A dependency-free Linux USBTMC command-line client for the RIGOL DS1152E. It provides a typed catalog for the DS1000E/DS1000D programming guide, automatic measurements, configuration snapshots, and waveform export without VISA or a GUI.
The implementation is tested on:
Rigol Technologies,DS1152E,DS1ET192605874,00.04.01.00.02
- 164 merged programming-guide catalog entries
- 156 entries applicable to DS1000E/DS1152E
- 8 DS1000D-only logic-analyzer entries retained for reference and rejected on a DS1152E
list,info,config,commands,get,set,action,raw,batch,measure, andwaveformworkflows- CSV, JSON, and binary waveform export
- Automatic selection of a single attached instrument with a
DS...serial
The allowed trigger-mode combinations are modeled explicitly. The CLI rejects combinations which look syntactically plausible but are not defined by the manual. The complete allowed query surface expands to 160 commands; all 160 responded on the test instrument.
Firmware update is deliberately out of scope. There is no update, bootloader, or device-reflash command in this project.
Linux with Python 3.10 or newer and the kernel usbtmc driver is required.
git clone https://github.com/LHX369963/ds1152e-cli.git
cd ds1152e-cli
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[test]'Install the udev rule once so normal CLI use does not require sudo:
sudo install -m 0644 udev/99-rigol-usbtmc.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger --subsystem-match=usbThen reconnect the USB cable, or log out and back in if group membership changed.
The rule grants access through plugdev and desktop uaccess. Running the CLI
itself with sudo is neither required nor recommended.
rigol list
rigol info
rigol config
rigol commands list
rigol commands list --section trigger
rigol commands show channel.scale
rigol get channel.scale --channel 1
rigol set channel.scale 0.5 --channel 1
rigol get trigger.source --mode edge
rigol set trigger.source CHANnel1 --mode edge
rigol measure all --channel 1 --json
rigol waveform --source ch1 --points-mode maximum --format csv --output ch1.csv
rigol waveform --source ch2 --points-mode raw --stop --format bin --output ch2.bin
rigol raw ':TRIGger:STATus?'
rigol batch commands.scpiUse --device /dev/usbtmcN or --serial SERIAL when explicit selection is
needed. raw is the escape hatch for valid SCPI not yet represented by a higher
level workflow; it does not bypass USBTMC access controls.
Waveform voltage conversion was calibrated against five DC levels generated by a DG1022. For analog channels it uses the DS1000E byte reference value of 125. A -1 V source measured -1.02 V automatically and -1.023 V in the exported CSV.
Waveform download restores the previous WAVeform:POINts:MODE setting even when
an error occurs. --stop stops acquisition for the transfer and resumes only when
the scope was running beforehand.
The Git-tracked Codex skill is in skills/ds1152e-cli. From the repository root,
install its discovery link with:
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
ln -sfn "$(pwd)/skills/ds1152e-cli" "${CODEX_HOME:-$HOME/.codex}/skills/ds1152e-cli"python -m pytestThe current unit suite has 20 tests. Connected acquisition, channel, measurement,
trigger, MATH, FFT, and robustness reports are maintained in the adjacent DG1022
repository's validation/ directory.
The checked-in official references are:
docs/official/DS1000E_DS1000D_ProgrammingGuide_EN.pdfdocs/official/DS1000E_DS1000D_Users_Guide_EN.pdf
See docs/validation.md for the live catalog audit, waveform calibration, and
final connected measurements.
The command catalog follows the programming guide. Device-specific behavior and numeric limits remain authoritative on the connected instrument.