A small, fully synthetic SCPI-style instrument simulator and conformance checker for practicing lab-automation code without hardware.
- A tiny command parser that normalizes short/long SCPI-style headers.
- A stateful, vendor-neutral instrument simulator (
OUTPUT,SOURCE,BURST,MEASURE). - Deterministic synthetic measurements: no real device, no customer data, no measured values.
- A CLI with
repl,check, anddemomodes. - A conformance check that reproduces a common real-world bug: burst state leaking from a burst waveform into a later non-burst waveform.
- Not a full SCPI implementation.
- Not a driver for any real instrument or vendor.
- Not derived from employer code, internal ATE formats, course material, or private test data.
Requires Python 3.10 or newer.
python -m pip install -e .
python -m scpi_lab_sim check
python -m scpi_lab_sim demo
python -m scpi_lab_sim replExample check output:
[PASS] identity query: SCPI-LAB-SIM,1.0,0,SYNTHETIC
[PASS] output state: on=True, off=False
[PASS] burst reset on plain generation: after setup=True, after generate=False
[PASS] deterministic measurements: -0.001000, 0.099967, 0.199635
[PASS] invalid argument rejected: CommandError raised
5/5 checks passed
In the REPL, try:
scpi> *IDN?
SCPI-LAB-SIM,1.0,0,SYNTHETIC
scpi> SOUR:FUNC RAMP
OK
scpi> MEAS:VOLT?
0.000657
scpi> quit
src/scpi_lab_sim/
parser.py # command normalization and validation
device.py # simulated instrument state and command execution
checks.py # built-in conformance checks
cli.py # argparse-based CLI
tests/ # unit and CLI tests
.github/workflows/ci.yml
python -m pip install -e ".[dev]"
ruff check .
ruff format --check .
python -m pytest
coverage run -m pytest
coverage reportThis repository was created in November 2026 with AI assistance for scaffolding, tests, and documentation. It is a synthetic practice project, not a claim of prior production use, hardware certification, or independent authorship of any historical exercise. No employer source code, real instrument data, or unpublished course material is included.
MIT. See LICENSE.