Documentation Center

  • Trial Software
  • Product Updates

Parent

Indicate parent (device object) of channel or line

Description

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

The parent of a channel (line) is defined as the device object that contains the channel (line).

You can create a copy of the device object containing a particular channel or line by returning the value of Parent. You can treat this copy like any other device object. For example, you can configure property values, add channels or lines to it, and so on.

Characteristics

Usage

AI, AO, per channel; DIO, per line

Access

Read-only

Data type

Device object

Read-only when running

N/A

Values

The value is defined when channels or lines are added to the device object.

Examples

Create the analog input object ai for a National Instruments® board and add three hardware channels to it.

ai = analoginput('nidaq','Dev1');
chans = addchannel(ai,0:2);

To return the parent for channel 2:

parent = ai.Channel(2).Parent;

parent is an exact copy of ai.

isequal(ai,parent)
ans =
     1
Was this topic helpful?