TCVoltsToTemp [LJM User's Guide]
Converts thermocouple voltage to temperature.
Syntax
LJM_ERROR_RETURN LJM_TCVoltsToTemp(
int TCType,
double TCVolts,
double CJTempK,
double * pTCTempK)
Parameters
TCType [in]
The thermocouple type. Constants and and their valid temperature ranges are (alphabetically):
B = 6001
, 250 to 1820 °CC = 6009
, 0 to 2319 °CE = 6002
, -200 to 1000 °CJ = 6003
, -210 to 1200 °CK = 6004
, -200 to 1372 °CN = 6005
, -200 to 1300 °CR = 6006
, -50 to 1768 °CS = 6007
, -50 to 1768 °CT = 6008
, -200 to 400 °C
TCVolts [in]
The voltage reported by the thermocouple in volts.
CJTempK [in]
The cold-junction temperature in degrees Kelvin.
pTCTempK [out]
The calculated thermocouple temperature in degrees Kelvin.
Returns
LJM errorcodes or 0
for no error.
Remarks
Use this function to easily calculate thermocouple temperatures from voltage readings. When thermocouples are connected to the AIN0-AIN3
screw terminals, the cold-junction temperature can be obtained from AIN14
, which maps to a nearby temp sensor inside most LabJack devices.
Example
Get the temperature of a K type thermocouple.
int LJMError;
double TCTempKelvin;
LJMError = LJM_TCVoltsToTemp(6004, 0.00134, 299.039, &TCTempKelvin);
printf("%f\n", TCTempKelvin);