DMM simulator
The DMM simulator is a local SCPI server for development, tests, and demos. It listens on a TCP socket and exposes a digital-multimeter command set: function switching plus the five primary measurements (DC/AC voltage, DC/AC current, and two-wire resistance). Each function measures a configurable stimulus value returned with Gaussian noise, so repeated reads look like a real bench instrument. Unlike the PSU simulator, the DMM simulator is headless: there is no terminal UI. Set stimulus values with CLI flags at startup, or through the Python API when embedding the simulator in tests.Quickstart
Start the simulator in one terminal:127.0.0.1:5026 by default. If you are working from a source checkout, run the same command through uv:
SimulatedDMM driver. This small Python client opens an InstroDMM, switches functions, and reads measurements:
Stimulus model
The stimulus is the simulator’s stand-in for the physical quantity on the probes (the DMM analog of the PSU simulator’s load model). Each measurement function has one stimulus value, and every measurement returns that value with Gaussian noise (±0.5% at 3 standard deviations).| Function | CLI flag | Default |
|---|---|---|
| DC voltage | --dc-voltage | 1.25 V |
| AC voltage | --ac-voltage | 0.5 V |
| DC current | --dc-current | 0.1 A |
| AC current | --ac-current | 0.05 A |
| Resistance | --resistance | 1000 Ω |
*RST: reset returns the instrument state (active function, error queue) to defaults, but the simulated physical world stays put.
Programming guide
Brackets mark optional SCPI path components. For example,[SENSe:]FUNCtion accepts FUNC, FUNCTION, and SENS:FUNC. Keywords match in short or long form, in any case.
| Command | Functionality |
|---|---|
*IDN? | Returns NOMINAL,SIMULATED_DMM,000001,1.0. |
*RST | Resets the active function to DC voltage and clears the error queue. Stimulus values are preserved. |
*CLS | Clears the error queue. |
SYSTem:ERRor? | Pops the oldest queued error, or 0,"No error". |
[SENSe:]FUNCtion "<function>" | Sets the active function: VOLT:DC, VOLT:AC, CURR:DC, CURR:AC, or RES. Bare VOLT/CURR select DC. Quotes optional. |
[SENSe:]FUNCtion? | Returns the active function, quoted (e.g. "VOLT:DC"). |
CONFigure:VOLTage[:DC] | Sets the active function to DC voltage. Same pattern for :AC, CURRent[:DC], CURRent:AC, and RESistance. |
MEASure:VOLTage[:DC]? | Switches to the function and returns a noisy measurement of its stimulus. Same pattern for the other four functions. |
READ? | Returns a noisy measurement using the active function. |
-113,"Undefined header"; an unknown function name queues -224,"Illegal parameter value". The SimulatedDMM driver checks SYST:ERR? after every transaction and raises on any queued error.