stoner_measurement.instruments.dmm.DigitalMultimeter

class stoner_measurement.instruments.dmm.DigitalMultimeter(transport: BaseTransport, protocol: BaseProtocol)[source]

Bases: BaseInstrument

Abstract base class for digital multimeter instruments.

Variables:
abort() → None[source]

Abort a running measurement sequence.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

clear_buffer() → None[source]

Clear the instrument reading buffer.

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

abstractmethod get_autorange() → bool[source]

Return True if autorange is enabled.

Returns:

True when autorange is enabled.

Return type:

(bool)

get_buffer_count() → int[source]

Return the number of readings currently stored in the buffer.

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

abstractmethod get_capabilities() → DmmCapabilities[source]

Return static capability metadata.

Returns:

Capability descriptor.

Return type:

(DmmCapabilities)

get_filter_count() → int[source]

Return the configured filter averaging count.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

get_filter_enabled() → bool[source]

Return whether filtering is enabled.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

abstractmethod get_measure_function() → DmmFunction[source]

Return the active measurement function.

Returns:

Active measurement function.

Return type:

(DmmFunction)

abstractmethod get_nplc() → float[source]

Return the integration time in line cycles.

Returns:

Integration time in power-line cycles.

Return type:

(float)

abstractmethod get_range() → float[source]

Return the active measurement range.

Returns:

Range value in units of the active function.

Return type:

(float)

get_trigger_count() → int[source]

Return the configured trigger count.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

get_trigger_source() → DmmTriggerSource[source]

Return the trigger source selection.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

initiate() → None[source]

Arm the trigger system and begin measurements.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

abstractmethod 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 buffer.

Keyword Parameters:

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

Returns:

Parsed buffer values.

Return type:

(tuple[float, …])

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

abstractmethod 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 filter averaging count.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

set_filter_enabled(state: bool) → None[source]

Enable or disable measurement filtering.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

abstractmethod set_measure_function(function: DmmFunction) → None[source]

Set the active measurement function.

Parameters:

function (DmmFunction) – Function to select.

abstractmethod set_nplc(value: float) → None[source]

Set the integration time in line cycles.

Parameters:

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

abstractmethod set_range(value: float) → None[source]

Set the active measurement range.

Parameters:

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

set_trigger_count(count: int) → None[source]

Set the trigger count.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

set_trigger_source(source: DmmTriggerSource) → None[source]

Set the trigger source selection.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.