Indicate parent (device object) of channel or line
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.
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
You can treat this copy like any other device object. For example,
you can configure property values, add channels or lines to it, and
AI, AO, per channel; DIO, per line
Read-only when running
The value is defined when channels or lines are added to the device object.
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
ans = 1