How to Get Channel Properties From a DAQmx Task in LabVIEW

Updated Sep 8, 2020

Environment

Software

  • LabVIEW

Driver

  • NI-DAQmx

How can I get channel properties (e.g. units, max and min value, measurement type, etc.) of a DAQmx task during runtime in LabVIEW?

This article assumes that you already have a DAQmx task that was defined using either NI MAX or LabVIEW. 

1. Create a DAQmx Channel property node by going to Measurement I/O >> NI DAQmx >> Channel Node and placing it into the block diagram.

2. Wire the DAQmx task that you have already created directly to the reference terminal.

3. Left-click on the property node and select Active Channels (if subset), this is going to allow you to wire in the name of the channel you want to get the properties from.

4. Drag down the bottom border of the property node to be able to select which property you want to read from the active channel.

5. Select the property that you want to read by left-clicking on it and verify that it is set to read. If it is set to write, then right-click on it and select Change To >> Read.
 

The resulting VI should look similar to the one below which intends to get the units from a analog output voltage channel using an NI MAX defined task: