LabJackTSeriesDriver#

class LabJackTSeriesDriver(device_id: str, stream_buffer_bytes: int = 0)[source]#

Bases: DAQDriverBase

LabJack T-series DAQ driver (T4/T7/T8 via the LJM library).

Construct the driver.

Parameters:
  • device_id – Device serial number, or “ANY” for the first device found.

  • stream_buffer_bytes – Device-side stream buffer size, always written when AI hardware timing is configured so no value carries over from an earlier session. 0 selects the device’s own default. Must be a power of 2 and the max is 262144. Setting this prevents the device from dropping scans at high sample rates, which LJM reports as -9999 sample values.

Attributes

ai_channels

Frozen snapshot of configured AI channels, keyed by alias.

ai_hw_timing_config

ao_channels

Frozen snapshot of configured AO channels, keyed by alias.

ao_hw_timing_config

channels

Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays).

di_channels

Frozen snapshot of configured DI channels, keyed by alias.

di_hw_timing_config

do_channels

Frozen snapshot of configured DO channels, keyed by alias.

do_hw_timing_config

relay_channels

Frozen snapshot of configured relay channels, keyed by alias.

points_in_buffer

Methods

close

Disconnect from LabJack device.

close_relay

Close the relay (connect the circuit).

configure_ai_channel

Deprecated: use configure_ai_voltage_channel.

configure_ai_current_channel

Register an AI current channel.

configure_ai_hw_timing

Configure hardware timing for the specified channels.

configure_ai_thermocouple_channel

Configure a thermocouple ai channel; volts convert to temperature in the channel's unit on read.

configure_ai_voltage_channel

Configure a voltage ai channel on the LabJack device.

configure_ao_channel

Deprecated: use configure_ao_voltage_channel.

configure_ao_current_channel

Register an AO current channel.

configure_ao_voltage_channel

Configure a voltage AO channel on the LabJack device.

configure_di_line_channel

Parse, program, and register a DI line channel.

configure_di_port_channel

Parse, program, and register a DI port channel.

configure_do_line_channel

Parse, program, and register a DO line channel.

configure_do_port_channel

Parse, program, and register a DO port channel.

define_relay_channel

Build a RelayChannel for physical_channel (e.g. "3101" = slot 3 / channel 101).

fetch_analog

Block until samples_per_channel new AI samples are available, then return them.

get_actual_sample_rate

Actual hardware sample rate achieved after start().

get_info

Get the LabJack device info.

open

Connect to LabJack device.

open_relay

Open the relay (disconnect the circuit).

read_analog

Read from analog input channels.

read_digital_line

Sample a single DI line.

read_digital_port

Sample a multi-line DI port.

start

Start the DAQ device for hw timed data acquisition.

stop

Stop the DAQ device.

write_analog_value

Write value to AO channel.

write_digital_line

Drive a single DO line.

write_digital_port

Drive a multi-line DO port.