| Data Acquisition Toolbox | ![]() |
Syntax
Arguments
obj |
A digital I/O object. |
obj.Line(index) |
One or more lines contained by obj. |
data |
A decimal value or binary vector. |
Description
writes putvalue(obj,data)
data to the hardware lines contained by the digital I/O object obj.
writes putvalue(obj.Line(index),data)
data to the hardware lines specified by obj.Line(index).
More About Writing Values to Lines
data as either a decimal value or a binary vector. A binary vector (or binvec) 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 binary vector [1 1 1 0 1].
obj contains lines from a port-configurable device, then all lines will be written to even if they are not contained by the device object.
Example
Create the digital I/O object dio and add four output lines to it.
Write the value 8 as a decimal value and as a binary vector.
| putsample | save | ![]() |