uni-t-uts-mcp

v1.1.0
uni-t-uts-mcp Checked 32 minutes ago Published 19 days ago

MCP 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.

ParameterTypeDescription
timeout_msintegerHow 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.

ParameterTypeDescription
hoststringHostname or IP address of the analyzer (defaults to the UTS_IP env var); "auto" discovers it on the local network (see discover_instruments)
namestringInstrument 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…
portintegerTCP 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
transportstringraw, 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.

ParameterTypeDescription
namestringInstrument 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.

ParameterTypeDescription
namestringInstrument 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.

ParameterTypeDescription
command *stringSCPI query, e.g. '*IDN?' or ':SWEep:POINts?'
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
replystringReply type: 'text' (default) or 'block' for a binary block
timeout_msintegerTimeout 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.

ParameterTypeDescription
command *stringSCPI command, e.g. ':FREQuency:CENTer 1 GHz'
confirmbooleanSet true to allow a command on the safety denylist (e.g. *RST). Only with the user's approval.
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
center_hznumberCenter frequency in Hz (> 0)
center_step_autobooleanAutomatic center frequency step on/off
center_step_hznumberCenter frequency step in Hz (> 0); turns the automatic step off
full_spanbooleanSet the full span. Cannot be combined with center/span/start/stop
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
offset_hznumberFrequency offset in Hz
span_hznumberSpan in Hz (> 0; use zero_span for zero span)
start_hznumberStart frequency in Hz (>= 0)
stop_hznumberStop frequency in Hz (> 0)
zero_spanbooleanSet 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).

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
attenuation_autobooleanAutomatic attenuation on/off (not with attenuation_db)
attenuation_dbnumberManual input attenuation, integer dB 0 to 51; turns automatic attenuation off
input_impedance_ohmInput impedance in ohms (50 or 75; 75 is a correction for a 75 ohm source)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
power_unitstringPower unit; set before the reference level
preampbooleanPreamplifier on/off
reference_levelnumberReference 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_dbnumberReference level offset in dB (clamped to +-327.6)
scale_per_div_dbnumberScale per division in dB (0.1 to 20)
scale_typestringY 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).

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
filter_shapestringResolution filter shape
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
rbw_autobooleanAutomatic RBW (follows the span); not with rbw_hz
rbw_hznumberResolution 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_autobooleanAutomatic VBW (RBW times vbw_rbw_ratio); not with vbw_hz
vbw_hznumberVideo bandwidth in Hz (1-3-10 steps, clamped like RBW). Turns VBW auto off
vbw_rbw_rationumberVBW/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).

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
sweep_pointsnumberSweep points, integer 11..40001. Changes the trace length (trace data has this many values)
sweep_time_autobooleanAutomatic sweep time; not with sweep_time_s
sweep_time_rulestringAutomatic sweep time rule
sweep_time_snumberSweep time in seconds (1 ms..4000 s, clamped; zero span allows less). Turns sweep time auto off
sweep_typestringSweep type (turns automatic type off)
sweep_type_autobooleanAutomatic sweep type; not with sweep_type
trigger_sourcestringTrigger source: immediate (free run) or video. External is rejected by the UTS3036B
trigger_video_level_dbmnumberVideo 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>.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
traceintegerTrace 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.

ParameterTypeDescription
trace *integerTrace number 1-6
autobooleanAutomatic detector selection for the trace; not with detector=...
detectorstringDetector mode
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
continuous *booleantrue = continuous sweep, false = single sweep
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
methodstringimmediate (default) or restart
timeout_snumberGive up after this many seconds (default: sweep time + 10 s)
waitbooleanWait 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
timeout_snumberGive 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
timeout_snumberGive 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).

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
traceintegerOnly 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.

ParameterTypeDescription
average_countnumberAverage count, integer 1-999. Global: shared by every trace of type average
average_typestringAverage type (global): voltage, power or log
displaybooleanShow (true) or hide (false) `trace`
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
selected_traceintegerMake this trace (1-6) the current trace (:TRACe:SELect)
traceintegerTrace (1-6) that type, update and display apply to
typestringTrace type of `trace`: write (clear/write, live), average, max_hold or min_hold
updatebooleanUpdate 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
traceintegerOnly 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.

ParameterTypeDescription
operation *stringMath operation
trace *integerTrace (1-6) the operation is applied to
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
offset_dbnumberOffset in dB, only for log_difference and log_offset (default 0)
operand_aintegerOperand A trace (1-6); required unless operation is off
operand_bintegerOperand 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.

ParameterTypeDescription
instrumentstringWhich 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…

ParameterTypeDescription
formatstringTransfer format (default ascii; real32/real64 switch the instrument's :FORMat for the read and restore it)
freshbooleanRun a single sweep first and read the finished trace; restores continuous mode if it was on (default false)
include_axisbooleanInclude the per-point frequency (or time) axis (default true)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
max_pointsintegerReturn at most this many points using peak-preserving min/max decimation (default: all points)
traceintegerTrace 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker 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.

ParameterTypeDescription
marker *integerMarker number, 1 to 10
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
modestringoff, normal (position), delta or fixed
reference_markerintegerReference marker for delta mode (another marker)
traceintegerTrace the marker sits on, 1 to 6
x_hznumberMarker 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_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.

ParameterTypeDescription
marker *integerMarker number, 1 to 10
target *stringParameter to set from the marker
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
excursion_autobooleanAutomatic excursion on/off (not true together with excursion_db)
excursion_dbnumberPeak excursion in dB, 0 to 100; a peak must rise this far above the valleys beside it
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
threshold_autobooleanAutomatic threshold on/off (not true together with threshold_dbm)
threshold_dbmnumberPeak 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).

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker 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'.

ParameterTypeDescription
marker *integerMarker number, 1 to 10
band_span_hznumberBand span in Hz for band_power / band_density
functionstringMarker function
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker 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).

ParameterTypeDescription
marker *integerMarker number, 1 to 10
enabledbooleanTurn the N-dB measurement on or off
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
ndbnumberN 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
enabledbooleanCounter on or off
gate_time_snumberGate time in seconds, 1e-6 to 0.5
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit 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'.

ParameterTypeDescription
displayedbooleanShow the line on the display
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit line number, 1 to 6 (the 1000-series models have 1 to 4)
margin_dbnumberMargin in dB, -40 to 40
margin_enabledbooleanMargin on/off
pointsarrayReplace the whole point list: 1 to 10 points in ascending frequency order (equal frequencies make a vertical step)
traceintegerTrace number (1-6) to test against the line
typestringupper: 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.

ParameterTypeDescription
allbooleanDelete every limit line instead of one
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
measurementstringCheck 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…

ParameterTypeDescription
measurement *string
averagebooleanMeasurement averaging on/off
average_controlstringAverage termination control
average_countnumberAverages, integer 1-999 (manual range)
average_typestringAverage type
carrier_bandwidth_hznumberacpr only: carrier (main channel) bandwidth in Hz
fundamental_hznumberharmonics only: fundamental frequency in Hz
harmonics_countnumberharmonics only: number of results including the fundamental, integer 2-10 (the preset is 2)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
integration_bandwidth_hznumberchannel_power, acpr or cn: integration bandwidth in Hz (channel_power: clamped by the instrument to 100 Hz..3.61 GHz)
left_limit_snumbertime_power only: left limit in s, 0-0.01 (10 ms)
noise_bandwidth_hznumbercn only: noise bandwidth in Hz
offset_hznumberacpr or cn: offset of the adjacent channel (acpr) or of the noise (cn) from the carrier, in Hz, 0 or more
offset_sidestringacpr only: which adjacent channels to measure
percentnumberobw only: occupied power fraction, above 0 up to 1 (0.99 = 99 %); the instrument clamps to 0.9999
presetbooleanPreset the measurement's parameters (default true)
right_limit_snumbertime_power only: right limit in s, 0-0.01 (10 ms)
sweep_time_snumberharmonics only: sweep time in s, 0.001-100
xdbnumberobw 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…

ParameterTypeDescription
measurement *string
fetchbooleanReturn the latest result without starting a measurement
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
timeout_snumberSeconds 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
restore_settingsbooleanRestore 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…

ParameterTypeDescription
measurement *string
averagebooleanMeasurement averaging on/off
average_controlstringAverage termination control
average_countnumberAverages, integer 1-999 (manual range)
average_typestringAverage type
carrier_bandwidth_hznumberacpr only: carrier (main channel) bandwidth in Hz
fundamental_hznumberharmonics only: fundamental frequency in Hz
harmonics_countnumberharmonics only: number of results including the fundamental, integer 2-10 (the preset is 2)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
integration_bandwidth_hznumberchannel_power, acpr or cn: integration bandwidth in Hz (channel_power: clamped by the instrument to 100 Hz..3.61 GHz)
left_limit_snumbertime_power only: left limit in s, 0-0.01 (10 ms)
noise_bandwidth_hznumbercn only: noise bandwidth in Hz
offset_hznumberacpr or cn: offset of the adjacent channel (acpr) or of the noise (cn) from the carrier, in Hz, 0 or more
offset_sidestringacpr only: which adjacent channels to measure
percentnumberobw only: occupied power fraction, above 0 up to 1 (0.99 = 99 %); the instrument clamps to 0.9999
presetbooleanPreset the measurement's parameters when entering (default true)
right_limit_snumbertime_power only: right limit in s, 0-0.01 (10 ms)
sweep_time_snumberharmonics only: sweep time in s, 0.001-100
timeout_snumberSeconds to wait for the result (default 30, 1-600); READ waits for the measurement, including its averages
xdbnumberobw 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
enabledbooleanTracking generator output on or off
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
level_dbmnumberOutput level in dBm (-40 to 0 on the UTS3036B)
level_offset_dbnumberOutput level offset in dB (-200 to 200)
normalizebooleanNormalization on or off
normalize_ref_level_dbnumberNormalization reference level in dB (-100 to 100)
reference_tracebooleanReference 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
module *stringModule to select: sa (spectrum analyzer), emi, or ad (analog demodulation)
instrumentstringWhich 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.

ParameterTypeDescription
groupsarrayWhich 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…
instrumentstringWhich 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'.

ParameterTypeDescription
bandsarrayPer-band edits; give only the fields to change for each band
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
presetsarrayLoad 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).

ParameterTypeDescription
average_countintegerAverage count, 1 to 999
average_typestringAveraging type
final_detectorsarrayFinal-measurement detector edits
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
meter_detectorsarrayPer-meter detector (meter index 1 to 3)
meter_dwell_snumberMeter detector dwell time in seconds, 0.001 to 100 (one value for all meters)
peak_countintegerSearch peak count, 1 to 50
remeasurestringWhat the measure step covers
search_modestringPeak-search mode for the signal table
segment_countintegerSearch segment count, 1 to 50
sequencestringSweep sequence: scan only, search only, scan+search+measure, scan+search, search+measure, measure only
standardstringNONE 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_detectorsarrayPer-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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit 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…

ParameterTypeDescription
build_from_traceintegerBuild this line's points from a trace's current data (sent before points/other settings)
copy_fromintegerCopy another limit line's points into this one (sent before points/other settings)
displayedbooleanShow the line on the display
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit line number, 1 to 6 (EMI mode has only 3 traces to test against, see 'trace')
margin_dbnumberMargin in dB, -40 to 40
margin_enabledbooleanMargin on/off
pointsarrayReplace the whole point list: 1 to 12 points in ascending frequency order (equal frequencies make a vertical step)
traceintegerTrace number to test against the line (EMI has only 3 traces; the manual documents 1-6)
typestringupper: 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.

ParameterTypeDescription
allbooleanDelete every EMI limit line instead of one
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
lineintegerLimit 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).

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
slotintegerCorrection 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'.

ParameterTypeDescription
all_offbooleanTurn off every correction slot's enabled state (:CSET:ALL:STATe OFF); exclusive of slot/points/enabled/delete/delete_all
deletebooleanClear this slot's points (sent before points/enabled)
delete_allbooleanClear every correction slot's points (:CSET:ALL:DELete); exclusive of slot/points/enabled/delete/all_off
enabledbooleanTurn this slot's correction on/off
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
pointsarrayReplace slot's whole point list: 1 to 10 points in ascending frequency order
slotintegerRequired 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker 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.

ParameterTypeDescription
marker *integerMarker number, 1 to 6 (EMI has 6 markers)
frequency_hznumberMarker position in Hz. Not clamped by the instrument
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
modestringoff, normal (position), delta or fixed
reference_markerintegerReference marker for delta mode (another marker)
traceintegerEMI trace, 1 to 3

emi_markers_all_off

Turn every EMI marker off (:CALCulate:FSCan:MARKer:AOFF) and confirm it by reading each marker's mode.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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'.

ParameterTypeDescription
excursion_autobooleanAutomatic excursion on/off (not true together with excursion_db)
excursion_dbnumberPeak excursion in dB, 0 to 100; a peak must rise this far above the valleys beside it
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
threshold_autobooleanAutomatic threshold on/off (not true together with threshold_dbm)
threshold_dbmnumberPeak 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.

ParameterTypeDescription
action *stringWhich signal-list action to run
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker number (add_marker)
meterintegerMeter number (replace_with_meter, set_meter)
signalintegerSignal 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.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
sort_orderstring
sort_typestringfrequency, 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…

ParameterTypeDescription
clear_listbooleanClear the signal list before starting (:INITiate:FSCan:CLEar:IMMediate instead of :INITiate:IMMediate)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
timeout_snumberGive 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.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich 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.

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
restore_settingsbooleanRestore 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…

ParameterTypeDescription
instrumentstringWhich 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).

ParameterTypeDescription
center_hznumberCenter frequency in Hz, 50 Hz to the instrument's max minus 50 Hz (manual; UNKNOWN to clamp vs error)
center_step_autobooleanAutomatic center frequency step on/off
center_step_hznumberCenter frequency step in Hz; turns the automatic step off
demod_bandwidth_hznumberDemodulation bandwidth (DBW) in Hz, 400 Hz to 25 MHz (manual; the range text is ambiguous)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
rbw_autobooleanAutomatic RF resolution bandwidth on/off
rbw_hznumberRF 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_hznumberRF 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).

ParameterTypeDescription
average_countintegerAverage count, 1 to 999 (manual)
average_statebooleanAveraging on/off
demod_time_autobooleanAutomatic demodulation time on/off
demod_time_snumberDemodulation time in seconds (manual gives no upper bound; auto is 36x the window sweep time)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
window_sweep_time_snumberDemodulation 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…

ParameterTypeDescription
band_pass_filterstringBand-pass/weighting audio filter (PM p.160). Setting this turns the low-pass and high-pass filters off.
high_pass_filterstringHigh-pass audio filter cutoff (PM p.159-160). Setting this turns the band-pass filter off.
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
low_pass_filterstringLow-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…

ParameterTypeDescription
confirmbooleanRequired (true) to turn the speaker on, or to raise the volume while it is already on.
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
keepbooleanLeave the new speaker/volume state in place instead of restoring what it was before this call (default false: restore).
speakerbooleanTurn 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_pctintegerSystem 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…

ParameterTypeDescription
instrumentstringWhich 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…

ParameterTypeDescription
window *Display window: 1 RF spectrum, 2 demodulation waveform, 3 AF (modulation) spectrum
af_spacingstringAF spectrum Y-axis spacing. Only documented for window 3 (manual, PM p.150)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
per_divisionnumberY-axis value per division, same unit as reference_level for the chosen window
reference_levelnumberY-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.

ParameterTypeDescription
marker *integerMarker number, 1 to 6 (AD has six markers per demod type, not SA's ten)
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
modestringoff, normal (position), delta or fixed
reference_markerintegerReference marker for delta mode (another marker, 1-6)
tracestringTrace the marker sits on
xnumberMarker position: Hz for rf_spectrum/af_spectrum, seconds for the demod waveform traces

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).

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured
markerintegerMarker 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).

ParameterTypeDescription
instrumentstringWhich instrument to use (a name from list_instruments). Default: the `default` instrument, or the only one configured