Power Supply · SCPI command comparison

Keysight N5745A vs TDK-Lambda GEN40-19: SCPI commands and remote control compared

In TestFlow's instrument library, the Keysight N5745A takes 61 SCPI commands, 27 of them queries, and the TDK-Lambda GEN40-19 takes 21 SCPI commands, 9 of them queries. That is 40 more on the N5745A. Counting distinct command headers (the command path without its arguments), 15 are accepted by both, 39 exist only on the N5745A, and 2 only on the GEN40-19. 28% of the N5745A's command headers also exist on the GEN40-19.

Both libraries have commands under SOURce, OUTPut, SYSTem, and MEASure. Only the N5745A has STATus, INITiate, TRIGger, and ABORt.

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

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.

N5745A commands
61
GEN40-19 commands
21
Shared headers
15
Unique headers
41

Run this on your bench

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

Get started

N5745A 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.

Keysight N5745ATDK-Lambda GEN40-19
Commands in TestFlow's library6121
Queries (read a value or state)279
Settings and actions3412
Subsystems128
Distinct command headers5417
Headers the other lacks392
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setN5745AGEN40-19, GEN6-100, GEN8-90

Commands both accept

15 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 (0 to 31.5 V; limited by OVP/1.05 and UVL/0.95).
OUTPut:STATe ONTurn On. Enables the DC output of the power supply.
SYSTem:ERRor?Read Error. Reads and removes the next error number and message from the error queue.
*SAV <Slot>Save State. Saves the present instrument state to memory location 0 to 15 (lost at power-off).
SOURce:VOLTage?Read Voltage Setting. Reads the programmed output voltage in volts.
OUTPut:STATe?Read Output State. Reads whether the output is ON (1) or OFF (0).
*RCL <Slot>Recall State. Recalls an instrument state previously saved in memory location 0 to 15.
SOURce:VOLTage:PROTection:LEVel <Volt>Set OVP Level. Sets the over-voltage protection trip level in volts (2 to 36 V; at least 1.05 x the voltage setting).
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
SOURce:CURRent <Amp>Set Current. Sets the output current limit in amps (0 to 25 A).
*RSTReset. Resets the instrument to its default state (output off, V=0, I=0, OVP=max) and aborts triggers.
SOURce:CURRent?Read Current Setting. Reads the programmed output current limit in amps.

Only on the Keysight N5745A

39 command headers in the N5745A library have no match in the GEN40-19 library. Below are 22 of them from the 6 largest subsystems; the full list is in the Keysight N5745A command reference.

SOURce (9 only on the N5745A)

CommandWhat it does
SOURce:VOLTage:TRIGgered <Volt>Set Triggered Voltage. Sets the voltage that is transferred to the output when a trigger occurs.
SOURce:VOLTage:TRIGgered?Read Triggered Voltage. Reads the programmed triggered output voltage in volts.
SOURce:VOLTage:LIMit:LOW <Volt>Set Low Voltage Limit. Sets the under-voltage limit (UVL) below which voltage programming is ignored (0 to 28.5 V).
SOURce:VOLTage:LIMit:LOW?Read Low Voltage Limit. Reads the low-voltage limit setting in volts.

IEEE 488.2 common (*) (7 only on the N5745A)

CommandWhat it does
*STB?Read Status Byte. Reads the status byte register without clearing it.
*ESE <Value>Set Event Status Enable. Sets the standard event status enable register mask.
*ESR?Read Event Status Register. Reads and clears the standard event status register.
*SRE <Value>Set Service Request Enable. Sets the service request enable register mask.

STATus (7 only on the N5745A)

CommandWhat it does
STATus:OPERation:CONDition?Read Operation Condition. Reads the operation condition register (CV=256 / CC=1024 / waiting-for-trigger=32).
STATus:OPERation:EVENt?Read Operation Event. Reads and clears the operation event register.
STATus:OPERation:ENABle <Value>Set Operation Enable. Sets the operation enable register mask that drives the OPER bit of the status byte.
STATus:QUEStionable:CONDition?Read Questionable Condition. Reads the questionable condition register (OV=1 / OC=2 / PF=4 / OT=16 / INH=512 / UNR=1024).

SYSTem (4 only on the N5745A)

CommandWhat it does
SYSTem:COMMunicate:RLSTate <State>Set Remote Local State. Sets the remote/local state (RWLock disables the front panel keys).
SYSTem:COMMunicate:RLSTate?Read Remote Local State. Reads the remote/local state of the instrument.
SYSTem:COMMunicate:TCPip:CONTrol?Read TCP Control Port. Returns the control socket port number used for LAN socket connections.
SYSTem:VERSion?Read SCPI Version. Returns the SCPI version number that the instrument complies with.

INITiate (3 only on the N5745A)

CommandWhat it does
INITiate:IMMediate:TRANsientInitiate Trigger. Initiates the trigger system so that the next trigger applies the triggered voltage and current.
INITiate:CONTinuous:TRANsient ONEnable Continuous Trigger. Enables continuous initiation of the output trigger system.
INITiate:CONTinuous:TRANsient?Read Continuous Trigger State. Reads whether continuous triggering is ON (1) or OFF (0).

OUTPut (3 only on the N5745A)

CommandWhat it does
OUTPut:PON:STATe RSTSet Power On State Reset. Sets the unit to power on in the reset (*RST) state.
OUTPut:PON:STATe?Read Power On State. Reads the power-on state setting (RST or AUTO).
OUTPut:PROTection:CLEarClear Protection. Clears latched protection faults (OV/OC/OT/AC fail/inhibit) and restores the output to its previous state.

Only on the TDK-Lambda GEN40-19

2 command headers in the GEN40-19 library have no match in the N5745A library. Below are 2 of them from the 1 largest subsystem; the full list is in the TDK-Lambda GEN40-19 command reference.

MEASure (2 only on the GEN40-19)

CommandWhat it does
MEASure:VOLTage?Measure Voltage. Measures the output voltage of the selected channel in volts.
MEASure:CURRent?Measure Current. Measures the output current of the selected channel in amps.

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 SOURce:VOLTage? (read voltage setting), 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_N5745A_ADDRESS")  # Keysight N5745A
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: Read Voltage Setting
print(a.query("SOURce:VOLTage?"))
print(b.query("SOURce:VOLTage?"))

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

What is the difference between the Keysight N5745A and the TDK-Lambda GEN40-19 for remote control?

In TestFlow's library the N5745A has 61 SCPI commands and the GEN40-19 has 21 SCPI commands. 15 command headers are common to both, 39 are only on the N5745A (mostly SOURce and IEEE 488.2 common (*)), and 2 are only on the GEN40-19 (mostly MEASure).

Can I use the same SCPI code for the Keysight N5745A and the TDK-Lambda GEN40-19?

Partly. 15 command headers are accepted by both, including SOURce:VOLTage, OUTPut:STATe, and SYSTem:ERRor?. 41 are not, for example SOURce:VOLTage:TRIGgered on the N5745A and MEASure:VOLTage? on the GEN40-19, so a script that uses those needs a separate branch for each instrument.

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

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

How do the N5745A 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.