User manual
Chapter 5 Transducer Conversion Functions
NI-DAQ User Manual for PC Compatibles 5-10 ni.com
CJCTemp is the temperature in Celsius that NI-DAQ uses for
cold-junction compensation of the thermocouple temperature. If you are
using SCXI, most likely this is the temperature that NI-DAQ read from the
temperature sensor on the SCXI terminal block. The AMUX-64T also has
a temperature sensor that you can use for this purpose.
The TempScale integer indicates in which temperature unit you want your
return values to be. Constant definitions for each temperature scale are
shown in the conversion header file.
1: Celsius
2: Fahrenheit
3: Kelvin
4: Rankine
The
Thermocouple_Convert
routine has two remaining
parameters—TCVolts is the voltage that NI-DAQ read from the
thermocouple, and TCTemp is the return temperature value.
The
Thermocouple_Buf_Convert
routine has three remaining
parameters—numPts is the number of voltage points to convert,
TCVoltBuf is the array that contains the voltages that NI-DAQ read
from the thermocouple, and TCTempBuf is the return array that contains
the temperatures.
Using This Function
These routines convert TCVolts (or each element of TCVoltBuf)intoa
corresponding temperature after performing the necessary cold-junction
compensation. Cold-junction compensation is done by converting
CJCTemp into an equivalent thermocouple voltage and adding it to
TCVolts. The actual temperature-to-voltage conversion is done by
choosing the appropriate reference equation that characterizes the correct
temperature subrange for the specific TCType. The valid temperature
range for a given TCType is divided into several subranges with each
subrange characterized by a reference equation. The computed voltage
is then added to TCVolts to perform the cold-junction correction. The
conversion of TCVolts into a corresponding temperature is done by using
inverse equations that are specified for a given TCType for different
subranges. These inverse equations have an error tolerance as shown in
Table 5-1. All the reference equations and inverse equations used in
these routines are from NIST Monograph 175.










