Skip to main content
Control oscilloscope nets through the Lager CLI for waveform capture, triggering, measurements, and streaming.

Syntax

lager scope [NETNAME] [OPTIONS] COMMAND [ARGS]...
If NETNAME is omitted, lists all available scope nets on the box.

Global Options

OptionDescription
--box BOXLagerbox name or IP address
--mcu MCUMCU identifier (passed to the backend; use when multiple MCUs share a scope)
--helpShow help message and exit

Commands

CommandDescriptionHardware
enableEnable oscilloscope channelBoth
disableDisable oscilloscope channelBoth
startStart waveform capture (continuous or single)Both
stopStop waveform captureBoth
forceForce trigger manually (bypass trigger condition)Both
autoscaleAutomatically adjust vertical scale and timebaseRigol only
couplingSet channel coupling mode (dc, ac, or gnd)Rigol only
probeSet probe attenuation ratioRigol only
scaleSet vertical scale (volts per division)Rigol only
timebaseSet horizontal timebase (seconds per division)Rigol only
measureMeasure waveform characteristicsRigol only
triggerConfigure trigger settingsBoth (see note)
cursorControl scope cursor positionsRigol only
streamStream oscilloscope data with web visualizationPicoScope only
Edge trigger works with both PicoScope and Rigol. Protocol triggers (I2C, SPI, UART) and pulse width trigger are Rigol only.

Validation Ranges

The CLI validates input values before sending commands to the oscilloscope:
ParameterMinimumMaximumUnit
Vertical scale0.001100.0V/div
Horizontal timebase1e-9 (1 ns)50.0s/div
Capture duration0.001 (1 ms)3600 (1 hr)seconds
Sample count1100,000,000samples

Supported Hardware

ManufacturerModelFeatures
RigolMSO5000 series4 analog + 16 digital channels, SCPI/VISA control, advanced triggers (edge, pulse, I2C, SPI, UART), measurements, cursors
PicoScope2000 seriesReal-time streaming, web-based visualization, CSV export, edge trigger

Feature Comparison

FeatureRigol MSO5000PicoScope 2000
Channels4 analog + 16 digitalUp to 4 analog
Real-time streamingNo (single capture)Yes (continuous)
Measurements11 built-in typesVia streaming/CSV
Trigger typesEdge, pulse, I2C, SPI, UARTEdge only
Cursor controlManual XY cursorsWeb UI cursors
AutoscaleYesNo
Web visualizationNoYes (HTML5)
Data exportVia measurementsCSV streaming
Control methodSCPI over USB/LANWebSocket daemon

Basic Control Commands

enable

Enable oscilloscope channel for the specified net.
lager scope NET_NAME enable [--box BOX] [--mcu MCU]

disable

Disable oscilloscope channel.
lager scope NET_NAME disable [--box BOX] [--mcu MCU]

start

Start waveform capture (continuous or single).
lager scope NET_NAME start [--box BOX] [--mcu MCU] [--single]
Options:
  • --single - Capture single waveform then stop (one-shot mode)

stop

Stop waveform capture.
lager scope NET_NAME stop [--box BOX] [--mcu MCU]

force

Force trigger manually, bypassing the trigger condition. Useful when the signal doesn’t meet trigger criteria.
lager scope NET_NAME force [--box BOX] [--mcu MCU]

autoscale

Automatically adjust vertical scale and horizontal timebase for optimal display (Rigol only).
lager scope NET_NAME autoscale [--box BOX] [--mcu MCU]

Channel Configuration (Rigol)

coupling

Set the input coupling mode for the oscilloscope channel.
lager scope NET_NAME coupling MODE [--box BOX] [--mcu MCU]
Arguments:
  • MODE - Coupling mode: dc, ac, or gnd
ModeDescription
dcPass both DC and AC components
acBlock DC component, pass AC only
gndGround reference (0V baseline)

probe

Set the probe attenuation ratio for accurate voltage measurements.
lager scope NET_NAME probe RATIO [--box BOX] [--mcu MCU]
Arguments:
  • RATIO - Probe attenuation: 1, 10, 100, or 1000
lager scope ANALOG1 probe 10 --box my-box    # 10:1 probe
lager scope ANALOG1 probe 1 --box my-box     # Direct connection (1:1)
lager scope ANALOG1 probe 100 --box my-box   # 100:1 high-voltage probe

scale

Set the vertical scale (volts per division) for the oscilloscope channel.
lager scope NET_NAME scale VOLTS_PER_DIV [--box BOX] [--mcu MCU]
Arguments:
  • VOLTS_PER_DIV - Vertical scale in volts per division (0.001 to 100.0)
lager scope ANALOG1 scale 1.0 --box my-box    # 1V/div
lager scope ANALOG1 scale 0.5 --box my-box    # 500mV/div
lager scope ANALOG1 scale 0.1 --box my-box    # 100mV/div
lager scope ANALOG1 scale 0.001 --box my-box  # 1mV/div (minimum)

timebase

Set the horizontal timebase (seconds per division) for the oscilloscope.
lager scope NET_NAME timebase SEC_PER_DIV [--box BOX] [--mcu MCU]
Arguments:
  • SEC_PER_DIV - Horizontal timebase in seconds per division (1e-9 to 50.0)
lager scope ANALOG1 timebase 0.001 --box my-box      # 1ms/div
lager scope ANALOG1 timebase 0.0001 --box my-box     # 100us/div
lager scope ANALOG1 timebase 0.000001 --box my-box   # 1us/div
lager scope ANALOG1 timebase 0.000000001 --box my-box # 1ns/div (minimum)

Measure Subcommands (Rigol)

Measure waveform characteristics on Rigol oscilloscopes. PicoScope users should use the streaming capture commands to export waveform data for analysis. Common Options for all measure commands:
OptionDescription
--box BOXLagerbox name or IP
--mcu MCUMCU identifier
--displayDisplay measurement on oscilloscope screen
--cursorEnable measurement cursor on screen

Time Measurements

measure period

Measure waveform period.
lager scope NET_NAME measure period [--box BOX] [--display] [--cursor]

measure freq

Measure waveform frequency.
lager scope NET_NAME measure freq [--box BOX] [--display] [--cursor]

measure pulse-width-pos

Measure positive pulse width.
lager scope NET_NAME measure pulse-width-pos [--box BOX] [--display] [--cursor]

measure pulse-width-neg

Measure negative pulse width.
lager scope NET_NAME measure pulse-width-neg [--box BOX] [--display] [--cursor]

measure duty-cycle-pos

Measure positive duty cycle (percentage of time signal is high).
lager scope NET_NAME measure duty-cycle-pos [--box BOX] [--display] [--cursor]

measure duty-cycle-neg

Measure negative duty cycle (percentage of time signal is low).
lager scope NET_NAME measure duty-cycle-neg [--box BOX] [--display] [--cursor]

Voltage Measurements

measure vpp

Measure peak-to-peak voltage.
lager scope NET_NAME measure vpp [--box BOX] [--display] [--cursor]

measure vmax

Measure maximum voltage.
lager scope NET_NAME measure vmax [--box BOX] [--display] [--cursor]

measure vmin

Measure minimum voltage.
lager scope NET_NAME measure vmin [--box BOX] [--display] [--cursor]

measure vavg

Measure average voltage.
lager scope NET_NAME measure vavg [--box BOX] [--display] [--cursor]

measure vrms

Measure RMS (root mean square) voltage.
lager scope NET_NAME measure vrms [--box BOX] [--display] [--cursor]

Trigger Subcommands

Configure trigger settings. Edge trigger works with both PicoScope and Rigol. Protocol triggers (I2C, SPI, UART) and pulse trigger are Rigol only. Common Trigger Options:
OptionDescriptionDefault
--modeTrigger mode: normal, auto, singlenormal
--couplingCoupling mode: dc, ac, low_freq_rej, high_freq_rejdc
--source NETTrigger source netCurrent net
--level VOLTSTrigger level in volts-

trigger edge

Set edge trigger configuration. Works with both PicoScope and Rigol.
lager scope NET_NAME trigger edge [OPTIONS]
Options (in addition to common):
OptionDescription
--slopeTrigger slope: rising, falling, both
Examples:
# Rising edge at 1.5V
lager scope ANALOG1 trigger edge --slope rising --level 1.5 --box my-box

# Falling edge in single capture mode
lager scope ANALOG1 trigger edge --slope falling --level 0.5 --mode single --box my-box

# Either edge with AC coupling
lager scope ANALOG1 trigger edge --slope both --coupling ac --level 0 --box my-box

trigger pulse

Set pulse width trigger (Rigol only). Triggers when pulse width meets specified conditions.
lager scope NET_NAME trigger pulse [OPTIONS]
Options (in addition to common):
OptionDescriptionDefault
--trigger-onCondition (see table below)positive
--upper SECONDSUpper pulse width limit-
--lower SECONDSLower pulse width limit-
Trigger-on Conditions:
ConditionDescription
positivePositive pulse
negativeNegative pulse
positive_greaterPositive pulse wider than upper limit
negative_greaterNegative pulse wider than upper limit
positive_lessPositive pulse narrower than upper limit
negative_lessNegative pulse narrower than upper limit
Examples:
# Detect short positive glitches (< 100us)
lager scope ANALOG1 trigger pulse --trigger-on positive_less --upper 0.0001 --box my-box

# Detect long negative pulses (> 1ms)
lager scope ANALOG1 trigger pulse --trigger-on negative_greater --upper 0.001 --level 1.0 --box my-box

trigger i2c

Set I2C protocol trigger (Rigol only). Triggers on I2C bus events.
lager scope NET_NAME trigger i2c [OPTIONS]
Options (in addition to common mode/coupling):
OptionDescriptionDefault
--source-scl NETSCL source net-
--source-sda NETSDA source net-
--level-scl VOLTSSCL trigger level-
--level-sda VOLTSSDA trigger level-
--trigger-onCondition (see table below)start
--address HEXI2C address (hex)-
--addr-widthAddress width: 7, 8, 10 bits7
--data HEXData pattern to match (hex)-
--data-width INTData width in bits8
--directionDirection: read, write, read_writeread_write
Trigger-on Conditions:
ConditionDescription
startStart condition
restartRepeated start condition
stopStop condition
ack_missMissing ACK (NACK)
addressSpecific address match
dataSpecific data match
addr_dataAddress + data match
Examples:
# Trigger on I2C start condition
lager scope ANALOG1 trigger i2c \
  --source-scl SCL_NET --source-sda SDA_NET \
  --trigger-on start --box my-box

# Trigger on specific I2C address (7-bit)
lager scope ANALOG1 trigger i2c \
  --source-scl SCL_NET --source-sda SDA_NET \
  --trigger-on address --address 0x48 --box my-box

# Trigger on I2C write to address 0x76 with data 0xF4
lager scope ANALOG1 trigger i2c \
  --source-scl SCL_NET --source-sda SDA_NET \
  --trigger-on addr_data --address 0x76 --data 0xF4 \
  --direction write --box my-box

# Trigger on NACK (missing acknowledgment)
lager scope ANALOG1 trigger i2c \
  --source-scl SCL_NET --source-sda SDA_NET \
  --trigger-on ack_miss --box my-box

trigger spi

Set SPI protocol trigger (Rigol only). Triggers on SPI bus events.
lager scope NET_NAME trigger spi [OPTIONS]
Options (in addition to common mode/coupling):
OptionDescriptionDefault
--source-mosi-miso NETMOSI/MISO source net-
--source-sck NETSCK (clock) source net-
--source-cs NETCS (chip select) source net-
--level-mosi-miso VOLTSMOSI/MISO trigger level-
--level-sck VOLTSSCK trigger level-
--level-cs VOLTSCS trigger level-
--trigger-onCondition: timeout, cscs
--data HEXData pattern to match (hex)-
--data-width INTData width in bits8
--clk-slopeClock edge: rising, fallingrising
--cs-idleCS idle state: high, lowhigh
--timeout SECONDSTimeout value in seconds-
Examples:
# Trigger on CS assertion
lager scope ANALOG1 trigger spi \
  --source-mosi-miso MOSI_NET --source-sck SCK_NET --source-cs CS_NET \
  --trigger-on cs --box my-box

# Trigger on SPI data pattern with falling clock edge
lager scope ANALOG1 trigger spi \
  --source-mosi-miso MOSI_NET --source-sck SCK_NET --source-cs CS_NET \
  --data 0xFF --clk-slope falling --box my-box

trigger uart

Set UART protocol trigger (Rigol only). Triggers on UART serial events.
lager scope NET_NAME trigger uart [OPTIONS]
Options (in addition to common):
OptionDescriptionDefault
--baud INTBaud rate9600
--parityParity: none, even, oddnone
--stop-bitsStop bits: 1, 1.5, 21
--data-width INTData width in bits8
--trigger-onCondition: start, stop, data, errorstart
--data HEXData pattern to match (hex)-
Examples:
# Trigger on UART start bit at 115200 baud
lager scope ANALOG1 trigger uart \
  --source UART_TX --baud 115200 --trigger-on start --box my-box

# Trigger on specific UART data byte
lager scope ANALOG1 trigger uart \
  --source UART_TX --baud 9600 --trigger-on data --data 0x55 --box my-box

# Trigger on UART framing error
lager scope ANALOG1 trigger uart \
  --source UART_RX --baud 115200 --trigger-on error --box my-box

Cursor Subcommands (Rigol)

Control manual XY cursors on Rigol oscilloscopes for precise time and voltage measurements. Cursors A and B can be positioned independently, and the oscilloscope calculates the delta between them.

cursor set-a / cursor set-b

Set the absolute position of cursor A or B.
lager scope NET_NAME cursor set-a [--x FLOAT] [--y FLOAT] [--box BOX] [--mcu MCU]
lager scope NET_NAME cursor set-b [--x FLOAT] [--y FLOAT] [--box BOX] [--mcu MCU]
Options:
OptionDescription
--xX coordinate (time position)
--yY coordinate (voltage position)

cursor move-a / cursor move-b

Move a cursor by a relative offset from its current position.
lager scope NET_NAME cursor move-a [--x FLOAT] [--y FLOAT] [--box BOX] [--mcu MCU]
lager scope NET_NAME cursor move-b [--x FLOAT] [--y FLOAT] [--box BOX] [--mcu MCU]
Options:
OptionDescription
--xRelative X movement (delta)
--yRelative Y movement (delta)

cursor hide

Hide the cursor display.
lager scope NET_NAME cursor hide [--box BOX] [--mcu MCU]
Examples:
# Position cursors for time measurement
lager scope ANALOG1 cursor set-a --x -0.001 --box my-box
lager scope ANALOG1 cursor set-b --x 0.001 --box my-box

# Fine-tune cursor B position
lager scope ANALOG1 cursor move-b --x 0.0001 --box my-box

# Set voltage measurement cursors
lager scope ANALOG1 cursor set-a --y 0.5 --box my-box
lager scope ANALOG1 cursor set-b --y 3.3 --box my-box

# Hide cursors when done
lager scope ANALOG1 cursor hide --box my-box

Stream Subcommands (PicoScope)

Stream oscilloscope data in real time from PicoScope devices. The streaming system uses a dedicated daemon on the Lager Box with a web-based visualization interface.

Daemon Architecture

The PicoScope streaming daemon communicates over multiple ports:
PortPurpose
8080HTTP server for web visualization UI
8082WebSocket command channel (browser)
8083WebTransport streaming (browser data)
8085CLI command port (WebSocket)

stream start

Start oscilloscope streaming acquisition with web visualization.
lager scope NET_NAME stream start [OPTIONS]
Options:
OptionShortDescriptionDefault
--channel-cChannel: A, B, 1, 2A
--volts-per-div-vVertical scale (V/div)1.0
--time-per-div-tHorizontal scale (s/div)0.001
--trigger-levelTrigger threshold voltage0.0
--trigger-slopeSlope: rising, falling, eitherrising
--capture-modeMode: auto, normal, singleauto
--couplingCoupling: dc, acdc
--quiet-qMinimal output
--jsonJSON output format
--verboseVerbose debugging output
Examples:
# Start streaming on channel A with default settings
lager scope PICO1 stream start --box my-box

# Start with specific configuration
lager scope PICO1 stream start -c A -v 2.0 -t 0.0001 --box my-box

# Start with trigger configuration
lager scope PICO1 stream start \
  --trigger-level 1.5 --trigger-slope rising \
  --capture-mode normal --box my-box

# Start in single capture mode with AC coupling
lager scope PICO1 stream start \
  --capture-mode single --coupling ac --box my-box

stream stop

Stop oscilloscope streaming acquisition.
lager scope NET_NAME stream stop [--box BOX]

stream status

Check oscilloscope streaming daemon status.
lager scope NET_NAME stream status [--box BOX]

stream web

Open web browser for real-time oscilloscope visualization.
lager scope NET_NAME stream web [--box BOX] [--port PORT]
Options:
  • --port - HTTP server port (default: 8080)
The web interface provides an HTML5 oscilloscope display with real-time waveform rendering via WebTransport.

stream capture

Capture oscilloscope waveform data to a CSV file.
lager scope NET_NAME stream capture [OPTIONS]
Options:
OptionShortDescriptionDefault
--output-oCSV output file pathscope_data.csv
--duration-dCapture duration in seconds (0.001-3600)1.0
--samples-nMaximum samples to capture (1-100M)unlimited
--quiet-qMinimal output
--jsonJSON output format
--verboseVerbose debugging output
Examples:
# Capture 1 second of data (default)
lager scope PICO1 stream capture --box my-box

# Capture 5 seconds to specific file
lager scope PICO1 stream capture -o waveform.csv -d 5.0 --box my-box

# Capture up to 1M samples
lager scope PICO1 stream capture -n 1000000 -o data.csv --box my-box

# Capture with JSON output format
lager scope PICO1 stream capture --json --box my-box

stream config

Configure oscilloscope streaming settings without starting/stopping acquisition.
lager scope NET_NAME stream config [OPTIONS]
Options:
OptionShortDescription
--channel-cChannel: A, B, 1, 2
--volts-per-div-vVolts per division
--time-per-div-tTime per division (seconds)
--trigger-levelTrigger level (volts)
--trigger-sourceTrigger source channel: A, B, 1, 2
--trigger-slopeSlope: rising, falling, either
--capture-modeMode: auto, normal, single
--couplingCoupling: dc, ac
--enable / --disableEnable or disable channel
Examples:
# Change vertical scale while streaming
lager scope PICO1 stream config -v 0.5 --box my-box

# Switch to channel B
lager scope PICO1 stream config -c B --enable --box my-box

# Change trigger settings
lager scope PICO1 stream config --trigger-level 2.0 --trigger-slope falling --box my-box

# Switch to single capture mode
lager scope PICO1 stream config --capture-mode single --box my-box

Examples

Basic Rigol Workflow

# Enable scope channel
lager scope ANALOG1 enable --box my-box

# Auto-scale to find signal
lager scope ANALOG1 autoscale --box my-box

# Fine-tune settings
lager scope ANALOG1 scale 0.5 --box my-box
lager scope ANALOG1 timebase 0.001 --box my-box

# Start continuous capture
lager scope ANALOG1 start --box my-box

# Take measurements
lager scope ANALOG1 measure freq --display --box my-box
lager scope ANALOG1 measure vpp --display --box my-box

# Single capture mode
lager scope ANALOG1 start --single --box my-box

# Stop capture
lager scope ANALOG1 stop --box my-box

Channel Configuration

# Configure for 10x probe at 500mV/div, 1ms/div
lager scope ANALOG1 probe 10 --box my-box
lager scope ANALOG1 scale 0.5 --box my-box
lager scope ANALOG1 timebase 0.001 --box my-box

# Set AC coupling for audio signals
lager scope ANALOG1 coupling ac --box my-box

# Force trigger when signal doesn't meet criteria
lager scope ANALOG1 force --box my-box

Measurements

# Time measurements
lager scope ANALOG1 measure freq --display --box my-box
lager scope ANALOG1 measure period --box my-box
lager scope ANALOG1 measure duty-cycle-pos --box my-box

# Voltage measurements
lager scope ANALOG1 measure vpp --box my-box
lager scope ANALOG1 measure vrms --display --box my-box
lager scope ANALOG1 measure vmax --box my-box

Triggering

# Edge trigger
lager scope ANALOG1 trigger edge --slope rising --level 1.5 --box my-box

# Pulse width trigger (glitch detection)
lager scope ANALOG1 trigger pulse --trigger-on positive_less --upper 0.0001 --box my-box

# UART trigger at 115200 baud
lager scope ANALOG1 trigger uart \
  --source UART_NET --baud 115200 --trigger-on start --box my-box

# I2C trigger on address 0x48
lager scope ANALOG1 trigger i2c \
  --source-scl SCL --source-sda SDA \
  --trigger-on address --address 0x48 --box my-box

# SPI trigger on chip select
lager scope ANALOG1 trigger spi \
  --source-mosi-miso MOSI --source-sck SCK --source-cs CS \
  --trigger-on cs --box my-box

Cursor Measurements

# Measure time between two events
lager scope ANALOG1 cursor set-a --x -0.001 --box my-box
lager scope ANALOG1 cursor set-b --x 0.002 --box my-box

# Measure voltage difference
lager scope ANALOG1 cursor set-a --y 0.0 --box my-box
lager scope ANALOG1 cursor set-b --y 3.3 --box my-box

# Clean up
lager scope ANALOG1 cursor hide --box my-box

PicoScope Streaming

# Start streaming with default settings
lager scope PICO1 stream start --box my-box

# Open web visualization
lager scope PICO1 stream web --box my-box

# Capture data to file
lager scope PICO1 stream capture -o waveform.csv -d 5.0 --box my-box

# Adjust settings while streaming
lager scope PICO1 stream config -v 2.0 -t 0.0001 --box my-box

# Check streaming status
lager scope PICO1 stream status --box my-box

# Stop streaming
lager scope PICO1 stream stop --box my-box

Command Structure

scope [NETNAME] [--box BOX]
  Basic Control
  ├── enable [--mcu]
  ├── disable [--mcu]
  ├── start [--mcu] [--single]
  ├── stop [--mcu]
  └── force [--mcu]

  Channel Configuration (Rigol)
  ├── scale VOLTS_PER_DIV [--mcu]
  ├── coupling {dc|ac|gnd} [--mcu]
  ├── probe {1|10|100|1000} [--mcu]
  ├── timebase SECONDS_PER_DIV [--mcu]
  └── autoscale [--mcu]

  Measurements (Rigol)
  └── measure
      ├── period [--display] [--cursor]
      ├── freq [--display] [--cursor]
      ├── vpp [--display] [--cursor]
      ├── vmax [--display] [--cursor]
      ├── vmin [--display] [--cursor]
      ├── vrms [--display] [--cursor]
      ├── vavg [--display] [--cursor]
      ├── pulse-width-pos [--display] [--cursor]
      ├── pulse-width-neg [--display] [--cursor]
      ├── duty-cycle-pos [--display] [--cursor]
      └── duty-cycle-neg [--display] [--cursor]

  Triggers
  └── trigger
      ├── edge [--slope] [--level] [--mode] [--coupling] [--source]
      ├── pulse [--trigger-on] [--upper] [--lower] [--level] ...
      ├── i2c [--source-scl] [--source-sda] [--trigger-on] [--address] ...
      ├── spi [--source-mosi-miso] [--source-sck] [--source-cs] ...
      └── uart [--baud] [--parity] [--trigger-on] [--data] ...

  Cursors (Rigol)
  └── cursor
      ├── set-a [--x] [--y]
      ├── set-b [--x] [--y]
      ├── move-a [--x] [--y]
      ├── move-b [--x] [--y]
      └── hide

  Streaming (PicoScope)
  └── stream
      ├── start [-c] [-v] [-t] [--trigger-level] [--trigger-slope] ...
      ├── stop
      ├── status
      ├── web [--port]
      ├── capture [-o] [-d] [-n] [--quiet] [--json] [--verbose]
      └── config [-c] [-v] [-t] [--enable/--disable] ...

Notes

  • Net names refer to names assigned when setting up your testbed with lager nets
  • The --mcu option is available on all commands and is passed to the backend; use it when multiple MCUs share a scope channel
  • Streaming commands are only available for PicoScope devices
  • Measurement and cursor commands are only available for Rigol devices
  • Edge trigger is the only trigger type supported on both PicoScope and Rigol
  • Web visualization requires port 8080 to be accessible on the Lager Box
  • Validation rejects values outside the allowed ranges before sending to hardware
  • Use lager nets to see available scope nets