Keysight34980A#
- class Keysight34980A(
- visa_resource: str | VisaConfig,
- *,
- sync_system_clock: bool = True,
Bases:
DAQDriverBaseKeysight 34980A Multifunction Switch/Measure Unit.
Initialize the driver.
- Parameters:
visa_resource
VISA resource string or full
VisaConfig.sync_system_clock
Sync the instrument clock to host UTC on
open()so returned timestamps align with the host. Enabled by default.
Attributes
Frozen snapshot of configured AI channels, keyed by alias.
Frozen snapshot of configured AO channels, keyed by alias.
Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays).
Frozen snapshot of configured DI channels, keyed by alias.
Frozen snapshot of configured DO channels, keyed by alias.
Frozen snapshot of configured relay channels, keyed by alias.
Methods
Close every task/handle owned by the driver.
ROUTe:CLOSethe relay.Deprecated: use
configure_ai_voltage_channel.Register an AI current channel.
Configure
TRIG:SOUR TIMERat the configured sample period and infinite count.Register an AI thermocouple channel.
Configure an AI voltage channel:
CONF:VOLT:DCat computed range, then add toROUT:SCANand enable timestamps.Deprecated: implement
configure_ao_voltage_channelinstead.Register an AO current channel.
Register an AO voltage channel.
Parse
MNNN/B(slot/channel/bit), program the port for DI, and register the line.Parse
MNNN(slot/channel), program the port for DI, and register the port.Parse
MNNN/B(slot/channel/bit), program the port for DO, and register the line.Parse
MNNN(slot/channel), program the port for DO, and register the port.Build a
RelayChannelforphysical_channel(e.g."3101"= slot 3 / channel 101).Block until the buffer holds at least one full per-channel batch, then drain a channel-aligned chunk.
Actual hardware sample rate achieved after
start().Open the underlying transport (or verify the device is present, for handle-less SDKs).
ROUTe:OPENthe relay.Software-timed read of every configured AI channel.
Sample a single DI line.
Sample a DI port as one N-bit integer.
Enable timestamps and
INITthe scan.ABORtany pending scan.Write
valueto AOchannel.Drive a single DO line.
Drive a DO port as one N-bit integer.
- open()[source]#
Open the underlying transport (or verify the device is present, for handle-less SDKs).
- configure_ai_channel(
- channel: AnalogChannel,
Deprecated: use
configure_ai_voltage_channel.
- configure_ai_voltage_channel(
- channel: AnalogVoltageChannel,
Configure an AI voltage channel:
CONF:VOLT:DCat computed range, then add toROUT:SCANand enable timestamps.
- configure_ai_hw_timing(
- hw_timing_config: HWTimingConfig,
Configure
TRIG:SOUR TIMERat the configured sample period and infinite count.
- read_analog() KeysightData[source]#
Software-timed read of every configured AI channel.
Returns a vendor-specific payload that
_read_to_measurementsthen unpacks intoMeasurement``s. ``response.dtshould beNoneso the wrapper timestamps with wall-clock time.
- fetch_analog() KeysightData[source]#
Block until the buffer holds at least one full per-channel batch, then drain a channel-aligned chunk.
- configure_di_line_channel( )[source]#
Parse
MNNN/B(slot/channel/bit), program the port for DI, and register the line.
- configure_do_line_channel( )[source]#
Parse
MNNN/B(slot/channel/bit), program the port for DO, and register the line.
- configure_di_port_channel(
- physical_channel: str,
- logic: Logic,
- port_width: DigitalPortWidth,
- logic_level: float | None = None,
- alias: str | None = None,
Parse
MNNN(slot/channel), program the port for DI, and register the port.
- configure_do_port_channel(
- physical_channel: str,
- logic: Logic,
- port_width: DigitalPortWidth,
- logic_level: float | None = None,
- alias: str | None = None,
Parse
MNNN(slot/channel), program the port for DO, and register the port.
- write_digital_line(
- channel: DigitalChannel,
- data: int,
Drive a single DO line.
datais 0 or 1 (active-lowchannel.logicis handled in the driver).
- read_digital_line(
- channel: DigitalChannel,
Sample a single DI line. Returns 0 or 1 after applying
channel.logic.
- write_digital_port(
- channel: DigitalChannel,
- data: int,
Drive a DO port as one N-bit integer. Active-low is applied in hardware via CONF:DIG:POL.
- read_digital_port(
- channel: DigitalChannel,
Sample a DI port as one N-bit integer. Active-low is applied in hardware via CONF:DIG:POL.
- close_relay(channel: RelayChannel)[source]#
ROUTe:CLOSethe relay.
- open_relay(channel: RelayChannel)[source]#
ROUTe:OPENthe relay.
- property ai_channels: Mapping[str, AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel]#
Frozen snapshot of configured AI channels, keyed by alias.
- property ai_hw_timing_config: HWTimingConfig | None#
- property ao_channels: Mapping[str, AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel]#
Frozen snapshot of configured AO channels, keyed by alias.
- property ao_hw_timing_config: HWTimingConfig | None#
- property channels: tuple[DAQChannel, ...]#
Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays).
- configure_ai_current_channel(
- channel: AnalogCurrentChannel,
Register an AI current channel. Override if the driver supports analog current input.
- configure_ai_thermocouple_channel(
- channel: AnalogThermocoupleChannel,
Register an AI thermocouple channel. Override if the driver supports thermocouple input.
- configure_ao_channel(
- channel: AnalogChannel,
Deprecated: implement
configure_ao_voltage_channelinstead.
- configure_ao_current_channel(
- channel: AnalogCurrentChannel,
Register an AO current channel. Override if the driver supports analog current output.
- configure_ao_voltage_channel(
- channel: AnalogVoltageChannel,
Register an AO voltage channel. Override if the driver supports analog voltage output.
- define_relay_channel( ) RelayChannel#
Build a
RelayChannelforphysical_channel(e.g."3101"= slot 3 / channel 101).Default implementation suits the Keysight 34980A’s slot/channel addressing; override if the driver needs different parsing. Overrides must also record the resulting channel on
self._relay_channels.
- property di_channels: Mapping[str, DigitalChannel]#
Frozen snapshot of configured DI channels, keyed by alias.
- property di_hw_timing_config: HWTimingConfig | None#
- property do_channels: Mapping[str, DigitalChannel]#
Frozen snapshot of configured DO channels, keyed by alias.
- property do_hw_timing_config: HWTimingConfig | None#
- get_actual_sample_rate() float | None#
Actual hardware sample rate achieved after
start().Default returns
None(driver doesn’t know or hasn’t started). Override on drivers whose SDK reports the effective rate (NI, MCC, LabJack T-series all do).
- property relay_channels: Mapping[str, RelayChannel]#
Frozen snapshot of configured relay channels, keyed by alias.
- write_analog_value(
- channel: AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel,
- value: float,
Write
valueto AOchannel. Override if the driver supports analog output.