Sorensen instrument command references

Remote-control command sets for 6 Sorensen instruments from TestFlow's instrument library, each with its arguments and a working PyVISA example.

The library covers 6 power supplies from Sorensen: 208 commands in total, 80 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 Sorensen hardware, so every entry is one that drives a real instrument.

Sorensen power supplies

Commands shared across Sorensen instruments

These commands appear on more than one Sorensen instrument in the library, so a script that uses them carries over between models.

CommandWhat it doesModels
*CLSClears all event registers and the error queue.6 of 6
*IDN?Returns the instrument identification string (manufacturer, model, serial, firmware).6 of 6
*OPC?Returns 1 when all pending operations are complete.6 of 6
*RSTResets the instrument to its default state.6 of 6
*TST?Runs the self-test and returns 0 for pass or 1 for failure.6 of 6
*WAIWaits until all pending operations are complete before continuing.6 of 6
*TRGGenerates a bus trigger when the instrument is in wait-for-trigger state.5 of 6

Control a Sorensen instrument from Python

The pattern is the same for every Sorensen instrument here: open it through VISA, identify it, then write settings and query values. This example uses the Sorensen DCS40-25E; the full DCS40-25E reference has every command.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find the Sorensen DCS40-25E's VISA address

# Paste the address of your Sorensen DCS40-25E (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(":OUTPut:STATe ON")  # Turn On
print(inst.query(":MEASure:VOLTage?"))  # Measure Voltage

inst.close()

Related guides

Frequently asked questions

Which Sorensen instruments have a command reference here?

6 Sorensen models (power supply): DCS40-25E, SGA50-200, SGI50-200, XG40-21, XPF35-10DP, XPL30-2. Each page lists every remote-control command TestFlow's agent uses for that instrument, with its arguments.

Do Sorensen instruments use SCPI?

Yes. Every Sorensen 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.

How do I control a Sorensen instrument from Python?

Install PyVISA and a VISA backend, list the connected instruments with ResourceManager().list_resources(), open the Sorensen 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.

Can I automate Sorensen instruments 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 your Sorensen instruments 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.