# Keysight34980A

## class Keysight34980A( visa_resource: str | VisaConfig, *, sync_system_clock: bool = True, )[source]

Bases: [`DAQDriverBase`](https://dev.nominal.io/instro/ref/instruments/instro.daq.DAQDriverBase.md#instro.daq.DAQDriverBase "instro.daq.daq.DAQDriverBase")

Keysight 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

| [`ai_channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.ai_channels "instro.daq.drivers.keysight_34980a.Keysight34980A.ai_channels") | Frozen snapshot of configured AI channels, keyed by alias. |
| --- | --- |
| [`ai_hw_timing_config`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.ai_hw_timing_config "instro.daq.drivers.keysight_34980a.Keysight34980A.ai_hw_timing_config") |  |
| [`ao_channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.ao_channels "instro.daq.drivers.keysight_34980a.Keysight34980A.ao_channels") | Frozen snapshot of configured AO channels, keyed by alias. |
| [`ao_hw_timing_config`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.ao_hw_timing_config "instro.daq.drivers.keysight_34980a.Keysight34980A.ao_hw_timing_config") |  |
| [`channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.channels "instro.daq.drivers.keysight_34980a.Keysight34980A.channels") | Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays). |
| [`di_channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.di_channels "instro.daq.drivers.keysight_34980a.Keysight34980A.di_channels") | Frozen snapshot of configured DI channels, keyed by alias. |
| [`di_hw_timing_config`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.di_hw_timing_config "instro.daq.drivers.keysight_34980a.Keysight34980A.di_hw_timing_config") |  |
| [`do_channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.do_channels "instro.daq.drivers.keysight_34980a.Keysight34980A.do_channels") | Frozen snapshot of configured DO channels, keyed by alias. |
| [`do_hw_timing_config`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.do_hw_timing_config "instro.daq.drivers.keysight_34980a.Keysight34980A.do_hw_timing_config") |  |
| [`relay_channels`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.relay_channels "instro.daq.drivers.keysight_34980a.Keysight34980A.relay_channels") | Frozen snapshot of configured relay channels, keyed by alias. |
| [`points_in_buffer`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.points_in_buffer "instro.daq.drivers.keysight_34980a.Keysight34980A.points_in_buffer") |  |

Methods

| [`close`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.close "instro.daq.drivers.keysight_34980a.Keysight34980A.close") | Close every task/handle owned by the driver. |
| --- | --- |
| [`close_relay`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.close_relay "instro.daq.drivers.keysight_34980a.Keysight34980A.close_relay") | `ROUTe:CLOSe` the relay. |
| [`configure_ai_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_channel") | Deprecated: use `configure_ai_voltage_channel`. |
| [`configure_ai_current_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_current_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_current_channel") | Register an AI current channel. |
| [`configure_ai_hw_timing`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_hw_timing "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_hw_timing") | Configure `TRIG:SOUR TIMER` at the configured sample period and infinite count. |
| [`configure_ai_thermocouple_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_thermocouple_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_thermocouple_channel") | Register an AI thermocouple channel. |
| [`configure_ai_voltage_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_voltage_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ai_voltage_channel") | Configure an AI voltage channel: `CONF:VOLT:DC` at computed range, then add to `ROUT:SCAN` and enable timestamps. |
| [`configure_ao_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_channel") | Deprecated: implement `configure_ao_voltage_channel` instead. |
| [`configure_ao_current_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_current_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_current_channel") | Register an AO current channel. |
| [`configure_ao_voltage_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_voltage_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_ao_voltage_channel") | Register an AO voltage channel. |
| [`configure_di_line_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_di_line_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_di_line_channel") | Parse `MNNN/B` (slot/channel/bit), program the port for DI, and register the line. |
| [`configure_di_port_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_di_port_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_di_port_channel") | Parse `MNNN` (slot/channel), program the port for DI, and register the port. |
| [`configure_do_line_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_do_line_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_do_line_channel") | Parse `MNNN/B` (slot/channel/bit), program the port for DO, and register the line. |
| [`configure_do_port_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.configure_do_port_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.configure_do_port_channel") | Parse `MNNN` (slot/channel), program the port for DO, and register the port. |
| [`define_relay_channel`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.define_relay_channel "instro.daq.drivers.keysight_34980a.Keysight34980A.define_relay_channel") | Build a `RelayChannel` for `physical_channel` (e.g. `"3101"` = slot 3 / channel 101). |
| [`fetch_analog`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.fetch_analog "instro.daq.drivers.keysight_34980a.Keysight34980A.fetch_analog") | Block until the buffer holds at least one full per-channel batch, then drain a channel-aligned chunk. |
| [`get_actual_sample_rate`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.get_actual_sample_rate "instro.daq.drivers.keysight_34980a.Keysight34980A.get_actual_sample_rate") | Actual hardware sample rate achieved after `start()`. |
| [`open`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.open "instro.daq.drivers.keysight_34980a.Keysight34980A.open") | Open the underlying transport (or verify the device is present, for handle-less SDKs). |
| [`open_relay`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.open_relay "instro.daq.drivers.keysight_34980a.Keysight34980A.open_relay") | `ROUTe:OPEN` the relay. |
| [`read_analog`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.read_analog "instro.daq.drivers.keysight_34980a.Keysight34980A.read_analog") | Software-timed read of every configured AI channel. |
| [`read_digital_line`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.read_digital_line "instro.daq.drivers.keysight_34980a.Keysight34980A.read_digital_line") | Sample a single DI line. |
| [`read_digital_port`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.read_digital_port "instro.daq.drivers.keysight_34980a.Keysight34980A.read_digital_port") | Sample a DI port as one N-bit integer. |
| [`start`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.start "instro.daq.drivers.keysight_34980a.Keysight34980A.start") | Enable timestamps and `INIT` the scan. |
| [`stop`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.stop "instro.daq.drivers.keysight_34980a.Keysight34980A.stop") | `ABORt` any pending scan. |
| [`write_analog_value`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.write_analog_value "instro.daq.drivers.keysight_34980a.Keysight34980A.write_analog_value") | Write `value` to AO `channel`. |
| [`write_digital_line`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.write_digital_line "instro.daq.drivers.keysight_34980a.Keysight34980A.write_digital_line") | Drive a single DO line. |
| [`write_digital_port`](https://dev.nominal.io/instro/ref/instruments/instro.daq.drivers.keysight_34980a.Keysight34980A.md#instro.daq.drivers.keysight_34980a.Keysight34980A.write_digital_port "instro.daq.drivers.keysight_34980a.Keysight34980A.write_digital_port") | 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).

### close()[source]

Close every task/handle owned by the driver. Idempotent.

### configure_ai_channel( channel: AnalogChannel, )[source]

Deprecated: use `configure_ai_voltage_channel`.

### configure_ai_voltage_channel( channel: AnalogVoltageChannel, )[source]

Configure an AI voltage channel: `CONF:VOLT:DC` at computed range, then add to `ROUT:SCAN` and enable timestamps.

### configure_ai_hw_timing( hw_timing_config: HWTimingConfig, )[source]

Configure `TRIG:SOUR TIMER` at the configured sample period and infinite count.

### start(**kwargs)[source]

Enable timestamps and `INIT` the scan.

### stop(**kwargs)[source]

`ABORt` any pending scan.

### read_analog() → KeysightData[source]

Software-timed read of every configured AI channel.

Returns a vendor-specific payload that `_read_to_measurements` then
unpacks into ``` Measurement``s. ``response.dt ``` should be `None` so
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( physical_channel: str, logic: Logic, logic_level: float | None = None, alias: str | None = None, )[source]

Parse `MNNN/B` (slot/channel/bit), program the port for DI, and register the line.

### configure_do_line_channel( physical_channel: str, logic: Logic, logic_level: float | None = None, alias: str | None = None, )[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, )[source]

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, )[source]

Parse `MNNN` (slot/channel), program the port for DO, and register the port.

### write_digital_line( channel: DigitalChannel, data: int, ) → None[source]

Drive a single DO line. `data` is 0 or 1 (active-low `channel.logic` is handled in the driver).

### read_digital_line( channel: DigitalChannel, ) → int[source]

Sample a single DI line. Returns 0 or 1 after applying `channel.logic`.

### write_digital_port( channel: DigitalChannel, data: int, )[source]

Drive a DO port as one N-bit integer. Active-low is applied in hardware via CONF:DIG:POL.

### read_digital_port( channel: DigitalChannel, ) → int[source]

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:CLOSe` the relay.

### open_relay(channel: RelayChannel)[source]

`ROUTe:OPEN` the 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_channel` instead.

### 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( physical_channel: str, alias: str | None = None, ) → RelayChannel

Build a `RelayChannel` for `physical_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 `value` to AO `channel`. Override if the driver supports analog output.

### points_in_buffer: int
