MCCDriver#

class MCCDriver(device_id: str, buffer_multiplier: int = 2)[source]#

Bases: DAQDriverBase

MCC (Universal Library / mcculw) DAQ driver.

Initialize the MCC DAQ driver.

Parameters:
  • device_id – Device unique ID, optionally with a board number as "<serial>:<board_number>" (e.g. "344371:0"). Defaults to board 0.

  • buffer_multiplier – Circular-buffer size relative to per-fetch size. Higher values tolerate more jitter at the cost of memory.

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 MCC device.

close_relay

Close the relay (connect the circuit).

configure_ai_channel

Deprecated: use configure_ai_voltage_channel.

configure_ai_current_channel

Configure a current input channel on the MCC DAQ device.

configure_ai_hw_timing

Configure hardware timing for the specified channels.

configure_ai_thermocouple_channel

Configure a thermocouple input channel on the MCC DAQ device.

configure_ai_voltage_channel

Configure a voltage analog input channel on the MCC DAQ 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 analog output channel on the MCC DAQ device.

configure_di_line_channel

Parse DigitalPortType/#, configure the bit for DI, and register the line.

configure_di_port_channel

Parse DigitalPortType, configure the port for DI, and register the port.

configure_do_line_channel

Parse DigitalPortType/#, configure the bit for DO, and register the line.

configure_do_port_channel

Parse DigitalPortType, configure the port for DO, 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 samples are available, then drain the circular buffer.

get_actual_sample_rate

Actual hardware sample rate achieved after start().

get_info

Device capabilities snapshot captured at open().

open

Connect to MCC device.

open_relay

Open the relay (disconnect the circuit).

read_analog

Read from analog input channels; thermocouple channels return temperature in their configured unit.

read_digital_line

Read 0/1 from a single DI line (DigitalLineChannel).

read_digital_port

Read an N-bit value from a DI port (bit i reflects line i).

start

Start the MCC DAQ device for hw timed data acquisition.

stop

Stop the MCC DAQ device.

write_analog_value

Write an analog value to an analog output channel.

write_digital_line

Write 0/1 to a single DO line (DigitalLineChannel).

write_digital_port

Write an N-bit value to a DO port (bit i drives line i).