Power Supply · SCPI command comparison

Sorensen DCS40-25E vs XG40-21: SCPI commands and remote control compared

In TestFlow's instrument library, the Sorensen DCS40-25E takes 33 SCPI commands, 11 of them queries, and the Sorensen XG40-21 takes 26 SCPI commands, 10 of them queries. That is 7 more on the DCS40-25E. Counting distinct command headers (the command path without its arguments), 17 are accepted by both, 9 exist only on the DCS40-25E, and 5 only on the XG40-21. 65% of the DCS40-25E's command headers also exist on the XG40-21.

Both libraries have commands under OUTPut, SOURce, MEASure, and SYSTem. Only the DCS40-25E has TRIGger.

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.

TestFlow's library gives the DCS40-350E, DCS50-20E, DCS50-56E, DCS55-18E, DCS60-18E, DCS60-250E, DCS60-50E, DCS600-1.7E, DCS600-5E, DCS8-1000E, DCS8-125E, DCS8-350E, DCS80-13E, DCS80-185E, DCS80-37E, DLM10-60E, DLM150-4E, DLM150-8E, DLM20-30E, DLM300-2E, DLM300-4E, DLM32-19E, DLM32-38E, DLM40-15E, DLM40-30E, DLM5-75E, DLM60-10E, DLM60-20E, DLM600-1E, DLM600-2E, DLM8-75E, DLM80-15E, and DLM80-7.5E the same command set as the DCS40-25E, so the DCS40-25E column applies to them too. TestFlow's library gives the XG600-1.4, XG8-100, XG80-10.5, XTR100-17, XTR100-8.5, XTR12-70, XTR150-11.2, XTR150-5.6, XTR20-42, XTR20-84, XTR300-2.8, XTR300-5.6, XTR33-25, XTR33-50, XTR40-21, XTR40-42, XTR6-110, XTR60-14, XTR60-28, XTR600-1.4, XTR600-2.8, XTR7.5-140, XTR8-100, XTR80-10.5, and XTR80-21 the same command set as the XG40-21, so the XG40-21 column applies to them too.

DCS40-25E commands
33
XG40-21 commands
26
Shared headers
17
Unique headers
14

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Sorensen DCS40-25E or Sorensen XG40-21 and writes the report from the measured results.

Get started

DCS40-25E vs XG40-21 at a glance

Counts come from TestFlow's instrument library, the command sets its AI agent uses to drive each instrument. A distinct command header is the command path without its arguments, so :OUTPut ON and :OUTPut OFF count once.

Sorensen DCS40-25ESorensen XG40-21
Commands in TestFlow's library3326
Queries (read a value or state)1110
Settings and actions2216
Subsystems98
Distinct command headers2622
Headers the other lacks95
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setDCS40-25E, DCS40-350E, DCS50-20E, DCS50-56E, DCS55-18E, DCS60-18E, DCS60-250E, DCS60-50E, DCS600-1.7E, DCS600-5E, DCS8-1000E, DCS8-125E, DCS8-350E, DCS80-13E, DCS80-185E, DCS80-37E, DLM10-60E, DLM150-4E, DLM150-8E, DLM20-30E, DLM300-2E, DLM300-4E, DLM32-19E, DLM32-38E, DLM40-15E, DLM40-30E, DLM5-75E, DLM60-10E, DLM60-20E, DLM600-1E, DLM600-2E, DLM8-75E, DLM80-15E, DLM80-7.5EXG40-21, XG600-1.4, XG8-100, XG80-10.5, XTR100-17, XTR100-8.5, XTR12-70, XTR150-11.2, XTR150-5.6, XTR20-42, XTR20-84, XTR300-2.8, XTR300-5.6, XTR33-25, XTR33-50, XTR40-21, XTR40-42, XTR6-110, XTR60-14, XTR60-28, XTR600-1.4, XTR600-2.8, XTR7.5-140, XTR8-100, XTR80-10.5, XTR80-21

Commands both accept

17 command headers are in both libraries. Here are 12, taken across subsystems. Where the XG40-21 library writes the command differently, its form is shown under the DCS40-25E's.

CommandWhat it does
:OUTPut:STATe ONTurn On. Enables the power supply output (closes isolation relay).
:SOURce:VOLTage <Volt>Set Voltage. Sets the output voltage in volts.
:MEASure:VOLTage?Measure Voltage. Measures the actual output voltage in volts.
:SYSTem:ERRor?Read Error. Returns the next message from the error queue.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
:OUTPut:PROTection:FOLD <Mode>XG40-21: :OUTPut:PROTection:FOLDback <Mode>Set Foldback. Sets foldback mode: 0 off, 1 program down on CV, 2 program down on CC.
:SOURce:VOLTage?Read Voltage Setting. Reads the programmed output voltage.
:MEASure:CURRent?Measure Current. Measures the actual output current in amps.
*RSTReset. Resets the instrument to its default state.
:SOURce:CURRent <Amp>Set Current. Sets the output current in amps.
*CLSClear Status. Clears all event registers and the error queue.
:SOURce:CURRent?Read Current Setting. Reads the programmed output current.

Only on the Sorensen DCS40-25E

9 command headers in the DCS40-25E library have no match in the XG40-21 library. Below are 8 of them from the 3 largest subsystems; the full list is in the Sorensen DCS40-25E command reference.

OUTPut (5 only on the DCS40-25E)

CommandWhat it does
:OUTPut:PROTection:DELay <Sec>Set Protection Delay. Sets the protection reporting delay in seconds.
:OUTPut:ISOLation ONEnable Isolation. Closes the rear-panel isolation relay.
:OUTPut:POLarity NORMSet Polarity Normal. Sets the output polarity relay to normal.
:OUTPut:SENSe ONEnable Remote Sense. Closes the remote-sense relay (4-wire sensing).

SOURce (3 only on the DCS40-25E)

CommandWhat it does
:SOURce:VOLTage:LIMit <Volt>Set Voltage Limit. Sets the soft upper voltage limit in volts.
:SOURce:CURRent:LIMit <Amp>Set Current Limit. Sets the soft upper current limit in amps.
:SOURce:VOLTage:PROTection:TRIPped?Read OVP Tripped. Returns 1 if OVP has tripped, 0 otherwise.

TRIGger (1 only on the DCS40-25E)

CommandWhat it does
:TRIGger:TYPe <Type>Trigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state.

Only on the Sorensen XG40-21

5 command headers in the XG40-21 library have no match in the DCS40-25E library. Below are 5 of them from the 2 largest subsystems; the full list is in the Sorensen XG40-21 command reference.

IEEE 488.2 common (*) (3 only on the XG40-21)

CommandWhat it does
*SAV <Slot>Save State. Saves the current instrument state to the specified storage slot.
*RCL <Slot>Recall State. Recalls an instrument state from the specified storage slot.
*TRGTrigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state.

OUTPut (2 only on the XG40-21)

CommandWhat it does
:OUTPut:STATe?Read Output State. Reads whether the output is ON or OFF.
:OUTPut:PROTection:CLEarClear Protection. Clears a latched protection (OVP/OCP/foldback) trip.

Control both from Python

With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, both libraries hold :OUTPut:STATe (turn on), and the same line runs on each. For the reading, both libraries hold :MEASure:VOLTage? (measure voltage), and the same line runs on each. For the basics, see the PyVISA tutorial.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find both VISA addresses

a = rm.open_resource("PASTE_DCS40_25E_ADDRESS")  # Sorensen DCS40-25E
b = rm.open_resource("PASTE_XG40_21_ADDRESS")  # Sorensen XG40-21
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Turn On
a.write(":OUTPut:STATe ON")
b.write(":OUTPut:STATe ON")

# The same reading on both: Measure Voltage
print(a.query(":MEASure:VOLTage?"))
print(b.query(":MEASure:VOLTage?"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Sorensen DCS40-25E or Sorensen XG40-21 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Sorensen DCS40-25E and the Sorensen XG40-21 for remote control?

In TestFlow's library the DCS40-25E has 33 SCPI commands and the XG40-21 has 26 SCPI commands. 17 command headers are common to both, 9 are only on the DCS40-25E (mostly OUTPut and SOURce), and 5 are only on the XG40-21 (mostly IEEE 488.2 common (*) and OUTPut).

Can I use the same SCPI code for the Sorensen DCS40-25E and the Sorensen XG40-21?

Partly. 17 command headers are accepted by both, including :OUTPut:STATe, :SOURce:VOLTage, and :MEASure:VOLTage?. 14 are not, for example :OUTPut:PROTection:DELay on the DCS40-25E and *SAV on the XG40-21, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the DCS40-25E or the XG40-21?

The DCS40-25E: 33 commands for the DCS40-25E against 26 for the XG40-21 in TestFlow's library. Of those, 11 on the DCS40-25E and 10 on the XG40-21 are queries that read a value or state, and the library splits them into 9 and 8 subsystems.

How do the DCS40-25E and XG40-21 signal operation complete and report errors?

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?. Each command named here is listed in the tables on this page and on each instrument's command reference.

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.