Remote-control command sets for 8 Viavi instruments from TestFlow's instrument library, each with its arguments and a working PyVISA example.
The library covers 8 radio test sets from Viavi: 803 commands in total, 241 of them queries that read a value or a setting back. These are the commands TestFlow's agent sends when it automates a test on Viavi hardware, so every entry is one that drives a real instrument.
92 SCPI commands, 36 queries
80 SCPI commands, 13 queries
171 SCPI commands, 59 queries
154 SCPI commands, 42 queries
180 SCPI commands, 58 queries
45 SCPI commands, 13 queries
81 SCPI commands, 20 queries
These commands appear on more than one Viavi instrument in the library, so a script that uses them carries over between models.
| Command | What it does | Models |
|---|---|---|
| *IDN? | Returns the identification string (manufacturer, type number, serial number, firmware version). | 4 of 7 |
| *RST | Sets the instrument functions to the factory default power-up state. | 4 of 7 |
| *CLS | Clears all status event registers. | 3 of 7 |
| *OPC? | Returns 1 when the preceding operation has completed. | 3 of 7 |
| *WAI | Inhibits execution of an overlapped command until the preceding operation is complete. | 3 of 7 |
| *OPT? | Returns the state of enabled options in 32 data fields. | 2 of 7 |
| *STB? | Returns the value of the status byte. | 2 of 7 |
| *TST? | Runs the self test and returns 0 if all tests passed. | 2 of 7 |
The pattern is the same for every Viavi instrument here: open it through VISA, identify it, then write settings and query values. This example uses the Viavi 2945B; the full 2945B reference has every command.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Viavi 2945B's VISA address
# Paste the address of your Viavi 2945B (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(":RECEiver:Autotune ON") # Turn On Autotune
print(inst.query(":MEASUre:TXFreq?")) # Measure TX Frequency
inst.close()8 Viavi models (radio test set): 2945B, 2975, 3550, 3550R, 3920B, 8800SX, ALT-8000, AVX-10K. Each page lists every remote-control command TestFlow's agent uses for that instrument, with its arguments.
Yes. Every Viavi model in TestFlow's library is programmed with SCPI commands over its remote interfaces, including the IEEE 488.2 common commands such as *IDN? and *RST.
Install PyVISA and a VISA backend, list the connected instruments with ResourceManager().list_resources(), open the Viavi instrument by its VISA address (USB, LAN or GPIB), then send commands with write() and read values with query(). Each model page has a working example.
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 your Viavi instruments 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.