Power Supply · SCPI command comparison

Sorensen XG40-21 vs TDK-Lambda GEN40-19: SCPI commands and remote control compared

In TestFlow's instrument library, the Sorensen XG40-21 takes 26 SCPI commands, 10 of them queries, and the TDK-Lambda GEN40-19 takes 21 SCPI commands, 9 of them queries. That is 5 more on the XG40-21. Counting distinct command headers (the command path without its arguments), 16 are accepted by both, 6 exist only on the XG40-21, and 1 only on the GEN40-19. 73% of the XG40-21's command headers also exist on the GEN40-19.

Both libraries have commands under SOURce, OUTPut, MEASure, and SYSTem. Neither has a command root the other lacks: the differences are inside shared subsystems.

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

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. TestFlow's library gives the GEN6-100 and GEN8-90 the same command set as the GEN40-19, so the GEN40-19 column applies to them too.

XG40-21 commands
26
GEN40-19 commands
21
Shared headers
16
Unique headers
7

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Sorensen XG40-21 or TDK-Lambda GEN40-19 and writes the report from the measured results.

Get started

XG40-21 vs GEN40-19 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 XG40-21TDK-Lambda GEN40-19
Commands in TestFlow's library2621
Queries (read a value or state)109
Settings and actions1612
Subsystems88
Distinct command headers2217
Headers the other lacks61
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setXG40-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-21GEN40-19, GEN6-100, GEN8-90

Commands both accept

16 command headers are in both libraries. Here are 12, taken across subsystems.

CommandWhat it does
:SOURce:VOLTage <Volt>Set Voltage. Sets the output voltage in volts.
:OUTPut:STATe ONTurn On. Enables the power supply output.
:MEASure:VOLTage?Measure Voltage. Measures the actual output voltage in volts.
:SYSTem:ERRor?Read Error. Reads the next message from the error queue.
*SAV <Slot>Save State. Saves the current instrument state to the specified storage slot.
:SOURce:VOLTage?Read Voltage Setting. Reads the programmed output voltage.
:OUTPut:STATe?Read Output State. Reads whether the output is ON or OFF.
:MEASure:CURRent?Measure Current. Measures the actual output current in amps.
*RCL <Slot>Recall State. Recalls an instrument state from the specified storage slot.
:SOURce:CURRent <Amp>Set Current. Sets the output current limit in amps.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
:SOURce:CURRent?Read Current Setting. Reads the programmed output current limit.

Only on the Sorensen XG40-21

6 command headers in the XG40-21 library have no match in the GEN40-19 library. Below are 6 of them from the 3 largest subsystems; the full list is in the Sorensen XG40-21 command reference.

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

CommandWhat it does
*WAIWait To Continue. Waits until all pending operations are complete before continuing.
*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:PROTection:FOLDback <Mode>Set Foldback. Sets foldback mode: 0 off, 1 trip on CV, 2 trip on CC.
:OUTPut:PROTection:CLEarClear Protection. Clears a latched protection (OVP/OCP/foldback) trip.

SOURce (2 only on the XG40-21)

CommandWhat it does
:SOURce:VOLTage:PROTection <Volt>Set OVP. Sets the over-voltage protection trip level in volts.
:SOURce:VOLTage:PROTection?Read OVP. Reads the over-voltage protection trip level.

Only on the TDK-Lambda GEN40-19

1 command header in the GEN40-19 library has no match in the XG40-21 library. Below are 1 of them from the 1 largest subsystem; the full list is in the TDK-Lambda GEN40-19 command reference.

SOURce (1 only on the GEN40-19)

CommandWhat it does
SOURce:VOLTage:PROTection:LEVel <Volt>Set OVP. Sets the over-voltage protection level of the selected channel.

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_XG40_21_ADDRESS")  # Sorensen XG40-21
b = rm.open_resource("PASTE_GEN40_19_ADDRESS")  # TDK-Lambda GEN40-19
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 XG40-21 or TDK-Lambda GEN40-19 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Sorensen XG40-21 and the TDK-Lambda GEN40-19 for remote control?

In TestFlow's library the XG40-21 has 26 SCPI commands and the GEN40-19 has 21 SCPI commands. 16 command headers are common to both, 6 are only on the XG40-21 (mostly IEEE 488.2 common (*) and OUTPut), and 1 are only on the GEN40-19 (mostly SOURce).

Can I use the same SCPI code for the Sorensen XG40-21 and the TDK-Lambda GEN40-19?

Partly. 16 command headers are accepted by both, including :SOURce:VOLTage, :OUTPut:STATe, and :MEASure:VOLTage?. 7 are not, for example *WAI on the XG40-21 and SOURce:VOLTage:PROTection:LEVel on the GEN40-19, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the XG40-21 or the GEN40-19?

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

How do the XG40-21 and GEN40-19 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.