stoner_measurement.instruments.keithley.k2000.Keithley2000

class stoner_measurement.instruments.keithley.k2000.Keithley2000(transport: BaseTransport, protocol: BaseProtocol | None = None)[source]

Bases: DigitalMultimeter

Driver for the Keithley 2000 digital multimeter.

Variables:
  • transport (BaseTransport) – Transport layer (serial, GPIB, or Ethernet).

  • protocol (BaseProtocol) – Protocol instance (defaults to ScpiProtocol).

AC_FUNCTIONS = frozenset({DmmFunction.CURR_AC, DmmFunction.VOLT_AC})
GATED_FUNCTIONS = frozenset({DmmFunction.FREQ, DmmFunction.PER})
RANGED_FUNCTIONS = frozenset({DmmFunction.CURR_AC, DmmFunction.CURR_DC, DmmFunction.FRES, DmmFunction.RES, DmmFunction.VOLT_AC, DmmFunction.VOLT_DC})
SUPPORTED_FUNCTIONS = (DmmFunction.VOLT_DC, DmmFunction.VOLT_AC, DmmFunction.CURR_DC, DmmFunction.CURR_AC, DmmFunction.RES, DmmFunction.FRES, DmmFunction.FREQ, DmmFunction.PER, DmmFunction.TEMP)
abort() → None[source]

Abort a running measurement sequence and return to idle.

clear_buffer() → None[source]

Clear all readings from the instrument trace buffer.

configure_single_reading(function: DmmFunction, *, autorange: bool = True, input_range: float = 10.0, nplc: float = 1.0, filter_enabled: bool = False, filter_count: int = 10, filter_type: str = 'REP', trigger_delay: float = 0.0, ac_bandwidth: float = 300.0, gate_time: float = 0.1) → None[source]

Configure one immediate DMM reading without operating scanner relays.

Parameters:

function (DmmFunction) – Active measurement function.

Keyword Parameters:
  • autorange (bool) – Select automatic ranging for ranged functions.

  • input_range (float) – Fixed input range in the function’s SI unit.

  • nplc (float) – Integration time in PLC, 0.01..10 where applicable.

  • filter_enabled (bool) – Enable digital averaging where supported.

  • filter_count (int) – Averaging count, 1..100.

  • filter_type (str) – REPeating (REP) or MOVing averaging.

  • trigger_delay (float) – Delay before conversion, in seconds.

  • ac_bandwidth (float) – AC lower bandwidth: 3, 30 or 300 Hz.

  • gate_time (float) – Frequency/period gate time, 0.01..1 seconds.

Temperature readings use kelvin and the instrument’s existing sensor configuration. The method sends no reset, route, scan-list or relay commands. No channel lists are used on the 2700.

Raises:

ValueError – If the function or applicable settings are invalid.

get_autorange() → bool[source]

Return True if autorange is enabled.

Returns:

True when autorange is active.

Return type:

(bool)

get_buffer_count() → int[source]

Return the number of readings currently stored in the buffer.

Returns:

Number of readings in the trace buffer.

Return type:

(int)

get_capabilities() → DmmCapabilities[source]

Return static capability metadata for the Keithley 2000.

Returns:

Capability descriptor.

Return type:

(DmmCapabilities)

get_filter_count() → int[source]

Return the averaging filter count.

Returns:

Configured number of readings averaged per sample.

Return type:

(int)

get_filter_enabled() → bool[source]

Return True if digital averaging filter is enabled.

Returns:

True when the averaging filter is active.

Return type:

(bool)

get_measure_function() → DmmFunction[source]

Return the active measurement function.

Returns:

Active measurement function.

Return type:

(DmmFunction)

get_nplc() → float[source]

Return the integration time in power-line cycles.

Returns:

Integration time in power-line cycles.

Return type:

(float)

get_range() → float[source]

Return the active measurement range in units of the active function.

Returns:

Active measurement range.

Return type:

(float)

get_trigger_count() → int[source]

Return the configured trigger count.

Returns:

Number of triggers configured.

Return type:

(int)

get_trigger_source() → DmmTriggerSource[source]

Return the trigger source selection.

Returns:

Active trigger source.

Return type:

(DmmTriggerSource)

initiate() → None[source]

Arm the trigger system and begin a measurement sequence.

measure() → float[source]

Trigger a measurement and return its value.

Returns:

Measured scalar value in units of the active function.

Return type:

(float)

read_buffer(count: int | None = None) → tuple[float, ...][source]

Read values from the instrument trace buffer.

Keyword Parameters:

count (int | None) – Number of points to read from the start of the buffer. If None, read all available points.

Returns:

Parsed buffer readings.

Return type:

(tuple[float, …])

Raises:

ValueError – If count is not positive.

read_single_snapshot(function: DmmFunction) → tuple[float, dict[str, float]][source]

Read one fresh value and applicable numeric settings from the instrument.

Parameters:

function (DmmFunction) – Expected configured function.

Returns:

Reading and queried settings. Filter

type is encoded as 0 for repeating and 1 for moving. Timeout is the actual transport timeout, not an instrument readback.

Return type:

(tuple[float, dict[str, float]])

Raises:
  • RuntimeError – If the function changed outside the plugin.

  • ValueError – If the response is empty, malformed or has multiple readings.

set_autorange(state: bool) → None[source]

Enable or disable autorange.

Parameters:

state (bool) – True to enable autorange.

set_filter_count(count: int) → None[source]

Set the averaging filter count.

Parameters:

count (int) – Number of readings to average. Must be positive.

Raises:

ValueError – If count is not positive.

set_filter_enabled(state: bool) → None[source]

Enable or disable the digital averaging filter.

Parameters:

state (bool) – True to enable filtering.

set_measure_function(function: DmmFunction) → None[source]

Set the active measurement function.

Parameters:

function (DmmFunction) – Function to select.

set_nplc(value: float) → None[source]

Set the integration time in power-line cycles.

Parameters:

value (float) – Integration time in power-line cycles. Must be positive.

Raises:

ValueError – If value is not positive.

set_range(value: float) → None[source]

Set the measurement range.

Parameters:

value (float) – Range value in units of the active function. Must be positive.

Raises:

ValueError – If value is not positive.

set_trigger_count(count: int) → None[source]

Set the trigger count.

Parameters:

count (int) – Number of triggers. Must be positive.

Raises:

ValueError – If count is not positive.

set_trigger_source(source: DmmTriggerSource) → None[source]

Set the trigger source.

Parameters:

source (DmmTriggerSource) – Trigger source to select.

classmethod uses_nplc(function: DmmFunction, ac_bandwidth: float = 300.0) → bool[source]

Return whether NPLC controls integration for this function and bandwidth.