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

Updated Oct 21, 2020



  • 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 card not designed for temperature measurement.  As such I need to set up CJC manually.  How to I do it?
  • I am wanting 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 you can do one of the following options:

Option A: Use the NI MAX to configure the cjc

  1. Open NI MAX, and create a task on your DAQ device.
  2. Add multiple temperature measurements on the same task. 
  3. Choose the virtual channel you wish to implement CJC on.
    1. In the channel settings list, the CJC channel must be above the other channels you plan on using the CJC channel for. It would be best to have your CJC channel placed at the top of your list (see image).
  4. Under CJC Source, choose Channel
  5. Select the CJC Channel drop-down.  Your options here are other virtual channels on the task. This selected channel will be used to compensate the values of the active virtual channel selected in step 2.
  6. Be sure that the CJC channel is physically measuring the appropriate location.  It should measure the temperature at the connection between the thermocouple and the analog input for the main measurement channel.

Option B:Use LabVIEW to configure the cjc:
  1. Open the blockdiagramm 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. Choose maximum and minimum value
    2. Choose the physical channel on which your thermocouple (TC) is connected to
    3. Choose as temperature unit the one which fit with the unit of the cjc channel temperature unit (also have a look on point g.)
    4. Choose a thermocouple type
    5. Choose as cjc source "Channel"
    6. Create a new Global Virtual NI DAQmx Channel for the cjc channel by open the dropdown-menu and click on Browse and then on Create New->Max Channel
    7. 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.