ReferenceDevice driversLabJackRead task

LabJack read task

Learn how to acquire data from LabJack devices with Synnax.

This task follows the standard task lifecycle.

Task configuration reference

Parameter Type Required Default Description
device string - Key of the LabJack device
sample_rate number 10 Samples per second (Hz)
stream_rate number 5 Rate data is streamed to Synnax (Hz), must be ≤ sample_rate
channels array - List of input channel configurations

Channel types reference

Analog input (analog)

Reads analog voltage from a specified input terminal. Supports single-ended and differential configurations.

Parameter Type Required Default Description
channel number - Synnax channel key
port string - Port location (e.g., AIN0, AIN1)
range number 10.0 Voltage range (±range volts)
neg_chan number 199 Negative channel for differential measurements (199 = single-ended/GND)
scale object - Custom scaling applied to the reading

Thermocouple (thermocouple)

Reads temperature from a thermocouple with cold junction compensation (CJC).

Performance note -> Thermocouple channels use LabJack’s built-in thermocouple features, which reduce the maximum reliable sample rate compared to tasks with only analog or digital inputs.

Parameter Type Required Default Description
channel number - Synnax channel key
port string - AIN port the positive lead is wired to (e.g., AIN0, AIN1)
thermocouple_type enum K B, E, J, K, N, R, S, T, C
units enum K Temperature units (K, C, F)
cjc_source string TEMPERATURE_DEVICE_K CJC source: TEMPERATURE_DEVICE_K, TEMPERATURE_AIR_K, or AIN#
cjc_slope number 1.0 CJC voltage to temperature slope (K/V)
cjc_offset number 0.0 CJC temperature offset (K)
neg_chan number 199 Negative channel for differential measurements (199 = single-ended/GND)
scale object - Custom scaling applied to the reading

CJC configuration examples:

  • Device temp sensor -> cjc_source="TEMPERATURE_DEVICE_K", cjc_slope=1.0, cjc_offset=0.0
  • LM34 sensor -> cjc_source="AIN1", cjc_slope=55.56, cjc_offset=255.37

Digital input (digital)

Reads digital state (0 or 1) from a specified digital I/O line.

Parameter Type Required Default Description
channel number - Synnax channel key
port string - Port location (e.g., DIO4, FIO5)

Important rules

  • Thermocouple performance -> Thermocouple channels lower the maximum sample rate because LJM processes them outside the stream.
  • Stream rate -> For sample rates under 50 Hz, set the stream rate equal to the sample rate. Above that, keep the stream rate under 50 Hz.

How-to