Oscilloscope · SCPI command comparison

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

In TestFlow's instrument library, the Rohde & Schwarz RTA4004 takes 83 SCPI commands, 30 of them queries, and the Tektronix MSO22 takes 71 SCPI commands, 7 of them queries. That is 12 more on the RTA4004. Counting distinct command headers (the command path without its arguments), 0 are accepted by both, 80 exist only on the RTA4004, and 50 only on the MSO22. None of the RTA4004's command headers appears in the MSO22 library, so a script written for one needs every command rewritten for the other.

Both libraries have commands under TRIGger. Only the RTA4004 has SPECtrum, CHANnel, MMEMory, HCOPy, EXPort, and TIMebase and 5 more. Only the MSO22 has AFG, DISplay, CURSor, DCH<Digital, DCH1_D, and MEASUrement and 6 more.

Only the RTA4004 library has an operation-complete command (*OPC?); the MSO22 library has none. Only the RTA4004 library has an error-queue read (SYSTem:ERRor?); the MSO22 library has none.

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. TestFlow's library gives the MSO24 the same command set as the MSO22, so the MSO22 column applies to it too.

RTA4004 commands
83
MSO22 commands
71
Shared headers
0
Unique headers
130

Run this on your bench

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

Get started

RTA4004 vs MSO22 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 RTA4004Tektronix MSO22
Commands in TestFlow's library8371
Queries (read a value or state)307
Settings and actions5364
Subsystems1616
Distinct command headers8050
Headers the other lacks8050
Command languageSCPISCPI
Operation complete*OPC?Not in library
Error queueSYSTem:ERRor?Not in library
Models on this command setRTA4004, RTA4006, RTA4012, RTA4014, RTA4024, RTA4044MSO22, MSO24

Commands both accept

None. No command header in TestFlow's RTA4004 library matches one in its MSO22 library, so every command needs its own version for each instrument.

Only on the Rohde & Schwarz RTA4004

80 command headers in the RTA4004 library have no match in the MSO22 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).

CHANnel (12 only on the RTA4004)

CommandWhat it does
CHANnel<Channel>:STATe <OnOff>Channel Enable. Enable/disable an analog channel.
CHANnel<Channel>:STATe?Read Channel Enable. Query enable/disable state of an analog channel.
CHANnel<Channel>:SCALe <VoltsDiv>Channel Scale. Set vertical scale (volts per division).
CHANnel<Channel>:SCALe?Read Channel Scale. Query vertical scale (volts per division).

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.

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.

HCOPy (6 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:FORMat PNGCapture. Return screenshot image data as IEEE 488.2 block data.
HCOPy:COLor:SCHeme <ColorScheme>Screenshot Color Scheme. Set screenshot color scheme.

IEEE 488.2 common (*) (6 only on the RTA4004)

CommandWhat it does
*IDN?Identify. Query the instrument identification string.
*RSTReset. Reset the instrument.
*CLSClear Status. Clear status registers and error queue.
*OPC?Operation Complete. Query operation complete flag.

Only on the Tektronix MSO22

50 command headers in the MSO22 library have no match in the RTA4004 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Tektronix MSO22 command reference.

AFG (16 only on the MSO22)

CommandWhat it does
AFG:AMPLitude <Voltage>AFG Amplitude. Sets output amplitude of the arbitrary function generator.
AFG:ARBitrary:SOUrce <Source_path>AFG source. Loads an arbitrary waveform file.
AFG:BURSt:CCOUnt <Cycles_count>AFG cycles count. Defines number of cycles for burst mode.
AFG:BURSt:TRIGgerAFG burst. Triggers a burst waveform output.

TRIGger (8 only on the MSO22)

CommandWhat it does
TRIGger:A:EDGE:SLOpe <Slope>Trigget slope. Defines whether triggering occurs on rising, falling, or either edge.
TRIGger:A:EDGE:COUPling <Coupling>Trigger coupling. Filters the trigger signal to improve trigger stability.
TRIGger:A:LEVel:<Channel> <Volt>Trigger level. Sets the voltage threshold at which the trigger fires.
TRIGger:A:TYPe LOGIc ; ...D trigger condition. Defines the logical relationship between trigger inputs.

CURSor (5 only on the MSO22)

CommandWhat it does
CURSor:SOUrce <Channel>Cursor channel. Assigns cursors to operate on a specific channel waveform.
CURSor:FUNCtion WAVEFORMCursers ON. Enables waveform cursors for manual measurement.
CURSor:DDT?Cursers dV/dT. Returns slope (dV/dT) between cursor points.
CURSor:HBArs:DELTa?Cursor dV. Returns voltage difference between horizontal cursors.

DISplay (4 only on the MSO22)

CommandWhat it does
DISplay:WAVEView1:CURSor:CURSOR1:MODe <Mode>Cursor mode. Sets whether cursors move independently or track each other.
DISplay:WAVEView1:CURSor:CURSOR1:VBArs:DELTa?Cursor dT. Returns time difference between vertical cursors.
DISplay:GLObal:DCH<Digital Channel>:STATE <State>D channel display. Enables or disables the entire digital channel group.
DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_D<Bit>:STATE ONWaveView display. Shows a digital bit in a specific WaveView pane.

MEASUrement (4 only on the MSO22)

CommandWhat it does
MEASUrement:IMMed:SOUrce <Channel> ; ...Measurement. Configures a measurement source and type, then queries its numeric result.
MEASUrement:IMMed:TYPe <Measurement>Measurement Type. Selects the type of measurement to perform (frequency, RMS, rise time, etc.).
MEASUrement:IMMed:VALue?Measure. Reads the numeric result of the currently configured measurement.
MEASUrement:IMMed:DELay:EDGE1 <Edge> ; ...Measure delay. Measures propagation delay between two signal edges.

SEARCH (4 only on the MSO22)

CommandWhat it does
SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:LOGICPattern:DCH1_D<Bit> <State>Search pattern. Searches captured data for a specific digital pattern.
SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:WHEn <Condition>Search condition. Defines how the pattern comparison is evaluated.
SEARCH:SEARCH<Search>:TRIGger:A:PULSEWidth:HIGHLimit <Width>Search puls width. Searches for pulses based on width criteria.
SEARCH:SEARCH<Search>:TRIGger:A:TIMEOut:TIMe <Time>Search TIMEOUT. Defines timeout behavior for search operations.

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, the two libraries have no common command with a worked example on both, so each instrument uses its own: SPECtrum:FREQuency:FULLspan on the RTA4004 and ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto on the MSO22. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: TIMebase:SCALe? on the RTA4004 and Set? on the MSO22. 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_RTA4004_ADDRESS")  # Rohde & Schwarz RTA4004
b = rm.open_resource("PASTE_MSO22_ADDRESS")  # Tektronix MSO22
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# No shared setting with an example on both, so each uses its own command
a.write("SPECtrum:FREQuency:FULLspan")  # Spectrum Full Span
b.write("ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto")  # RUN

# No shared reading with an example on both, so each uses its own command
print(a.query("TIMebase:SCALe?"))  # Read Timebase Scale
print(b.query("Set?"))  # Get settings

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

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

In TestFlow's library the RTA4004 has 83 SCPI commands and the MSO22 has 71 SCPI commands. 0 command headers are common to both, 80 are only on the RTA4004 (mostly SPECtrum and CHANnel), and 50 are only on the MSO22 (mostly AFG and TRIGger).

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

Not without changes. None of the 80 command headers in the RTA4004 library matches one of the 50 in the MSO22 library: the RTA4004 uses commands such as SPECtrum:STATe and the MSO22 uses commands such as AFG:AMPLitude. PyVISA opens both the same way, but each command needs its own version for each instrument.

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

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

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

Only the RTA4004 library has an operation-complete command (*OPC?); the MSO22 library has none. Only the RTA4004 library has an error-queue read (SYSTem:ERRor?); the MSO22 library has none. 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.