Radio Test Set · SCPI command comparison

Rohde & Schwarz CMA180 vs Viavi 3920B: SCPI commands and remote control compared

In TestFlow's instrument library, the Rohde & Schwarz CMA180 takes 145 SCPI commands, 72 of them queries, and the Viavi 3920B takes 154 SCPI commands, 42 of them queries. That is 9 more on the 3920B. Counting distinct command headers (the command path without its arguments), 2 are accepted by both, 136 exist only on the CMA180, and 135 only on the 3920B. 1% of the CMA180's command headers also exist on the 3920B.

Both libraries have commands under CONFigure, FETCh, SYSTem, INITiate, and ABORt. Only the CMA180 has SOURce, STOP, and SENSe. Only the 3920B has RF, MOD, SA, DMM, AF, and LIMits and 3 more.

Only the CMA180 library has an operation-complete command (*OPC?); the 3920B library has none. Both libraries read errors with SYSTem:ERRor?.

CMA180 commands
145
3920B commands
154
Shared headers
2
Unique headers
271

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz CMA180 or Viavi 3920B and writes the report from the measured results.

Get started

CMA180 vs 3920B 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 CMA180Viavi 3920B
Commands in TestFlow's library145154
Queries (read a value or state)7242
Settings and actions73112
Subsystems1218
Distinct command headers138137
Headers the other lacks136135
Command languageSCPISCPI
Operation complete*OPC?Not in library
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setCMA1803920B

Commands both accept

2 command headers are in both libraries.

CommandWhat it does
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
*RSTReset. Resets the instrument to its default state.

Only on the Rohde & Schwarz CMA180

136 command headers in the CMA180 library have no match in the 3920B library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz CMA180 command reference.

CONFigure (57 only on the CMA180)

CommandWhat 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).

SOURce (35 only on the CMA180)

CommandWhat it does
SOURce:AFRF:GENerator1:STATe ONTurn 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).

FETCh (16 only on the CMA180)

CommandWhat 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.

SYSTem (9 only on the CMA180)

CommandWhat 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:BASEReset Base Settings. Resets the base settings.

IEEE 488.2 common (*) (5 only on the CMA180)

CommandWhat it does
*CLSClear Status. Clears all event registers and the error queue.
*OPC?Operation Complete. Returns 1 when all pending operations are complete.
*WAIWait To Continue. Waits until all pending operations are complete before continuing.
*SAV <Memory>Save State. Stores the current settings in an intermediate memory.

ABORt (4 only on the CMA180)

CommandWhat it does
ABORt:AFRF:MEASurement1:MEValuationAbort Measurement. Aborts the AFRF multi-evaluation measurement and releases resources (state OFF).
ABORt:AFRF:MEASurement1:FREQuency:COUNterAbort Frequency Counter. Aborts the RF frequency search procedure.
ABORt:GPRF:MEASurement1:POWerAbort Power Measurement. Aborts the GPRF power measurement and releases resources (state OFF).
ABORt:GPRF:MEASurement1:SPECtrumAbort Spectrum Measurement. Aborts the spectrum analyzer measurement and releases resources (state OFF).

Only on the Viavi 3920B

135 command headers in the 3920B 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 3920B command reference.

CONFigure (29 only on the 3920B)

CommandWhat it does
:CONFigure:PORT:LOUDspeaker <Source>Set Loudspeaker Source. Selects the loudspeaker port source.
:CONFigure:RF:GENerator:FINCrement <Step>Set RF Generator Freq Increment. Sets the RF generator frequency increment (1 Hz to 999 MHz).
:CONFigure:RF:GENerator:LINCrement <Step>Set RF Generator Level Increment. Sets the RF generator level increment in dB (0.1 to 100 dB).
:CONFigure:OFFSet:GENerator:ENABle ONTurn On RF Generator Offset. Enables the RF generator level offset.

RF (27 only on the 3920B)

CommandWhat it does
:RF:POWer:RESet:OVERloadReset RF Power Overload. Resets the RF power meter after an input overload has occurred.
:RF:GENerator:ENABle ONTurn On RF Generator. Enables the RF generator.
:RF:GENerator:ENABle?Read RF Generator State. Returns the RF generator enable state.
:RF:GENerator:FREQuency <Freq>Set RF Generator Frequency. Sets the RF generator frequency (100 kHz to 2.71 GHz; units Hz/kHz/MHz/GHz).

FETCh (21 only on the 3920B)

CommandWhat it does
:FETCh:RF:ALARM:GEN?Read Generator Overload. Returns the generator overload status (NORMAL or OVERLOADED).
:FETCh:RF:ALARM:REC?Read Receiver Overload. Returns the receiver overload status (NORMAL or OVERLOADED).
:FETCh:RF:ANALyzer:FREQuency?Measure RF Frequency. Returns RF frequency measurement data (<statusbyte>,<frequency>).
:FETCh:RF:ANALyzer:FCOUNTer?Measure RF Frequency Counter. Returns the RF frequency counter measurement.

DMM (10 only on the 3920B)

CommandWhat it does
:DMM:METERs:TYPE <Type>Set DMM Type. Sets the DMM measurement type (0 = ACV, 1 = DCV, 2 = DCA, 3 = ACA, 4 = OHMS).
:DMM:METERs:VOLTs:DC:STATus?Measure DMM DC Volts. Returns DC volts measurement data (<statusbyte>,<failbyte>,<precision>,<complete>,<avg>,<max>,<min>,<avgcount>,<units>).
:DMM:METERs:VOLTs:AC:STATus?Measure DMM AC Volts. Returns AC volts measurement data.
:DMM:METERs:AMPS:DC:STATus?Measure DMM DC Current. Returns DC current measurement data.

MOD (9 only on the 3920B)

CommandWhat it does
:MOD:GENerator:SOURce<Gen>:ENABle ONTurn On Mod Generator. Enables the specified modulation generator source (1, 2 or 3).
:MOD:GENerator:SOURce<Gen>:FREQuency <Freq>Set Mod Generator Frequency. Sets the modulation generator frequency (1.0 Hz to 20 kHz).
:MOD:GENerator:SOURce<Gen>:FM <Deviation>Set Mod Generator FM Deviation. Sets the FM deviation of the modulation generator (0 Hz to 150 kHz).
:MOD:GENerator:SOURce<Gen>:AM <Depth>Set Mod Generator AM Depth. Sets the AM depth of the modulation generator (0 to 99%).

SA (9 only on the 3920B)

CommandWhat it does
:SA:HORizontal:FREQuency:CENTer <Freq>Set SA Center Frequency. Sets the spectrum analyzer center frequency (within +/-2.5 MHz of the system receive frequency).
:SA:HORizontal:FREQuency:SPAN <Span>Set SA Span. Sets the spectrum analyzer span (2 kHz to 5 MHz).
:SA:VERTical:LEVel <Level>Set SA Reference Level. Sets the spectrum analyzer reference level in dBm.
:SA:VERTical:VDIV <dBdiv>Set SA Vertical Scale. Sets the spectrum analyzer vertical scale per division.

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: SOURce:AFRF:GENerator1:STATe ON on the CMA180 and :SYSTem:CONFigure:FRONTPanel:LOCK ON on the 3920B. 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 :FETCh:RF:ANALyzer:FREQuency? on the 3920B. 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_3920B_ADDRESS")  # Viavi 3920B
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(":SYSTem:CONFigure:FRONTPanel:LOCK ON")  # Lock Front Panel

# 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(":FETCh:RF:ANALyzer:FREQuency?"))  # Measure RF Frequency

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz CMA180 or Viavi 3920B and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Rohde & Schwarz CMA180 and the Viavi 3920B for remote control?

In TestFlow's library the CMA180 has 145 SCPI commands and the 3920B has 154 SCPI commands. 2 command headers are common to both, 136 are only on the CMA180 (mostly CONFigure and SOURce), and 135 are only on the 3920B (mostly CONFigure and RF).

Can I use the same SCPI code for the Rohde & Schwarz CMA180 and the Viavi 3920B?

Partly. 2 command headers are accepted by both. 271 are not, for example CONFigure:BASE:SCENario on the CMA180 and :CONFigure:PORT:LOUDspeaker on the 3920B, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the CMA180 or the 3920B?

The 3920B: 145 commands for the CMA180 against 154 for the 3920B in TestFlow's library. Of those, 72 on the CMA180 and 42 on the 3920B are queries that read a value or state, and the library splits them into 12 and 18 subsystems.

How do the CMA180 and 3920B signal operation complete and report errors?

Only the CMA180 library has an operation-complete command (*OPC?); the 3920B 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.

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.