In TestFlow's instrument library, the Viavi 3920B takes 154 SCPI commands, 42 of them queries, and the Viavi 8800SX takes 180 SCPI commands, 58 of them queries. That is 26 more on the 8800SX. Counting distinct command headers (the command path without its arguments), 0 are accepted by both, 137 exist only on the 3920B, and 157 only on the 8800SX. None of the 3920B's command headers appears in the 8800SX library, so a script written for one needs every command rewritten for the other.
Only the 3920B has CONFigure, RF, FETCh, MOD, SA, and DMM and 8 more. Only the 8800SX has gen, upconverter, analyzer, devmod, rfpow, and rec and 19 more.
Neither library has an operation-complete command such as *OPC?. Only the 3920B 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 Viavi 3920B 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.
| Viavi 3920B | Viavi 8800SX | |
|---|---|---|
| Commands in TestFlow's library | 154 | 180 |
| Queries (read a value or state) | 42 | 58 |
| Settings and actions | 112 | 122 |
| Subsystems | 18 | 28 |
| Distinct command headers | 137 | 157 |
| Headers the other lacks | 137 | 157 |
| Command language | SCPI | SCPI |
| Operation complete | Not in library | Not in library |
| Error queue | SYSTem:ERRor? | Not in library |
| Models on this command set | 3920B | 8800SX |
None. No command header in TestFlow's 3920B library matches one in its 8800SX library, so every command needs its own version for each instrument.
137 command headers in the 3920B library have no match in the 8800SX library. Below are 24 of them from the 6 largest subsystems; the full list is in the Viavi 3920B command reference.
| Command | What 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 ON | Turn On RF Generator Offset. Enables the RF generator level offset. |
| Command | What it does |
|---|---|
| :RF:POWer:RESet:OVERload | Reset RF Power Overload. Resets the RF power meter after an input overload has occurred. |
| :RF:GENerator:ENABle ON | Turn 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). |
| Command | What 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. |
| Command | What 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. |
| Command | What it does |
|---|---|
| :MOD:GENerator:SOURce<Gen>:ENABle ON | Turn 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%). |
| Command | What 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. |
157 command headers in the 8800SX library have no match in the 3920B 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: :SYSTem:CONFigure:FRONTPanel:LOCK ON on the 3920B 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: :FETCh:RF:ANALyzer:FREQuency? on the 3920B 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_3920B_ADDRESS") # Viavi 3920B
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(":SYSTem:CONFigure:FRONTPanel:LOCK ON") # Lock Front Panel
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(":FETCh:RF:ANALyzer:FREQuency?")) # Measure RF 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 Viavi 3920B or Viavi 8800SX and writes the report from the measured results.
In TestFlow's library the 3920B has 154 SCPI commands and the 8800SX has 180 SCPI commands. 0 command headers are common to both, 137 are only on the 3920B (mostly CONFigure and RF), and 157 are only on the 8800SX (mostly gen and analyzer).
Not without changes. None of the 137 command headers in the 3920B library matches one of the 157 in the 8800SX library: the 3920B uses commands such as :CONFigure:PORT:LOUDspeaker 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: 154 commands for the 3920B against 180 for the 8800SX in TestFlow's library. Of those, 42 on the 3920B and 58 on the 8800SX are queries that read a value or state, and the library splits them into 18 and 28 subsystems.
Neither library has an operation-complete command such as *OPC?. Only the 3920B 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.