Remote-control command sets for 11 Stanford Research Systems instruments from TestFlow's instrument library, each with its arguments and a working PyVISA example.
The library covers 2 clock generators, 2 function generators, 7 power supplies from Stanford Research Systems: 299 commands in total, 125 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 Stanford Research Systems hardware, so every entry is one that drives a real instrument.
67 SCPI commands, 31 queries
107 SCPI commands, 50 queries
29 SCPI commands, 6 queries
25 SCPI commands, 4 queries
33 SCPI commands, 16 queries
38 SCPI commands, 18 queries
These commands appear on more than one Stanford Research Systems instrument in the library, so a script that uses them carries over between models.
| Command | What it does | Models |
|---|---|---|
| *CLS | Clears the ESR, CESR, LCKR and INSR registers and the LERR error buffer. | 6 of 6 |
| *IDN? | Returns the instrument identification string (manufacturer, model, serial, firmware). | 6 of 6 |
| *RCL | Recalls the instrument settings from a memory location (0 to 9 user; 10 is the current settings). | 6 of 6 |
| *RST | Resets the instrument to its factory default settings (remote interface and GPIB address are unchanged). | 6 of 6 |
| *SAV | Saves the instrument settings to a memory location (0 to 9 user; 10 is reserved for the current settings). | 6 of 6 |
| *ESE | Sets the standard event status enable register (0 to 255). | 4 of 6 |
| *ESE? | Reads the standard event status enable register. | 4 of 6 |
| *ESR? | Reads and clears the standard event status register (0 to 255). | 4 of 6 |
The pattern is the same for every Stanford Research Systems instrument here: open it through VISA, identify it, then write settings and query values. This example uses the Stanford Research Systems CG635; the full CG635 reference has every command.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Stanford Research Systems CG635's VISA address
# Paste the address of your Stanford Research Systems CG635 (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("RPHS") # Set Relative Phase Zero
print(inst.query("FREQ?")) # Read Frequency
inst.close()11 Stanford Research Systems models (clock generator, function generator, power supply): CG635, CG792, DS345, DS360, PS310, PS325, PS350, PS355, PS365, PS370, PS375. Each page lists every remote-control command TestFlow's agent uses for that instrument, with its arguments.
Yes. Every Stanford Research Systems 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 Stanford Research Systems 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 Stanford Research Systems 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.