In TestFlow's instrument library, the Rohde & Schwarz CMA180 takes 145 SCPI commands, 72 of them queries, and the Viavi 8800SX takes 180 SCPI commands, 58 of them queries. That is 35 more on the 8800SX. Counting distinct command headers (the command path without its arguments), 0 are accepted by both, 138 exist only on the CMA180, and 157 only on the 8800SX. None of the CMA180's command headers appears in the 8800SX library, so a script written for one needs every command rewritten for the other.
Only the CMA180 has CONFigure, SOURce, FETCh, SYSTem, INITiate, and ABORt and 2 more. Only the 8800SX has gen, upconverter, analyzer, devmod, rfpow, and rec and 19 more.
Only the CMA180 library has an operation-complete command (*OPC?); the 8800SX library has none. Only the CMA180 library has an error-queue read (SYSTem:ERRor?); the 8800SX library has none.
Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz CMA180 or Viavi 8800SX 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 CMA180 | Viavi 8800SX | |
|---|---|---|
| Commands in TestFlow's library | 145 | 180 |
| Queries (read a value or state) | 72 | 58 |
| Settings and actions | 73 | 122 |
| Subsystems | 12 | 28 |
| Distinct command headers | 138 | 157 |
| Headers the other lacks | 138 | 157 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | SYSTem:ERRor? | Not in library |
| Models on this command set | CMA180 | 8800SX |
None. No command header in TestFlow's CMA180 library matches one in its 8800SX library, so every command needs its own version for each instrument.
138 command headers in the CMA180 library have no match in the 8800SX library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz CMA180 command reference.
| Command | What it does |
|---|---|
| CONFigure:BASE:SCENario <Scenario> | Set Test Scenario. Selects the test scenario (analog TX/RX/duplex/spectrum/expert/audio/avionics or digital); select it before configuring an application. |
| CONFigure:BASE:SCENario? | Read Test Scenario. Reads the selected test scenario (analog TX/RX/duplex/spectrum/expert/audio/avionics or digital); select it before configuring an application. |
| CONFigure:AFRF:MEASurement1:RFSettings:FREQuency <Frequency> | Set Analyzer Frequency. Sets the center frequency of the RF analyzer in Hz (100 kHz to 3 GHz). |
| CONFigure:AFRF:MEASurement1:RFSettings:FREQuency? | Read Analyzer Frequency. Reads the center frequency of the RF analyzer in Hz (100 kHz to 3 GHz). |
| Command | What it does |
|---|---|
| SOURce:AFRF:GENerator1:STATe ON | Turn On Generator. Starts the AFRF generator. |
| SOURce:AFRF:GENerator1:STATe? | Read Generator. Reads the AFRF generator state (OFF, ON, PENDing). |
| SOURce:AFRF:GENerator1:MSCHeme <Scheme> | Set RF Signal Mode. Selects the RF modulation scheme for analog scenarios (FM, AM, PM, SSB upper/lower, CW, FM stereo, ARB). |
| SOURce:AFRF:GENerator1:MSCHeme? | Read RF Signal Mode. Reads the selected RF modulation scheme for analog scenarios (FM, AM, PM, SSB upper/lower, CW, FM stereo, ARB). |
| Command | What it does |
|---|---|
| FETCh:AFRF:MEASurement1:MEValuation:STATe? | Read Measurement State. Returns the AFRF multi-evaluation measurement state: OFF, RUN or RDY. |
| FETCh:AFRF:MEASurement1:MEValuation:RFCarrier:CURRent? | Fetch RF Carrier Current. Returns the current RF carrier results (power, PEP, frequency error...). |
| FETCh:AFRF:MEASurement1:MEValuation:RFCarrier:AVERage? | Fetch RF Carrier Average. Returns the average RF carrier results. |
| FETCh:AFRF:MEASurement1:MEValuation:RFCarrier:FREQuency:AVERage? | Fetch RF Carrier Frequency. Returns the average RF carrier frequency in Hz. |
| Command | What it does |
|---|---|
| SYSTem:BASE:REFerence:FREQuency:SOURce <Source> | Set Reference Frequency Source. Selects the internal or external reference frequency source. |
| SYSTem:BASE:REFerence:FREQuency:SOURce? | Read Reference Frequency Source. Reads the selected internal or external reference frequency source. |
| SYSTem:COMMunicate:NET:IPADdress? | Read IP Address. Returns the IP address of the LAN interface. |
| SYSTem:RESet:BASE | Reset Base Settings. Resets the base settings. |
| Command | What it does |
|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| *RST | Reset. Resets the instrument to its default state. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. |
| Command | What it does |
|---|---|
| ABORt:AFRF:MEASurement1:MEValuation | Abort Measurement. Aborts the AFRF multi-evaluation measurement and releases resources (state OFF). |
| ABORt:AFRF:MEASurement1:FREQuency:COUNter | Abort Frequency Counter. Aborts the RF frequency search procedure. |
| ABORt:GPRF:MEASurement1:POWer | Abort Power Measurement. Aborts the GPRF power measurement and releases resources (state OFF). |
| ABORt:GPRF:MEASurement1:SPECtrum | Abort Spectrum Measurement. Aborts the spectrum analyzer measurement and releases resources (state OFF). |
157 command headers in the 8800SX library have no match in the CMA180 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Viavi 8800SX command reference.
| Command | What it does |
|---|---|
| :gen:freq <Freq> | Set Generator Frequency. Sets the RF generator frequency in MHz (2 to 1000 MHz). |
| :gen:freq? | Read Generator Frequency. Returns the RF generator frequency in MHz. |
| :gen:lvl:dbm <Level> | Set Generator Level dBm. Sets the RF generator level in dBm on the selected output connector (SWR -65 to -5, T/R -120 to -50, ANT -90 to -30 dBm). |
| :gen:lvl:dbm? | Read Generator Level dBm. Returns the RF generator level in dBm. |
| Command | What it does |
|---|---|
| :analyzer:freq <Freq> | Set Analyzer Center Frequency. Sets the spectrum analyzer center frequency in MHz (2 to 1000 MHz). |
| :analyzer:freq? | Read Analyzer Center Frequency. Returns the spectrum analyzer center frequency in MHz. |
| :analyzer:span <Span> | Set Analyzer Span. Sets the spectrum analyzer span in Hz. |
| :analyzer:avg <Count> | Set Analyzer Average. Sets the spectrum analyzer averaging (1 to 99). |
| Command | What it does |
|---|---|
| :devmod:type <Type> | Set Mod Meter Type. Sets the modulation meter type (0 = AM, 1 = FM). |
| :devmod:type? | Read Mod Meter Type. Returns the modulation meter type (0 = AM, 1 = FM). |
| :devmod:average <Count> | Set Mod Meter Average. Sets the number of modulation meter readings to average (1 to 99). |
| :devmod:reading:type <Type> | Set Mod Meter Reading Type. Sets the reading sent to the meter (0 = Peak+, 1 = Peak-, 2 = Peak-Peak). |
| Command | What it does |
|---|---|
| :rfpow:units <Units> | Set RF Power Units. Sets the RF power meter units (0 = dBm, 1 = Watts). |
| :rfpow:range <Range> | Set RF Power Range. Sets the RF power meter range (0 = Low, 1 = High, 2 = Auto). |
| :rfpow:average <Count> | Set RF Power Average. Sets the number of RF power readings to average (1 to 99). |
| :rfpow:extatten <Atten> | Set RF Power External Atten. Sets the RF power meter compensation for external attenuation in dB (-50 to +50 dB). |
| Command | What it does |
|---|---|
| :upconverter:carrier_state 1 | Turn On Carrier. Turns the generator carrier on (acts as PTT; must be ON for normal generator operation). |
| :upconverter:carrier_state? | Read Carrier State. Returns the generator carrier state (0 = OFF, 1 = ON). |
| :upconverter:type <Type> | Set Modulator Type. Sets the modulator type (0 = AM, 1 = FM, 2 = None, 3 = P25, 4 = SDE-AM, 5 = SDE-FM). |
| :upconverter:type? | Read Modulator Type. Returns the modulator type. |
| Command | What it does |
|---|---|
| :alm:state 1 | Turn On Audio Level Meter. Enables the audio level meter. |
| :alm:source <Source> | Set Audio Level Source. Sets the audio level meter input (0 = AUD IN, 1 = DVM). |
| :alm:units <Units> | Set Audio Level Units. Sets the audio level units (0 = V, 1 = mV, 2 = dBuV, 3 = dBm, 4 = W, 5 = dBr). |
| :alm:coupling <Coupling> | Set Audio Level Coupling. Sets the audio level meter coupling (0 = AC, 1 = DC, 2 = GND). |
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: SOURce:AFRF:GENerator1:STATe ON on the CMA180 and :devmod:range:fm:auto on the 8800SX. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: CONFigure:AFRF:MEASurement1:RFSettings:FREQuency? on the CMA180 and :gen:freq? on the 8800SX. 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_CMA180_ADDRESS") # Rohde & Schwarz CMA180
b = rm.open_resource("PASTE_8800SX_ADDRESS") # Viavi 8800SX
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("SOURce:AFRF:GENerator1:STATe ON") # Turn On Generator
b.write(":devmod:range:fm:auto") # Set FM Range Auto
# No shared reading with an example on both, so each uses its own command
print(a.query("CONFigure:AFRF:MEASurement1:RFSettings:FREQuency?")) # Read Analyzer Frequency
print(b.query(":gen:freq?")) # Read Generator Frequency
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz CMA180 or Viavi 8800SX and writes the report from the measured results.
In TestFlow's library the CMA180 has 145 SCPI commands and the 8800SX has 180 SCPI commands. 0 command headers are common to both, 138 are only on the CMA180 (mostly CONFigure and SOURce), and 157 are only on the 8800SX (mostly gen and analyzer).
Not without changes. None of the 138 command headers in the CMA180 library matches one of the 157 in the 8800SX library: the CMA180 uses commands such as CONFigure:BASE:SCENario and the 8800SX uses commands such as :gen:freq. PyVISA opens both the same way, but each command needs its own version for each instrument.
The 8800SX: 145 commands for the CMA180 against 180 for the 8800SX in TestFlow's library. Of those, 72 on the CMA180 and 58 on the 8800SX are queries that read a value or state, and the library splits them into 12 and 28 subsystems.
Only the CMA180 library has an operation-complete command (*OPC?); the 8800SX library has none. Only the CMA180 library has an error-queue read (SYSTem:ERRor?); the 8800SX 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.