The Viavi 3920B radio test set is controlled remotely with SCPI commands. TestFlow's instrument library holds 154 commands for it, 42 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the 3920B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Viavi 3920B and writes the report from the measured results.
With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Viavi 3920B's VISA address
# Paste the address of your Viavi 3920B (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000 # ms
print(inst.query("*IDN?")) # identify the instrument
inst.write(":SYSTem:CONFigure:FRONTPanel:LOCK ON") # Lock Front Panel
print(inst.query(":FETCh:RF:ANALyzer:FREQuency?")) # Measure RF Frequency
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Viavi 3920B and writes the report from the measured results.
Describe the test in a sentence, for example “lock front panel on the 3920B, then measure rf frequency and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.
154 commands in 18 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| :CONFigure:PORT:LOUDspeaker <Source> | Set Loudspeaker Source. Selects the loudspeaker port source. | Text: OFF,AUDio,FAUDio,DEMod,DDEMod,FDEMod,FDDEMod |
| :CONFigure:RF:GENerator:FINCrement <Step> | Set RF Generator Freq Increment. Sets the RF generator frequency increment (1 Hz to 999 MHz). | Number |
| :CONFigure:RF:GENerator:LINCrement <Step> | Set RF Generator Level Increment. Sets the RF generator level increment in dB (0.1 to 100 dB). | Number: 0.1,100 |
| :CONFigure:OFFSet:GENerator:ENABle ON | Turn On RF Generator Offset. Enables the RF generator level offset. | None |
| :CONFigure:OFFSet:GENerator:ENABle OFF | Turn Off RF Generator Offset. Disables the RF generator level offset. | None |
| :CONFigure:OFFSet:GENerator:VALue <Offset> | Set RF Generator Offset. Sets the RF generator offset value in dB (-100 to +100 dB). | Number: -100,100 |
| :CONFigure:RF:GENerator:PTTControl ON | Turn On PTT Control. Enables push-to-talk control. | None |
| :CONFigure:RF:GENerator:PTTControl OFF | Turn Off PTT Control. Disables push-to-talk control. | None |
| :CONFigure:IMPedance:AF:GENerator <Ohms> | Set AF Generator Impedance. Sets the AF generator impedance (1 to 10,000 ohms). | Number: 1,10000 |
| :CONFigure:MOD:GENerator:ESOurce <Source> | Set External Mod Source. Selects the external modulation source. | Text: AUD1HI,AUD2HI,MIC,BAL,AUD1600,AUD2600 |
| :CONFigure:OFFSet:DUPLex:LOCK ON | Turn On Duplex Offset. Enables the RF analyzer duplex offset mode. | None |
| :CONFigure:OFFSet:DUPLex:LOCK OFF | Turn Off Duplex Offset. Disables the RF analyzer duplex offset mode. | None |
| :CONFigure:OFFSet:DUPLex:VALue <Offset> | Set Duplex Offset. Sets the RF analyzer duplex offset value (-999 to +999 MHz). | Number |
| :CONFigure:RF:ANALyzer:FOFFset:AVERage <Count> | Set Frequency Offset Average. Sets the number of readings used to average the frequency offset measurement (1 to 250). | Number: 1,250 |
| :CONFigure:RF:ANALyzer:TRBPower:AVERage <Count> | Set TR Broadband Power Average. Sets the number of readings used to average T/R broadband power (1 to 250). | Number: 1,250 |
| :CONFigure:RF:ANALyzer:TRBPower:UNIts <Units> | Set TR Broadband Power Units. Sets the units for the T/R broadband power measurement. | Text: W,dBW,dBm |
| :CONFigure:MOD:ANALyzer:FM:AVERage <Count> | Set FM Average. Sets the number of readings used to average FM measurements (1 to 250). | Number: 1,250 |
| :CONFigure:MOD:ANALyzer:FM:UNIts <Units> | Set FM Units. Sets the units for FM measurements. | Text: Hz,dBr |
| :CONFigure:MOD:ANALyzer:FM:MTYPe <Type> | Set FM Measurement Type. Sets the FM demod measurement type. | Text: PEAK,RMS |
| :CONFigure:MOD:ANALyzer:AM:AVERage <Count> | Set AM Average. Sets the number of readings used to average AM depth measurements (1 to 250). | Number: 1,250 |
| :CONFigure:MOD:ANALyzer:AM:UNIts <Units> | Set AM Units. Sets the units for AM measurements. | Text: PCT,dBr |
| :CONFigure:MOD:ANALyzer:DISTortion:FREQuency <Freq> | Set Mod Distortion Frequency. Sets the notch filter frequency for modulation distortion (1 Hz to 20 kHz). | Number: 1,20000 |
| :CONFigure:MOD:ANALyzer:SINad:AVERage <Count> | Set Mod SINAD Average. Sets the number of readings used to average modulation SINAD (1 to 250). | Number: 1,250 |
| :CONFigure:MOD:ANALyzer:HN:REFerence | Set Mod Hum Noise Reference. Locks the modulation hum and noise reference to the current meter reading. | None |
| :CONFigure:AF:ANALyzer:SOURce <Source> | Set AF Analyzer Source. Selects the AF analyzer source. | Text: AUD1,AUD2,BAL,MIC |
| :CONFigure:AF:ANALyzer:SOURce:LOAD <Load> | Set AF Analyzer Load. Sets the impedance of the selected AF analyzer source. | Text: UNBHI,UNB600 |
| :CONFigure:AF:ANALyzer:LEVel:AVERage <Count> | Set AF Level Average. Sets the number of readings used to average AF level (1 to 250). | Number: 1,250 |
| :CONFigure:AF:ANALyzer:LEVel:AUDio:UNIts <Units> | Set AF Level Units. Sets the unit for AF audio level measurement. | Text: V,dBr,dBV,dBm,W |
| :CONFigure:AF:ANALyzer:FREQuency:AVERage <Count> | Set AF Frequency Average. Sets the number of readings used to average AF frequency (1 to 250). | Number: 1,250 |
| :CONFigure:AF:ANALyzer:DISTortion:AVERage <Count> | Set AF Distortion Average. Sets the number of readings used to average AF distortion (1 to 250). | Number: 1,250 |
| :CONFigure:AF:ANALyzer:DISTortion:FREQuency <Freq> | Set AF Distortion Frequency. Sets the modulation frequency for AF distortion measurement (1 Hz to 40 kHz). | Number: 1,40000 |
| :CONFigure:AF:ANALyzer:SINad:AVERage <Count> | Set AF SINAD Average. Sets the number of readings used to average AF SINAD (1 to 250). | Number: 1,250 |
| Command | What it does | Arguments |
|---|---|---|
| :RF:POWer:RESet:OVERload | Reset RF Power Overload. Resets the RF power meter after an input overload has occurred. | None |
| :RF:GENerator:ENABle ON | Turn On RF Generator. Enables the RF generator. | None |
| :RF:GENerator:ENABle OFF | Turn Off RF Generator. Disables the RF generator. | None |
| :RF:GENerator:ENABle? | Read RF Generator State. Returns the RF generator enable state. | None |
| :RF:GENerator:FREQuency <Freq> | Set RF Generator Frequency. Sets the RF generator frequency (100 kHz to 2.71 GHz; units Hz/kHz/MHz/GHz). | Number: 100000,2710000000 |
| :RF:GENerator:FREQuency? | Read RF Generator Frequency. Returns the RF generator frequency in Hz. | None |
| :RF:GENerator:LEVel <Level> | Set RF Generator Level. Sets the RF generator level (default unit dBm; units dBm/uV/mV/V/dBuV). | Number |
| :RF:GENerator:LEVel? | Read RF Generator Level. Returns the RF generator level in dBm. | None |
| :RF:GENerator:MOD <Mod> | Set RF Generator Modulation. Sets the RF generator modulation type. | Text: OFF,AM,FM,FM50,FM75,FM750,AMUSB,AMLSB,IQGEN |
| :RF:GENerator:MOD? | Read RF Generator Modulation. Returns the RF generator modulation type. | None |
| :RF:GENerator:PORT <Port> | Set RF Generator Port. Selects the RF output connector. | Text: TR,GEN |
| :RF:GENerator:FINCrement | Increment RF Generator Frequency. Increases the RF generator frequency by the increment value. | None |
| :RF:GENerator:FDECrement | Decrement RF Generator Frequency. Decreases the RF generator frequency by the increment value. | None |
| :RF:ANALyzer:FREQuency <Freq> | Set RF Analyzer Frequency. Sets the RF analyzer frequency in manual mode (100 kHz to 2.71 GHz). | Number: 100000,2710000000 |
| :RF:ANALyzer:FREQuency? | Read RF Analyzer Frequency. Returns the RF analyzer frequency in Hz. | None |
| :RF:ANALyzer:PORT <Port> | Set RF Analyzer Port. Selects the RF input connector. | Text: TR,ANT |
| :RF:ANALyzer:MOD <Mod> | Set RF Analyzer Modulation. Selects the RF analyzer modulation type. | Text: AM,FM,FM50,FM75,FM750,AMUSB,AMLSB |
| :RF:ANALyzer:FMIF <BW> | Set RF Analyzer FM IF Bandwidth. Sets the FM IF bandwidth in kHz. | Number: 6.25,8.33,10.0,12.5,25,30.0,100,230,300 |
| :RF:ANALyzer:AMIF <BW> | Set RF Analyzer AM IF Bandwidth. Sets the AM IF bandwidth in kHz. | Number: 6.25,8.33,10.0,12.5,25,30.0,100,230,300 |
| :RF:ANALyzer:AGC:MODE <Mode> | Set AGC Mode. Sets the AGC mode of operation. | Text: AUTo,MANual |
| :RF:ANALyzer:AGC:LEVel <Level> | Set AGC Level. Sets the AGC level in manual mode (TR -60 to +60 dBm, ANT -100 to +10 dBm). | Number |
| :RF:ANALyzer:RECeiver:AMP ON | Turn On Receiver Preamp. Enables the receiver pre-amplifier. | None |
| :RF:ANALyzer:RECeiver:AMP OFF | Turn Off Receiver Preamp. Disables the receiver pre-amplifier. | None |
| :RF:ANALyzer:RECeiver:TIMEBase <Ref> | Set Frequency Reference. Sets the RF frequency reference as internal or external. | Text: EXTernal,INTernal |
| :RF:ANALyzer:FMODe <Mode> | Set AutoTune Mode. Selects the AutoTune frequency mode. | Text: AUTo,MANual |
| :RF:ANALyzer:FMODe:STATus? | Read AutoTune Status. Returns AutoTune search status (0 = complete, 1 = searching). | None |
| :RF:ANALyzer:PMType <Type> | Set RF Power Measurement Type. Sets the RF power measurement type (IB = inband, BB = broadband). | Text: IB,BB |
| :RF:ANALyzer:FOFFset:UNIts <Units> | Set Frequency Offset Units. Sets the frequency offset units. | Text: Hz,PPM |
| :RF:POWer:DETector:ZERO | Zero RF Power Detector. Zeroes the RF power detector. | None |
| Command | What it does | Arguments |
|---|---|---|
| :FETCh:RF:ALARM:GEN? | Read Generator Overload. Returns the generator overload status (NORMAL or OVERLOADED). | None |
| :FETCh:RF:ALARM:REC? | Read Receiver Overload. Returns the receiver overload status (NORMAL or OVERLOADED). | None |
| :FETCh:RF:ANALyzer:FREQuency? | Measure RF Frequency. Returns RF frequency measurement data (<statusbyte>,<frequency>). | None |
| :FETCh:RF:ANALyzer:FCOUNTer? | Measure RF Frequency Counter. Returns the RF frequency counter measurement. | None |
| :FETCh:RF:ANALyzer:FOFFset? | Measure Frequency Offset. Returns RF frequency offset measurement data (<statusbyte>,<failbyte>,<avgcount>,<avg>,<wc>). | None |
| :FETCh:RF:ANALyzer:TRBPower? <Units> | Measure TR Broadband Power. Returns T/R broadband power measurement data in the specified unit. | Text: W,dBW,dBM |
| :FETCh:RF:ANALyzer:TRIPower? <Units> | Measure TR Inband Power. Returns T/R inband power measurement data in the specified unit. | Text: W,dBW,dBM |
| :FETCh:RF:ANALyzer:AIPower? <Units> | Measure ANT Inband Power. Returns antenna inband power measurement data in the specified unit. | Text: dBm,mW,dBW,mV |
| :FETCh:MOD:ANALyzer:FM? | Measure FM Deviation. Returns FM measurement data (<statusbyte>,<failbyte>,<avgcount>,<pk-pk/2>,<pos peak>,<neg peak>,<RMS>,<units>). | None |
| :FETCh:MOD:ANALyzer:AM? | Measure AM Depth. Returns AM depth measurement data (<statusbyte>,<failbyte>,<avgcount>,<pk-pk/2>,<pos peak>,<neg peak>). | None |
| :FETCh:MOD:ANALyzer:FREQuency? | Measure Mod Frequency. Returns modulation frequency measurement data. | None |
| :FETCh:MOD:ANALyzer:DISTortion? | Measure Mod Distortion. Returns modulation distortion measurement data. | None |
| :FETCh:MOD:ANALyzer:SINad? | Measure Mod SINAD. Returns modulation SINAD measurement data. | None |
| :FETCh:MOD:ANALyzer:SNR? | Measure Mod SNR. Returns modulation signal-to-noise ratio measurement data. | None |
| :FETCh:MOD:ANALyzer:HN? | Measure Mod Hum Noise. Returns modulation hum and noise measurement data. | None |
| :FETCh:AF:ANALyzer:LEVel? | Measure AF Level. Returns AF level measurement data (<statusbyte>,<failbyte>,<avgcount>,<avg>,<units>). | None |
| :FETCh:AF:ANALyzer:FREQuency? | Measure AF Frequency. Returns AF frequency measurement data (<statusbyte>,<avgcount>,<avg>). | None |
| :FETCh:AF:ANALyzer:DISTortion? | Measure AF Distortion. Returns AF distortion measurement data (<statusbyte>,<failbyte>,<avgcount>,<avg>,<wc>). | None |
| :FETCh:AF:ANALyzer:SINad? | Measure AF SINAD. Returns AF SINAD measurement data (<statusbyte>,<failbyte>,<avgcount>,<avg>,<wc>). | None |
| :FETCh:AF:ANALyzer:SNR? | Measure AF SNR. Returns AF signal-to-noise ratio measurement data. | None |
| :FETCh:AF:ANALyzer:HN? | Measure AF Hum Noise. Returns AF hum and noise measurement data. | None |
| Command | What it does | Arguments |
|---|---|---|
| :MOD:GENerator:SOURce<Gen>:ENABle ON | Turn On Mod Generator. Enables the specified modulation generator source (1, 2 or 3). | Number: 1,2,3 |
| :MOD:GENerator:SOURce<Gen>:ENABle OFF | Turn Off Mod Generator. Disables the specified modulation generator source (1, 2 or 3). | Number: 1,2,3 |
| :MOD:GENerator:SOURce<Gen>:FREQuency <Freq> | Set Mod Generator Frequency. Sets the modulation generator frequency (1.0 Hz to 20 kHz). | Number: 1,2,3; Number: 1,20000 |
| :MOD:GENerator:SOURce<Gen>:FM <Deviation> | Set Mod Generator FM Deviation. Sets the FM deviation of the modulation generator (0 Hz to 150 kHz). | Number: 1,2,3; Number: 0,150000 |
| :MOD:GENerator:SOURce<Gen>:AM <Depth> | Set Mod Generator AM Depth. Sets the AM depth of the modulation generator (0 to 99%). | Number: 1,2,3; Number: 0,99 |
| :MOD:GENerator:SOURce<Gen>:SHAPe <Shape> | Set Mod Generator Shape. Sets the waveform shape of the modulation generator. | Number: 1,2,3; Text: SINE,SQUare,TRIangle,RAMP,DCS,DCSINV,DTMF |
| :MOD:GENerator:ESOURce:ENABle ON | Turn On External Modulation. Enables the external modulation source. | None |
| :MOD:GENerator:ESOURce:ENABle OFF | Turn Off External Modulation. Disables the external modulation source. | None |
| :MOD:GENerator:ESOURce:FM <Deviation> | Set External Mod FM. Sets the FM deviation scaling for the external modulation source (0 Hz to 150 kHz). | Number: 0,150000 |
| :MOD:GENerator:ESOURce:AM <Depth> | Set External Mod AM. Sets the AM depth scaling for the external modulation source (0 to 99%). | Number: 0,99 |
| :MOD:ANALyzer:MFILter <Filter> | Set Mod Analyzer Filter. Selects the modulation analyzer post-detection filter. | Text: PSOPh,None,LP1,LP2,LP3,LP4,LP5,LP6,LP7,HP1,HP2,HP3,BP0,BP1,BP2,BP3,BP4,BP5,BP6,BP7,BP8 |
| Command | What it does | Arguments |
|---|---|---|
| :SA:HORizontal:FREQuency:CENTer <Freq> | Set SA Center Frequency. Sets the spectrum analyzer center frequency (within +/-2.5 MHz of the system receive frequency). | Number |
| :SA:HORizontal:FREQuency:SPAN <Span> | Set SA Span. Sets the spectrum analyzer span (2 kHz to 5 MHz). | Number: 2000,5000000 |
| :SA:VERTical:LEVel <Level> | Set SA Reference Level. Sets the spectrum analyzer reference level in dBm. | Number |
| :SA:VERTical:VDIV <dBdiv> | Set SA Vertical Scale. Sets the spectrum analyzer vertical scale per division. | Number: 1,2,5,10 |
| :SA:COUPling:RBW:AUTO ON | Turn On SA RBW Auto. Sets the resolution bandwidth to automatic. | None |
| :SA:COUPling:RBW:AUTO OFF | Turn Off SA RBW Auto. Sets the resolution bandwidth to manual. | None |
| :SA:MARKer:MKR<Marker>:PEAK | SA Marker To Peak. Moves the specified spectrum analyzer marker to the peak point. | Number |
| :SA:TRACe:LIVE? | Read SA Live Trace. Returns the live spectrum analyzer trace (560 points in dB). | None |
| :SA:OBW:ENABle ON | Turn On SA OBW. Enables the occupied bandwidth meter. | None |
| :SA:OBW:ENABle OFF | Turn Off SA OBW. Disables the occupied bandwidth meter. | None |
| :SA:OBW:POWer? | Read SA OBW Power. Returns the occupied bandwidth power measurement. | None |
| Command | What it does | Arguments |
|---|---|---|
| :DMM:METERs:TYPE <Type> | Set DMM Type. Sets the DMM measurement type (0 = ACV, 1 = DCV, 2 = DCA, 3 = ACA, 4 = OHMS). | Number: 0,1,2,3,4 |
| :DMM:METERs:VOLTs:DC:STATus? | Measure DMM DC Volts. Returns DC volts measurement data (<statusbyte>,<failbyte>,<precision>,<complete>,<avg>,<max>,<min>,<avgcount>,<units>). | None |
| :DMM:METERs:VOLTs:AC:STATus? | Measure DMM AC Volts. Returns AC volts measurement data. | None |
| :DMM:METERs:AMPS:DC:STATus? | Measure DMM DC Current. Returns DC current measurement data. | None |
| :DMM:METERs:AMPS:AC:STATus? | Measure DMM AC Current. Returns AC current measurement data. | None |
| :DMM:METERs:OHMS:STATus? | Measure DMM Ohms. Returns resistance measurement data. | None |
| :DMM:METERs:VOLTS:DC:TOS <Range> | Set DMM DC Volts Range. Sets the DC volts range (0 = Auto, 1 = 2000 V, 2 = 200 V, 3 = 20 V, 4 = 2 V, 5 = 200 mV). | Number: 0,1,2,3,4,5 |
| :DMM:METERs:VOLTS:AC:TOS <Range> | Set DMM AC Volts Range. Sets the AC volts range (0 = Auto, 1 = 2000 V, 2 = 200 V, 3 = 20 V, 4 = 2 V, 5 = 200 mV). | Number: 0,1,2,3,4,5 |
| :DMM:METERs:VOLTs:DC:AVERaging <Count> | Set DMM DC Volts Average. Sets the number of readings used to average DCV (1 to 100,000). | Number |
| :DMM:METERs:VOLTs:DC:CLEar:AVG | Clear DMM DC Volts Average. Clears and resets the average DCV measurement. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SYSTem:LOAD <System> | Load System. Loads the specified operating system, e.g. "Analog Duplex". | Text |
| :SYSTem:LOAD? | Read Loaded System. Returns the currently loaded operating system. | None |
| :SYSTem:STORe <Filename> | Store Configuration. Stores the current test set configuration under the specified file name. | Text |
| :SYSTem:RECAll <Filename> | Recall Configuration. Recalls (loads) the specified test set configuration file. | Text |
| :SYSTem:CONFigure:FRONTPanel:LOCK ON | Lock Front Panel. Locks the front panel keypad during remote operation. | None |
| :SYSTem:CONFigure:FRONTPanel:LOCK OFF | Unlock Front Panel. Unlocks the front panel keypad. | None |
| :SYSTem:RCI:METER:MODE <Mode> | Set RCI Meter Mode. Sets the receiver meter mode of operation when operating remotely. | Text: SLOW,FAST |
| :SYSTem:ERRor? | Read System Error. Returns the next error from the FIFO error queue. | None |
| Command | What it does | Arguments |
|---|---|---|
| :AF:GENerator:SOURce<Gen>:ENABle ON | Turn On AF Generator. Enables the specified AF generator (1, 2 or 3). | Number: 1,2,3 |
| :AF:GENerator:SOURce<Gen>:ENABle OFF | Turn Off AF Generator. Disables the specified AF generator (1, 2 or 3). | Number: 1,2,3 |
| :AF:GENerator:SOURce<Gen>:FREQuency <Freq> | Set AF Generator Frequency. Sets the frequency of the specified AF generator (1.0 Hz to 40 kHz). | Number: 1,2,3; Number: 1,40000 |
| :AF:GENerator:SOURce<Gen>:FREQuency? | Read AF Generator Frequency. Returns the frequency of the specified AF generator in Hz. | Number: 1,2,3 |
| :AF:GENerator:SOURce<Gen>:LEVel <Level> | Set AF Generator Level. Sets the level of the specified AF generator (1.0 mV to 5.0 Vrms; default unit mV). | Number: 1,2,3; Number |
| :AF:GENerator:SOURce<Gen>:SHAPe <Shape> | Set AF Generator Shape. Sets the waveform shape of the specified AF generator. | Number: 1,2,3; Text: SINE,SQUare,TRIangle,RAMP,DCS,DCSINV,DTMF |
| :AF:ANALyzer:MFILter <Filter> | Set AF Analyzer Filter. Selects the audio analyzer post-detection filter. | Text: PSOPh,None,LP1,LP2,LP3,LP4,LP5,LP6,LP7,HP1,HP2,HP3,BP0,BP1,BP2,BP3,BP4,BP5,BP6,BP7,BP8 |
| :AF:ANALyzer:NTYPe <Type> | Set AF Noise Type. Sets the audio analyzer noise measurement type. | Text: DISTortion,SINad,SN |
| Command | What it does | Arguments |
|---|---|---|
| :INITiate:CONTinuous:SCOPe ON | Start Scope Continuous. Starts continuous oscilloscope sweeps. | None |
| :INITiate:CONTinuous:SCOPe OFF | Stop Scope Continuous. Stops continuous oscilloscope sweeps. | None |
| :INITiate:IMMediate:SCOPe | Single Scope Sweep. Acquires a single oscilloscope sweep. | None |
| :INITiate:CONTinuous:SA ON | Start SA Continuous. Starts continuous spectrum analyzer sweeps. | None |
| :INITiate:CONTinuous:SA OFF | Stop SA Continuous. Stops continuous spectrum analyzer sweeps. | None |
| :INITiate:IMMediate:SA | Single SA Sweep. Acquires a single spectrum analyzer sweep. | None |
| Command | What it does | Arguments |
|---|---|---|
| :LIMits:AF:SINad:LOWer:ENABle ON | Turn On AF SINAD Lower Limit. Enables the lower limit check for the AF SINAD measurement. | None |
| :LIMits:AF:SINad:LOWer:ENABle OFF | Turn Off AF SINAD Lower Limit. Disables the lower limit check for the AF SINAD measurement. | None |
| :LIMits:AF:SINad:LOWer:VALue <Limit> | Set AF SINAD Lower Limit. Sets the lower limit value for AF SINAD (0 to 100 dB). | Number: 0,100 |
| Command | What it does | Arguments |
|---|---|---|
| :SCOPe:TRIGger:MODE <Mode> | Set Scope Trigger Mode. Selects the oscilloscope trigger mode. | Text: AUTO,NORMal |
| :SCOPe:TRIGger:EDGE <Edge> | Set Scope Trigger Edge. Selects the oscilloscope trigger edge. | Text: RISE,FALL |
| :SCOPe:TRIGger:SOURce <Source> | Set Scope Trigger Source. Selects the oscilloscope trigger source. | Text: ATRace,BTRace,EXT |
| Command | What it does | Arguments |
|---|---|---|
| :CALibrate:USER:RUN | Run User Calibration. Starts the user calibration procedure. | None |
| :CALibrate:USER:STATus? | Read User Calibration Status. Returns the user calibration status (0 to 25 = running, 0 = passed, negative = failed). | None |
| Command | What it does | Arguments |
|---|---|---|
| :ASSign:VOLume <Volume> | Set Speaker Volume. Sets the loudspeaker volume (0 to 100). | Number: 0,100 |
| Command | What it does | Arguments |
|---|---|---|
| :ABORt:SA | Abort SA Sweep. Stops spectrum analyzer sweeps. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Output Variable>=<Equation> | Math. Variable equals an equation like (${Var_name}= ${Var_name}/2) | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| wait(<ms>) | Wait. Waits for number of milliseconds | Number |
| Command | What it does | Arguments |
|---|---|---|
| save2var <Variable_name> | Save2Variable. Saves last measurement to a variable | Text |
| Command | What it does | Arguments |
|---|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial number, software issue, CAI board version). | None |
| *RST | Reset. Resets all system parameters to factory defaults and unloads the currently loaded system. | None |
| *STB? | Read Status Byte. Returns the status byte (bit 0 = system load in progress, bit 1 = stale reading). | None |
| *OPT? | Read Options. Returns the options installed in the test set. | None |
| *REBoot? | Read Reboot Status. Returns 1 if the unit has been rebooted since the last status query. | None |
This reference is generated from TestFlow's instrument library, which is drafted from Viavi's programming documentation for the 3920B and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Viavi's programming manual: check it before you rely on an edge case. Last updated November 12, 2026.
Yes. The Viavi 3920B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 154 SCPI commands for it: 42 queries that read values or state, and 112 settings and actions.
Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :SYSTem:CONFigure:FRONTPanel:LOCK ON and :FETCh:RF:ANALyzer:FREQuency?.
:FETCh:RF:ANALyzer:FREQuency? (measure rf frequency). Returns RF frequency measurement data (<statusbyte>,<frequency>). The full list of queries is in the command reference on this page, grouped by subsystem.
Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the Viavi 3920B through the TestFlow desktop app, and writes the report from the measured results.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.