Data Acquisition Toolbox | ![]() ![]() |
Contain hardware lines added to the device object
Description
Line
is a vector of all the hardware lines contained by a digital I/O (DIO) object. Because a newly created DIO object does not contain hardware lines, Line
is initially an empty vector. The size of Line
increases as lines are added with the addline
function, and decreases as lines are removed with the delete
function.
You can use Line
to reference one or more individual lines. To reference a line, you must know its MATLAB index and hardware ID. The MATLAB index is given by the Index
property, while the hardware ID is given by the HwLine
property.
Characteristics
Usage |
DIO, Common |
Access |
Read/write |
Data type |
Vector of lines |
Read-only when running |
Yes |
Values
Values are automatically defined when lines are added to the DIO object with the addline
function. The default value is an empty column vector.
Example
Create the digital I/O object dio
and add four input lines to it.
To set a property value for the first line added (ID = 0), you can reference the line by its index using the Line
property.
Functions
Properties
![]() | InputType | LineName | ![]() |