Contain hardware lines added to device object
Note: You cannot use the legacy interface on 64-bit MATLAB®. See Working with 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, 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.
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 Line property.
line1 = dio.Line(1); line1.Direction = 'Out'