Using sigrok-cli with an oscilloscope
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Oscilloscopes can be controlled using a command-line interface through Sigrok-cli. This page provides some example commands for use with the popular Hantek 6022BE USB oscilloscope. For a full list of commands, see the sigrok-cli manual.
Example sigrok-cli commands
Display the capabilities of the device attached
sigrok-cli --driver hantek-6xxx --show
To show the options of the channel group "CH1"
sigrok-cli --driver hantek-6xxx --channel-group CH1 --show
Example for collecting 100 samples at 1MHz
sigrok-cli --driver hantek-6xxx --config samplerate=1m --samples 100
For collecting samples for 100 ms
sigrok-cli --driver hantek-6xxx --time 100
For collecting 20k samples at 1MHz sample rate and save to a csv file in the sigrok-cli directory. May require admin rights depending on sigrok-cli install location.
sigrok-cli --driver hantek-6xxx --config samplerate=1m --output-file test.csv --output-format csv --samples 20k
Note: sigrok-cli can only be used with one Hantek 6022BE device at a time.