In order to programmatically find all the physical channels associated with your DAQmx Task, you can use the DAQmx Channel Property Node.This can be done by performing the following steps:
- Place a DAQmx Task property node on the block diagram to return an array of virtual channels associated with your task.
- Place a For Loop on the block diagram to auto index the returned channels.
- Place a DAQmx Channel property node within the For Loop and select the Active Channels property.
- Pass the virtual channel names one by one to the DAQmx Channel property node to set the Active Channels (ActiveChans) property.
- Wire the Physical Channel Name (PhysicalChanName) output property to return the channel name.
- Auto-index the array to build an array of channel names.
An example of these steps can be found below.
Additional Information
If using a DSA module like the NI-9237, 9234 or 9225 you need to specify the timing source to be able to retrieve the information since these modules do not support software timing.