Accessing the On-Board Temperature Sensor of a DAQ Device

Updated Apr 21, 2023

Reported In

Hardware

  • Multifunction I/O Device

Software

  • LabVIEW
  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Driver

  • NI-DAQmx
  • Traditional NI-DAQ

Programming Language

  • C

Issue Details

Can I read the actual internal temperature? How can I programmatically read the on-board temperature sensor of a multifunction (MIO) data acquisition (DAQ) device?

Solution

Many Multifunction DAQ devices (M Series (62xx), E Series (60xxE), X Series (63xx) and Analog Output Series (67xx)) are equipped with an on-board temperature sensor that will read the temperature of the device. As a general rule, if you can see the device's temperature on the settings page of NI-MAX, then it can be accessed programmatically.

Note: Although you can see the temperature setting section in NI MAX most C Series Modules do not contain an on-board temperature sensor. 

This feature is important for calculating accuracy of DAQ operations and ensuring the device is operating within the operating temperature specification. The temperature is accessible as a device property or as an analogue input channel. 

 
  • DAQmx Temperature Sensor Property
Reading the temperature sensor as a device property returns a temperature value, but is available only with NI-DAQmx drivers. 
 
  • LabVIEW
In LabVIEW, you can access the device temperature using a property node. The DAQmx Calibration Info property node contains the DevTemp property. The property value returns the current temperature of the board as a Celsius value.

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
 
  • ANSI C
For text-based programming, there is a function that is equivalent to the LabVIEW function described above.  It returns the temperature read by the sensor in degrees Celsius.

int32 __CFUNC DAQmxGetCalDevTemp(const char deviceName[], float64 *data);

 

  • Temperature Sensor Channel (not supported by Analog Output Series)
Reading the sensor as an analog input channel can be done with both NI-DAQ and NI-DAQmx.  This will return the reading from the on-board temperature sensor as a voltage. 
 
  • Traditional NI-DAQ (Legacy)
If you are using NI-DAQ you may use the channel string _DevTemp for any DAQ functions (NI-DAQ or LabVIEW) that require an analog input channel string. As a demonstration, launch Measurement & Automation Explorer (MAX), right-click on the DAQ device and select Test PanelOn the Analog Input tab, type _DevTemp in the Channel field 
 
  • NI-DAQmx
If you are using NI-DAQmx you may select the DevX/_board_temp_sensor physical channel, where DevX is your device name.  As an example, launch MAX, right-click on a DAQ device and select Test Panel. On the Analog Input tab, select DevX/_board_temp_sensor from the pull-down menu in the Channel field, and ensure that you have selected RSE as the input configuration. 
 

You can compute temperature from the voltage that is returned as follows:

  • For VXI MIO boards,  = ((V × 100) - 32)×5÷9   [°c]
  • For all other supported E-Series, M-Series, and X-Series devices, T = -(V × 100) - 50   [°c]
 

Additional Information

The device will not operate correctly if it exceeds its recommended operating temperature that is listed in the user manual.