« Close

Datasheets and User Guides

App Notes

Software & Driver


Configuring & Reading a Thermocouple

T-series devices have various configurable features as part of the Analog Input Extended Feature (AIN-EF) system. The following example demonstrates how to configure and read a thermocouple input in the Kipling Register Matrix.

1. First connect the thermocouple between AIN0 and GND. In Kipling navigate to the Register Matrix page and type "ain0" in the search bar.


2. Add the registers config-a, index, and read-a to the active register list.  Note that Kipling does have special high-level support for AIN-EF configuration on the Analog Inputs tab, but for the purpose of this tutorial we are using the Register Matrix instead.


3. Configure the thermocouple input by writing the following values to each of the pinned registers.
We write a 1 to config-a so that the output is in deg C


4. The AIN0_EF_READ_A register should be outputting the scaled temperature value in degC.


5.  To save the configuration, so the AIN-EF thermocouple feature will be configured at boot-up, go to the Power-Up Defaults tab and click "Configure Power-up Defaults". Make sure that "Current Device Settings" option is selected.  This is suggested if using LJLogM or LJStreamM, or other simple polling programs, but not needed if your software will do the configuration.


Reading a Thermocouple Input in LJLogM

Once the AIN extended feature is configured (above), you can read AIN0_EF_READ_A using any row in LJLogM.


Reading a Thermocouple Input in LJStreamM

AIN Extended Features are not supported in Stream mode. LJStreamM cannot read thermocouple inputs while streaming.


Reading a Thermocouple in DAQFactory

To configure a thermocouple input you can use steps 1-5 above or write AIN0_EF_INDEX = 21 (for Type-J) and AIN0_EF_CONFIG_A = 1 (for deg C) in DAQFactory. See "Device Configuration" on the DAQFactory for LJM page.
To read the temperature look in the AIN0_EF_READ_A register. See "Linking LabJack Inputs/Outputs to DAQFactory Channels" on the DAQFactory for LJM page.


Reading a Thermocouple in Your Program

Use steps 1-5 above to configure, or write the desired configuration registers at the start of your program with a couple calls to eWriteName or a single call to eWriteNames.

To get a temperature reading read the register AIN0_EF_READ_A with a call to eReadName.