The Stanford Research Systems PS310, PS325, and PS350 power supply is controlled remotely with SCPI commands. TestFlow's instrument library holds 33 commands for it, 16 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 PS310 on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Stanford Research Systems PS310, PS325, or PS350 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 Stanford Research Systems PS310's VISA address
# Paste the address of your Stanford Research Systems PS310 (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("HVON") # Turn On High Voltage
print(inst.query("VSET?")) # Read Voltage Setting
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Stanford Research Systems PS310, PS325, or PS350 and writes the report from the measured results.
Describe the test in a sentence, for example “turn on high voltage on the PS310, then read voltage setting 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.
33 commands in 12 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The PS310, PS325, and PS350 share this command set in TestFlow's library.
| Command | What it does | Arguments |
|---|---|---|
| TMOD 0 | Set Trip Reset Manual. Sets the trip reset mode to manual. | None |
| TMOD 1 | Set Trip Reset Auto. Sets the trip reset mode to automatic. | None |
| TMOD? | Read Trip Mode. Reads the trip reset mode (0=manual or 1=auto). | None |
| Command | What it does | Arguments |
|---|---|---|
| VSET <Volt> | Set Voltage. Sets the output voltage in volts (0 to +/-1250 V; reversible polarity set by the rear-panel switch); must be <= VLIM and front-panel setting mode must be active. | Number |
| VSET? | Read Voltage Setting. Reads the programmed output voltage setting in volts. | None |
| Command | What it does | Arguments |
|---|---|---|
| VLIM <Volt> | Set Voltage Limit. Sets the voltage limit in volts (0 to 100 % of full scale +/-1250 V; sign must match the output polarity; must be >= VSET). | Number |
| VLIM? | Read Voltage Limit. Reads the voltage limit in volts. | None |
| Command | What it does | Arguments |
|---|---|---|
| ILIM <Current> | Set Current Limit. Sets the current limit in amps (0 to 21 mA = 105 % of 20 mA). | Number |
| ILIM? | Read Current Limit. Reads the current limit in amps. | None |
| Command | What it does | Arguments |
|---|---|---|
| ITRP <Current> | Set Current Trip. Sets the current trip level in amps (0 to 21 mA = 105 % of 20 mA). | Number |
| ITRP? | Read Current Trip. Reads the current trip level in amps. | None |
| Command | What it does | Arguments |
|---|---|---|
| HVON | Turn On High Voltage. Turns the high voltage output on (front-panel HV switch must not be OFF) and clears any voltage or current trips. | None |
| Command | What it does | Arguments |
|---|---|---|
| HVOF | Turn Off High Voltage. Turns the high voltage output off. | None |
| Command | What it does | Arguments |
|---|---|---|
| VOUT? | Measure Voltage. Reads the actual output voltage in volts including sign (settles about 1 s after a change). | None |
| Command | What it does | Arguments |
|---|---|---|
| IOUT? | Measure Current. Reads the actual output current in amps (max 20 mA; settles about 1 s after a change). | None |
| Command | What it does | Arguments |
|---|---|---|
| TCLR | Clear Trips. Clears any voltage or current trips. | None |
| Command | What it does | Arguments |
|---|---|---|
| SMOD? | Read Voltage Setting Mode. Reads the voltage setting mode (0=front panel or 1=rear-panel analog input; changed only by the rear-panel switch). | None |
| Command | What it does | Arguments |
|---|---|---|
| *SAV <Location> | Save Settings. Stores the present setup to a memory location (1 to 9). | Number: 1,2,3,4,5,6,7,8,9 |
| *RCL <Location> | Recall Settings. Recalls a stored setup (1 to 9 user; 0 recalls the default settings). | Number: 0,1,2,3,4,5,6,7,8,9 |
| *ESE <Mask> | Set Standard Event Enable. Sets the standard event status enable register (0 to 255). | Number |
| *ESE? | Read Standard Event Enable. Reads the standard event status enable register. | None |
| *ESR? | Read Standard Event Register. Reads and clears the standard event status register. | None |
| *ESR? <Bit> | Read Standard Event Bit. Reads and clears one bit of the standard event status register (0 to 7). | Number: 0,1,2,3,4,5,6,7 |
| *SRE <Mask> | Set Service Request Enable. Sets the serial poll (service request) enable register (0 to 255). | Number |
| *SRE? | Read Service Request Enable. Reads the serial poll (service request) enable register. | None |
| *STB? | Read Status Byte. Reads the serial poll status byte (bit 0=stable,1=voltage trip,2=current trip,3=current limit,4=MAV,5=ESB,6=RQS,7=HV on). | None |
| *STB? <Bit> | Read Status Byte Bit. Reads one bit of the serial poll status byte (0 to 7). | Number: 0,1,2,3,4,5,6,7 |
| *PSC 1 | Turn On Power On Status Clear. Sets the power-on status clear bit so status and enable registers are cleared at power-up. | None |
| *PSC 0 | Turn Off Power On Status Clear. Clears the power-on status clear bit so status enable registers keep their values through power cycles. | None |
| *PSC? | Read Power On Status Clear. Reads the power-on status clear bit (0 or 1). | None |
| *IDN? | Identify. Returns the identification string (StanfordResearchSystems,PS310,serial,firmware version). | None |
| *RST | Reset. Resets the power supply to its default configuration (same as holding CLR at power-on). | None |
| *CLS | Clear Status. Clears all status registers. | None |
This reference is generated from TestFlow's instrument library, which is drafted from Stanford Research Systems's programming documentation for the PS310, PS325, and PS350 and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Stanford Research Systems's programming manual: check it before you rely on an edge case. Last updated October 13, 2026.
Yes. The Stanford Research Systems PS310 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 33 SCPI commands for it: 16 queries that read values or state, and 17 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?, HVON and VSET?.
VSET? (read voltage setting). Reads the programmed output voltage setting in volts. 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 Stanford Research Systems PS310 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.