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

Syntax

lager scope [OPTIONS] NET_NAME COMMAND [ARGS]...

Global Options

OptionDescription
--box BOXLagerbox name or IP address
--helpShow help message and exit

Commands

CommandDescription
autoscaleAutomatically adjust vertical scale and timebase (Rigol only)
couplingSet channel coupling mode (dc, ac, or gnd)
cursorControl scope cursor (Rigol only)
disableDisable oscilloscope channel
enableEnable oscilloscope channel
forceForce trigger manually (bypass trigger condition)
measureMeasure waveform characteristics (Rigol only)
probeSet probe attenuation ratio (1x, 10x, 100x, 1000x)
scaleSet vertical scale (volts per division)
startStart waveform capture (continuous or single)
stopStop waveform capture
streamStream oscilloscope data (PicoScope)
timebaseSet horizontal timebase (seconds per division)
triggerConfigure trigger settings

Command Reference

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]

autoscale

Automatically adjust vertical scale and horizontal timebase for optimal display (Rigol oscilloscopes only).
lager scope NET_NAME autoscale [--box BOX] [--mcu MCU]
Notes:
  • Only supported on Rigol MSO5000 series
  • Adjusts both vertical scale and timebase automatically
  • Useful for quickly finding signals

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
Examples:
lager scope ANALOG1 coupling dc --box my-box   # DC coupling (shows DC + AC)
lager scope ANALOG1 coupling ac --box my-box   # AC coupling (blocks DC)
lager scope ANALOG1 coupling gnd --box my-box  # Ground reference

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]

probe

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

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 (float)
Examples:
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

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 (float)
Examples:
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

Measure Subcommands

Measure waveform characteristics (Rigol only - PicoScope uses streaming). Common Options for all measure commands:
  • --display - Display measurement on screen
  • --cursor - Enable measurement cursor

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.

trigger edge

Set edge trigger configuration.
lager scope NET_NAME trigger edge [OPTIONS]
Options:
  • --mode - Trigger mode: normal, auto, single (default: normal)
  • --coupling - Coupling mode: dc, ac, low_freq_rej, high_freq_rej (default: dc)
  • --source NET - Trigger source net
  • --slope - Trigger slope: rising, falling, both
  • --level FLOAT - Trigger level in volts

trigger pulse

Set pulse width trigger (Rigol only). Triggers when pulse width meets specified conditions.
lager scope NET_NAME trigger pulse [OPTIONS]
Options:
  • --mode - Trigger mode: normal, auto, single (default: normal)
  • --coupling - Coupling mode: dc, ac, low_freq_rej, high_freq_rej (default: dc)
  • --source NET - Trigger source net
  • --level FLOAT - Trigger level in volts
  • --trigger-on - Condition: positive, negative, positive_greater, negative_greater, positive_less, negative_less (default: positive)
  • --upper FLOAT - Upper pulse width limit (seconds)
  • --lower FLOAT - Lower pulse width limit (seconds)

trigger i2c

Set I2C protocol trigger (Rigol only). Triggers on I2C bus events.
lager scope NET_NAME trigger i2c [OPTIONS]
Options:
  • --mode - Trigger mode: normal, auto, single (default: normal)
  • --coupling - Coupling mode: dc, ac, low_freq_rej, high_freq_rej (default: dc)
  • --source-scl NET - SCL source net
  • --source-sda NET - SDA source net
  • --level-scl FLOAT - SCL trigger level
  • --level-sda FLOAT - SDA trigger level
  • --trigger-on - Condition: start, restart, stop, ack_miss, address, data, addr_data (default: start)
  • --address TEXT - I2C address (hex)
  • --addr-width - Address width: 7, 8, 10 bits (default: 7)
  • --data TEXT - Data pattern to match (hex)
  • --data-width INT - Data width in bits (default: 8)
  • --direction - Transfer direction: read, write, read_write (default: read_write)
Example:
# Trigger on I2C start condition
lager scope ANALOG1 trigger i2c --source-scl SCL_NET --source-sda SDA_NET --trigger-on start

# Trigger on specific I2C address
lager scope ANALOG1 trigger i2c --source-scl SCL_NET --source-sda SDA_NET --trigger-on address --address 0x48

trigger spi

Set SPI protocol trigger (Rigol only). Triggers on SPI bus events.
lager scope NET_NAME trigger spi [OPTIONS]
Options:
  • --mode - Trigger mode: normal, auto, single (default: normal)
  • --coupling - Coupling mode: dc, ac, low_freq_rej, high_freq_rej (default: dc)
  • --source-mosi-miso NET - MOSI/MISO source net
  • --source-sck NET - SCK (clock) source net
  • --source-cs NET - CS (chip select) source net
  • --level-mosi-miso FLOAT - MOSI/MISO trigger level
  • --level-sck FLOAT - SCK trigger level
  • --level-cs FLOAT - CS trigger level
  • --trigger-on - Condition: timeout, cs (default: cs)
  • --data TEXT - Data pattern to match (hex)
  • --data-width INT - Data width in bits (default: 8)
  • --clk-slope - Clock edge: rising, falling (default: rising)
  • --cs-idle - CS idle state: high, low (default: high)
  • --timeout FLOAT - Timeout value in seconds

trigger uart

Set UART protocol trigger (Rigol only). Triggers on UART serial events.
lager scope NET_NAME trigger uart [OPTIONS]
Options:
  • --mode - Trigger mode: normal, auto, single (default: normal)
  • --coupling - Coupling mode: dc, ac, low_freq_rej, high_freq_rej (default: dc)
  • --source NET - Trigger source net
  • --level FLOAT - Trigger level in volts
  • --baud INT - Baud rate (default: 9600)
  • --parity - Parity: none, even, odd (default: none)
  • --stop-bits - Stop bits: 1, 1.5, 2 (default: 1)
  • --data-width INT - Data width in bits (default: 8)
  • --trigger-on - Condition: start, stop, data, error (default: start)
  • --data TEXT - Data pattern to match (hex)
Example:
# Trigger on UART start bit at 115200 baud
lager scope ANALOG1 trigger uart --source UART_TX --baud 115200 --trigger-on start

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

Cursor Subcommands

cursor set-a / cursor set-b

Set cursor A or B position.
lager scope NET_NAME cursor set-a [--x FLOAT] [--y FLOAT]
lager scope NET_NAME cursor set-b [--x FLOAT] [--y FLOAT]

cursor move-a / cursor move-b

Shift cursor position.
lager scope NET_NAME cursor move-a [--del-x FLOAT] [--del-y FLOAT]
lager scope NET_NAME cursor move-b [--del-x FLOAT] [--del-y FLOAT]

cursor hide

Hide the cursor.
lager scope NET_NAME cursor hide

Stream Subcommands (PicoScope)

stream start

Start oscilloscope streaming acquisition (PicoScope only).
lager scope NET_NAME stream start [OPTIONS]
Options:
  • --channel - Channel to enable: A, B, 1, 2 (default: A)
  • --volts-per-div - Volts per division (default: 1.0)
  • --time-per-div - Time per division in seconds (default: 0.001)
  • --trigger-level - Trigger level in volts (default: 0.0)
  • --trigger-slope - Trigger slope: rising, falling, either (default: rising)
  • --capture-mode - Capture mode: auto, normal, single (default: auto)
  • --coupling - Input coupling: dc, ac (default: dc)

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 oscilloscope visualization.
lager scope NET_NAME stream web [--box BOX] [--port PORT]
Options:
  • --port - HTTP server port (default: 8080)

stream capture

Capture oscilloscope data to file.
lager scope NET_NAME stream capture [--output FILE] [--duration FLOAT] [--samples INT]
Options:
  • --output - Output file path (default: scope_data.csv)
  • --duration - Capture duration in seconds (default: 1.0)
  • --samples - Number of samples to capture

stream config

Configure oscilloscope streaming settings.
lager scope NET_NAME stream config [OPTIONS]
Options:
  • --channel - Channel to configure
  • --volts-per-div - Volts per division
  • --time-per-div - Time per division
  • --trigger-level - Trigger level
  • --trigger-source - Trigger source channel
  • --trigger-slope - Trigger slope
  • --capture-mode - Capture mode
  • --coupling - Input coupling
  • --enable/--disable - Enable or disable channel

Examples

Basic Capture

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

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

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

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

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

Channel Configuration

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

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

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

Measurements

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

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

Triggering

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

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

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

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

PicoScope Streaming

# Start PicoScope streaming
lager scope PICO1 stream start --channel A --volts-per-div 2.0 --box my-lager-box

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

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

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

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

Supported Hardware

ManufacturerModel SeriesFeatures
RigolMSO5000Multi-channel, mixed-signal
PicoScopeVariousStreaming support

Notes

  • Net names refer to names assigned when setting up your testbed
  • Streaming commands are only supported for PicoScope devices
  • Web visualization requires port 8080 to be accessible
  • Use lager nets to see available scope nets