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.
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.
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.
Turn On FM Deviation. Turns FM deviation data collection on.
None
FMDev RUN 0
Turn 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 VALue
Read FM Deviation. Returns the last average FM deviation reading.
None
FMDev READING
Read FM Deviation Detail. Returns the last readings (+Deviation, -Deviation, Average Deviation, Precision).
None
FMDev PHRESET
Reset FM Deviation Peak. Resets the FM deviation peak hold readings.
None
FG subsystem (6)
Command
What it does
Arguments
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)
Command
What it does
Arguments
RFError RUN 1
Turn On RF Error. Turns RF frequency error data collection on.
None
RFError RUN 0
Turn 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 VALue
Read RF Error. Returns the last frequency error reading.
None
AFC subsystem (5)
Command
What it does
Arguments
AFCounter RUN 1
Turn On AF Counter. Turns AF counter data collection on.
None
AFCounter RUN 0
Turn 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 VALue
Read AF Counter. Returns the last AF counter frequency reading.
None
A subsystem (5)
Command
What it does
Arguments
Analyzer SPAN <Start> <Stop>
Set Analyzer Span. Sets the spectrum analyzer start and stop frequencies.
Number; Number
Analyzer SPAN
Read 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)
Command
What it does
Arguments
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 ZERO
Zero Power Meter. Zeroes the power meter (remove all RF power from the T/R connector first).
None
Power VALue
Read RF Power. Returns the last RF power reading at the T/R port.
None
LOCKOUT subsystem (2)
Command
What it does
Arguments
LOCKOUT 1
Lock Keyboard. Locks the front panel keyboard during automated testing.
None
LOCKOUT 0
Unlock Keyboard. Restores keyboard control to the user.
None
Other subsystem (1)
Command
What it does
Arguments
<Output Variable>=<Equation>
Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)
Number; Text
WAIT subsystem (1)
Command
What it does
Arguments
wait(<ms>)
Wait. Waits for number of milliseconds
Number
SAVE subsystem (1)
Command
What it does
Arguments
save2var <Variable_name>
Save2Variable. Saves last measurement to a variable
Text
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.