uni-t-uts-mcp
v1.1.0MCP server for UNI-T UTS series spectrum analyzers via SCPI over LAN
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
discover_instruments
Find UNI-T / VXI-11 spectrum analyzers on the local network without knowing their IP address: broadcasts a portmapper query on each local IPv4 interface and identifies every responder with *IDN? (read-only; the serial number is not shown). Returns host, model, firmware and whether VXI-11 and raw port 5025 answer.
| Parameter | Type | Description |
|---|---|---|
timeout_ms | integer | How long to wait for replies in ms (default 1500) |
connect
Connect to a UNI-T UTS series spectrum analyzer over auto (default: VXI-11 when the instrument offers it, else raw SCPI/TCP), VXI-11 or raw SCPI/TCP. Returns the instrument identification and the transport in use. Use host "auto" (or UTS_IP=auto) to find the analyzer on the local network when exactly one answers. Using the analyzer puts it in remote mode and locks its front panel until Esc is pressed on the analyzer.
| Parameter | Type | Description |
|---|---|---|
host | string | Hostname or IP address of the analyzer (defaults to the UTS_IP env var); "auto" discovers it on the local network (see discover_instruments) |
name | string | Instrument name (1-32 letters, digits, '_' or '-'). Default: the `default` instrument, or the only one configured. See list_instruments. connect creates the name when it is new (host and port then com… |
port | integer | TCP port of the raw transport (defaults to the UTS_PORT env var, then 5025); VXI-11 finds its own port through the portmapper on port 111 |
transport | string | raw, vxi11 or auto (defaults to the UTS_TRANSPORT env var, then auto; raw when only a port is given). The VXI-11 device name comes from UTS_VXI11_DEVICE (default inst0) |
disconnect
Disconnect from the spectrum analyzer (the instrument named by `name`, default: the default one). The name stays registered so it can be connected again.
| Parameter | Type | Description |
|---|---|---|
name | string | Instrument name (1-32 letters, digits, '_' or '-'). Default: the `default` instrument, or the only one configured. See list_instruments |
identify
Query the analyzer identification (*IDN?): manufacturer, model, serial number and firmware version.
| Parameter | Type | Description |
|---|---|---|
name | string | Instrument name (1-32 letters, digits, '_' or '-'). Default: the `default` instrument, or the only one configured. See list_instruments |
list_instruments
List the instruments this server knows by name (the default one, those from UTS_INSTRUMENTS and any added with connect name=...): whether each is connected, where, over which transport, and which one is used when no name is given. Read-only; the serial number is not shown.
scpi_query
Send one raw SCPI query (it must end in '?') to the analyzer and return the reply. Escape hatch for commands without a dedicated tool. Use reply='block' for IEEE 488.2 '#' binary block replies (returned as base64). Unsupported queries get no reply from the instrument and time out.
| Parameter | Type | Description |
|---|---|---|
command * | string | SCPI query, e.g. '*IDN?' or ':SWEep:POINts?' |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
reply | string | Reply type: 'text' (default) or 'block' for a binary block |
timeout_ms | integer | Timeout in milliseconds (default 5000 for text, 30000 for blocks) |
scpi_command
Send a raw SCPI command (no reply expected) to the analyzer. Escape hatch for commands without a dedicated tool. Commands that reset the instrument, change network settings, lock the panel or write files are refused unless confirm=true. Queries are refused; use scpi_query.
| Parameter | Type | Description |
|---|---|---|
command * | string | SCPI command, e.g. ':FREQuency:CENTer 1 GHz' |
confirm | boolean | Set true to allow a command on the safety denylist (e.g. *RST). Only with the user's approval. |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_frequency
Get the analyzer's frequency settings: center, span, start, stop, center step (and whether it is automatic) and offset, all in Hz.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_frequency
Set frequency parameters (all in Hz). Give center and/or span, OR start and/or stop, OR full_span, OR zero_span; center step and offset can be combined with any of these. Frequency parameters are coupled, so the settings are re-read afterwards; values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
center_hz | number | Center frequency in Hz (> 0) |
center_step_auto | boolean | Automatic center frequency step on/off |
center_step_hz | number | Center frequency step in Hz (> 0); turns the automatic step off |
full_span | boolean | Set the full span. Cannot be combined with center/span/start/stop |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
offset_hz | number | Frequency offset in Hz |
span_hz | number | Span in Hz (> 0; use zero_span for zero span) |
start_hz | number | Start frequency in Hz (>= 0) |
stop_hz | number | Stop frequency in Hz (> 0) |
zero_span | boolean | Set zero span (time domain). Cannot be combined with center/span/start/stop |
get_amplitude
Get the analyzer's amplitude settings: reference level (in the current power unit), power unit, scale per division (dB), Y scale type, reference level offset (dB), input attenuation (dB) and whether it is automatic, preamp state and input impedance (ohms).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_amplitude
Set amplitude parameters. The power unit is applied first, so reference_level is interpreted in the new unit. Manual attenuation_db turns automatic attenuation off. Out-of-range values are clamped by the instrument; the settings are re-read afterwards and anything it changed is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
attenuation_auto | boolean | Automatic attenuation on/off (not with attenuation_db) |
attenuation_db | number | Manual input attenuation, integer dB 0 to 51; turns automatic attenuation off |
input_impedance_ohm | Input impedance in ohms (50 or 75; 75 is a correction for a 75 ohm source) | |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
power_unit | string | Power unit; set before the reference level |
preamp | boolean | Preamplifier on/off |
reference_level | number | Reference level in the power unit in effect after this call (power_unit if given, otherwise the current unit). In dBm the instrument accepts -100 to 30; other values are clamped |
reference_level_offset_db | number | Reference level offset in dB (clamped to +-327.6) |
scale_per_div_db | number | Scale per division in dB (0.1 to 20) |
scale_type | string | Y scale type |
get_bandwidth
Get resolution and video bandwidth (Hz) with their auto flags, the VBW/RBW ratio and the filter shape (gaussian or flattop).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_bandwidth
Set RBW, VBW, the VBW/RBW ratio and the filter shape. Manual values turn the matching auto flag off. The instrument snaps/clamps values and couples RBW, VBW and sweep time to the span and auto flags, so everything is re-read afterwards and any change is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
filter_shape | string | Resolution filter shape |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
rbw_auto | boolean | Automatic RBW (follows the span); not with rbw_hz |
rbw_hz | number | Resolution bandwidth in Hz; snaps to 1-3-10 steps and is clamped to 1 Hz..max (3 MHz on the UTS3036B). Turns RBW auto off |
vbw_auto | boolean | Automatic VBW (RBW times vbw_rbw_ratio); not with vbw_hz |
vbw_hz | number | Video bandwidth in Hz (1-3-10 steps, clamped like RBW). Turns VBW auto off |
vbw_rbw_ratio | number | VBW/RBW ratio used while VBW is automatic (3e-5..3e6 on the UTS3036B; clamped) |
get_sweep
Get sweep settings: sweep time (s) with auto flag and auto rule, sweep type (sweep/fft) with auto flag, sweep points (the trace length), trigger source (immediate/video) and video trigger level (dBm).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_sweep
Set sweep points, sweep time, sweep type, trigger source and video trigger level. Points, type and rule are applied before the sweep time so a manual time is not overridden by the auto coupling. Changing sweep_points changes the trace length. Out-of-range values are clamped silently by the instrument; settings are re-read afterwards and any change is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
sweep_points | number | Sweep points, integer 11..40001. Changes the trace length (trace data has this many values) |
sweep_time_auto | boolean | Automatic sweep time; not with sweep_time_s |
sweep_time_rule | string | Automatic sweep time rule |
sweep_time_s | number | Sweep time in seconds (1 ms..4000 s, clamped; zero span allows less). Turns sweep time auto off |
sweep_type | string | Sweep type (turns automatic type off) |
sweep_type_auto | boolean | Automatic sweep type; not with sweep_type |
trigger_source | string | Trigger source: immediate (free run) or video. External is rejected by the UTS3036B |
trigger_video_level_dbm | number | Video trigger level in dBm (clamped to -170..30) |
get_detector
Get the detector (sample, positive, negative, normal, average) and its auto flag for one trace (1-6) or all six, via :SENSe:DETector:TRACe<n>.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
trace | integer | Trace number 1-6; all traces when omitted |
set_detector
Set the detector of one trace (1-6): sample, positive, negative, normal or average (turns that trace's automatic detector off), or switch automatic selection on/off.
| Parameter | Type | Description |
|---|---|---|
trace * | integer | Trace number 1-6 |
auto | boolean | Automatic detector selection for the trace; not with detector=... |
detector | string | Detector mode |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_acquisition
Get the acquisition mode: continuous (true) or single sweep (false), plus the sweep time (s) and its auto flag. Note: over the raw transport the instrument ignores all commands while a single sweep is running; over VXI-11 it queues them.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_acquisition
Switch between continuous sweep (continuous=true, the instrument's normal state) and single sweep mode (continuous=false, :INITiate:CONTINUOUS OFF). In single mode the instrument sweeps only when start_sweep or single_sweep is used.
| Parameter | Type | Description |
|---|---|---|
continuous * | boolean | true = continuous sweep, false = single sweep |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
start_sweep
Start (:INITiate:IMMediate) or restart (:INITiate:RESTart) a sweep. In single mode, wait=true (default) blocks until the sweep is complete; with wait=false call wait_for_sweep_complete next, because over the raw transport the instrument ignores every command while it sweeps (VXI-11 queues them). In continuous mode the sweep is restarted and not awaited. There is no stop/pause/resume: the instrument rejects :INITiate:STOP/PAUSe/RESume.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
method | string | immediate (default) or restart |
timeout_s | number | Give up after this many seconds (default: sweep time + 10 s) |
wait | boolean | Wait for completion in single mode (default true) |
single_sweep
Switch to single sweep mode, run exactly one sweep and wait until it is complete, so the trace is final and can be read. Leaves the instrument in single mode; use set_acquisition continuous=true to resume normal sweeping.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
timeout_s | number | Give up after this many seconds (default: sweep time + 10 s) |
wait_for_sweep_complete
Wait for a sweep started with start_sweep(wait=false) to finish: over the raw transport it stays silent for the remaining sweep time (the instrument ignores input while sweeping) and then polls *OPC? until it answers; over VXI-11 it makes one blocking *OPC? read that returns when the sweep ends.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
timeout_s | number | Give up after this many seconds (default: sweep time + 10 s) |
get_trace
Get the trace configuration: the selected (current) trace, and for each trace 1-6 (or only `trace`) its type (write, average, max_hold, min_hold), update state (true = live, false = view/hold) and display state, plus the global average count and average type. Trace math cannot be read (the instrument has no query for it).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
trace | integer | Only this trace (1-6); all six when omitted |
set_trace
Set trace configuration: select the current trace, and for one trace set its type (write, average, max_hold, min_hold), update state (live or view/hold) and display state, and set the global average count (1-999) and average type. Everything is re-read afterwards and anything the instrument did not take is reported in 'warnings'. Changing a trace type or the averaging restarts that trace's hold/average. To restart hold or averaging without changing settings use restart_trace.
| Parameter | Type | Description |
|---|---|---|
average_count | number | Average count, integer 1-999. Global: shared by every trace of type average |
average_type | string | Average type (global): voltage, power or log |
display | boolean | Show (true) or hide (false) `trace` |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
selected_trace | integer | Make this trace (1-6) the current trace (:TRACe:SELect) |
trace | integer | Trace (1-6) that type, update and display apply to |
type | string | Trace type of `trace`: write (clear/write, live), average, max_hold or min_hold |
update | boolean | Update state of `trace`: true = live, false = view/hold (frozen) |
restart_trace
Restart max hold, min hold or averaging by re-sending the trace's current type (:TRACe<n>:TYPE <current type>). Verified on the instrument: this clears the accumulated hold/average and starts over, and so do changing the type or the update state; :INITiate:RESTart and :INITiate:IMMediate do NOT. Without `trace` every trace that is in average, max_hold or min_hold is restarted; write traces need no restart.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
trace | integer | Only this trace (1-6); every hold/average trace when omitted |
set_trace_math
Set trace math for a trace (:CALCulate:MATH): result trace <- operand_a (op) operand_b. Operations: off, power_difference, power_sum, log_difference, log_offset; offset_db (-100..100) applies only to the two log operations. The instrument has no query for the math setting, so it cannot be read back (check the trace data). Enabling math switches the trace on (update and display); turning it off does not switch it off again.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Math operation |
trace * | integer | Trace (1-6) the operation is applied to |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
offset_db | number | Offset in dB, only for log_difference and log_offset (default 0) |
operand_a | integer | Operand A trace (1-6); required unless operation is off |
operand_b | integer | Operand B trace (1-6); required unless operation is off |
screenshot
Capture the analyzer's screen and return it as a PNG image. Needs the VXI-11 transport (over raw TCP the instrument truncates large replies at 144,800 bytes, so the tool refuses with instructions). Temporarily selects PNG as the picture format (:SYSTem:PICture:FORMat) and always restores the original format. Takes about 3 seconds.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_trace_data
Read the amplitude values of one trace (1-6, default the selected trace) with the computed frequency axis, the power unit, the trace type and summary statistics (min, max, mean, peak level and peak frequency). The axis is linear from :FREQuency:STARt? to :FREQuency:STOP? over :SENSe:SWEep:POINts? points (zero span has no frequency axis: a time axis from 0 to the sweep time is returned and the result says so). `format` is ascii (default: about 14 KB, 7 significant digits, no state change, fastest on the unit), real32 (binary, about 4 KB, the same 7 digits) or real64 (binary, about 8 KB, full do…
| Parameter | Type | Description |
|---|---|---|
format | string | Transfer format (default ascii; real32/real64 switch the instrument's :FORMat for the read and restore it) |
fresh | boolean | Run a single sweep first and read the finished trace; restores continuous mode if it was on (default false) |
include_axis | boolean | Include the per-point frequency (or time) axis (default true) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
max_points | integer | Return at most this many points using peak-preserving min/max decimation (default: all points) |
trace | integer | Trace 1-6; default the selected trace (:TRACe:SELect?) |
get_marker
Read one marker: mode (off, normal, delta, fixed), trace, and its frequency (x, Hz) and level (y, current power unit, dBm by default) together. A delta marker's x and y are relative to its reference marker (reference_marker is included). An off marker has x and y null.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number, 1 to 10 |
set_marker
Set a marker's mode, trace, reference marker (delta mode) and/or position. Commands are applied in the order mode, trace, reference, x; the marker is re-read afterwards and anything the instrument did not take is reported in 'warnings'. A position set on a marker that is off has no effect: set mode normal (or use marker_search, which turns the marker on) first.
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 10 |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
mode | string | off, normal (position), delta or fixed |
reference_marker | integer | Reference marker for delta mode (another marker) |
trace | integer | Trace the marker sits on, 1 to 6 |
x_hz | number | Marker position in Hz (seconds in zero span). Not clamped by the instrument: a value outside the sweep span is accepted but its level reading is not meaningful |
marker_search
Move a marker with a search and return its new frequency and level together. Actions: peak (highest), next_peak (next highest), next_left / next_right (next peak left or right of the marker), minimum, peak_to_peak (the marker becomes a delta marker showing the peak-to-peak difference). A search turns a marker that is off on. Peaks must satisfy the peak threshold and excursion (get_peak_criteria).
| Parameter | Type | Description |
|---|---|---|
action * | string | Which search to run |
marker * | integer | Marker number, 1 to 10 |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker_to_instrument
Use a marker's frequency or level to set an instrument parameter: center, step (center frequency step; turns automatic step off), start, stop or reference_level. The marker must be on. Returns the new value of the parameter. The instrument refuses a center that would put the span outside its range.
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 10 |
target * | string | Parameter to set from the marker |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
markers_all_off
Turn every marker off (:CALCulate:MARKer:AOFF) and confirm it by reading each marker's mode.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_peak_criteria
Read the peak search criteria: threshold (dBm) and excursion (dB), each with its automatic flag. In automatic mode the instrument derives the value from the trace.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_peak_criteria
Set the peak search criteria. Giving threshold_dbm or excursion_db turns that criterion's automatic mode off (verified on the instrument); threshold_auto / excursion_auto true switches it back to automatic. Values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
excursion_auto | boolean | Automatic excursion on/off (not true together with excursion_db) |
excursion_db | number | Peak excursion in dB, 0 to 100; a peak must rise this far above the valleys beside it |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
threshold_auto | boolean | Automatic threshold on/off (not true together with threshold_dbm) |
threshold_dbm | number | Peak threshold in dBm, -200 to 30; a peak must be above it |
get_marker_function
Read a marker's function (off, noise, band_power, band_density) and the band span used by the band functions. The function result is the marker's level: read it with get_marker (y).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number, 1 to 10 |
set_marker_function
Set a marker's function: noise (noise level per Hz), band_power (power in the band), band_density (power density in the band) or off. band_span_hz sets the band width for band_power and band_density. Read the result with get_marker. Values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 10 |
band_span_hz | number | Band span in Hz for band_power / band_density |
function | string | Marker function |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_marker_ndb
Read a marker's N-dB bandwidth measurement: whether it is on, the N value (dB below the marker) and, when on, the measured bandwidth in Hz.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number, 1 to 10 |
set_marker_ndb
Turn a marker's N-dB bandwidth measurement on or off and/or set N (dB below the marker, -140 to -0.01, e.g. -3 or -6). Returns the state including the measured bandwidth in Hz (null while off).
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 10 |
enabled | boolean | Turn the N-dB measurement on or off |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
ndb | number | N in dB, negative: -140 to -0.01 |
get_frequency_counter
Read the marker frequency counter: whether it is on and its gate time in seconds.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_frequency_counter
Turn the marker frequency counter on or off and/or set its gate time (1 us to 500 ms). Values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Counter on or off |
gate_time_s | number | Gate time in seconds, 1e-6 to 0.5 |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_limit_line
Read one limit line: whether it is displayed, its type (upper or lower), the trace it is tested against, the margin and its on/off state, and the point list (frequency in Hz, level in dBm, connected). The analyzer documents no pass/fail read-back, so whether a trace violates the line cannot be read; check the screenshot or compare get_trace_data with the points.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (the 1000-series models have 1 to 4) |
set_limit_line
Create or edit a limit line. Give any of: displayed, type (upper/lower), trace, margin_db and margin_enabled, and points (replaces the whole point list; 1 to 10 points in ascending frequency order, equal frequencies make a vertical step, each with frequency_hz, amplitude_dbm and optional connected). The line is re-read afterwards; anything the instrument did not take is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
displayed | boolean | Show the line on the display |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (the 1000-series models have 1 to 4) |
margin_db | number | Margin in dB, -40 to 40 |
margin_enabled | boolean | Margin on/off |
points | array | Replace the whole point list: 1 to 10 points in ascending frequency order (equal frequencies make a vertical step) |
trace | integer | Trace number (1-6) to test against the line |
type | string | upper: the trace must stay below the line; lower: above |
delete_limit_line
Delete the points of one limit line (line) or of all limit lines (all: true). Type, trace and margin settings are left as they are. The result confirms the line is empty (for all, line 1 is checked); the analyzer finishes a delete a moment after it is sent, so the tool waits for it.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Delete every limit line instead of one |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (the 1000-series models have 1 to 4) |
get_measurement
Report whether the instrument is in spectrum analyzer mode, or check one measurement. The instrument has no query for the active measurement, so without 'measurement' this asks one query that only spectrum analyzer mode answers (spectrum_analyzer, or an error that a measurement is active). With 'measurement' (channel_power, time_power, obw, acpr, toi, cn or harmonics) it checks that measurement and returns its parameters; an error means it is not active. A check that gets no reply costs a few seconds while the instrument recovers.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
measurement | string | Check this measurement and return its parameters |
configure_measurement
Enter a measurement (channel_power, time_power, obw, acpr, toi, cn or harmonics) and set its parameters; the instrument stays in the measurement until exit_measurement. preset=true (default) is :CONFigure:<meas>, false is :CONFigure:<meas>:NDEFault. Either way the instrument changes the span, RBW and sweep time (for example span 3 MHz); when entered from spectrum analyzer mode the previous frequency, bandwidth and sweep settings are saved and exit_measurement puts them back, and so is the tracking generator output (entering a measurement switches it off). While a measurement is active most spe…
| Parameter | Type | Description |
|---|---|---|
measurement * | string | |
average | boolean | Measurement averaging on/off |
average_control | string | Average termination control |
average_count | number | Averages, integer 1-999 (manual range) |
average_type | string | Average type |
carrier_bandwidth_hz | number | acpr only: carrier (main channel) bandwidth in Hz |
fundamental_hz | number | harmonics only: fundamental frequency in Hz |
harmonics_count | number | harmonics only: number of results including the fundamental, integer 2-10 (the preset is 2) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
integration_bandwidth_hz | number | channel_power, acpr or cn: integration bandwidth in Hz (channel_power: clamped by the instrument to 100 Hz..3.61 GHz) |
left_limit_s | number | time_power only: left limit in s, 0-0.01 (10 ms) |
noise_bandwidth_hz | number | cn only: noise bandwidth in Hz |
offset_hz | number | acpr or cn: offset of the adjacent channel (acpr) or of the noise (cn) from the carrier, in Hz, 0 or more |
offset_side | string | acpr only: which adjacent channels to measure |
percent | number | obw only: occupied power fraction, above 0 up to 1 (0.99 = 99 %); the instrument clamps to 0.9999 |
preset | boolean | Preset the measurement's parameters (default true) |
right_limit_s | number | time_power only: right limit in s, 0-0.01 (10 ms) |
sweep_time_s | number | harmonics only: sweep time in s, 0.001-100 |
xdb | number | obw only: x dB level in dB, -100 to -0.1 |
read_measurement
Read the result of the active measurement. READ (default) runs the measurement and waits for it; fetch=true returns the latest result at once. channel_power gives channel power (dBm) and density (dBm/Hz), time_power gives power (dBm), obw gives occupied bandwidth (Hz), frequency error (Hz), x dB bandwidth (Hz) and total power (dBm), acpr gives main, lower and upper channel power (dBm) and lower/upper relative power (dBc), cn gives carrier and noise power (dBm) and C/N (dB), toi gives the lower and upper third-order products and tones and the intercept, harmonics gives the fundamental, harmonic…
| Parameter | Type | Description |
|---|---|---|
measurement * | string | |
fetch | boolean | Return the latest result without starting a measurement |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
timeout_s | number | Seconds to wait for the result (default 30, 1-600); READ waits for the measurement, including its averages |
exit_measurement
Leave the measurement and return to spectrum analyzer mode (:CONFigure:SANalyzer). The measurement preset leaves the span, RBW and sweep time changed, so unless restore_settings=false the frequency, bandwidth, sweep time and continuous-sweep settings saved by configure_measurement are put back and verified, and so is the tracking generator output, level and offset when it was on (a measurement entered elsewhere has nothing saved: a warning says so). Does nothing when already in spectrum analyzer mode.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
restore_settings | boolean | Restore the settings saved when the measurement was entered (default true) |
measure
One-shot measurement that leaves the instrument as it found it: from spectrum analyzer mode it saves the frequency, bandwidth and sweep settings and the tracking generator output (entering a measurement switches it off), enters the measurement (channel_power, time_power, obw, acpr, toi, cn or harmonics) with the given parameters, READs the result, and ALWAYS (even on errors) exits to spectrum analyzer mode, restores the settings and the generator and verifies. With the requested measurement already active it only reads and puts any parameters you changed back. It refuses when the instrument is…
| Parameter | Type | Description |
|---|---|---|
measurement * | string | |
average | boolean | Measurement averaging on/off |
average_control | string | Average termination control |
average_count | number | Averages, integer 1-999 (manual range) |
average_type | string | Average type |
carrier_bandwidth_hz | number | acpr only: carrier (main channel) bandwidth in Hz |
fundamental_hz | number | harmonics only: fundamental frequency in Hz |
harmonics_count | number | harmonics only: number of results including the fundamental, integer 2-10 (the preset is 2) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
integration_bandwidth_hz | number | channel_power, acpr or cn: integration bandwidth in Hz (channel_power: clamped by the instrument to 100 Hz..3.61 GHz) |
left_limit_s | number | time_power only: left limit in s, 0-0.01 (10 ms) |
noise_bandwidth_hz | number | cn only: noise bandwidth in Hz |
offset_hz | number | acpr or cn: offset of the adjacent channel (acpr) or of the noise (cn) from the carrier, in Hz, 0 or more |
offset_side | string | acpr only: which adjacent channels to measure |
percent | number | obw only: occupied power fraction, above 0 up to 1 (0.99 = 99 %); the instrument clamps to 0.9999 |
preset | boolean | Preset the measurement's parameters when entering (default true) |
right_limit_s | number | time_power only: right limit in s, 0-0.01 (10 ms) |
sweep_time_s | number | harmonics only: sweep time in s, 0.001-100 |
timeout_s | number | Seconds to wait for the result (default 30, 1-600); READ waits for the measurement, including its averages |
xdb | number | obw only: x dB level in dB, -100 to -0.1 |
get_tracking_generator
Get the tracking generator (the manual's 'trace source') state: output on/off, output level in dBm, level offset in dB, reference trace, normalization on/off and its reference level in dB. While a measurement is active it is an error saying so (call exit_measurement); an error naming the query otherwise means the option is probably not installed.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_tracking_generator
Set the tracking generator (trace source): output on/off, level (dBm), level offset (dB), reference trace, normalization and its reference level. Level and offset are set before the output is switched on. The output is wired to the analyzer input on some benches, so switch it off when done: switching it off also re-asserts automatic RBW/VBW that were on (the instrument otherwise keeps a stale 300 kHz RBW). Values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Tracking generator output on or off |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
level_dbm | number | Output level in dBm (-40 to 0 on the UTS3036B) |
level_offset_db | number | Output level offset in dB (-200 to 200) |
normalize | boolean | Normalization on or off |
normalize_ref_level_db | number | Normalization reference level in dB (-100 to 100) |
reference_trace | boolean | Reference trace on or off (only takes while the output is on) |
get_instrument_module
Get the active measurement function module: spectrum_analyzer, emi or analog_demod. Read-only, safe in any module. An unexpected reply (not SA/EMI/AD) is an error quoting it rather than a guess.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
select_instrument_module
Switch the active measurement function module (SA/EMI/AD) and read it back. Does not restore the previous module afterwards - the caller chose this switch; call it again with the module you want back when done. Warns (not an error) if the module did not change: on this firmware an unlicensed module is refused silently with no SCPI error, which this tool cannot distinguish from a link glitch. The front-panel lock is unaffected by this call beyond the usual: see docs/verified-hardware.md, 'Front-panel lock'.
| Parameter | Type | Description |
|---|---|---|
module * | string | Module to select: sa (spectrum analyzer), emi, or ad (analog demodulation) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_emi_settings
Get a read-only snapshot of the EMI module configuration: standard, scan sequence, the 10-band scan table, meter/trace detectors, trace types, search/peak settings, meter frequency and attenuation, and trigger. EMI module must be active (select_instrument_module). By default omits 'scan_table' (10 bands, by far the most expensive group); pass groups including 'scan_table' to include it. A silent or malformed reply to any query is an error naming that command; no partial snapshot is ever returned.
| Parameter | Type | Description |
|---|---|---|
groups | array | Which setting groups to read. Default: all except scan_table (standard, sequence, meters, detectors, traces, search, frequency, amplitude, trigger). Pass an explicit list (including 'scan_table') to c… |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_emi_scan_table
Edit the EMI module's 10-band scan table: per band, enabled, start_hz, stop_hz, rbw_hz/rbw_auto, time_s/time_auto, attenuation_db/attenuation_auto, points (11-40001) and preamp; or load a CISPR band preset (presets: band, cis: A/B/C/D/CD/E). EMI module must be active (select_instrument_module). The whole table is re-read afterwards and anything adjusted by the instrument (including the neighbor-band coupling the manual describes on overlap or crossing) is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
bands | array | Per-band edits; give only the fields to change for each band |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
presets | array | Load a CISPR band preset into a band (applied before any bands edits for the same band number) |
set_emi_measurement
Configure the EMI module's measurement: standard (none/cispr), sweep sequence and re-measure mode, trace/meter/final detectors, meter dwell time, averaging, and search mode/counts. EMI module must be active (select_instrument_module). At most two of quasi_peak/average_continuous/average may be selected together per detector group (the manual documents this as mutually exclusive). Everything requested is re-read afterwards and any instrument-adjusted value is reported in 'warnings'. Leaves the new state (nothing is restored).
| Parameter | Type | Description |
|---|---|---|
average_count | integer | Average count, 1 to 999 |
average_type | string | Averaging type |
final_detectors | array | Final-measurement detector edits |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
meter_detectors | array | Per-meter detector (meter index 1 to 3) |
meter_dwell_s | number | Meter detector dwell time in seconds, 0.001 to 100 (one value for all meters) |
peak_count | integer | Search peak count, 1 to 50 |
remeasure | string | What the measure step covers |
search_mode | string | Peak-search mode for the signal table |
segment_count | integer | Search segment count, 1 to 50 |
sequence | string | Sweep sequence: scan only, search only, scan+search+measure, scan+search, search+measure, measure only |
standard | string | NONE allows 1-3-10 RBW steps 1 kHz-3 MHz; CISPr fixes RBW to 200 Hz/9 kHz/120 kHz/1 MHz and filter type to EMI (6 dB) |
trace_detectors | array | Per-trace detector (trace index 1 to 3) |
get_emi_limit_line
Read one EMI limit line: whether it is displayed, its type (upper or lower), the trace it is tested against, the margin and its on/off state, and the point list (frequency in Hz, level in dBm, connected). EMI module must be active (select_instrument_module). The analyzer documents no pass/fail read-back, so whether a trace violates the line cannot be read; check the screenshot or compare get_trace_data with the points.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (EMI mode has only 3 traces to test against, see 'trace') |
set_emi_limit_line
Create or edit an EMI limit line. EMI module must be active (select_instrument_module). Give any of: displayed, type (upper/lower), trace, margin_db and margin_enabled, points (replaces the whole point list; 1 to 12 points in ascending frequency order, equal frequencies make a vertical step, each with frequency_hz, amplitude_dbm and optional connected), copy_from (copy another line's points into this one) or build_from_trace (build points from a trace's current data). copy_from/build_from_trace are sent first, then the other settings. The line is re-read afterwards; anything the instrument did…
| Parameter | Type | Description |
|---|---|---|
build_from_trace | integer | Build this line's points from a trace's current data (sent before points/other settings) |
copy_from | integer | Copy another limit line's points into this one (sent before points/other settings) |
displayed | boolean | Show the line on the display |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (EMI mode has only 3 traces to test against, see 'trace') |
margin_db | number | Margin in dB, -40 to 40 |
margin_enabled | boolean | Margin on/off |
points | array | Replace the whole point list: 1 to 12 points in ascending frequency order (equal frequencies make a vertical step) |
trace | integer | Trace number to test against the line (EMI has only 3 traces; the manual documents 1-6) |
type | string | upper: the trace must stay below the line; lower: above |
delete_emi_limit_line
Delete the points of one EMI limit line (line) or of all EMI limit lines (all: true). EMI module must be active (select_instrument_module). Type, trace and margin settings are left as they are. The result confirms the line is empty (for all, line 1 is checked); the analyzer finishes a delete a moment after it is sent, so the tool waits for it.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Delete every EMI limit line instead of one |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
line | integer | Limit line number, 1 to 6 (EMI mode has only 3 traces to test against, see 'trace') |
get_emi_correction
Read one EMI correction (antenna/cable) factor set: whether it is enabled and its point list (frequency in Hz, gain in dB, added to the measured level at that frequency). EMI module must be active (select_instrument_module).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
slot | integer | Correction set number, 1 to 10 |
set_emi_correction
Edit an EMI correction (antenna/cable) factor set. EMI module must be active (select_instrument_module). Give slot plus any of: points (replaces the whole point list; 1 to 10 points in ascending frequency order, each with frequency_hz and gain_db), enabled (on/off), or delete (clears this slot's points; not combined with points). Or give all_off (turns every slot off) or delete_all (clears every slot's points) alone, without slot. The slot (or slot 1, for all_off/delete_all) is re-read afterwards; anything the instrument did not take is reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
all_off | boolean | Turn off every correction slot's enabled state (:CSET:ALL:STATe OFF); exclusive of slot/points/enabled/delete/delete_all |
delete | boolean | Clear this slot's points (sent before points/enabled) |
delete_all | boolean | Clear every correction slot's points (:CSET:ALL:DELete); exclusive of slot/points/enabled/delete/all_off |
enabled | boolean | Turn this slot's correction on/off |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
points | array | Replace slot's whole point list: 1 to 10 points in ascending frequency order |
slot | integer | Required unless all_off or delete_all is the only action given |
get_emi_marker
Read one EMI marker: mode (off, normal, delta, fixed), trace (1-3) and its frequency (x, Hz) and level (y, dBm by default) together. A delta marker's x and y are relative to its reference marker. An off marker has x and y null.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number, 1 to 6 (EMI has 6 markers) |
set_emi_marker
Set an EMI marker's mode, trace, reference marker (delta mode) and/or frequency position. Commands are applied in the order mode, trace, reference, frequency; the marker is re-read afterwards and anything the instrument did not take is reported in 'warnings'. A position set on a marker that is off has no effect: set mode normal (or use emi_marker_search, which turns the marker on) first.
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 6 (EMI has 6 markers) |
frequency_hz | number | Marker position in Hz. Not clamped by the instrument |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
mode | string | off, normal (position), delta or fixed |
reference_marker | integer | Reference marker for delta mode (another marker) |
trace | integer | EMI trace, 1 to 3 |
emi_marker_search
Move an EMI marker with a peak search and return its new frequency and level. Actions: peak (highest), next (next highest), left / right (next peak left or right of the marker), minimum. A search turns a marker that is off on. Peaks must satisfy the peak criteria (get_emi_peak_criteria).
| Parameter | Type | Description |
|---|---|---|
action * | string | Which search to run |
marker * | integer | Marker number, 1 to 6 (EMI has 6 markers) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
emi_markers_all_off
Turn every EMI marker off (:CALCulate:FSCan:MARKer:AOFF) and confirm it by reading each marker's mode.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_emi_peak_criteria
Read the EMI peak search criteria: threshold (dBm) and excursion (dB), each with its automatic flag. In automatic mode the instrument derives the value from the trace.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_emi_peak_criteria
Set the EMI peak search criteria. Giving threshold_dbm or excursion_db turns that criterion's automatic mode off; threshold_auto / excursion_auto true switches it back to automatic. Values the instrument changed are reported in 'warnings'.
| Parameter | Type | Description |
|---|---|---|
excursion_auto | boolean | Automatic excursion on/off (not true together with excursion_db) |
excursion_db | number | Peak excursion in dB, 0 to 100; a peak must rise this far above the valleys beside it |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
threshold_auto | boolean | Automatic threshold on/off (not true together with threshold_dbm) |
threshold_dbm | number | Peak threshold in dBm, -200 to 30; a peak must be above it |
emi_signal_list
Act on the EMI module's signal table (peak table): add the current marker's frequency or measurement to the list, replace or append a row from a meter reading, delete or mark/unmark a signal, set which meter a marker couples to, or zoom the list view. The manual documents NO command to read the table's contents and none of these actions has a read-back, so the result only confirms the command was accepted (no instrument error); to see the actual list, use the screenshot tool over VXI-11.
| Parameter | Type | Description |
|---|---|---|
action * | string | Which signal-list action to run |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number (add_marker) |
meter | integer | Meter number (replace_with_meter, set_meter) |
signal | integer | Signal number (delete, mark, clear_mark; optional for zoom_in/zoom_out) |
get_emi_signal_list_sort
Read the EMI module signal list's sort type and order - the only part of the signal table the manual documents as queryable.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_emi_signal_list_sort
Set the EMI module signal list's sort type and/or order. Read back afterward; anything the instrument did not take is a `warnings` entry.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
sort_order | string | |
sort_type | string | frequency, or amplitude/delta for trace 1-3 |
emi_run
Start an EMI scan sequence and wait for it, with a time limit. Sends `:INITiate2:CONTinuous OFF` first (cannot read its prior state first: `:INITiate2:CONTinuous?` gets no reply in EMI, live-verified), then either `:INITiate:FSCan:CLEar:IMMediate` (clear_list true: clears the signal list and starts) or `:INITiate:IMMediate`. There is no documented 'finished' query; completion is inferred from the instrument answering again, since a scan-only sequence was live-verified to leave it silent to everything (including the error queue) for 25 s or more while running, then stop by itself. Reading the r…
| Parameter | Type | Description |
|---|---|---|
clear_list | boolean | Clear the signal list before starting (:INITiate:FSCan:CLEar:IMMediate instead of :INITiate:IMMediate) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
timeout_s | number | Give up waiting after this many seconds (default 45, 0-600). A cold EMI scan was seen to leave the instrument silent to everything, including the error queue, for 25 s or more; reaching this limit doe… |
emi_stop
Stop a running EMI scan sequence (`:INITiate:STOP`). Live-verified 2026-11-12: accepted without an instrument error in EMI mode (unlike SA, where this command gives -113). No independent confirmation that it actually halted anything was taken (no documented read-back); the result only reports whether the instrument raised an error.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
enter_analog_demod
Switch to the analog demodulation (AD) module and read it back. From spectrum analyzer mode, saves the frequency, bandwidth, sweep time and continuous-sweep settings first, for exit_analog_demod to restore; re-entering AD while already there keeps whatever was saved the first time. Warns (not an error) if the module did not change: on this firmware an unlicensed module is refused silently with no SCPI error, which this tool cannot distinguish from a link glitch. Leaves the instrument in AD on purpose; call exit_analog_demod when done. Does not select or preset an AM/FM demodulation type.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
exit_analog_demod
Leave the AD module and return to spectrum analyzer mode (:INSTrument:SELect SA). Unless restore_settings=false, the frequency, bandwidth, sweep time and continuous-sweep settings saved by enter_analog_demod are put back and verified by read-back (the same resend-once-then-fail pattern exit_measurement uses). Always sends the switch, even if this server never called enter_analog_demod (e.g. after select_instrument_module); a clear warning says so when there is nothing saved to restore, rather than guessing at settings this server never saw.
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
restore_settings | boolean | Restore the settings saved when AD was entered (default true) |
get_ad_settings
Get a read-only snapshot of the AD (analog demodulation) module's frequency, bandwidth and demod-timing settings: current demodulation type (AM/FM, via :CONFigure?), center frequency and step, RF span and resolution bandwidth, demodulation bandwidth, AF spectrum start/stop and bandwidth, demod window sweep time, demod time and averaging, and input impedance. AD module must be active (enter_analog_demod/select_instrument_module). Filters, audio and display/marker settings are not included here (separate tool groups). A silent or malformed reply to any query is an error naming that command; no p…
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_ad_frequency
Configure the AD module's center frequency, RF span, resolution bandwidth and demodulation bandwidth (DBW). AD module must be active. The AM/FM prefix is read fresh from :CONFigure? each call. Ranges come from the programming manual and are not yet live-verified: whether the instrument clamps or errors out of range is UNKNOWN. Everything requested is re-read afterwards and any instrument-adjusted value is reported in 'warnings'. Leaves the new state (nothing is restored).
| Parameter | Type | Description |
|---|---|---|
center_hz | number | Center frequency in Hz, 50 Hz to the instrument's max minus 50 Hz (manual; UNKNOWN to clamp vs error) |
center_step_auto | boolean | Automatic center frequency step on/off |
center_step_hz | number | Center frequency step in Hz; turns the automatic step off |
demod_bandwidth_hz | number | Demodulation bandwidth (DBW) in Hz, 400 Hz to 25 MHz (manual; the range text is ambiguous) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
rbw_auto | boolean | Automatic RF resolution bandwidth on/off |
rbw_hz | number | RF resolution bandwidth in Hz, 100 Hz to 1 MHz (manual; exact step list is 1-1.5-2-3-5-7.5-10, ambiguous in the manual) |
span_hz | number | RF sweep width in Hz, 100 Hz to 12.8 MHz (manual) |
set_ad_demod_timing
Configure the AD module's demodulation window sweep time, demodulation time (or automatic), and averaging state/count. AD module must be active. The AM/FM prefix is read fresh from :CONFigure? each call. Ranges come from the programming manual and are not yet live-verified. Everything requested is re-read afterwards and any instrument-adjusted value is reported in 'warnings'. Leaves the new state (nothing is restored).
| Parameter | Type | Description |
|---|---|---|
average_count | integer | Average count, 1 to 999 (manual) |
average_state | boolean | Averaging on/off |
demod_time_auto | boolean | Automatic demodulation time on/off |
demod_time_s | number | Demodulation time in seconds (manual gives no upper bound; auto is 36x the window sweep time) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
window_sweep_time_s | number | Demodulation window sweep time in seconds, 1 us to 500 ms (manual) |
set_ad_filters
Set the AD (analog demodulation) module's audio filters: low-pass and/or high-pass (freely combinable), or band-pass/weighting (PM p.158-160). AD module must be active. The AM/FM prefix is read fresh from :CONFigure? each call. Live-verified (2026-11-12): low_pass_filter and high_pass_filter can be set together in one call (the instrument does not turn either off for the other), but band_pass_filter is mutually exclusive with both — setting it turns off any active low-/high-pass filter and vice versa (refused locally before sending anything if requested together with either). This tool reads…
| Parameter | Type | Description |
|---|---|---|
band_pass_filter | string | Band-pass/weighting audio filter (PM p.160). Setting this turns the low-pass and high-pass filters off. |
high_pass_filter | string | High-pass audio filter cutoff (PM p.159-160). Setting this turns the band-pass filter off. |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
low_pass_filter | string | Low-pass audio filter cutoff (PM p.159). Setting this turns the band-pass filter off. |
set_ad_audio
Set the AD (analog demodulation) module's speaker and/or system volume (PM p.158-159, p.9). AD module must be active. Turning the speaker ON, or raising the volume while it is already on, requires confirm=true (loud/unexpected tone in a shared lab, docs/research/analog-demodulation.md risk 3). By default restores the speaker and volume to what they were before this call once the requested change is confirmed by read-back; pass keep=true to leave the new state in place instead. The read path (speaker state, volume) is live-verified (2026-11-12); the speaker-on/volume-raise write path was intent…
| Parameter | Type | Description |
|---|---|---|
confirm | boolean | Required (true) to turn the speaker on, or to raise the volume while it is already on. |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
keep | boolean | Leave the new speaker/volume state in place instead of restoring what it was before this call (default false: restore). |
speaker | boolean | Turn the speaker on or off. Turning it ON requires confirm=true: it plays the demodulated signal on the loudspeaker and headphones immediately, at the shared system volume (PM p.158-159, UM p.52; docs… |
volume_pct | integer | System volume in percent, 0-100 (PM p.9). Shared with the rest of the instrument. |
get_demod_result
Get the AD (analog demodulation) module's numeric result window — center frequency, carrier power, carrier frequency error, modulation rate, SINAD, distortion/total Vrms, THD, and peak+/peak-/(pk-pk)/2/RMS for both the current and max-hold rows — without a screenshot. Wraps the undocumented bare `:FETCh:AM?`/`:FETCh:FM?` query (suffix 1, the default), confirmed live on this firmware (docs/verified-hardware.md). The AM/FM type is read fresh from :CONFigure? each call. AD module must be active (enter_analog_demod/select_instrument_module). This does not expose the RF spectrum trace, demodula…
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
set_ad_display
Configure one AD display window's Y-axis reference level and/or per-division value, and (window 3 only) the AF spectrum's linear/log spacing. AD module must be active. The unit of reference_level/per_division depends on the window and current demod type (AM/FM, read fresh from :CONFigure? each call) — see each parameter's description. Live-verified (2026-11-12) for window 1 and window 3's spacing setter; window 2's unit and exact clamp-vs-error behavior were not separately exercised. Everything requested is re-read afterwards and any instrument-adjusted value is reported in 'warnings'. Leave…
| Parameter | Type | Description |
|---|---|---|
window * | Display window: 1 RF spectrum, 2 demodulation waveform, 3 AF (modulation) spectrum | |
af_spacing | string | AF spectrum Y-axis spacing. Only documented for window 3 (manual, PM p.150) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
per_division | number | Y-axis value per division, same unit as reference_level for the chosen window |
reference_level | number | Y-axis reference level. Unit depends on window and demod type: dBm (window 1), modulation depth fraction in AM / Hz deviation in FM (window 2), unconfirmed (window 3, manual ambiguous) |
ad_marker
Set an AD marker's mode, trace, reference marker (delta mode) and/or position, then return its new state. AD module must be active. Commands apply in the order mode, trace, reference, x. AD has six markers per demod type (not SA's ten) and AD-specific traces (rf_spectrum, demod, demod_average, demod_max, demod_min, af_spectrum); x's unit is Hz for the spectrum traces and seconds for the demodulation-waveform traces. A position set on a marker that is off has no effect: set mode normal (or use ad_marker_search) first. Live-verified (2026-11-12) against a real signal.
| Parameter | Type | Description |
|---|---|---|
marker * | integer | Marker number, 1 to 6 (AD has six markers per demod type, not SA's ten) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
mode | string | off, normal (position), delta or fixed |
reference_marker | integer | Reference marker for delta mode (another marker, 1-6) |
trace | string | Trace the marker sits on |
x | number | Marker position: Hz for rf_spectrum/af_spectrum, seconds for the demod waveform traces |
ad_marker_search
Move an AD marker with a search and return its new state. AD module must be active. Actions: peak (highest), next_peak, next_left / next_right (next peak left/right of the marker), minimum, peak_to_peak (the marker becomes a delta marker). A search turns a marker that is off on. Live-verified (2026-11-12): peak search found a real external signal exactly.
| Parameter | Type | Description |
|---|---|---|
action * | string | Which search to run |
marker * | integer | Marker number, 1 to 6 (AD has six markers per demod type, not SA's ten) |
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
get_ad_marker
Read one AD marker: mode (off, normal, delta, fixed), trace, and its position (x) and value (y) together, with their units (which depend on the trace and current demod type). AD module must be active. A delta marker's x/y are relative to its reference marker. An off marker has x and y null. Live-verified (2026-11-12).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |
marker | integer | Marker number, 1 to 6 (AD has six markers per demod type, not SA's ten) |
ad_markers_all_off
Turn every AD marker off (:CALCulate:AM|FM:MARKer:AOFF for the current demod type) and confirm it by reading each of the six markers' mode. AD module must be active. Live-verified (2026-11-12).
| Parameter | Type | Description |
|---|---|---|
instrument | string | Which instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured |