DMMDriverBase#
- class DMMDriverBase[source]#
Bases:
ABCVendor DMM driver contract. Concrete drivers own their transport and lifecycle.
Range and NPLC are split per function (
set_dc_voltage_range,set_ac_current_nplc, …) so the driver never tracks the active function —InstroDMMdispatches based on its own_measurement_config.Methods
Close the underlying transport.
Trigger an AC-current measurement and return the value (amperes RMS, vendor-dependent).
Trigger an AC-voltage measurement and return the value (volts RMS, vendor-dependent).
Trigger a DC-current measurement and return the value (amperes).
Trigger a DC-voltage measurement and return the value (volts).
Trigger a 4-wire-resistance measurement and return the value (ohms).
Trigger a 2-wire-resistance measurement and return the value (ohms).
Open the underlying transport and put the instrument into a known state.
Set AC-current integration time to
nplcpower-line cycles.Set manual AC-current range to
valueamperes;Noneselects auto-range.Set AC-voltage integration time to
nplcpower-line cycles.Set manual AC-voltage range to
valuevolts;Noneselects auto-range.Set integration time directly in seconds.
Set DC-current integration time to
nplcpower-line cycles.Set manual DC-current range to
valueamperes;Noneselects auto-range.Set DC-voltage integration time to
nplcpower-line cycles.Set manual DC-voltage range to
valuevolts;Noneselects auto-range.Set resolution to
ndigits.Set 4-wire-resistance integration time to
nplcpower-line cycles.Set manual 4-wire-resistance range to
valueohms;Noneselects auto-range.Configure the DMM for
function(DC voltage, AC current, 2-wire resistance, …).Set 2-wire-resistance integration time to
nplcpower-line cycles.Set manual 2-wire-resistance range to
valueohms;Noneselects auto-range.- abstractmethod open() None[source]#
Open the underlying transport and put the instrument into a known state.
Concrete drivers also do one-shot setup here (e.g.
*CLSto clear the error queue,SYST:REMfor remote control).
- abstractmethod set_measurement_function(
- function: MeasurementFunction,
Configure the DMM for
function(DC voltage, AC current, 2-wire resistance, …).Drivers may issue a dummy measurement to commit the mode change.
MeasurementFunctionvalues the instrument doesn’t support should raiseNotImplementedError.
- set_digits(n: int) None[source]#
Set resolution to
ndigits.Default raises
NotImplementedError; override on drivers whose SCPI exposes a direct digits/resolution control. Instruments that only expose integration time (e.g. Keithley 2400) should leave this as a no-implementation and direct users toset_aperture_nplc.
- set_aperture_seconds(seconds: float) None[source]#
Set integration time directly in seconds.
Default raises
NotImplementedError. Mutually exclusive withset_aperture_nplcon a given driver — vendors typically expose one or the other.
- set_dc_voltage_range(value: float | None) None[source]#
Set manual DC-voltage range to
valuevolts;Noneselects auto-range.
- set_ac_voltage_range(value: float | None) None[source]#
Set manual AC-voltage range to
valuevolts;Noneselects auto-range.
- set_dc_current_range(value: float | None) None[source]#
Set manual DC-current range to
valueamperes;Noneselects auto-range.
- set_ac_current_range(value: float | None) None[source]#
Set manual AC-current range to
valueamperes;Noneselects auto-range.
- set_two_wire_resistance_range(value: float | None) None[source]#
Set manual 2-wire-resistance range to
valueohms;Noneselects auto-range.
- set_four_wire_resistance_range( ) None[source]#
Set manual 4-wire-resistance range to
valueohms;Noneselects auto-range.
- set_dc_voltage_nplc(nplc: float) None[source]#
Set DC-voltage integration time to
nplcpower-line cycles.
- set_ac_voltage_nplc(nplc: float) None[source]#
Set AC-voltage integration time to
nplcpower-line cycles.
- set_dc_current_nplc(nplc: float) None[source]#
Set DC-current integration time to
nplcpower-line cycles.
- set_ac_current_nplc(nplc: float) None[source]#
Set AC-current integration time to
nplcpower-line cycles.
- set_two_wire_resistance_nplc(nplc: float) None[source]#
Set 2-wire-resistance integration time to
nplcpower-line cycles.
- set_four_wire_resistance_nplc(nplc: float) None[source]#
Set 4-wire-resistance integration time to
nplcpower-line cycles.
- measure_four_wire_resistance() float[source]#
Trigger a 4-wire-resistance measurement and return the value (ohms).
Default raises
NotImplementedError; override on drivers whose instrument has dedicated sense leads (e.g. Agilent 34401A).
- abstractmethod measure_dc_voltage() float[source]#
Trigger a DC-voltage measurement and return the value (volts).
- abstractmethod measure_ac_voltage() float[source]#
Trigger an AC-voltage measurement and return the value (volts RMS, vendor-dependent).
- abstractmethod measure_resistance() float[source]#
Trigger a 2-wire-resistance measurement and return the value (ohms).