NIDAQDriver#

class NIDAQDriver(device_id: str)[source]#

Bases: DAQDriverBase

NI-DAQmx DAQ driver.

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

Close every DAQmx task this driver owns.

close_relay

Close the relay (connect the circuit).

configure_ai_channel

Deprecated: use configure_ai_voltage_channel.

configure_ai_current_channel

Configure an analog current input channel on the NI device.

configure_ai_hw_timing

Configure hardware timing for the specified channels.

configure_ai_thermocouple_channel

Configure a thermocouple input channel on the NI device; DAQmx reads cjc_temp in unit.

configure_ai_voltage_channel

Configure an analog voltage input channel on the NI device.

configure_ao_channel

Deprecated: use configure_ao_voltage_channel.

configure_ao_current_channel

Configure an analog current output channel on the NI device.

configure_ao_voltage_channel

Configure an analog voltage output channel on the NI device.

configure_di_line_channel

Parse DevN/portM/lineP, add as CHAN_PER_LINE to the shared DI line task, and register the line.

configure_di_port_channel

Parse DevN/portM, add as CHAN_FOR_ALL_LINES to a dedicated DI task, and register the port.

configure_do_line_channel

Parse DevN/portM/lineP, add as CHAN_PER_LINE to the shared DO line task, and register the line.

configure_do_port_channel

Parse DevN/portM, add as CHAN_FOR_ALL_LINES to a dedicated DO task, and register the port.

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

open

NI-DAQmx has no explicit connect — verifies the device is present in niSystem.local().

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 DI port as one N-bit integer; bit i reflects line i.

start

Start the DAQ device for data acquisition.

stop

Stop the DAQ device.

write_analog_value

Write value to AO channel.

write_digital_line

Write to digital output channels.

write_digital_port

Drive a DO port as one N-bit integer; bit i controls line i.