Difference between revisions of "Using sigrok-cli with an oscilloscope"
Jump to navigation
Jump to search
(Created page with "Oscilloscopes can be controlled using a command-line interface through [https://sigrok.org/wiki/Sigrok-cli sigrok-cli]. This page provides some example commands for use with t...") |
(No difference)
|
Revision as of 13:38, 6 April 2020
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 here.
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.