Documentation Center

  • Trial Software
  • Product Updates

Port

Specify port ID

Description

    Note:   You cannot use the legacy interface on 64–bit MATLAB®. See Session-Based Interface to acquire and generate data.

Hardware lines are often grouped together as a port. Digital I/O subsystems can consist of multiple ports and typically have eight lines per port. When adding hardware lines to a digital I/O object with addline, you can specify the port ID. The port ID is stored in the Port property. If the port ID is not specified, then the smallest port ID value is automatically used.

Characteristics

Usage

DIO, per line

Access

Read-only

Data type

Double

Read-only when running

N/A

Values

The port ID is defined when line are added to the digital I/O object with addline.

Examples

Create the digital I/O object dio and add two hardware channels to it.

dio = digitalio('nidaq','Dev1');
addline(dio,0:1,'In');

You can use Port property to return the port IDs associated with the lines contained by dio.

dio.Line.Port
ans = 
    [0]
    [0]

See Also

Functions

addline

Was this topic helpful?