HwLine - Specify hardware line ID

Description

All lines contained by a digital I/O object have a hardware ID and an associated MATLAB® index. The hardware ID is given by HwLine and the MATLAB index is given by the Index property. The HwLine value is defined when hardware lines are added to a digital I/O object with the addline function.

The beginning line ID value depends on the hardware device. For National Instruments® hardware, line IDs are zero-based (begin at zero).

Characteristics

Usage

DIO, Line

Access

Read/write

Data type

Double

Read-only when running

Yes

Values

Values are automatically defined when lines are added to the digital I/O object with the addline function. The default value is one.

Examples

Suppose you create the digital I/O object dio and add four hardware lines to it.

dio = digitalio('nidaq','Dev1');
addline(dio,0:3,'out');

addline automatically assigns the indices 1-4 to these hardware lines. You can swap the hardware lines associated with index 1 and index 2 with HwLine.

dio.Line(1).HwLine = 1;
dio.Line(2).HwLine = 0;

See Also

Functions

addline

Properties

Line, Index

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS