Install
openclaw skills install @jessehornbuckle/hantek-scope-controlControl Hantek DSO2D15 / DSO2000-series oscilloscopes over USB SCPI, including connection checks, channel/generator setup, waveform capture, probe compensation guidance, and remote-control lock handling.
openclaw skills install @jessehornbuckle/hantek-scope-controlUse this skill when working with a Hantek DSO2D15 or DSO2000-series oscilloscope and the user wants to:
SCPI means Standard Commands for Programmable Instruments. It is the plain-text command language many test instruments use so a computer can ask questions like *IDN? or set values like :CHANnel1:SCALe 0.2V.
VISA is the instrument communication layer used by tools such as PyVISA. It helps software find and talk to USB, serial, LAN, and GPIB instruments.
*IDN? before sending setting changes.A successful Hantek DSO2000 identity response may look similar to:
undefined, DSO2D15, <serial>, <firmware-version>
Typical dependencies:
python -m pip install pyvisa pyvisa-py pyusb
On macOS, PyVISA-py may need help finding the correct libusb backend. If the scope appears in the system USB tree but PyVISA cannot enumerate it, try installing a libusb provider such as libusb-package and explicitly wiring PyUSB to that backend.
Minimal identity test:
import pyvisa
rm = pyvisa.ResourceManager("@py")
resources = rm.list_resources()
print(resources)
inst = rm.open_resource(resources[0])
inst.timeout = 3000
print(inst.query("*IDN?").strip())
Identity and basic setup:
*IDN?
ACQuire:POINts?
:ACQuire:SRATe?
:CHANnel1:DISPlay?
:CHANnel1:SCALe?
:CHANnel1:PROBe?
:CHANnel1:COUPling?
:CHANnel1:OFFSet?
:TIMebase:SCALe?
:TRIGger:MODE?
:TRIGger:STATus?
Channel setup examples:
:CHANnel1:DISPlay ON
:CHANnel1:COUPling DC
:CHANnel1:PROBe 10
:CHANnel1:SCALe 0.2V
:CHANnel1:OFFSet 0V
Trigger setup examples:
:TRIGger:MODE EDGE
:TRIGger:EDGe:SOURce CHANnel1
:TRIGger:EDGe:SLOPe RISIng
:TRIGger:EDGe:LEVel 0V
:TRIGger:SWEep AUTO
:TRIGger:SWEep NORMal
:TRIGger:SWEep SINGle
Timebase setup example:
:TIMebase:SCALe 0.0002
:TIMebase:POSition 0
Generator / DDS examples, when supported by the model:
:DDS ON
:DDS OFF
:DDS:TYPE SINE
:DDS:TYPE SQUAre
:DDS:TYPE RAMP
:DDS:FREQuency 1000
:DDS:AMPLitude 1
:DDS:OFFSet 0
:DDS:DUTY 50
The public SCPI manual documents:
:WAVeform:DATA:ALL?
Some DSO2000 units also respond to a private waveform transfer command:
PRIVate:WAVeform:DATA:ALL?
When using private or undocumented commands:
A practical capture workflow:
Remote control may cause the scope to display a message like:
In remote communication, the keypad is locked
Treat this as a remote-control state warning. On some units it can remain on screen after the controls are actually released, so verify by whether the front-panel controls respond.
Documented single trigger:
:TRIGger:SWEep SINGle
This waits for one trigger, displays the captured waveform, then stops. On some setups it may not behave the same as the physical Run/Stop button.
Some units expose additional run-state commands such as:
:RUNning STOP
:RUNning ON
:RUNning 0
:RUNning 1
These may be underdocumented or firmware-dependent. Test them cautiously and avoid polling afterward if the goal is to leave the screen static.
To release keypad lock, try:
:SYSTem:LOCKed OFF
Then close the VISA/session and stop querying. If the front panel remains locked, disconnect USB or power-cycle the scope with USB unplugged.
Normal passive probes:
10X for most oscilloscope work.10X.High-voltage probes:
100X probes reduce the measured signal and are useful for higher-voltage checks.BNC-to-alligator leads:
Probe compensation:
10X.Interpretation:
Good: flat top and bottom, clean corners
Too much compensation: spike or overshoot, then droop
Too little compensation: rounded leading edge and curved top
When reporting to the user: