| Data Acquisition Toolbox | ![]() |
Syntax
Arguments
obj |
A digital I/O object. |
obj.Line(index) |
One or more lines contained by obj. |
out |
A binary vector. |
Description
returns the current value from all lines contained by out = getvalue(obj)
obj as a binary vector to out.
returns the current value from the lines specified by out = getvalue(obj.Line(index))
obj.Line(index).
More About Reading Values from Lines
out is returned as a binary vector (binvec). A binvec value is constructed with the least significant bit (LSB) in the first column and the most significant bit (MSB) in the last column. For example, the decimal number 23 is written as the binvec value [1 1 1 0 1].
binvec2dec function.
obj contains lines from a port-configurable device, the data acquisition engine will automatically read from all the lines even if they are not contained by the device object.
Example
Create the digital I/O object dio and add eight input lines to it.
To return the current values from all lines contained by dio as a binvec value:
Functions
| getsample | ischannel | ![]() |