From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview:
Demonstrates on acquiring thermistor measurement with NI-9219.

Description:
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.

Requirements:

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


Instructions:

  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.

FP.PNGBD.PNG

**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.

Comments
samantha.arato
Member
Member
on