In TestFlow's instrument library, the Keysight N5767A takes 75 SCPI commands, 39 of them queries, and the Sorensen XG40-21 takes 26 SCPI commands, 10 of them queries. That is 49 more on the N5767A. Counting distinct command headers (the command path without its arguments), 14 are accepted by both, 51 exist only on the N5767A, and 8 only on the XG40-21. 22% of the N5767A's command headers also exist on the XG40-21.
Both libraries have commands under OUTPut, SYSTem, and MEASure. Only the N5767A has VOLTage, STATus, CURRent, INITiate, TRIGger, and ABORt. Only the XG40-21 has SOURce.
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.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight N5767A or Sorensen XG40-21 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 N5767A | Sorensen XG40-21 | |
|---|---|---|
| Commands in TestFlow's library | 75 | 26 |
| Queries (read a value or state) | 39 | 10 |
| Settings and actions | 36 | 16 |
| Subsystems | 10 | 8 |
| Distinct command headers | 65 | 22 |
| Headers the other lacks | 51 | 8 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | N5767A | XG40-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 |
14 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 N5767A's.
| Command | What it does |
|---|---|
| OUTPut:STATe <state>XG40-21: :OUTPut:STATe ON | Set Output Enable. Enables or disables the power supply output. |
| SYSTem:ERRor? | Query Error. Returns the next error number and message from the error queue. |
| MEAS:VOLT?XG40-21: :MEASure:VOLTage? | Measure Voltage. Returns the measured output voltage. |
| *IDN? | Identify Instrument. Returns manufacturer, model, serial number and firmware revision. |
| OUTPut:STATe? | Query Output Enable. Returns 1 if the output is on, 0 if off. |
| MEAS:CURR?XG40-21: :MEASure:CURRent? | Measure Current. Returns the measured output current. |
| *RST | Reset Instrument. Resets the power supply to its factory-defined state. |
| OUTPut:PROTection:CLEar | Clear Output Protection. Clears latched protection signals that disabled the output. |
| *TRG | Generate Trigger. Generates a bus trigger when the trigger source is BUS. |
| *CLS | Clear Status. Clears event registers, status byte and error queue. |
| *OPC? | Operation Complete Query. Returns 1 when all pending operations are complete. |
| *WAI | Wait To Continue. Holds off further commands until all pending operations complete. |
51 command headers in the N5767A library have no match in the XG40-21 library. Below are 22 of them from the 6 largest subsystems; the full list is in the Keysight N5767A command reference.
| Command | What it does |
|---|---|
| STATus:OPERation:EVENt? | Read Operation Event Register. Returns the operation event register, which clears on read (CC, CV, WTG bits). |
| STATus:OPERation:CONDition? | Read Operation Condition Register. Returns the live operation condition register (CC, CV, WTG bits). |
| STATus:OPERation:ENABle <value> | Set Operation Enable Mask. Sets the operation enable mask for the operation summary bit. |
| STATus:OPERation:ENABle? | Query Operation Enable Mask. Returns the operation enable mask. |
| Command | What it does |
|---|---|
| VOLTage:LEVel <value> | Set Voltage. Sets the immediate output voltage level in volts. |
| VOLTage:LEVel? | Query Voltage Setting. Returns the programmed output voltage level in volts. |
| VOLTage:LEVel:TRIGgered <value> | Set Triggered Voltage. Sets the triggered output voltage level transferred on trigger. |
| VOLTage:LEVel:TRIGgered? | Query Triggered Voltage. Returns the triggered output voltage level in volts. |
| Command | What it does |
|---|---|
| CURRent:LEVel <value> | Set Current. Sets the immediate output current level in amperes. |
| CURRent:LEVel? | Query Current Setting. Returns the programmed output current level in amperes. |
| CURRent:LEVel:TRIGgered <value> | Set Triggered Current. Sets the triggered output current level transferred on trigger. |
| CURRent:LEVel:TRIGgered? | Query Triggered Current. Returns the triggered output current level in amperes. |
| Command | What it does |
|---|---|
| *ESR? | Read Standard Event Register. Returns the standard event status register and clears it. |
| *ESE <value> | Set Standard Event Enable. Sets the standard event status enable register mask. |
| *ESE? | Query Standard Event Enable. Returns the standard event status enable register mask. |
| *SRE <value> | Set Service Request Enable. Sets the service request enable register mask. |
| Command | What it does |
|---|---|
| INITiate | Initiate Trigger System. Initiates the trigger system so the next trigger changes the output. |
| INITiate:CONTinuous <state> | Set Continuous Trigger Initiation. Enables or disables continuous initiation of output triggers. |
| INITiate:CONTinuous? | Query Continuous Trigger Initiation. Returns the continuous trigger initiation state. |
| Command | What it does |
|---|---|
| SYSTem:VERSion? | Query SCPI Version. Returns the SCPI version number the instrument complies with. |
| SYSTem:COMMunicate:RLSTate <mode> | Set Remote Local State. Sets front panel control, remote control, or remote with front panel locked. |
| SYSTem:COMMunicate:RLSTate? | Query Remote Local State. Returns the remote/local state of the instrument. |
8 command headers in the XG40-21 library have no match in the N5767A library. Below are 6 of them from the 3 largest subsystems; the full list is in the Sorensen XG40-21 command reference.
| Command | What it does |
|---|---|
| :SOURce:VOLTage <Volt> | Set Voltage. Sets the output voltage in volts. |
| :SOURce:VOLTage? | Read Voltage Setting. Reads the programmed output voltage. |
| :SOURce:CURRent <Amp> | Set Current. Sets the output current limit in amps. |
| :SOURce:CURRent? | Read Current Setting. Reads the programmed output current limit. |
| Command | What it does |
|---|---|
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. |
| Command | What it does |
|---|---|
| :OUTPut:PROTection:FOLDback <Mode> | Set Foldback. Sets foldback mode: 0 off, 1 trip on CV, 2 trip on CC. |
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:PROTection:CLEar (clear output protection), and the same line runs on each. For the reading, both libraries hold MEAS:VOLT? (measure voltage); the XG40-21 library writes it as :MEASure:VOLTage?. 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_N5767A_ADDRESS") # Keysight N5767A
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: Clear Output Protection
a.write("OUTPut:PROTection:CLEar")
b.write(":OUTPut:PROTection:CLEar")
# The same reading on both: Measure Voltage
print(a.query("MEAS:VOLT?"))
print(b.query(":MEASure:VOLTage?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Keysight N5767A or Sorensen XG40-21 and writes the report from the measured results.
In TestFlow's library the N5767A has 75 SCPI commands and the XG40-21 has 26 SCPI commands. 14 command headers are common to both, 51 are only on the N5767A (mostly STATus and VOLTage), and 8 are only on the XG40-21 (mostly SOURce and IEEE 488.2 common (*)).
Partly. 14 command headers are accepted by both, including OUTPut:STATe, SYSTem:ERRor?, and MEAS:VOLT?. 59 are not, for example STATus:OPERation:EVENt? on the N5767A and :SOURce:VOLTage on the XG40-21, so a script that uses those needs a separate branch for each instrument.
The N5767A: 75 commands for the N5767A against 26 for the XG40-21 in TestFlow's library. Of those, 39 on the N5767A and 10 on the XG40-21 are queries that read a value or state, and the library splits them into 10 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.