Skip to main content
Control and monitor power supply Nets through the Lager CLI. Supports multi-vendor bench power supplies with voltage/current setting, protection thresholds, real-time monitoring via TUI, and concurrent access.

Syntax

When invoked without a subcommand, lists all available power supply nets on the box:

Global Options

Commands

CLI Validation Ranges

The CLI enforces conservative upper bounds before sending commands to hardware: All values must be positive. OVP must be greater than or equal to the voltage setpoint.

Command Reference

voltage

Set or read output voltage with optional protection thresholds.
Arguments:
  • VALUE - Voltage in volts. Omit to read the current voltage setting.
Options: When VALUE is provided, the CLI prompts for confirmation unless --yes is passed:
Examples:

current

Set or read output current with optional protection thresholds.
Arguments:
  • VALUE - Current in amps. Omit to read the current limit setting.
Options: When VALUE is provided, the CLI prompts for confirmation unless --yes is passed:
Examples:

enable

Enable power output to device. Requires confirmation to prevent accidental power-on.
Options:

disable

Disable power output. Requires confirmation to prevent accidental power-off.
Options:

state

Show comprehensive power supply state including measurements, setpoints, and protection status.
Example output (Rigol DP800):
Fields:
  • Channel - Active channel on multi-channel supplies
  • Enabled - Output ON or OFF
  • Mode - CV (constant voltage) or CC (constant current)
  • Voltage/Current/Power - Live measurements (4 decimal places)
  • OCP/OVP Limit - Protection thresholds
  • OCP/OVP Tripped - Whether protection tripped (color-coded: green=NO, red=YES)

clear-ovp

Clear over-voltage protection fault. Use after an OVP trip to reset the protection and allow the output to be re-enabled.

clear-ocp

Clear over-current protection fault. Use after an OCP trip to reset the protection and allow the output to be re-enabled.

set

Set power supply mode. The available modes depend on the hardware.

tui

Launch an interactive terminal UI for real-time power supply monitoring and control. The TUI provides live-updating measurements, inline command entry, and keyboard shortcuts.
Requires the textual Python package (pip install textual). TUI display:
  • Live voltage, current, and power measurements (updated every second)
  • Output status (ON/OFF) with color coding
  • Mode indicator (CV/CC) with color coding
  • Protection thresholds and trip status
  • Hardware maximum ratings
  • Scrollable command log
TUI commands (enter at the prompt): Keyboard shortcuts: Concurrent access: While the TUI runs, other lager supply CLI commands (e.g., lager supply PSU voltage 3.3 --yes) will route through the TUI’s WebSocket connection on port 9000. They share the one USB connection to the instrument. If the TUI is not open, commands use direct USB access.

OVP / OCP Protection

Over-voltage protection (OVP) and over-current protection (OCP) thresholds protect your device under test from damage. Setting thresholds:
Validation rules:
  • All values must be positive
  • OVP must be >= the voltage setpoint
  • OCP must be >= the current setpoint
  • Values are validated against CLI maximum limits before being sent to hardware
When protection trips:
  1. The supply output is disabled automatically
  2. state shows the tripped status in red
  3. Clear the fault with clear-ovp or clear-ocp
  4. Re-enable the output with enable
Automatic OVP management (Rigol): If a new voltage will exceed the current OVP limit, the driver raises OVP by 10% headroom first. It then sets the new voltage and restores the desired OVP limit. This prevents false trips during voltage changes.

Supported Hardware

Multi-channel supplies use the channel number configured in the net record. Each channel is typically configured as a separate net.

Default Net

Set a default power supply net to avoid specifying the name each time:
Then commands can omit the net name:

Examples

Scripting Example

Troubleshooting

Notes

  • All voltage and current set operations require confirmation (use --yes to skip)
  • enable and disable also require confirmation
  • Net names refer to names assigned when setting up your testbed with lager nets
  • The TUI connects via WebSocket (port 9000) for real-time updates
  • Protection thresholds help prevent damage to your device under test
  • Multi-channel supplies: each channel is configured as a separate net

See Also