Setting Different Analog Input and Output Voltage Levels for Each DAQmx Channel

Updated Feb 3, 2022

Environment

Software

  • LabVIEW

Driver

  • NI-DAQmx

The setting of different analogue input voltage levels for each DAQmx channel can be done in NI Measurement & Automation Explorer (MAX) or in LabVIEW. This article is a step-by-step guide on how to do so. This will require Data Acquisition Using NI-DAQmx and LabVIEW Course or equivalent experience. 

Using NI MAX

  1. Open NI MAX and select your device from the Devices and Interfaces drop-down menu.
  2. Click on Create Task... from the toolbar at the top of the window. Then, Acquire Signals>>Analog Input>>Voltage. 
  3. Select the device channels to be included in the analogue input task by clicking the first channel, holding the shift key and then clicking the last channel in your list. It is also possible to select them individually by holding the control key and then selecting the channels one by one. Click Next >.
  1. Name the voltage task and click Finish.
  2. Configure the individual voltage ranges in the configuration panel by clicking each channel and setting the signal input range, as many times as required. 


Note: For DAQmx tasks configured in NI MAX, NI recommends the creation of a backup of this configuration for later use and changes. Please, refer to this article for guidance to Export/Import the System Configuration in Measurement & Automation Explorer (MAX).

In LabVIEW, the task can be directly wired to DAQmx Timing VI (after being dragged and dropped from NI MAX to the block diagram) as shown below. The DAQmx Create Task and DAQmx Create Virtual Channel VIs are not necessary because the task and channels have already been created in MAX.

 

    Using LabVIEW:

    In LabVIEW, the assignment of different input voltage ranges to analogue input channels can be done by using multiple DAQmx Create Virtual Channels VIs to create different channels and set different analogue input voltages for each channel or the DAQ Assistant. 

    Using Create Virtual Channel VI:

    1. Place a DAQmx Create Virtual Channel VI for each channel to be set at the same analogue input range. To select multiple channels for one VI, use channel expansion
    2. Connect relevant terminals for the physical channels and other settings. To set the lower boundary of the analogue input range, wire a double value to the minimum value input terminal. To set the upper boundary of the analogue input range, wire a double value to the maximum value input terminal. 
    An example of this is shown below.


    Using DAQ Assistant:

    1. Place a DAQ Assistant in LabVIEW Block Diagram.
    2. Once placed, it will begin initializing and a Create New... window will pop up. 
    3. The configuration process is the same as using NI MAX. Please refer to steps 3-5 of the Using NI MAX section of this article.
    In LabVIEW, the DAQ Assistant can be used by itself or to automatically generate code.

    All the steps presented before can also be used for setting different voltage levels in voltage output applications when selecting voltage output tasks.

    Note: Some C Series cards have defined input voltage ranges, such as +10V, +5V, +2V and +1V. If a value for minimum and maximum are something different than these, the NI-DAQmx driver will coerce the value up to the nearest voltage range that can fully capture the input.