Skip to main content
InstroDMM provides a unified interface for digital multimeters. This class is initialized with a vendor-specific driver (Agilent34401A, Keysight34461A, Keithley2400, …), and provides the vendor-agnostic API (set_measurement_function, read, set_range, …).

Creating an InstroDMM

Supported Vendors

Agilent/HP/Keysight 34401A

Agilent/HP/Keysight 34401A

Keysight 34461A

Keysight 34461A

Keithley 2400

Keithley 2400
  • Simulated: no hardware required; pairs with the bundled DMM simulator (SimulatedDMM)
If your vendor or model is not listed, see Custom Driver Development, or open a Driver Request issue on GitHub.

Example

More examples found in Examples

Details

The following presents details about the InstroDMM. Specific driver details can be found on their pages.

Driver Composition

An InstroDMM is built from a concrete driver:
  • Agilent34401A owns the connection setup and vendor-specific command mapping.
  • InstroDMM owns the category-level workflow: measurements, commands, publishers, the background daemon.

Lifecycle

The typical InstroDMM workflow:
  1. Construct: instantiate the vendor driver and pass it to InstroDMM.
  2. open(): establishes the VISA connection.
  3. Configure measurement: set the measurement function (e.g. DC voltage), and optionally resolution, aperture, and range.
  4. read(): trigger a measurement and get the value. The read_<function>() shorthands (e.g. read_dc_voltage()) fold steps 3 and 4 into one call.
  5. close(): disconnect from hardware.
Optionally, you can use background fetching via start() / stop(), but it is an atypical use case for a DMM. See Two ways to get data for more.

Measurement Functions

InstroDMM supports these measurement functions (availability depends on the driver):
  • DC Voltage
  • AC Voltage
  • DC Current
  • AC Current
  • 2-Wire Resistance
  • 4-Wire Resistance
You must call set_measurement_function() before configuring resolution, aperture, range, or calling read().

Single-call reads

When you only need a value and don’t need to tune resolution, aperture, or range, use the per-function shorthand instead of the two-step sequence:
One exists per measurement function: read_dc_voltage(), read_ac_voltage(), read_dc_current(), read_ac_current(), read_resistance() (2-wire), and read_four_wire_resistance(). Each selects the function only when it isn’t already active, so repeated calls in the same function cost a single measurement and publish set_measurement_function.cmd once. They publish exactly the same channels as set_measurement_function() + read().

Init from a Config File

InstroDMM can also be constructed directly from a JSON config file, which removes the need to write any Python setup code:
Where bench_dmm.json contains:
See Config Files for the full field reference.

Custom Driver Development

For more information on writing a custom driver, see Custom Driver Development.