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.
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.
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 MXO54 | Rohde & Schwarz RTA4004 | |
|---|---|---|
| Commands in TestFlow's library | 63 | 83 |
| Queries (read a value or state) | 7 | 30 |
| Settings and actions | 56 | 53 |
| Subsystems | 19 | 16 |
| Distinct command headers | 57 | 80 |
| Headers the other lacks | 48 | 71 |
| Command language | SCPI | SCPI |
| Operation complete | Not in library | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | MXO54, MXO54-1000, MXO54-2000, MXO54-500 | RTA4004, RTA4006, RTA4012, RTA4014, RTA4024, RTA4044 |
9 command headers are in both libraries. Where the RTA4004 library writes the command differently, its form is shown under the MXO54's.
| Command | What 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 PNG | Capture. 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. |
| *RST | Reset. Resets the oscilloscope to default settings. |
| :CHANnel<n>:OFFSet <Volts>RTA4004: CHANnel<Channel>:OFFSet <Volts> | Channel Offset. Sets vertical offset. |
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.
| Command | What 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 FFT | FFT Set Type. Configures math waveform as FFT |
| :MATH<Math_index>:FFT:WINDow <Window> | FFT Window. Sets FFT windowing function |
| Command | What 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. |
| Command | What it does |
|---|---|
| :ACQuire:RUN | Run. Starts continuous acquisition. |
| :ACQuire:STOP | Stop. Stops acquisition. |
| :ACQuire:SINGle | Single Seq. Arms a single acquisition. |
| :ACQuire:MODE <Mode> | Acquisition Mode. Sets acquisition mode (real-time or segmented). |
| Command | What 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) |
| Command | What it does |
|---|---|
| :DISPlay:GRID <State> | Display Grid. Enables or disables display grid |
| :DISPlay:PERSistence <Mode> | Display Persistence. Controls waveform persistence |
| Command | What it does |
|---|---|
| :HISTory:STATe <State> | History Enable. Enables waveform history mode |
| :HISTory:POSition <Index> | History Position. Selects a historical acquisition |
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.
| Command | What 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). |
| Command | What 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. |
| Command | What 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). |
| Command | What 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. |
| Command | What 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:SAVE | Waveform Export Save. Execute saving waveform to the previously defined name/path. |
| Command | What it does |
|---|---|
| HCOPy:CWINdow <OnOff> | Screenshot Close Windows. Close dialog boxes/menus before saving screenshot. |
| HCOPy:IMMediate | Screenshot 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. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.