sig is a small, fast Python CLI tool for reading measurement values
(frequency, RMS, peak-to-peak) from a Siglent SDS1202X-E oscilloscope
via LAN (SCPI).
The tool is intentionally Linux-like:
sig freq
sig rms
sig pkpkInternally, PyVISA is used. Measurements are queried via PAVA? (and optionally via the Cymometer / frequency counter).
- ✅ Linux-style CLI (
sig …) - ✅ Connection via LAN (more stable than USB)
- ✅ Supports C1 / C2
- ✅ Frequency display in kHz with decimal point
- ✅ RMS & PKPK
- ✅ Clean handling of “no signal” (
nan) - ✅ Works reliably with Siglent SDS1202X-E firmware 1.3.26
- ✅ No GUI, perfect for scripts & automation
- Linux
- Python ≥ 3.9
- Siglent SDS1202X-E
- Network connection to the oscilloscope
- SCPI over LAN enabled
pip install pyvisa pyvisa-pysiglent/
├── sig.py # CLI tool
├── venv/ # Python venv (optional, recommended)
├── freq_scop.py # tests / experiments
├── scps_scope.py
└── README.md
git clone https://github.com/DL2DBG/siglent.git
cd siglent
python3 -m venv venv
source venv/bin/activate
pip install pyvisa pyvisa-pyIt is recommended to use a wrapper in ~/bin so that sig behaves like a
real Linux command.
/home/ulrich/bin/sig
#!/usr/bin/env bash
set -euo pipefail
REPO="/home/ulrich/Dokumente/GitHub/siglent"
VENV="$REPO/venv"
CLI="$REPO/sig.py"
exec "$VENV/bin/python3" "$CLI" "$@"chmod +x ~/bin/sigIf required:
export PATH="$HOME/bin:$PATH"usage: sig [-h] [-i IP] [-c {C1,C2,both}] [--idn] [--raw] {freq,rms,pkpk,all}
sig: error: the following arguments are required: cmd
sig freqC1 freq=7010.000 kHz
C2 freq=nan kHz
sig rmssig pkpksig allsig freq -c C1
sig rms -c C2sig freq -i 192.168.178.54Default: PAVA?
C1:PAVA? FREQ
C1:PAVA? RMS
C1:PAVA? PKPK
This method is:
- fast
- stable
- directly coupled to the scope’s measurement display
The frequency may appear in discrete steps (e.g. 7010 / 7020 kHz). This is not a bug but the internal quantization of the measurement function.
Optionally, the Cymometer (CYMT?) can be used (frequency counter),
which is often more accurate under clean trigger conditions.
- C2 shows
nanif:- channel is disabled
- no valid signal is present
- USB-SCPI is firmware-dependent and problematic on the SDS1202X-E → LAN recommended
- Only tested with SDS1202X-E; other SDS models may be compatible
- Device: Siglent SDS1202X-E
- Firmware: 1.3.26
- OS: Linux
- Python: 3.12
- pyvisa / pyvisa-py
MIT License (or adjust as desired)
A small, fast tool for:
- laboratory use
- embedded development
- RF experiments
- automated measurements
- shell scripts
No GUI, no overhead.
Pull requests, issues, and improvements are welcome 🙂
Parts of this project (design, debugging, documentation) were developed with the assistance of ChatGPT (OpenAI) as an interactive programming aid.