In TestFlow's instrument library, the Rigol MSO5074 takes 161 SCPI commands, 49 of them queries, and the Rohde & Schwarz RTA4004 takes 83 SCPI commands, 30 of them queries. That is 78 more on the MSO5074. Counting distinct command headers (the command path without its arguments), 18 are accepted by both, 108 exist only on the MSO5074, and 62 only on the RTA4004. 14% of the MSO5074's command headers also exist on the RTA4004.
Both libraries have commands under MEASure, CHANnel, TRIGger, TIMebase, SYSTem, RUN, STOP, and SINGle. Only the MSO5074 has WAVeform, CURSor, ACQuire, MATH, SOURce, and DISPlay and 6 more. Only the RTA4004 has SPECtrum, MMEMory, HCOPy, and EXPort.
Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.
TestFlow's library gives the MSO5104 the same command set as the MSO5074, so the MSO5074 column applies to it 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 Rigol MSO5074 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.
| Rigol MSO5074 | Rohde & Schwarz RTA4004 | |
|---|---|---|
| Commands in TestFlow's library | 161 | 83 |
| Queries (read a value or state) | 49 | 30 |
| Settings and actions | 112 | 53 |
| Subsystems | 23 | 16 |
| Distinct command headers | 126 | 80 |
| Headers the other lacks | 108 | 62 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | MSO5074, MSO5104 | RTA4004, RTA4006, RTA4012, RTA4014, RTA4024, RTA4044 |
18 command headers are in both libraries. Here are 12, taken across subsystems. Where the RTA4004 library writes the command differently, its form is shown under the MSO5074's.
| Command | What it does |
|---|---|
| :MEASure:SOURce <Source>RTA4004: MEASurement1:SOURce CH<Channel> ; ... | Measure Source. Sets the source of the automatic measurement parameters. |
| :CHANnel<Channel>:COUPling <Coupling> | Channel Coupling. Sets the input coupling mode of the specified analog channel. |
| :SYSTem:ERRor? | Get Error. Queries and clears the next message in the system error queue. |
| :RUN | Run. Starts the oscilloscope acquisition (equivalent to pressing RUN on the front panel). |
| :STOP | Stop. Stops the oscilloscope acquisition and freezes the displayed waveform. |
| :SINGle | Single Trigger. Sets the oscilloscope to the single trigger mode so it triggers once and then stops. |
| *RST | Reset. Restores the instrument to its factory default state. |
| :CHANnel<Channel>:COUPling? | Get Channel Coupling. Queries the input coupling mode of the specified analog channel. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial number, firmware version). |
| :CHANnel<Channel>:SCALe <Scale>RTA4004: CHANnel<Channel>:SCALe <VoltsDiv> | Channel Scale. Sets the vertical scale of the specified channel in V/div. |
| *CLS | Clear Status. Clears all the event registers and the error queue. |
| :CHANnel<Channel>:SCALe? | Get Channel Scale. Queries the vertical scale of the specified channel in V/div. |
108 command headers in the MSO5074 library have no match in the RTA4004 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rigol MSO5074 command reference.
| Command | What it does |
|---|---|
| :TRIGger:MODE <Type> | Trigger Type. Selects the trigger type. |
| :TRIGger:MODE? | Get Trigger Type. Queries the trigger type currently selected. |
| :TRIGger:SWEep <Sweep> | Trigger Sweep. Sets the trigger mode to auto, normal or single. |
| :TRIGger:COUPling <Coupling> | Trigger Coupling. Sets the trigger coupling type (edge trigger with an analog source only). |
| Command | What it does |
|---|---|
| :MEASure:ITEM <Item>,<Source> | Measure Item. Adds an automatic measurement of the selected parameter on the selected source. |
| :MEASure:ITEM? <Item>,<Source> | Get Measure Item. Queries the measurement result of the selected parameter on the selected source. |
| :MEASure:CLEar ALL | Clear Measurements. Clears all the automatic measurement items currently displayed. |
| :MEASure:AMSource <Source> | Measure All Source. Sets the source of the all-parameter measurement function. |
| Command | What it does |
|---|---|
| :WAVeform:SOURce <Source> | Waveform Source. Sets the channel whose waveform data will be read. |
| :WAVeform:MODE <Mode> | Waveform Mode. Sets the reading mode of the waveform data (screen data or internal memory data). |
| :WAVeform:FORMat <Format> | Waveform Format. Sets the return format of the waveform data. |
| :WAVeform:STARt <Point> | Waveform Start. Sets the start point of the waveform data reading. |
| Command | What it does |
|---|---|
| :TIMebase:MAIN:SCALe <Scale> | Timebase Scale. Sets the main timebase scale in s/div. |
| :TIMebase:MAIN:SCALe? | Get Timebase Scale. Queries the main timebase scale in s/div. |
| :TIMebase:MAIN:OFFSet <Offset> | Timebase Offset. Sets the main timebase (horizontal) offset in seconds relative to the trigger point. |
| :TIMebase:MAIN:OFFSet? | Get Timebase Offset. Queries the main timebase (horizontal) offset in seconds. |
| Command | What it does |
|---|---|
| :CURSor:MODE <Mode> | Cursor Mode. Enables cursor measurement in the selected mode. |
| :CURSor:MANual:SOURce <Source> | Cursor Source. Sets the channel the manual cursors measure. |
| :CURSor:MANual:TYPE <Type> | Cursor Type. Sets the manual cursor type (X for time, Y for amplitude). |
| :CURSor:MANual:CAX <Position> | Cursor AX. Sets the horizontal position of cursor A in screen pixels. |
| Command | What it does |
|---|---|
| :CHANnel<Channel>:DISPlay ON | Channel On. Turns on the display of the specified analog channel. |
| :CHANnel<Channel>:DISPlay? | Get Channel State. Queries the on/off status of the specified analog channel (returns 1 or 0). |
| :CHANnel<Channel>:PROBe <Ratio> | Channel Probe Ratio. Sets the probe attenuation ratio of the specified channel. |
| :CHANnel<Channel>:UNITs <Unit> | Channel Unit. Sets the amplitude display unit of the specified channel. |
62 command headers in the RTA4004 library have no match in the MSO5074 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 |
|---|---|
| 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 |
|---|---|
| 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:FORMat PNG | Capture. Return screenshot image data as IEEE 488.2 block data. |
| HCOPy:COLor:SCHeme <ColorScheme> | Screenshot Color Scheme. Set screenshot color scheme. |
| Command | What 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>:POSition? | Read Channel Position. Query channel trace position (div). |
| CHANnel<Channel>:LABel <Label> | Channel Label. Set channel label. |
| 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. |
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<Channel>:COUPling (channel coupling); the RTA4004 library writes it as CHANnel1:COUPling DCLimit. For the reading, both libraries hold :CHANnel<Channel>:COUPling? (get channel coupling), 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_MSO5074_ADDRESS") # Rigol MSO5074
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 Coupling
a.write(":CHANnel1:COUPling AC")
b.write("CHANnel1:COUPling DCLimit")
# The same reading on both: Get Channel Coupling
print(a.query(":CHANnel1:COUPling?"))
print(b.query("CHANnel1:COUPling?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Rigol MSO5074 or Rohde & Schwarz RTA4004 and writes the report from the measured results.
In TestFlow's library the MSO5074 has 161 SCPI commands and the RTA4004 has 83 SCPI commands. 18 command headers are common to both, 108 are only on the MSO5074 (mostly TRIGger and MEASure), and 62 are only on the RTA4004 (mostly SPECtrum and MMEMory).
Partly. 18 command headers are accepted by both, including :MEASure:SOURce, :CHANnel<Channel>:COUPling, and :SYSTem:ERRor?. 170 are not, for example :TRIGger:MODE on the MSO5074 and SPECtrum:STATe on the RTA4004, so a script that uses those needs a separate branch for each instrument.
The MSO5074: 161 commands for the MSO5074 against 83 for the RTA4004 in TestFlow's library. Of those, 49 on the MSO5074 and 30 on the RTA4004 are queries that read a value or state, and the library splits them into 23 and 16 subsystems.
Both libraries synchronise with *OPC?. 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.