ReferenceDriverLabJackRead Task

LabJack Read Task

Learn how to acquire data from LabJack devices with Synnax.

For task lifecycle management, see the Task Basics page.

Task Configuration Reference

ParameterTypeRequiredDefaultDescription
namestringYes-Human-readable task name
sample_ratenumberYes-Samples per second (Hz)
stream_ratenumberNosample_rateRate data is streamed to Synnax (Hz), must be ≤ sample_rate
data_savingbooleanNofalseEnable permanent storage in Synnax
auto_startbooleanNofalseAutomatically start task after configuration
channelsarrayYes-List of input channel configurations

Channel Types Reference

Analog Input (AI)

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

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
portstringYes-Port location (e.g., AIN0, AIN1)
rangenumberNo10.0Voltage range (±range volts)
neg_channumberNo199Negative channel for differential measurements (199 = single-ended/GND)
pos_channumberNo0Positive channel number (e.g., 0 for AIN0)

Thermocouple (TC)

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.

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
portstringYes-Port location (e.g., AIN0, AIN1)
thermocouple_typeenumYes-B, E, J, K, N, R, S, T, C
unitsenumNoCTemperature units (K, C, F)
cjc_sourcestringNoTEMPERATURE_DEVICE_KCJC source: TEMPERATURE_DEVICE_K, TEMPERATURE_AIR_K, or AIN#
cjc_slopenumberNo1.0CJC voltage to temperature slope (K/V)
cjc_offsetnumberNo0.0CJC temperature offset (K)
neg_channumberNo199Negative channel for differential measurements (199 = single-ended/GND)
pos_channumberNo0Positive channel number (e.g., 0 for AIN0)

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 (DI)

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

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
portstringYes-Port location (e.g., DIO4, FIO5)

Important Rules

  • Sample rates: All channels in a task sample at the same rate. Create separate tasks for different rates.
  • Thermocouple performance: Tasks with thermocouple channels have reduced maximum sample rates due to LJM thermocouple processing.
  • One running task per channel: A channel can only receive live data from one task at a time.
  • Stream rate optimization: For low-rate tasks (< 50 Hz), set the stream rate to the sample rate. For high-rate tasks, keep stream rate less than 50 Hz for better performance.

How-To

Console

Python

TypeScript