> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lagerdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Oscilloscope

> Control oscilloscope settings and capture waveforms

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

> [!WARNING]
>
> **Known limitations on the Rigol MSO5000.** The edge and SPI triggers work. The pulse, UART, I2C and CAN triggers are refused before anything reaches the scope, so it keeps its trigger, and the command exits 1. Every bus decoder in the Python API fails. [Issue #418](https://github.com/lagerdata/lager/issues/418) tracks this work.

## Syntax

```bash theme={null}
lager scope [NET_NAME] [OPTIONS] COMMAND [ARGS]...
```

With no command, `lager scope` lists the `scope` and `scope-channel` nets on the box. A command without `NET_NAME` uses the default scope net. Set the default with `lager defaults add --scope-net NET_NAME`.

## The scope and its channels

An oscilloscope is two kinds of net. A **`scope`** net is the instrument itself. A **`scope-channel`** net is one of its inputs, one net for each channel. For a two-channel PicoScope, `lager nets tui` offers three nets: the two channels and the scope that they belong to.

The split follows the hardware. Six settings belong to a channel, and the rest belong to the instrument:

| Belongs to a `scope-channel` net | Belongs to the `scope` net |
| - | - |
| `enable`, `disable` | `start`, `stop`, `force`, `status` |
| `scale` (volts/div) | `timebase`, horizontal position |
| `coupling` | `trigger` (source, slope, level, mode, holdoff) |
| `probe` | `cursor` |
| analog offset | `acquire`, `roll`, `display` |
| `measure` | `autoscale`, reported capabilities |

You address both kinds of net in the same way:

```bash theme={null}
lager scope vbus coupling ac --box my-lager-box           # a channel net
lager scope picoscope1 timebase 0.001 --box my-lager-box  # the scope net
```

> [!NOTE]
>
> An instrument command also works on one of its channel nets. A channel names exactly one scope, so the command is not ambiguous. Scripts from before scope nets keep working unchanged.
>
> The reverse does not work. `lager scope picoscope1 coupling ac` names no channel, and the box does not guess one. The error names the channel nets to use instead.

> [!NOTE]
>
> Boxes from before scope nets had only channel nets, saved with the role `scope`. The box converts them the first time that it reads its nets. Each one becomes a `scope-channel` net with the same name and pin. A `scope` net named after the model, such as `picoscope1`, appears next to them. An old `scope` net with no pin stays a `scope` net and stands for the instrument. You do not need to add anything again, and you can rename the new net.

## Global Options

| Option | Description |
| - | - |
| `--box BOX` | Lager Box name or IP address |
| `--help` | Show help message and exit |

Every command also accepts `--box`. The channel, capture-control, `autoscale`, `measure` and `cursor` commands also accept `--mcu MCU`, and so do the trigger types other than `holdoff`. No `lager scope` command uses its value.

## Commands

| Command | Description | Hardware |
| - | - | - |
| `enable` | Enable oscilloscope channel | Both |
| `disable` | Disable oscilloscope channel | Both |
| `start` | Start waveform capture (continuous or single) | Both |
| `stop` | Stop waveform capture | Both |
| `force` | Force a trigger now (bypass the trigger condition) | Both |
| `status` | Show every scope setting in one reply | Both |
| `autoscale` | Automatically adjust vertical scale and timebase | Rigol only |
| `coupling` | Set channel coupling mode (dc, ac; gnd is Rigol only) | Both |
| `probe` | Set probe attenuation ratio | Both |
| `scale` | Set vertical scale (volts per division) | Both |
| `timebase` | Set horizontal timebase (seconds per division) | Both |
| `measure` | Measure waveform characteristics | Both (see note) |
| `trigger` | Show the trigger, or set it with a subcommand | Both (see note) |
| `acquire` | Set how captures combine (normal, average, peak) | Both |
| `roll` | Set roll mode for slow timebases | PicoScope 2202, 2203, 2204(A) and 2205(A) only |
| `fft` | Report the strongest frequency components of a channel | Both |
| `display` | Set how the web UI draws the trace | Both |
| `cursor` | Place cursors over the capture and read the deltas | `time`/`volts`/`off` on both; `set-a`/`set-b`/`move-a`/`move-b`/`hide` are Rigol only |
| `stream` | Stream oscilloscope data with web visualization | Both (a Rigol MSO5000 needs an HDMI capture card) |

> [!NOTE]
>
> The edge trigger and `trigger holdoff` work on PicoScope and Rigol. The SPI trigger is Rigol only. The pulse, I2C and UART triggers are refused on both, with the scope unchanged.

> [!NOTE]
>
> Measurements work on both instruments. A single `measure` on a Rigol is the scope's own reading of its full memory. Lager clears the readout the query adds to the scope's measurement bar, and leaves any readout you added at the front panel. Lager finds that readout in the live view, so a Rigol with no capture card paired keeps it on screen. The set the web UI shows, and `measurement.all()` in Python, are computed from the channel's 1000-point screen record, as for a PicoScope. That record is too coarse to time an edge, so rise and fall are left out of the set. The web UI offers **Read** for them, which asks the scope once. For a PicoScope, the daemon computes every value from a captured block, because no PicoTech API has an equivalent of `:MEAS:VPP?`. `--display` and `--cursor` are Rigol only. They put the reading on the screen of the instrument, and a PicoScope has no screen.
>
> While a PicoScope acquires, measurements and cursor readings use the capture that the daemon streamed out last. So they describe the trace in the web UI, not a different capture a moment later. After a stop, they describe the last capture, as the readouts on a stopped bench scope do.

***

## Validation Ranges

The CLI checks these values before it sends a command to the oscilloscope:

| Parameter | Minimum | Maximum | Unit |
| - | - | - | - |
| Vertical scale | 0.001 | 100.0 | V/div |
| Horizontal timebase | 1e-9 (1 ns) | 50.0 | s/div |
| Capture duration | 0.001 (1 ms) | 3600 (1 hr) | seconds |
| Sample count | 1 | 100,000,000 | samples |

***

## Supported Hardware

| Manufacturer | Model | Features |
| - | - | - |
| Rigol | MSO5000 series | 2 or 4 analog + 16 digital channels, live view through an HDMI capture card, edge and SPI triggers, single measurements by the instrument, display cursors |
| Rigol | DS1000Z series (DS1054Z, DS1074Z, DS1104Z) | 4 analog channels, live view from the 1200-point screen record (no capture card), edge trigger with holdoff, autoscale, single measurements by the instrument |
| PicoScope | 2000, 2000a, 3000a, 4000a, 5000a series | Real-time streaming, web-based visualization, CSV export, edge trigger, daemon-computed measurements, cursors over the capture |

A DS1000Z has no video output, so the daemon reads its screen record over full-speed USB, about 2.4 frames a second with three channels on. It has no digital channels, display cursors or roll mode. After `autoscale`, its timing measurements read as unavailable for 5 to 25 s while the scope settles.

The daemon reads the channel count, voltage ranges, bandwidth, memory depth and ADC resolution from the attached PicoScope. It does not assume them from the series. Type `capabilities` in the console of the web UI to see what the daemon found.

When you add nets, `lager nets tui` reads the channel count from the model number. It offers two channel nets for a 2-channel model and four for a 4-channel model. The 8-channel 4824A also gets four, channels A to D, because Lager names no channel after D. A model number that it cannot read gets two.

### Feature Comparison

| Feature | Rigol MSO5000 | PicoScope |
| - | - | - |
| Channels | 2 or 4 analog (by model) + 16 digital | 2 or 4 analog (A to D), detected at runtime |
| Real-time streaming | Yes, from its HDMI output through a capture card | Yes (continuous) |
| Measurements | 14 types: one at a time by the instrument, the whole set from the screen record | 14 types, computed from the capture |
| Trigger types | Edge, with holdoff, and SPI. Pulse, I2C and UART are refused, with the scope unchanged | Edge only, with holdoff |
| Cursor control | Time/voltage cursors over the captured samples, and XY cursors on the instrument display | Time/voltage cursors over the captured samples |
| Autoscale | Yes | No |
| Averaging, peak detect, FFT | `acquire` (done by the instrument), `fft` | `acquire`, `fft` |
| Roll mode | No | `roll`, on the 2202, 2203, 2204(A) and 2205(A) |
| Web visualization | Yes, with a capture card | Yes (HTML5) |
| Data export | Via measurements | CSV streaming |
| Control method | SCPI over USB, via the box daemon | Vendor SDK, via the box daemon |

***

## Basic Control Commands

### `enable`

Enable the channel of a `scope-channel` net.

```bash theme={null}
lager scope NET_NAME enable [--box BOX]
```

### `disable`

Disable the channel of a `scope-channel` net.

```bash theme={null}
lager scope NET_NAME disable [--box BOX]
```

### `start`

Start waveform capture. Without `--single`, the scope captures continuously in the trigger mode that is set.

```bash theme={null}
lager scope NET_NAME start [--single] [--box BOX]
```

**Options:**

* `--single` - Arm one capture, then stop (one-shot mode)

A PicoScope in `single` mode changes to `auto` when `start` runs without `--single`. A single-shot stops after one capture, so it cannot run continuously.

### `stop`

Stop waveform capture.

```bash theme={null}
lager scope NET_NAME stop [--box BOX]
```

### `force`

Trigger now, without the trigger condition. Use it when the signal does not meet the trigger condition.

```bash theme={null}
lager scope NET_NAME force [--box BOX]
```

### `status`

Show every scope setting in one reply: the channels, the timebase, the trigger and the acquisition.

```bash theme={null}
lager scope NET_NAME status [--box BOX]
```

The reply comes from the settings that the daemon published last. The web UI draws its controls from the same state.

### `autoscale`

Automatically adjust the vertical scale and the horizontal timebase (Rigol only). The command can take 10 to 15 seconds.

```bash theme={null}
lager scope NET_NAME autoscale [--box BOX]
```

A PicoScope refuses `autoscale`, because its SDKs have no autoset. Set `scale` and `timebase` yourself.

***

## Channel Configuration

### `coupling`

Set the input coupling mode of the channel.

```bash theme={null}
lager scope NET_NAME coupling MODE [--box BOX]
```

**Arguments:**

* `MODE` - Coupling mode: `dc`, `ac`, or `gnd`

| Mode | Description |
| - | - |
| `dc` | Pass both DC and AC components |
| `ac` | Block DC component, pass AC only |
| `gnd` | Ground reference (0V baseline). Rigol only |

A PicoScope refuses `gnd`, because no PicoScope series has a ground switch. Use `ac` to block the DC component, or disable the channel.

### `probe`

Set the probe attenuation ratio for accurate voltage measurements.

```bash theme={null}
lager scope NET_NAME probe RATIO [--box BOX]
```

**Arguments:**

* `RATIO` - Probe attenuation: `1`, `10`, `100`, or `1000`

```bash theme={null}
lager scope ANALOG1 probe 10 --box my-lager-box    # 10:1 probe
lager scope ANALOG1 probe 1 --box my-lager-box     # Direct connection (1:1)
lager scope ANALOG1 probe 100 --box my-lager-box   # 100:1 high-voltage probe
```

A 2000-series PicoScope (2204A, 2205A) starts at 10x. The 2000a, 3000a, 4000a and 5000a series start at 1x. Set the ratio to match your probe.

### `scale`

Set the vertical scale (volts per division) of the channel.

```bash theme={null}
lager scope NET_NAME scale VOLTS_PER_DIV [--box BOX]
```

**Arguments:**

* `VOLTS_PER_DIV` - Vertical scale in volts per division (0.001 to 100.0)

```bash theme={null}
lager scope ANALOG1 scale 1.0 --box my-lager-box    # 1V/div
lager scope ANALOG1 scale 0.5 --box my-lager-box    # 500mV/div
lager scope ANALOG1 scale 0.1 --box my-lager-box    # 100mV/div
lager scope ANALOG1 scale 0.001 --box my-lager-box  # 1mV/div (minimum)
```

### `timebase`

Set the horizontal timebase (seconds per division) of the oscilloscope.

```bash theme={null}
lager scope NET_NAME timebase SECONDS_PER_DIV [--box BOX]
```

**Arguments:**

* `SECONDS_PER_DIV` - Horizontal timebase in seconds per division (1e-9 to 50.0)

```bash theme={null}
lager scope ANALOG1 timebase 0.001 --box my-lager-box      # 1ms/div
lager scope ANALOG1 timebase 0.0001 --box my-lager-box     # 100us/div
lager scope ANALOG1 timebase 0.000001 --box my-lager-box   # 1us/div
lager scope ANALOG1 timebase 0.000000001 --box my-lager-box # 1ns/div (minimum)
```

The range above is what the command accepts, not what a given unit can do. A scope samples at a fixed set of intervals, so it rounds the request to the nearest one. The fastest timebase also depends on the block depth, not only on the sample rate. For example, a 2204A at 100 MS/s over 8000 samples stops at 8 us/div. On a PicoScope, `status` reports the timebase in use, not the one that you asked for.

***

## Measure Subcommands

Measure waveform characteristics on either instrument. A Rigol returns a reading that it computes itself. For a PicoScope, the box captures a block and the daemon computes the value from the samples. You do not need streaming or a CSV export.

Each PicoScope measurement asks for its own capture, so several values cost several captures. To read the whole set from one capture, use `measurement.all()` in the [Python API](https://docs.lagerdata.com/source/reference/python/scope.md).

**Common Options for all measure commands:**

| Option | Description |
| - | - |
| `--box BOX` | Lager Box name or IP |
| `--display` | Show the measurement on the oscilloscope screen (Rigol only) |
| `--cursor` | Show the measurement cursor on the screen (Rigol only) |

### Time Measurements

#### `measure period`

Measure waveform period.

```bash theme={null}
lager scope NET_NAME measure period [--box BOX] [--display] [--cursor]
```

#### `measure freq`

Measure waveform frequency.

```bash theme={null}
lager scope NET_NAME measure freq [--box BOX] [--display] [--cursor]
```

#### `measure pulse-width-pos`

Measure positive pulse width.

```bash theme={null}
lager scope NET_NAME measure pulse-width-pos [--box BOX] [--display] [--cursor]
```

#### `measure pulse-width-neg`

Measure negative pulse width.

```bash theme={null}
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).

```bash theme={null}
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).

```bash theme={null}
lager scope NET_NAME measure duty-cycle-neg [--box BOX] [--display] [--cursor]
```

### Voltage Measurements

#### `measure vpp`

Measure peak-to-peak voltage.

```bash theme={null}
lager scope NET_NAME measure vpp [--box BOX] [--display] [--cursor]
```

#### `measure vmax`

Measure maximum voltage.

```bash theme={null}
lager scope NET_NAME measure vmax [--box BOX] [--display] [--cursor]
```

#### `measure vmin`

Measure minimum voltage.

```bash theme={null}
lager scope NET_NAME measure vmin [--box BOX] [--display] [--cursor]
```

#### `measure vavg`

Measure average voltage.

```bash theme={null}
lager scope NET_NAME measure vavg [--box BOX] [--display] [--cursor]
```

#### `measure vrms`

Measure RMS (root mean square) voltage.

```bash theme={null}
lager scope NET_NAME measure vrms [--box BOX] [--display] [--cursor]
```

***

## Trigger Subcommands

Show or set the trigger. The edge trigger works on PicoScope and Rigol, and the SPI trigger on a Rigol. The pulse, I2C and UART triggers are refused on both: the command exits 1 before anything reaches the scope.

### `trigger`

With no subcommand, `trigger` shows the mode, source, slope and level of the trigger. On a PicoScope, it also shows the holdoff if one is set.

```bash theme={null}
lager scope NET_NAME trigger [--box BOX]
```

**Options for `pulse`, `i2c`, `spi` and `uart`:**

| Option | Description | Default |
| - | - | - |
| `--mode` | Trigger mode: `normal`, `auto`, `single` | `normal` |
| `--coupling` | Trigger-path coupling filter: `dc`, `ac`, `low_freq_rej`, `high_freq_rej` | `dc` |
| `--source NET` | Trigger source net (`pulse` and `uart` only) | unchanged |
| `--level VOLTS` | Trigger level in volts (`pulse` and `uart` only) | unchanged |

These four commands apply `--mode` and `--coupling` every time. So a call without them sets `normal` and `dc`. `trigger edge` has no defaults, and it changes only the settings that you give.

> [!NOTE]
>
> `--coupling` is the filter in front of the trigger comparator, not the input coupling of the channel. The two settings share a word, but they do different things. The trigger filter lets the scope trigger on a noisy or drifting edge, and the trace does not change. `lager scope <net> coupling` changes what the channel passes, and the trace moves. Only a Rigol has the trigger filter. A PicoScope refuses the flag, and it does not apply it to the input instead.

> [!NOTE]
>
> `--mode` sets how a running scope triggers. In `auto`, the scope triggers itself if no edge crosses the level, so the trace always moves. In `normal`, the screen updates only on a real trigger, which holds a repetitive waveform still.
>
> On a PicoScope, `--mode single` also arms one capture, the same as `lager scope <net> start --single`. A single-shot cannot run continuously. So `start` without `--single` changes `single` to `auto`. In the other modes, `start` keeps the mode that you set.

### `trigger edge`

Set the edge trigger. It works on PicoScope and Rigol.

```bash theme={null}
lager scope NET_NAME trigger edge [OPTIONS]
```

**Options:**

| Option | Description |
| - | - |
| `--mode` | Trigger mode: `normal`, `auto`, `single` |
| `--coupling` | Trigger-path coupling filter: `dc`, `ac`, `low_freq_rej`, `high_freq_rej` (Rigol only) |
| `--source NET` | Trigger source (see below) |
| `--slope` | Trigger slope: `rising`, `falling`, `both` |
| `--level VOLTS` | Trigger level in volts |

Every option is optional, and an option that you do not give keeps its value. On a PicoScope, give at least one option. With none, the command prints an error and exits 1.

`--source` takes a channel letter (`A` to `D`), a channel number (`1` to `4`), or the name of a `scope-channel` net.

**Examples:**

```bash theme={null}
# Rising edge at 1.5V
lager scope ANALOG1 trigger edge --slope rising --level 1.5 --box my-lager-box

# Trigger on channel B
lager scope picoscope1 trigger edge --source B --box my-lager-box

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

# Either edge, with the trigger path AC coupled (Rigol only)
lager scope ANALOG1 trigger edge --slope both --coupling ac --level 0 --box my-lager-box
```

### `trigger holdoff`

Ignore triggers for `SECONDS` after each trigger, from 0 to 10. With no value, the command shows the holdoff.

```bash theme={null}
lager scope NET_NAME trigger holdoff [SECONDS] [--box BOX]
```

A holdoff steadies the trace of a signal with several edges that cross the level, such as a burst or a serial byte. The scope waits for the rest of one burst before it triggers on the next.

```bash theme={null}
lager scope picoscope1 trigger holdoff 0.001 --box my-lager-box   # 1 ms
lager scope picoscope1 trigger holdoff --box my-lager-box         # show it
```

### `trigger pulse`

Set pulse width trigger. Not available yet: a Rigol MSO5000 refuses it before anything reaches the scope, and the command exits 1.

On the Rigol MSO5000, this trigger does not work yet. See the limitations at the top of this page.

```bash theme={null}
lager scope NET_NAME trigger pulse [OPTIONS]
```

**Options (in addition to the options above):**

| Option | Description | Default |
| - | - | - |
| `--trigger-on` | Condition (see table below) | `positive` |
| `--upper SECONDS` | Upper pulse width limit | - |
| `--lower SECONDS` | Lower pulse width limit | - |

**Trigger-on Conditions:**

| Condition | Description |
| - | - |
| `positive` | Positive pulse wider than `--upper` |
| `negative` | Negative pulse wider than `--upper` |
| `positive_greater` | Positive pulse wider than `--upper` |
| `negative_greater` | Negative pulse wider than `--upper` |
| `positive_less` | Positive pulse narrower than `--lower` |
| `negative_less` | Negative pulse narrower than `--lower` |

The condition does not select a polarity yet: each `positive` value and its `negative` counterpart set the same width condition. Without the width it needs, the command changes no width condition and prints a note.

### `trigger i2c`

Set I2C protocol trigger. Not available yet: a Rigol MSO5000 refuses it before anything reaches the scope, and the command exits 1.

On the Rigol MSO5000, this command does not work yet. See the limitations at the top of this page.

```bash theme={null}
lager scope NET_NAME trigger i2c [OPTIONS]
```

**Options (in addition to `--mode` and `--coupling`):**

| Option | Description | Default |
| - | - | - |
| `--source-scl NET` | SCL source net | - |
| `--source-sda NET` | SDA source net | - |
| `--level-scl VOLTS` | SCL trigger level | - |
| `--level-sda VOLTS` | SDA trigger level | - |
| `--trigger-on` | Condition (see table below) | `start` |
| `--address HEX` | I2C address (hex) | - |
| `--addr-width` | Address width: `7`, `8`, `10` bits | `7` |
| `--data HEX` | Data pattern to match (hex) | - |
| `--data-width INT` | Data width in bytes: `1` to `5` | `1` |
| `--direction` | Direction: `read`, `write`, `read_write` (either) | `read_write` |

**Trigger-on Conditions:**

| Condition | Description |
| - | - |
| `start` | Start condition |
| `restart` | Repeated start condition |
| `stop` | Stop condition |
| `ack_miss` | Missing ACK (NACK) |
| `address` | Specific address match |
| `data` | Specific data match |
| `addr_data` | Address + data match |

### `trigger spi`

Set SPI protocol trigger (Rigol only). The scope triggers on SPI bus events.

```bash theme={null}
lager scope NET_NAME trigger spi [OPTIONS]
```

**Options (in addition to `--mode` and `--coupling`):**

| Option | Description | Default |
| - | - | - |
| `--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 VOLTS` | MOSI/MISO trigger level | - |
| `--level-sck VOLTS` | SCK trigger level | - |
| `--level-cs VOLTS` | CS trigger level | - |
| `--trigger-on` | Condition: `timeout`, `cs` | `cs` |
| `--data HEX` | Data value to match (hex), at most 2^width − 1 | - |
| `--data-width INT` | Data width in bits: `4` to `32` | `8` |
| `--clk-slope` | Clock edge: `rising`, `falling` | `rising` |
| `--cs-idle` | CS idle state: `high`, `low`. `high` triggers while CS is low | `high` |
| `--timeout SECONDS` | Timeout value in seconds. `--trigger-on timeout` changes nothing without it | - |

**Examples:**

```bash theme={null}
# 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-lager-box
```

### `trigger uart`

Set UART protocol trigger. Not available yet: a Rigol MSO5000 refuses it before anything reaches the scope, and the command exits 1.

On the Rigol MSO5000, this command does not work yet. See the limitations at the top of this page.

```bash theme={null}
lager scope NET_NAME trigger uart [OPTIONS]
```

**Options (in addition to the options above):**

| Option | Description | Default |
| - | - | - |
| `--baud INT` | Baud rate | `9600` |
| `--parity` | Parity: `none`, `even`, `odd` | `none` |
| `--stop-bits` | Stop bits: `1`, `1.5`, `2` | `1` |
| `--data-width INT` | Data width in bits: `5` to `8` | `8` |
| `--trigger-on` | Condition: `start`, `data`, `error` (a framing error), `cerror` (a parity error) | `start` |
| `--data HEX` | Data pattern to match (hex) | - |

***

## Acquisition and Display

These commands work on both instruments, except `roll`: a Rigol has no roll mode. On a Rigol, averaging and peak detect are done by the instrument. It averages a power of two from 2 to 1024 captures, and refuses any other count.

### `acquire`

Set how consecutive captures combine. With no mode, the command shows the current mode.

```bash theme={null}
lager scope NET_NAME acquire [MODE] [--count N] [--box BOX]
```

| Mode | Description |
| - | - |
| `normal` | Each capture as the scope takes it |
| `average` | A running mean of the last `--count` captures (1 to 1024, default 16). It reduces random noise by the square root of the count |
| `peak` | The minimum and maximum of every sample interval. The daemon refuses it on a unit that returns one sample for each interval |

`--count` needs a mode. With `--count` and no mode, the command prints an error.

```bash theme={null}
lager scope picoscope1 acquire average --count 64 --box my-lager-box
lager scope picoscope1 acquire --box my-lager-box   # show the mode
```

### `roll`

Set roll mode, which streams slow timebases continuously. With no mode, the command shows the current mode.

```bash theme={null}
lager scope NET_NAME roll [auto|on|off] [--box BOX]
```

| Mode | Description |
| - | - |
| `auto` | Roll at 50 ms/div and slower while the trigger mode is `auto`, as a bench scope does |
| `on` | Roll at any timebase, and ignore the trigger |
| `off` | Do not roll |

### `fft`

Report the strongest frequency components of a channel. The box computes the spectrum from the capture on screen. Amplitudes are RMS volts at the probe tip, in dBV.

```bash theme={null}
lager scope NET_NAME fft [--channel CHANNEL] [--window WINDOW] [--peaks N] [--box BOX]
```

| Option | Description | Default |
| - | - | - |
| `--channel` | Channel to analyze: a letter such as `A` or a number such as `1` | The channel of the net |
| `--window` | FFT window: `hann`, `hamming`, `blackman`, `flattop`, `rectangular` | `hann` |
| `--peaks` | Number of components to report, from 1 to 50 | `5` |

On a `scope` net, give `--channel`, because the instrument has no channel of its own. Use `hann` for general work and `flattop` when the amplitude of a tone is important. Use `rectangular` for a signal that fits the capture exactly.

### `display`

Set how the web UI draws the trace. With no subcommand, `display` shows the current settings. The box holds them, so an open page follows a change from the CLI.

```bash theme={null}
lager scope NET_NAME display [SUBCOMMAND] [ARGS] [--box BOX]
```

| Subcommand | Description |
| - | - |
| `persistence VALUE` | Keep old traces on screen: a number of seconds (up to 60), `infinite`, or `off` |
| `xy on`, `xy off` | Plot channel B against channel A, not against time |
| `zoom FACTOR` | Magnify the capture by `FACTOR` (1 to 1000) around `--center`, in seconds from the trigger (default 0). `zoom off` stops the zoom |
| `math EXPR` | Draw a trace computed from two channels: `a+b`, `a-b`, `a*b`, or `off` |
| `fft CHANNEL` | Show a spectrum pane for `CHANNEL` with `--window` (default `hann`). `fft off` hides it |

```bash theme={null}
lager scope picoscope1 display persistence 2 --box my-lager-box   # traces fade over 2 s
lager scope picoscope1 display xy on --box my-lager-box           # B against A
lager scope picoscope1 display zoom 8 --center 0.001 --box my-lager-box
lager scope picoscope1 display math a-b --box my-lager-box
lager scope picoscope1 display fft a --box my-lager-box
```

***

## Cursor Subcommands

Two different sets of commands share this name.

`cursor time`, `cursor volts` and `cursor off` place cursors over the **captured samples** of a PicoScope. You type them, because there is no knob for them and no handle on the plot. The box holds the pair, so the web UI draws a cursor that you place from the terminal. The console of the web UI accepts the same `cursor` commands.

`cursor set-a`, `set-b`, `move-a`, `move-b` and `hide` move markers on the **front display of a Rigol** in screen coordinates, over SCPI. A PicoScope has no display for them.

### `cursor`

With no subcommand, `cursor` reads the cursors that are set.

```bash theme={null}
lager scope NET_NAME cursor [--box BOX]
```

### `cursor time`

Place the two time cursors, in seconds from the trigger. A negative time is before the trigger, and half of a capture is there.

```bash theme={null}
lager scope NET_NAME cursor time T1 T2 [--box BOX]
```

A negative value looks like an option to the CLI. Put `--` before the two values, after
every option: `lager scope NET_NAME cursor time --box BOX -- -0.001 0.002`. The same
applies to `cursor volts`.

The reply gives the interval between the cursors, its reciprocal as a frequency, and the voltage of the trace under each cursor. So a pair one cycle apart shows the frequency directly. The box interpolates the voltages between samples, because a cursor stays where you put it, not on the sample grid.

### `cursor volts`

Place the two voltage cursors, in volts at the probe tip.

```bash theme={null}
lager scope NET_NAME cursor volts V1 V2 [--box BOX]
```

The reply gives the difference. This pair needs no capture, so the reply comes without a wait for a trigger.

### `cursor off`

Clear both pairs, and stop the web UI from drawing them.

```bash theme={null}
lager scope NET_NAME cursor off [--box BOX]
```

**Examples:**

```bash theme={null}
# Measure a period: put a pair one cycle apart and read 1/dt
lager scope ANALOG1 cursor time 0 0.001 --box my-lager-box

# Read the two pairs back against the live signal
lager scope ANALOG1 cursor --box my-lager-box

# Mark a voltage window
lager scope ANALOG1 cursor volts 3.0 3.6 --box my-lager-box

lager scope ANALOG1 cursor off --box my-lager-box
```

> [!NOTE]
>
> The pairs are independent. When you place time cursors, the voltage cursors stay where they are. You place each pair as a pair, because one cursor alone reads nothing. The quantity that you want is the difference between two cursors.
>
> A cursor outside the captured window reports no voltage. The nearest sample comes from a different moment, so the box does not use it. The reply names the window, so the cause is clear.

### `cursor set-a` / `cursor set-b`

Rigol only.

Set the absolute position of cursor A or B.

```bash theme={null}
lager scope NET_NAME cursor set-a [--x FLOAT] [--y FLOAT] [--box BOX]
lager scope NET_NAME cursor set-b [--x FLOAT] [--y FLOAT] [--box BOX]
```

**Options:**

| Option | Description |
| - | - |
| `--x` | X coordinate (time position) |
| `--y` | Y coordinate (voltage position) |

### `cursor move-a` / `cursor move-b`

Rigol only. Move a display cursor by a relative offset from its current position.

```bash theme={null}
lager scope NET_NAME cursor move-a [--x FLOAT] [--y FLOAT] [--box BOX]
lager scope NET_NAME cursor move-b [--x FLOAT] [--y FLOAT] [--box BOX]
```

**Options:**

| Option | Description |
| - | - |
| `--x` | Relative X movement (delta) |
| `--y` | Relative Y movement (delta) |

### `cursor hide`

Rigol only. Hide the display cursors of the instrument.

```bash theme={null}
lager scope NET_NAME cursor hide [--box BOX]
```

**Examples:**

```bash theme={null}
# Position cursors for time measurement
lager scope ANALOG1 cursor set-a --x -0.001 --box my-lager-box
lager scope ANALOG1 cursor set-b --x 0.001 --box my-lager-box

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

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

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

***

## Stream Subcommands

Stream oscilloscope data in real time from a PicoScope or a Rigol MSO5000. A daemon on the Lager Box owns the scope, and a web page on the box shows the trace.

A Rigol MSO5000 streams the same way once it is paired with a USB HDMI capture card with `lager nets set-capture`. Its daemon takes the trace from the scope's HDMI output, so the stream shows the minimum and maximum of each screen column. The daemon reads the scope's settings back every few seconds, so `status` and the live view follow a knob turned at the scope.

### Daemon Architecture

Everything reaches the scope through the box HTTP server on **port 9000**, the same port that every other net uses. The daemon that owns the PicoScope listens on loopback only. You cannot reach it from outside the box:

| Endpoint | Purpose |
| - | - |
| `:9000` `GET /scope` | The web visualization UI |
| `:9000` `POST /net/command` | Control: enable, scale, timebase, trigger, measure |
| `:9000` `GET /scope/<net>/stream` | A ticket: a token, the WebSocket path, and the detected capabilities |
| `:9000` `GET /scope/<net>/ws` | WebSocket that carries capture frames, with the token above |
| `:9000` `/scope` (Socket.IO) | Live acquisition state for the UI |
| `127.0.0.1:8085` and `/tmp/lager-scope.sock` | The daemon itself. Loopback only; the port 9000 relay is the only way in |

Capture frames cross the relay in **LSCP/1**, a packed binary format. A frame has a 64-byte header, a 16-byte descriptor for each channel, and then contiguous `int16` ADC counts. The relay forwards frames without a decode, so its cost does not grow with the capture size.

> [!NOTE]
>
> Earlier versions published the daemon directly on ports 8081-8085. They streamed to the browser over WebTransport, which needed a QUIC listener and a certificate in the container. That design is gone. There is one listener, on loopback, and one way in.

### `stream start`

Start a streaming acquisition on a PicoScope, or on a Rigol MSO5000 with a paired capture card. Then print the link to the web UI.

```bash theme={null}
lager scope NET_NAME stream start [OPTIONS]
```

**Options:**

| Option | Short | Description | Default |
| - | - | - | - |
| `--channel` | `-c` | Channel: `A` to `D`, or `1` to `4` | The channel of the net, else `A` |
| `--volts-per-div` | `-v` | Vertical scale (V/div) | `1.0` |
| `--time-per-div` | `-t` | Horizontal scale (s/div) | `0.001` |
| `--trigger-level` | | Trigger threshold voltage | `0.0` |
| `--trigger-slope` | | Slope: `rising`, `falling`, `either` | `rising` |
| `--capture-mode` | | Mode: `auto`, `normal`, `single` | `auto` |
| `--coupling` | | Coupling: `dc`, `ac` | `dc` |
| `--quiet` | `-q` | Minimal output | |
| `--json` | | JSON output format | |
| `--verbose` | | Print each setting as the daemon applies it | |

The command applies the settings in order, then starts the acquisition. If the daemon refuses a setting, the command prints the error and exits 1. The acquisition does not start. The trigger source is the streamed channel.

After the start, the command prints the link to `http://<box>:9000/scope` on a line of its own, then the `stream stop` command that ends the acquisition. With `--json`, the link is the `visualization_url` field. On a box behind an access gateway, the link carries your sign-in token, as for [webcam streams](https://docs.lagerdata.com/source/reference/cli/webcam.md#access-gated-boxes):

```
Visualization:
http://<box>:9000/scope?token=...
Open this link within 15 minutes; it carries your sign-in.
If it has expired, or the viewer later asks for sign-in, run: lager scope PICO1 stream web --box my-lager-box

To stop streaming: lager scope PICO1 stream stop --box my-lager-box
```

For a scope that no daemon drives, the command prints an error and exits 1. For a Rigol with no capture card paired, the command exits 1 before anything reaches the scope. The error says to pair one with `lager nets set-capture`. `stream status` gives the same reason. Single captures and measurements work without a card.

**Examples:**

```bash theme={null}
# Start streaming on channel A with default settings
lager scope PICO1 stream start --box my-lager-box

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

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

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

### `stream stop`

Stop the streaming acquisition. If the daemon refuses, the command prints the error and exits 1.

```bash theme={null}
lager scope NET_NAME stream stop [--box BOX]
```

### `stream status`

Check that the oscilloscope daemon runs. The command shows the command port, the channel count and whether a capture is ready. It does not need a net name.

```bash theme={null}
lager scope [NET_NAME] stream status [--box BOX]
```

The command exits 1 if the daemon does not answer or cannot reach the scope. So a script can use it to check that a scope is ready to stream.

### `stream web`

Open the oscilloscope web UI in a browser.

```bash theme={null}
lager scope NET_NAME stream web [--box BOX] [--port PORT]
```

**Options:**

* `--port` - Box HTTP server port (default: 9000)

The command opens `http://<box>:<port>/scope` and prints the link on a line of its own. On a box behind an access gateway, the link carries your sign-in token, as for [webcam streams](https://docs.lagerdata.com/source/reference/cli/webcam.md#access-gated-boxes). The link has to be opened within the time the note under it gives, about 15 minutes. How long the opened page then lasts depends on the gateway. If the link no longer opens, or the page asks you to sign in, run `stream web` again for a new link.

The web interface is a dependency-free HTML5 oscilloscope display that the box serves at `http://<box>:9000/scope`. Waveforms arrive over a WebSocket as LSCP binary frames, and the browser decodes them. The page builds its controls from the capabilities of the attached unit, so a 2-channel scope shows no channel C. The page also has a command console. It accepts most commands of this CLI, and also `offset`, `hpos`, `vpos`, `sidebar` and `capabilities`. In the console, a command for one channel can name the channel: `scale B 0.5`, `coupling B ac`, `probe B 10`, `offset B 0.1`, `vpos B -0.5` and `measure B vpp`. Put the channel first. Use a letter for it, because `scale 2` sets 2 V/div. With no channel, the command uses the first channel that is on, as the measurements panel does. The reply in the console names the channel.

Hide the controls sidebar to give the trace and the console the full width. Use the **Hide sidebar** button in the header, or type `sidebar off`. `sidebar on` and **Show sidebar** bring it back. `sidebar` with no argument says which it is. The page keeps the choice for the next visit.

The **Screenshot** button in the header saves the waveform view as a PNG, named `scope-<net>-<date>-<time>.png`. A line under the trace gives the model, the net and the time per division. It also gives the scale of each channel that is on, the trigger, and the time of the screenshot.

Turning a channel off removes its trace, including the one already on screen. `disable B` does it, and so does the channel's switch.

Unplugging a scope during a stream stops the live session. The page then shows no live trace. Plugging the scope back in opens the unit again. Start then runs on the new session.

The page has two position controls, and they work differently:

| | Horizontal position | Vertical position |
| - | - | - |
| Console | `hpos [<seconds>]` | `vpos [<channel>] [<volts>]` |
| Sidebar | The **Position** field under the timebase | The **Position** field in each channel strip |
| Unit | Seconds | Volts |
| Effect | The scope captures a different window, relative to the trigger | The page draws the trace higher or lower. The capture and the measurements do not change |
| Lasts | The box keeps it | Until the page reloads |
| Limit | 5 divisions each way | 4 divisions each way |

* **Units.** In the console, give a number in seconds or volts, or add a unit: `hpos 100ms`, `hpos 0.1` and `hpos 1e-3` are all correct. In the sidebar, the selector beside each field changes the unit of the number that the field shows. It does not change the position.
* **Limits.** The limits are in divisions, so they change when you change the scale. If a position is outside the limit, the page moves it to the limit and writes a note in the console. A vertical position stays at the same voltage when you change volts/div, until it is outside the limit.
* **Applying a value.** A value that you type in the horizontal field applies when you push Enter or leave the field, because each change starts a new capture. Escape restores the last value. A value that you type in the vertical field applies immediately.
* **Arrow keys and buttons.** Each field has an up button and a down button at its right edge. In both fields, the buttons and the Up and Down keys apply a step immediately. They change the last digit that the field shows: `1.14` becomes `1.13`, and `1.1` becomes `1.2`. The field keeps the same number of decimal places, so `1.19` becomes `1.20`. If the field shows only `0`, the step is one tenth of a division. Hold a button down to repeat the step.
* **`offset` is not `vpos`.** `offset` moves the signal in the scope hardware, before the ADC. The measurements change, and at a smaller volts/div you get more resolution on a signal that is not centred on 0 V. `vpos` only moves the trace on the screen. Legacy PicoScope 2000 models (for example the 2204A) have no analog offset. On these models, the console refuses a nonzero `offset` and tells you to use `vpos`.
* `status` also shows the vertical position of each channel. `position` is an old name for `hpos`, and it will be removed in a later release.

### `stream capture`

Record the captures that a streaming scope takes during `--duration` to a CSV file. Run `stream start` first. A Rigol records its live view, the minimum and maximum of each screen column, not the scope's own record.

```bash theme={null}
lager scope NET_NAME stream capture [OPTIONS]
```

**Options:**

| Option | Short | Description | Default |
| - | - | - | - |
| `--output` | `-o` | CSV output file path | `scope_data.csv` |
| `--duration` | `-d` | Capture duration in seconds (0.001-3600) | `1.0` |
| `--samples` | `-n` | Maximum samples to capture (1-100M) | unlimited |
| `--quiet` | `-q` | Minimal output | |
| `--json` | | JSON output format | |
| `--verbose` | | Verbose debugging output | |

The command writes the CSV file on the box, not on your computer. A relative path is relative to `/tmp` on the box. After the capture, the command prints an `scp` command that copies the file to your computer.

The command either captures data or fails. If the scope is stopped, or no capture arrives during `--duration`, it prints the cause and exits 1. In `normal` and `single` mode, the scope waits for a trigger, so check the trigger level and source.

The CSV columns are `capture`, `channel`, `sample_index`, `time_ns` and `voltage`.

**Examples:**

```bash theme={null}
# Capture 1 second of data (default)
lager scope PICO1 stream capture --box my-lager-box

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

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

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

### `stream config`

Change streaming settings without a start or a stop of the acquisition.

```bash theme={null}
lager scope NET_NAME stream config [OPTIONS]
```

**Options:**

| Option | Short | Description |
| - | - | - |
| `--channel` | `-c` | Channel: `A` to `D`, or `1` to `4` |
| `--volts-per-div` | `-v` | Volts per division |
| `--time-per-div` | `-t` | Time per division (seconds) |
| `--trigger-level` | | Trigger level (volts) |
| `--trigger-source` | | Trigger source channel: `A` to `D`, or `1` to `4` |
| `--trigger-slope` | | Slope: `rising`, `falling`, `either` |
| `--capture-mode` | | Mode: `auto`, `normal`, `single` |
| `--coupling` | | Coupling: `dc`, `ac` |
| `--enable` / `--disable` | | Enable or disable channel |

Give at least one setting. `--volts-per-div`, `--coupling`, `--enable` and `--disable` apply to the channel that `--channel` names. Without `--channel`, they apply to the channel of the net, else to channel `A`. The command prints each setting that it applies. It stops at the first setting that the daemon refuses, and exits 1.

**Examples:**

```bash theme={null}
# Change vertical scale while streaming
lager scope PICO1 stream config -v 0.5 --box my-lager-box

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

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

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

***

## Examples

### Basic Rigol Workflow

```bash theme={null}
# Enable scope channel
lager scope ANALOG1 enable --box my-lager-box

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

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

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

# Take measurements
lager scope ANALOG1 measure freq --display --box my-lager-box
lager scope ANALOG1 measure vpp --display --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

```bash theme={null}
# Configure for 10x probe at 500mV/div, 1ms/div
lager scope ANALOG1 probe 10 --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

```bash theme={null}
# 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

```bash theme={null}
# 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 --lower 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

# 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-lager-box
```

### Cursor Measurements

```bash theme={null}
# PicoScope: measure the time between two events, and read it back
lager scope PICO1 cursor time --box my-lager-box -- -0.001 0.002
lager scope PICO1 cursor --box my-lager-box

# Rigol: measure the voltage difference with the display cursors
lager scope ANALOG1 cursor set-a --y 0.0 --box my-lager-box
lager scope ANALOG1 cursor set-b --y 3.3 --box my-lager-box

# Clean up
lager scope PICO1 cursor off --box my-lager-box
lager scope ANALOG1 cursor hide --box my-lager-box
```

### PicoScope Streaming

```bash theme={null}
# Start streaming with default settings
lager scope PICO1 stream start --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 -o waveform.csv -d 5.0 --box my-lager-box

# Adjust settings while streaming
lager scope PICO1 stream config -v 2.0 -t 0.0001 --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
```

***

## Command Structure

```
scope [NET_NAME] [--box BOX]
  Basic Control
  ├── enable
  ├── disable
  ├── start [--single]
  ├── stop
  ├── force
  ├── status
  └── autoscale                               (Rigol)

  Channel Configuration
  ├── coupling {dc|ac|gnd}
  ├── probe {1|10|100|1000}
  ├── scale VOLTS_PER_DIV
  └── timebase SECONDS_PER_DIV

  Measurements
  └── 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                                 (no subcommand: show it)
      ├── edge [--mode] [--coupling] [--source] [--slope] [--level]
      ├── holdoff [SECONDS]
      ├── pulse [--trigger-on] [--upper] [--lower] [--level] ...   (refused)
      ├── i2c [--source-scl] [--source-sda] [--trigger-on] [--address] ...   (refused)
      ├── spi [--source-mosi-miso] [--source-sck] [--source-cs] ...   (Rigol)
      └── uart [--baud] [--parity] [--trigger-on] [--data] ...   (refused)

  Acquisition and Display
  ├── acquire [normal|average|peak] [--count N]
  ├── roll [auto|on|off]                      (PicoScope 2000)
  ├── fft [--channel] [--window] [--peaks]
  └── display
      ├── persistence VALUE
      ├── xy {on|off}
      ├── zoom FACTOR|off [--center]
      ├── math EXPR
      └── fft CHANNEL|off [--window]

  Cursors
  └── cursor                                  (no subcommand: read them)
      ├── time T1 T2
      ├── volts V1 V2
      ├── off
      ├── set-a [--x] [--y]                   (Rigol)
      ├── set-b [--x] [--y]                   (Rigol)
      ├── move-a [--x] [--y]                  (Rigol)
      ├── move-b [--x] [--y]                  (Rigol)
      └── hide                                (Rigol)

  Streaming (PicoScope, or a Rigol with an HDMI capture card)
  └── 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 are the names that you assign with `lager nets` when you set up your testbed
* Instrument commands work on a `scope` net or on one of its `scope-channel` nets. Channel commands need a `scope-channel` net
* Streaming works on a PicoScope, and on a Rigol paired with an HDMI capture card (`lager nets set-capture`)
* Measurements work on both instruments. `--display` and `--cursor` are Rigol only, because they draw on the screen of the instrument
* `cursor time`, `cursor volts` and `cursor off` work on both instruments. The display cursor commands are Rigol only
* `roll` works only on a PicoScope 2202, 2203, 2204(A) or 2205(A)
* The edge trigger is the only trigger type that works on both PicoScope and Rigol
* On the Rigol MSO5000, only the edge and SPI triggers work (see [issue #418](https://github.com/lagerdata/lager/issues/418))
* The web UI needs access to port 9000 on the Lager Box
* The CLI rejects values outside the allowed ranges before it sends them to the hardware
* Run `lager scope --box BOX` to list the `scope` and `scope-channel` nets

## See Also

* [Logic Analyzer](https://docs.lagerdata.com/source/reference/cli/logic.md) -- Digital signal capture and protocol decode
* [Python Scope API](https://docs.lagerdata.com/source/reference/python/scope.md) -- Automate oscilloscope operations in Python scripts


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.