How Can I Programmatically Find All the Physical Channels for a DAQmx Task?

Updated Nov 8, 2019

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

How can I programmatically list all the physical channels associated with my DAQmx task in LabVIEW?
 

Solution

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:
  1. Place a DAQmx Task property node on the block diagram to return an array of virtual channels associated with your task.
  2. Place a For Loop on the block diagram to auto index the returned channels.
  3. Place a DAQmx Channel property node within the For Loop and select the Active Channels property.
  4. Pass the virtual channel names one by one to the DAQmx Channel property node to set the Active Channels (ActiveChans) property.
  5. Wire the Physical Channel Name (PhysicalChanName) output property to return the channel name.
  6. 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.

WAS THIS ARTICLE HELPFUL?

Not Helpful