Radio Test Set · SCPI command reference

Viavi 2975 SCPI commands

The Viavi 2975 radio test set is controlled remotely with SCPI commands. TestFlow's instrument library holds 80 commands for it, 13 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 2975 on a real bench.

Commands
80
Queries
13
Subsystems
14
Models covered
1

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Viavi 2975 and writes the report from the measured results.

Get started

Control the Viavi 2975 from Python

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 2975's VISA address

# Paste the address of your Viavi 2975 (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("Generator RFOUTput 0")  # Set Generator Output Port
print(inst.query("Generator FREQuency"))  # Read Generator Frequency

inst.close()

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Viavi 2975 and writes the report from the measured results.

Get started

Run a 2975 test without writing code

Describe the test in a sentence, for example “set generator output port on the 2975, then read generator 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.

Get started

SCPI command reference

80 commands in 14 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.

G subsystem (14)

CommandWhat it doesArguments
Generator DCPOWer 1Turn On Generator DC Power. Turns the RF generator DC power on.None
Generator DCPOWer 0Turn Off Generator DC Power. Turns the RF generator DC power off.None
Generator FREQuency <Freq> <Units>Set Generator Frequency. Sets the RF generator frequency (0 to 2.8 GHz) with units.Number; Text: Hz,kHz,MHz,GHz
Generator FREQuencyRead Generator Frequency. Returns the RF generator frequency.None
Generator RFLEVel <Level>Set Generator Level. Sets the RF generator output level in dBm (GEN connector -137 to -30, T/R connector -110 to +10).Number
Generator RFLEVelRead Generator Level. Returns the RF generator output level in dBm.None
Generator RFOUTput <Port>Set Generator Output Port. Sets the RF generator output port (0 = T/R, 1 = GEN).Number: 0,1
Generator MODulation <Mod>Set Generator Modulation. Sets the generator modulation (0 Off, 1 FMN, 2 FMW, 4 AM, 8 P25MIS, 9 P25MCC, 10 AMV, 11 P25LSM).Number: 0,1,2,4,8,9,10,11
Generator MODulationRead Generator Modulation. Returns the generator modulation type.None
Generator P25Mode <Mode>Set Generator P25 Mode. Sets the P25 modulation pattern (0 Off, 1 Speech, 2 Silence, 4 Hz1011, 6 StdTone, 15 Std511 ...).Number
Generator pushtotalk 1Turn On Generator PTT. Turns the generator push-to-talk (RF output) on.None
Generator pushtotalk 0Turn Off Generator PTT. Turns the generator push-to-talk (RF output) off.None
Generator pushtotalk 2Set Generator PTT Mode. Sets the generator push-to-talk to PTT mode.None
Generator hwBW <BW>Set Generator Bandwidth. Sets the generator bandwidth (0 = Narrow, 1 = Wide).Number: 0,1

D subsystem (11)

CommandWhat it doesArguments
Dist RUN 1Turn On Distortion. Turns distortion data collection on.None
Dist RUN 0Turn Off Distortion. Turns distortion data collection off.None
Dist FILTer <Count>Set Distortion Filter. Sets the number of samples used to average distortion (1 to 100).Number: 1,100
Dist VALueRead Distortion. Returns the last distortion reading.None
Dvm RUN 1Turn On DVM. Turns DVM data collection on.None
Dvm RUN 0Turn Off DVM. Turns DVM data collection off.None
Dvm MODe <Mode>Set DVM Mode. Sets the DVM AC/DC mode (1 = AC, 2 = DC).Number: 1,2
Dvm SOURce <Source>Set DVM Source. Sets the DVM hardware input source (0 = DVM, 1 = Scope1, 2 = Scope2).Number: 0,1,2
Dvm AVERAGE <Count>Set DVM Average. Sets the number of samples used to average the DVM (2 to 255).Number: 2,255
Dvm VALueRead DVM. Returns the last DVM voltage reading.None
Dvm ZERO 1Zero DVM. Forces the DVM to zero its DC offset.None

R subsystem (9)

CommandWhat it doesArguments
Receiver FREQuency <Freq> <Units>Set Receiver Frequency. Sets the receiver frequency (0 to 2.8 GHz) with units.Number; Text: Hz,kHz,MHz,GHz
Receiver FREQuencyRead Receiver Frequency. Returns the receiver frequency.None
Receiver RFINput <Port>Set Receiver Input. Sets the receiver RF input port (0 = T/R, 1 = ANT).Number: 0,1
Receiver DEMODulation <Demod>Set Receiver Demodulation. Selects the receiver demodulation (0 FMWide, 1 FMNarrow, 2 FMWideband, 3 FMTV, 4 AM, 5 P25, 10 MMedium, 11 Off, 12 P25qpsk, 13 P25_P2, 14 P25_wide).Number: 0,1,2,3,4,5,10,11,12,13,14
Receiver ATTENuation <Atten>Set Receiver Attenuation. Selects receiver path attenuation in dB.Number: -50,50
Receiver IFBANDWIDTH <BW> <Units>Set Receiver IF Bandwidth. Sets the receiver IF filter bandwidth (30 kHz, 300 kHz or 3 MHz) with units.Number: 30,300,3; Text: kHz,MHz
Receiver AGCMODE 1Turn On Receiver AGC. Turns the receiver software AGC on.None
Receiver AGCMODE 0Turn Off Receiver AGC. Turns the receiver software AGC off.None
Recall <File>Recall Setup. Recalls a saved instrument setup from /usr/setups (file number or name, case sensitive).Text

S subsystem (9)

CommandWhat it doesArguments
Sinad RUN 1Turn On SINAD. Turns SINAD data collection on.None
Sinad RUN 0Turn Off SINAD. Turns SINAD data collection off.None
Sinad FILTer <Count>Set SINAD Filter. Sets the number of samples used to average SINAD (1 to 100).Number: 1,100
Sinad VALueRead SINAD. Returns the last SINAD reading.None
Scope RUN 1Turn On Scope. Turns the oscilloscope on.None
Scope RUN 0Turn Off Scope. Turns the oscilloscope off.None
Scope inputCOUPLING <Coupling>Set Scope Coupling. Sets the oscilloscope input coupling (0 = AC, 1 = DC).Number: 0,1
Scope TRIGGERTYPE <Type>Set Scope Trigger Type. Sets the scope trigger type (0 = Auto, 1 = Normal, 2 = One Shot).Number: 0,1,2
Screens::Show . <Screen>Show Screen. Displays the specified screen.Text: User_Screen,Gen_Screen,Rec_Screen,Duplex_Screen,AFGen_Screen,Scope_Screen,Analyzer_Screen

FMD subsystem (7)

CommandWhat it doesArguments
FMDev RUN 1Turn On FM Deviation. Turns FM deviation data collection on.None
FMDev RUN 0Turn Off FM Deviation. Turns FM deviation data collection off.None
FMDev AVERAGE <Count>Set FM Deviation Average. Sets the number of samples used to average FM deviation (50 to 10000).Number: 50,10000
FMDev MATH <Math>Set FM Deviation Math. Sets the FM deviation math mode (0 = Peak, 1 = Average, 2 = Plus Peak, 3 = Minus Peak).Number: 0,1,2,3
FMDev VALueRead FM Deviation. Returns the last average FM deviation reading.None
FMDev READINGRead FM Deviation Detail. Returns the last readings (+Deviation, -Deviation, Average Deviation, Precision).None
FMDev PHRESETReset FM Deviation Peak. Resets the FM deviation peak hold readings.None

FG subsystem (6)

CommandWhat it doesArguments
FGen FREQuency<Lun> <Freq>Set FGen Frequency. Sets the audio frequency of function generator LUN 1-4 (0 to 20000 Hz).Number: 1,2,3,4; Number: 0,20000
FGen LEVel<Lun> <Volts>Set FGen Level. Sets the voltage level of function generator LUN 1-4 (0 to 20 V).Number: 1,2,3,4; Number: 0,20
FGen DEViation<Lun> <kHz>Set FGen Deviation. Sets the FM deviation of function generator LUN 1-4 (0 to 40 kHz).Number: 1,2,3,4; Number: 0,40
FGen PERcent<Lun> <Percent>Set FGen AM Percent. Sets the AM percentage of function generator LUN 1-4 (0 to 100%).Number: 1,2,3,4; Number: 0,100
FGen MODe<Lun> <Mode>Set FGen Mode. Sets the function generator mode (0 = Off, 1 = Tone, 2 = Burst).Number: 1,2,3,4; Number: 0,1,2
FGen SHape<Lun> <Shape>Set FGen Shape. Sets the function generator wave shape (0 Sine, 1 Triangle, 2 Square, 3 Ramp, 6 DTMF).Number: 1,2,3,4; Number: 0,1,2,3,6

RFE subsystem (5)

CommandWhat it doesArguments
RFError RUN 1Turn On RF Error. Turns RF frequency error data collection on.None
RFError RUN 0Turn Off RF Error. Turns RF frequency error data collection off.None
RFError AVERAGE <Count>Set RF Error Average. Sets the number of samples to average the frequency error (1 to 100).Number: 1,100
RFError GATE <Gate>Set RF Error Gate. Sets the RF error gate time (0 = Second, 1 = Tenth).Number: 0,1
RFError VALueRead RF Error. Returns the last frequency error reading.None

AFC subsystem (5)

CommandWhat it doesArguments
AFCounter RUN 1Turn On AF Counter. Turns AF counter data collection on.None
AFCounter RUN 0Turn Off AF Counter. Turns AF counter data collection off.None
AFCounter AVERAGE <Count>Set AF Counter Average. Sets the number of samples used to average the AF counter (0 to 200).Number: 0,200
AFCounter GATE <Gate>Set AF Counter Gate. Sets the AF counter gate time (0 = 0.1 s, 1 = 1 s).Number: 0,1
AFCounter VALueRead AF Counter. Returns the last AF counter frequency reading.None

A subsystem (5)

CommandWhat it doesArguments
Analyzer SPAN <Start> <Stop>Set Analyzer Span. Sets the spectrum analyzer start and stop frequencies.Number; Number
Analyzer SPANRead Analyzer Span. Returns the spectrum analyzer start and stop frequencies.None
Analyzer resolutionbandwidth <RBW>Set Analyzer RBW. Sets the resolution bandwidth in Hz.Number: 300,3000,30000,60000,300000,3000000
Analyzer topofscreen <Level>Set Analyzer Top Of Screen. Sets the analyzer top of screen (-99.9 to 80.0).Number: -99.9,80
Analyzer RUNanalyzer <State>Set Analyzer Run State. Sets the analyzer run state (1 = Channel active, 2 = Main active, 3 = Off).Number: 1,2,3

P subsystem (4)

CommandWhat it doesArguments
Power POWERRANGE <Range>Set Power Range. Sets the T/R power meter range (0 = Auto, 1 = Low, 2 = High).Number: 0,1,2
Power DETECTOR <Det>Set Power Detector. Sets the power detector (0 = Fast, 1 = Slow).Number: 0,1
Power ZEROZero Power Meter. Zeroes the power meter (remove all RF power from the T/R connector first).None
Power VALueRead RF Power. Returns the last RF power reading at the T/R port.None

LOCKOUT subsystem (2)

CommandWhat it doesArguments
LOCKOUT 1Lock Keyboard. Locks the front panel keyboard during automated testing.None
LOCKOUT 0Unlock Keyboard. Restores keyboard control to the user.None

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last measurement to a variableText

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Viavi's programming documentation for the 2975 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 September 27, 2026.

Frequently asked questions

Does the Viavi 2975 support SCPI remote control?

Yes. The Viavi 2975 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 80 SCPI commands for it: 13 queries that read values or state, and 67 settings and actions.

How do I control the Viavi 2975 from Python?

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?, Generator RFOUTput 0 and Generator FREQuency.

Which command reads a value from the Viavi 2975?

Generator FREQuency (read generator frequency). Returns the RF generator frequency. The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Viavi 2975 without writing code?

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 2975 through the TestFlow desktop app, and writes the report from the measured results.

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.