« Close

Datasheets and User Guides

App Notes

Software & Driver

 

2.6.2 - TCVoltsToTemp

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 are (alphabetically): 
B = 6001
C = 6009
E = 6002
J = 6003
K = 6004
N = 6005
R = 6006
S = 6007
T = 6008
TCVolts [in]
The voltage reported by the thermocouple.
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.

Examples

[C/C++] 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);