This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Read Current Data with NI DAQ Hardware

Updated Jun 2, 2022

Reported In

Hardware

  • USB-6218

Software

  • LabVIEW Base
  • LabVIEW Full

Driver

  • NI-DAQmx

Other

Windows 7

Issue Details

How do I acquire current data with NI DAQ Hardware? I have the USB-6218 set up to read voltage data, but would now like to read current data.

Solution

To acquire current data with any NI DAQ device, we can set up the DAQmx Create Virtual Channel VI to read Current data, as shown below. To switch between types of DAQmx readings such as Voltage and Current, you can click on the dropdown menu of the DAQmx Create Virtual Channel VI and set it to read the desired data.
Please note that unlike voltage readings, current readings require a shunt resistor of known value to be placed in parallel with the DAQ device. This Current Measurement tutorial goes into detail on how current measurements can be made.

An alternative to programming with the DAQmx API yourself would be to use the DAQ Assistant, which allows you to set up current acquisition parameters using a graphical interface. Simply place a DAQ Assistant (Right Click Block Diagram >> Measurement I/O >> NI DAQmx >> DAQ Assistant) on the block diagram and follow the prompts to set up current readings (Acquire Signals >> Analog Input >> Current). You can then select the input channel of your hardware and set up other acquisition settings such as the Max and Min of your current readings. Once you hit 'OK', the DAQ Assistant will output a data array as shown below. Run the LabVIEW program to obtain data from the DAQ Assistant.

Additional Information

Shipping examples for current readings can be found in LabVIEW under Help >> Find Examples and searching for the keyword 'Current'.