How to Use Cold Junction Compensation (CJC) with SCXI Modules

Updated Jan 2, 2018

Reported In


  • NI-DAQmx



Issue Details

Where can I find more information about addressing and using cold junction compensation (CJC) with my SCXI modules?


To create a thermocouple task in LabVIEW that automatically applies CJC, see the following code snippet. Note that this only applies to modules or terminal blocks that include a CJC channel.


The terminal blocks mentioned below all have a single temperature sensor included, which enables you to do accurate CJC for thermocouple inputs, or to simply track the change in room temperature. This sensor will either be an IC sensor (like a diode) or for some terminal blocks, a thermistor. The temperature sensor on the terminal block can be accessed by the SCXI module connected to the sensor, either in multiplexed mode (mtemp) or in direct mode (dtemp).

For each terminal block, you can choose which mode to access the sensor by setting the mtemp/dtemp jumper on the terminal block. For multiple SCXI modules, you can measure the room temperature from the SCXI module physically connected to the DAQ board. Pass the voltage value on to the CJC Voltage input terminal of the ​Convert Thermocouple Reading .vi(Thermo Linear) to calculate the CJC temperatures for all the remaining modules. Examples ship with LabVIEW that demonstrate this method for a particular module (e.g., SCXI-1102 Thermocouple .vi).

Once the chassis, modules, and terminal blocks have been added to Measurement & Automation Explorer (MAX) for NI-DAQmx, cjtemp, mtemp, and dtemp can be read like any analog input channel. In LabVIEW and MAX, the channel string SCxMody/_cjTemp references the on-board CJC. Replace x with the corresponding chassis number and y with the corresponding module number. All of the modules and terminal blocks will use this string with the exception of the SCXI 1112. The SCXI 1112 channel string will be listed as SCxMody/_cjTempz, where z is the corresponding channel.


Additional Information

Traditional NI-DAQ:
The following tables list the relevant information for addressing an individual module/terminal block combination. Once you know which channel to address, you can specify it in the channel string in LabVIEW the same as any other SCXI channel, substituting the CJC channel name for the normal channel number: OB0!SC1!MD1!mtemp In most cases, the channel is addressed as channel "-1" for NI-DAQ function calls. Refer to the NI-DAQ Function Reference Manual for information on specific calls. For example, you can reference SCXI_Scan_Setup for instructions on how to address the CJC on the SCXI-1102. The code for the SCXI-1102 requires a line similar to the following one in order to address the built-in CJC sensor.

i16 piStartChans[1] = {0 + ND_CJ_TEMP};    //array listing the start channel on each module

The addition of the ND_CJ_TEMP constant to the normal starting channel for each module includes the CJC sensor as the first measurement in each scan. If you set up 4 measurements on a module, then you would get the CJC measurement plus 3 more measurements starting at channel 0.
Multiplexed CJC string
Multiplexed CJC
"_cjTemp""_cjTemp""_cjTempz" "_cjTemp" "_cjTemp" "_cjTemp" "_cjTemp"
*Can it be scanned?noyesyesnononoyes
Number of AI channels3232884168
Compatible terminal blocks (that have CJC)SCXI-1300
None usedSCXI-1320

Note: "Can it be scanned?" refers to the ability of a module to scan the CJC while scanning other analog input channels listed in a channel string. All of the modules can scan the CJC individually. Scanning the CJC and the analog inputs in one scan is a limitation of the hardware and not the drivers.
 SCXI-1300  SCXI-1303  SCXI-1320  SCXI-1321  SCXI-1322 SCXI-1327  SCXI-1328  
Thermistor / IC SensorICthermICICthermthermtherm
Number of AI channels32328/4 416 8/4 8/4
Compatible ModulesSCXI-1100
SCXI-1121 SCXI-1122SCXI-1120

Note: Thermistors at room temperature return approximately 1.20V, while the IC Sensor returns approximately 0.26V at room temperature.

All Modules:
With the exceptions of the SCXI-1102, SCXI-1112, and SCXI-1125, "mtemp" always routes the multiplexer on the SCXI module directly to the temperature sensor inputs. In a given scan, you can only access "mtemp." The scan cannot include any other channels on the module in the channel string. When using "dtemp," you can always scan other channels concurrently. Also, "dtemp" is never a valid channel string. Use the "Multiplexed CJC string" listed above for the particular SCXI module.

When the SCXI module is configured in parallel mode, each of the analog input lines on the DAQ board cabled to the SCXI chassis is routed directly to a single input line on the connected SCXI module. The analog input lines are not routed to any other modules. The temperature sensor (in dtemp mode) routes to one of the connected input channels directly. The sensor can also be accessed by using the parallel mode direct string call. Refer to your module documentation for further information.

"dtemp" works when the module is configured in multiplexed mode. The temperature sensor can still be scanned in direct mode along with other multiplexed channels on the SCXI module. However, the module must be directly cabled to the DAQ device, because the signal still routes in parallel to the on board channel.

There is no parallel mode access for the temperature sensor from the SCXI-1102. The signal from the sensor is always routed to a separate analog input line, regardless of whether "mtemp" or "dtemp" has been selected. The extra analog input line connected to your temperature sensor can only be accessed by addressing it as "cjtemp." Neither "mtemp" nor "dtemp" are valid channel strings for the module. However, the extra cjtemp channel can be scanned with any other multiplexed channels in the same channel string.

"dtemp", or DTS mode, works only when in RSE and NRSE mode. You must set jumper W41 to position 3. Additionally, for RSE and NRSE mode you must set jumper W46 to AB-R0 or AB-R2 respectively. 

SCXI-1120 itself:
W46 set to RoAB, and jumper W41 set between pins 2 and 3 (the two unmarked pins).

There is no mtemp/dtemp jumper on the SCXI-1122. The module's temperature sensor can only be addressed with "mtemp," since the SCXI-1122 routs all its channels through a Single A/D converter.


Not Helpful