Oscilloscope · SCPI command comparison

Rohde & Schwarz MXO54 vs RTA4004: SCPI commands and remote control compared

In TestFlow's instrument library, the Rohde & Schwarz MXO54 takes 63 SCPI commands, 7 of them queries, and the Rohde & Schwarz RTA4004 takes 83 SCPI commands, 30 of them queries. That is 20 more on the RTA4004. Counting distinct command headers (the command path without its arguments), 9 are accepted by both, 48 exist only on the MXO54, and 71 only on the RTA4004. 16% of the MXO54's command headers also exist on the RTA4004.

Both libraries have commands under TRIGger, CHANnel, TIMebase, MEASure, SYSTem, and HCOPy. Only the MXO54 has MATH, ACQuire, CURSor, HISTory, REFerence, and ZOOM and 3 more. Only the RTA4004 has SPECtrum, MMEMory, EXPort, RUN, STOP, and SINGle.

Only the RTA4004 library has an operation-complete command (*OPC?); the MXO54 library has none. Both libraries read errors with SYSTem:ERRor?.

TestFlow's library gives the MXO54-1000, MXO54-2000, and MXO54-500 the same command set as the MXO54, so the MXO54 column applies to them too. TestFlow's library gives the RTA4006, RTA4012, RTA4014, RTA4024, and RTA4044 the same command set as the RTA4004, so the RTA4004 column applies to them too.

MXO54 commands
63
RTA4004 commands
83
Shared headers
9
Unique headers
119

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz MXO54 or Rohde & Schwarz RTA4004 and writes the report from the measured results.

Get started

MXO54 vs RTA4004 at a glance

Counts come from TestFlow's instrument library, the command sets its AI agent uses to drive each instrument. A distinct command header is the command path without its arguments, so :OUTPut ON and :OUTPut OFF count once.

Rohde & Schwarz MXO54Rohde & Schwarz RTA4004
Commands in TestFlow's library6383
Queries (read a value or state)730
Settings and actions5653
Subsystems1916
Distinct command headers5780
Headers the other lacks4871
Command languageSCPISCPI
Operation completeNot in library*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setMXO54, MXO54-1000, MXO54-2000, MXO54-500RTA4004, RTA4006, RTA4012, RTA4014, RTA4024, RTA4044

Commands both accept

9 command headers are in both libraries. Where the RTA4004 library writes the command differently, its form is shown under the MXO54's.

CommandWhat it does
:CHANnel<n>:STATe <OnOff>RTA4004: CHANnel<Channel>:STATe <OnOff>Channel Enable. Enables or disables a channel.
:TIMebase:SCALe <SecondsDiv>RTA4004: TIMebase:SCALe <SecDiv>Timebase Scale. Sets horizontal time scale (seconds/div).
:SYSTem:ERRor?Error Query. Reads system error queue.
:HCOPy:FORMat PNG ; ...RTA4004: HCOPy:FORMat PNGCapture. Captures the screenshot as png
*IDN?Identify. Returns instrument identification string.
:CHANnel<n>:SCALe <VoltsDiv>RTA4004: CHANnel<Channel>:SCALe <VoltsDiv>Channel Scale. Sets vertical scale (V/div).
:TIMebase:POSition <Seconds>Timebase Position. Sets horizontal trigger position.
*RSTReset. Resets the oscilloscope to default settings.
:CHANnel<n>:OFFSet <Volts>RTA4004: CHANnel<Channel>:OFFSet <Volts>Channel Offset. Sets vertical offset.

Only on the Rohde & Schwarz MXO54

48 command headers in the MXO54 library have no match in the RTA4004 library. Below are 20 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz MXO54 command reference.

MATH (15 only on the MXO54)

CommandWhat it does
:MATH<n>:STATe <State>Math Enable. Enables or disables math waveform
:MATH<n>:DEFine <Expression>Math Expression. Defines math expression (e.g. CH1-CH2)
:MATH<Math_index>:TYPE FFTFFT Set Type. Configures math waveform as FFT
:MATH<Math_index>:FFT:WINDow <Window>FFT Window. Sets FFT windowing function

TRIGger (9 only on the MXO54)

CommandWhat it does
:TRIGger:MODE <Mode>Trigger Mode. Sets trigger arming behavior
:TRIGger:TYPE <Type>Trigger Type. Selects trigger type.
:TRIGger:EVENt1:SOURce C<Source_channel>Trigger Source. Sets trigger source.
:TRIGger:LEVel <Volts>Trigger Level. Sets trigger level.

ACQuire (6 only on the MXO54)

CommandWhat it does
:ACQuire:RUNRun. Starts continuous acquisition.
:ACQuire:STOPStop. Stops acquisition.
:ACQuire:SINGleSingle Seq. Arms a single acquisition.
:ACQuire:MODE <Mode>Acquisition Mode. Sets acquisition mode (real-time or segmented).

CURSor (4 only on the MXO54)

CommandWhat it does
:CURSor:STATe <State>Cursor Enable. Enables manual cursors
:CURSor:MODE <Mode>Cursor Mode. Selects cursor measurement domain
:CURSor:X<n>?Spectrum Cursor X. Reads cursor frequency position
:CURSor:Y<n>?Spectrum Cursor Y. Reads cursor magnitude (FFT amplitude)

DISPlay (2 only on the MXO54)

CommandWhat it does
:DISPlay:GRID <State>Display Grid. Enables or disables display grid
:DISPlay:PERSistence <Mode>Display Persistence. Controls waveform persistence

HISTory (2 only on the MXO54)

CommandWhat it does
:HISTory:STATe <State>History Enable. Enables waveform history mode
:HISTory:POSition <Index>History Position. Selects a historical acquisition

Only on the Rohde & Schwarz RTA4004

71 command headers in the RTA4004 library have no match in the MXO54 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz RTA4004 command reference.

SPECtrum (23 only on the RTA4004)

CommandWhat it does
SPECtrum:STATe <OnOff>Spectrum Enable. Enable/disable spectrum (FFT) analysis.
SPECtrum:SOURce <Source>Spectrum Source. Set spectrum analysis source waveform.
SPECtrum:FREQuency:CENTer <CenterHz>Spectrum Center Frequency. Set center frequency (Hz).
SPECtrum:FREQuency:SPAN <SpanHz>Spectrum Span. Set frequency span (Hz).

MMEMory (10 only on the RTA4004)

CommandWhat it does
MMEMory:NAME <FileName>Screenshot FileName. Set the filename used by HCOPy[:IMMediate].
MMEMory:DRIVes?List Drives. List available storage devices/drives.
MMEMory:MDIRectory <DirPath>Make Directory. Create a directory.
MMEMory:CDIRectory <DirPath>Change Directory. Change current directory.

CHANnel (9 only on the RTA4004)

CommandWhat it does
CHANnel<Channel>:STATe?Read Channel Enable. Query enable/disable state of an analog channel.
CHANnel<Channel>:SCALe?Read Channel Scale. Query vertical scale (volts per division).
CHANnel<Channel>:OFFSet?Read Channel Offset. Query vertical offset (volts).
CHANnel<Channel>:POSition <Div>Channel Position. Set channel trace position (div).

TRIGger (8 only on the RTA4004)

CommandWhat it does
TRIGger:A:TYPE <Type>Trigger Type. Set trigger type (edge/pulse/etc.).
TRIGger:A:TYPE?Read Trigger Type. Query trigger type.
TRIGger:A:SOURce <Source>Trigger Source. Set trigger source.
TRIGger:A:SOURce?Read Trigger Source. Query trigger source.

EXPort (5 only on the RTA4004)

CommandWhat it does
EXPort:WAVeform:SOURce <WaveformSource>Waveform Export Source. Select waveform source for export.
EXPort:WFMSave:DESTination <DirPath>Waveform Export Destination. Set directory path where waveform files are saved (must exist).
EXPort:WAVeform:NAME <FileName>Waveform Export Name. Set waveform file path/name (extension defined by FORMat[DATA]).
EXPort:WAVeform:SAVEWaveform Export Save. Execute saving waveform to the previously defined name/path.

HCOPy (5 only on the RTA4004)

CommandWhat it does
HCOPy:CWINdow <OnOff>Screenshot Close Windows. Close dialog boxes/menus before saving screenshot.
HCOPy:IMMediateScreenshot Save To File. Save screenshot to file using current directory and filename settings.
HCOPy:COLor:SCHeme <ColorScheme>Screenshot Color Scheme. Set screenshot color scheme.
HCOPy:SIZE:X?Read Screenshot X Size. Query horizontal pixel resolution of screenshots.

Control both from Python

With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, both libraries hold :CHANnel<n>:STATe (channel enable), and the same line runs on each. For the reading, both libraries hold :SYSTem:ERRor? (error query), and the same line runs on each. For the basics, see the PyVISA tutorial.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find both VISA addresses

a = rm.open_resource("PASTE_MXO54_ADDRESS")  # Rohde & Schwarz MXO54
b = rm.open_resource("PASTE_RTA4004_ADDRESS")  # Rohde & Schwarz RTA4004
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Channel Enable
a.write(":CHANnel1:STATe ON")
b.write("CHANnel1:STATe ON")

# The same reading on both: Error Query
print(a.query(":SYSTem:ERRor?"))
print(b.query("SYSTem:ERRor?"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz MXO54 or Rohde & Schwarz RTA4004 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Rohde & Schwarz MXO54 and the Rohde & Schwarz RTA4004 for remote control?

In TestFlow's library the MXO54 has 63 SCPI commands and the RTA4004 has 83 SCPI commands. 9 command headers are common to both, 48 are only on the MXO54 (mostly MATH and TRIGger), and 71 are only on the RTA4004 (mostly SPECtrum and MMEMory).

Can I use the same SCPI code for the Rohde & Schwarz MXO54 and the Rohde & Schwarz RTA4004?

Partly. 9 command headers are accepted by both, including :CHANnel<n>:STATe, :TIMebase:SCALe, and :SYSTem:ERRor?. 119 are not, for example :MATH<n>:STATe on the MXO54 and SPECtrum:STATe on the RTA4004, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the MXO54 or the RTA4004?

The RTA4004: 63 commands for the MXO54 against 83 for the RTA4004 in TestFlow's library. Of those, 7 on the MXO54 and 30 on the RTA4004 are queries that read a value or state, and the library splits them into 19 and 16 subsystems.

How do the MXO54 and RTA4004 signal operation complete and report errors?

Only the RTA4004 library has an operation-complete command (*OPC?); the MXO54 library has none. Both libraries read errors with SYSTem:ERRor?. Each command named here is listed in the tables on this page and on each instrument's command reference.

Your next test, automated today

Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.