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.
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.
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 RTA4004 | Tektronix MSO22 | |
|---|---|---|
| Commands in TestFlow's library | 83 | 71 |
| Queries (read a value or state) | 30 | 7 |
| Settings and actions | 53 | 64 |
| Subsystems | 16 | 16 |
| Distinct command headers | 80 | 50 |
| Headers the other lacks | 80 | 50 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | SYSTem:ERRor? | Not in library |
| Models on this command set | RTA4004, RTA4006, RTA4012, RTA4014, RTA4024, RTA4044 | MSO22, MSO24 |
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.
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.
| 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 |
|---|---|
| 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). |
| 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 |
|---|---|
| *IDN? | Identify. Query the instrument identification string. |
| *RST | Reset. Reset the instrument. |
| *CLS | Clear Status. Clear status registers and error queue. |
| *OPC? | Operation Complete. Query operation complete flag. |
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.
| Command | What 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:TRIGger | AFG burst. Triggers a burst waveform output. |
| Command | What 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. |
| Command | What it does |
|---|---|
| CURSor:SOUrce <Channel> | Cursor channel. Assigns cursors to operate on a specific channel waveform. |
| CURSor:FUNCtion WAVEFORM | Cursers 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. |
| Command | What 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 ON | WaveView display. Shows a digital bit in a specific WaveView pane. |
| Command | What 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. |
| Command | What 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. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.