Cold Junction Compensation (CJC) on DAQ Hardware Without Built in CJC

Updated May 15, 2023



  • CompactDAQ Chassis
  • Temperature Input Device
  • NI-9213
  • NI-9217


  • Measurement & Automation Explorer (MAX)
  • LabVIEW

  • I am trying to set up cold junction compensation (CJC) on my module.  It does not have built in CJC.  Is such a setup possible?  If so, how do I do it?
  • I'm trying to measure temperature with a module not designed for temperature measurement.  As such I need to set up CJC manually.  How to I do it?
  • I want to use an external CJC channel rather than the built in one. How do I do this?

To use the cold junction compensation (CJC) on DAQ hardware without the built in CJC apply one of the following options:

Option A: Use the NI MAX to configure the CJC

  1. Open NI MAX, and create a task for your DAQ device(s).
  2. Add all channels that you wish to read from to this task, including the one that has the sensor that will provide the CJC.
  3. Right click on the channel that will serve as CJC source and click on Change to Global.
  4. Under CJC Source, choose Channel
  5. Open the CJC Channel drop-down and pick the channel that you would like to use as the CJC source.. 
  6. Run the task.

Option B:Use LabVIEW to configure the CJC:
  1. Open the block diagram of your LabVIEW VI
  2. Add a DAQmx Create Virtual Channel VI to your code and choose the option Analog Input->Temperature->Thermocouple
  3. Configure the VI:
    1. Configure your settings.
    2. Choose the CJC source "Channel"
    3. Right click on the CJC channel input and chose create constant.  Open the dropdown-menu and click on Browse and then on Create New->Max Channel
    4. Configure this channel through clicking on Acquire Signals->Analog Input->Temperature and choose your kind of temperature sensor. Choose then the physical channel to which this sensor is connected to and enter a name for the Global Virtual NI DAQmx Channel. Then click Finish and configure fewer settings for your sensor like the unit. After confirm with OK you can choose this channel as CJC channel for your thermocouple. 

Additional Information

For your measurement you are using a second temperature sensor to define the temperature you need for cold junction compensation of your thermocouple. 
If you are interested in this acquired data you may think about to save them as well and add a second Create Virtual Channel VI to your code. If you try this you will get the Error -200072 in My NI DAQmx Task.