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.
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.
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 N5745A | TDK-Lambda GEN40-19 | |
|---|---|---|
| Commands in TestFlow's library | 61 | 21 |
| Queries (read a value or state) | 27 | 9 |
| Settings and actions | 34 | 12 |
| Subsystems | 12 | 8 |
| Distinct command headers | 54 | 17 |
| Headers the other lacks | 39 | 2 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | N5745A | GEN40-19, GEN6-100, GEN8-90 |
15 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What 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 ON | Turn 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). |
| *RST | Reset. 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. |
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.
| Command | What 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. |
| Command | What 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. |
| Command | What 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). |
| Command | What 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. |
| Command | What it does |
|---|---|
| INITiate:IMMediate:TRANsient | Initiate Trigger. Initiates the trigger system so that the next trigger applies the triggered voltage and current. |
| INITiate:CONTinuous:TRANsient ON | Enable 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). |
| Command | What it does |
|---|---|
| OUTPut:PON:STATe RST | Set 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:CLEar | Clear Protection. Clears latched protection faults (OV/OC/OT/AC fail/inhibit) and restores the output to its previous state. |
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.
| Command | What 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. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.