Contain hardware lines added to device object
Note: You cannot use the legacy interface on 64-bit MATLAB®. See About the Session-Based Interface to acquire and generate data on a 64-bit MATLAB.
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,
initially an empty vector. The size of
as lines are added with the
addline function, and
decreases as lines are removed with the
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
while the hardware ID is given by the
Vector of lines
Read-only when running
Values are automatically defined when lines are added to the
DIO object with the
addline function. The default
value is an empty column vector.
Create the digital I/O object
dio and add
four input lines to it.
dio = digitalio('nidaq','Dev1'); addline(dio,0:3,'In');
To set a property value for the first line added (ID = 0), you
can reference the line by its index using the
line1 = dio.Line(1); line1.Direction = 'Out'