Rigol Oscilloscope
v0.1.2MCP server for Rigol oscilloscopes (DS1000Z, MSO5000, DHO series): measurements and waveforms.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_connection_info Get Connection Info
Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.
get_command_log Get Command Log
Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.
| Parameter | Type | Description |
|---|---|---|
limit | integer |
reconnect Reconnect
Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).
get_device_info Get Device Info
Identify the oscilloscope (model, serial, firmware), the command family used for it, the number of analog channels, and the current sample rate and memory depth.
get_settings Get Settings
Read the current vertical settings of every channel (on/off, V/div, offset, coupling, probe ratio, bandwidth limit), the timebase, the trigger (type, sweep, status, edge source/level/slope) and the acquisition sample rate / memory depth.
autoscale Autoscale
Run the scope's automatic setup (AUTO key): it picks vertical scales, timebase and trigger for the connected signals. This overwrites the user's current setup - only use it when asked. Needs signals of roughly >20 mVpp and >40 Hz.
run Run
Start continuous acquisition (RUN).
stop Stop
Stop acquisition (STOP) and freeze the current waveforms, e.g. before reading deep memory.
single Single
Arm a single acquisition (SINGLE key): the scope triggers once, then stops. With wait_s > 0 it waits until the acquisition is complete (status STOP). If the trigger condition is never met the status stays WAIT - check the trigger level/source or use `force_trigger`.
| Parameter | Type | Description |
|---|---|---|
wait_s | number | Seconds to wait for the trigger; 0 = just arm |
force_trigger Force Trigger
Force one trigger (FORCE key). Only has an effect in NORMal or SINGle sweep while waiting.
set_channel Set Channel
Change a channel's vertical settings; unspecified settings are left alone. The probe ratio is applied first because it changes the valid scale range. Returns the settings the scope actually applied (the scale snaps to 1-2-5 steps). Rejected values are reported from the scope's error queue.
| Parameter | Type | Description |
|---|---|---|
channel * | integer | Analog channel number |
bandwidth_limit_20mhz | 20 MHz bandwidth limit on/off | |
coupling | ||
enabled | Show (acquire) the channel | |
offset_v | Vertical offset in V | |
probe_ratio | Probe attenuation, e.g. 1 or 10 - must match the probe | |
scale_v_per_div | Vertical scale in V/div (1-2-5 steps) |
set_timebase Set Timebase
Set the main timebase scale and/or offset. Returns the applied values.
| Parameter | Type | Description |
|---|---|---|
offset_s | Horizontal (trigger) offset in s | |
scale_s_per_div | Horizontal scale in s/div (1-2-5 steps) |
set_trigger Set Trigger
Configure an edge trigger (source, level, slope) and the sweep mode. Sets the trigger type to EDGE. The level must lie within the source channel's screen range.
| Parameter | Type | Description |
|---|---|---|
level_v | Trigger level in V (displayed units) | |
slope | ||
source_channel | Analog channel to trigger on | |
sweep | auto = free-run when not triggered; normal = only on trigger; single = once |
measure Measure
Read the scope's automatic measurements for one channel: voltages (Vpp, Vmax, Vmin, Vtop, Vbase, Vamp, Vavg, Vrms, overshoot, preshoot) and timing (period, frequency, rise/fall time, +/- width, +/- duty). Values the scope cannot determine are null.
| Parameter | Type | Description |
|---|---|---|
channel * | integer | |
items | array | Parameters to measure |
capture_waveform Capture Waveform
Capture a channel's waveform, scaled to volts and seconds with the scope's waveform preamble, and return statistics plus a downsampled trace; optionally save all points to CSV. 'memory' mode reads the whole record (bounded by the `max_memory_points` limit) in batches and requires the scope to be stopped; 'screen' works while running.
| Parameter | Type | Description |
|---|---|---|
channel * | integer | |
max_points | integer | Max points returned (the data is downsampled) |
mode | string | 'screen' = the displayed points (1000-1200); 'memory' = full acquisition memory (scope must be stopped) |
save_path | Write every point (time_s, volts) to this new .csv file (never overwritten) |
screenshot Screenshot
Save a screenshot of the oscilloscope display (PNG; BMP on the MSO5000) and return its path. For PNG screenshots the image is also returned so the model can look at the screen.
| Parameter | Type | Description |
|---|---|---|
include_image | boolean | Also return the image to the client (PNG only) |
save_path | New image file to write (.png; .bmp on the MSO5000; never overwritten); default: a timestamped file in the system temp folder |