DAQmx Task with Multiple Terminal Configurations

Updated May 11, 2023

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Driver

  • NI-DAQmx

Issue Details

Is it possible to have a single DAQmx task which combines both Differential and Single-Ended Measurements?

Solution

Option 1: Using Single DAQmx Create Virtual Channel VIs for each Channel

To do this you need to call the DAQmx Create Virtual Channel VI multiple times for each configuration. Using this method, you can combine different input terminal configurations and measurement types (thermocouples, strain gauges, etc...) within a single task as shown below.
Option 2: Using a For Loop to Iterate through Many Channels

To do this you need to create a for loop and call the DAQmx Create Virtual Channel within it, wiring the task in and task out terminals to a shift register. Then, you need to create arrays with the different configurations for each one of the channels (maximum and minimum values, input terminal configuration, etc) and wire them to the corresponding terminals. If the channels are specified as a range of channels for example Dev1/ai0:Dev1/ai4, you can use the DAQmx Unflatten Channel String VI to convert the range of channels to an array of them and wire it to the physical channels terminal.

Additional Information

Terminal Input Configuration can also be changed with a property node .