Example Code

Thermistor Measurement with NI-9219

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • Data Acquisition (DAQ)


  • LabVIEW


  • NI DAQmx

Code and Documents


Demonstrates on acquiring thermistor measurement with NI-9219.

Since the NI-9219 is a viable option for thermistor readings but does not support thermistor tasks, this code shows one way to get the thermistor measurements using the NI-9219. This VI utilizes a resistance task to acquire data from the 2-wire thermistor using internal excitation.  
Then, it converts the resistances to a voltage by multiplying the values by the excitation current, to ensure the correct values are passed into Convert Thermistor Reading.vi.


  1. LabVIEW 2012 or compatible.
  2. NI-DAQmx 15.5.1 or compatible.
  3. C Series Universal Analog Input Module : NI-9219


  1. Set all the control values on the front panel.
  2. Run this VI.


Block Diagram Steps:

  1. Creates a task and adds virtual channels to that task if you specify them in the global virtual channels input.
  2. Creates channels to measure resistance.
  3. Sets the sample clock with number of samples to acquire, sample mode and sampling rate.
  4. By wiring -1 to number of samples per channel terminal, NI-DAQmx determines how many samples to read based on if the task acquires samples continuously or acquires a finite number of samples. The output of the task is resistance measurements with an array of waveform data type.  The multiplication by the excitation current converts the resistances to voltage so that the correct values are passed into Convert Thermistor Reading.vi.
  5. Converts a thermistor voltage into a temperature.


**This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.