In TestFlow's instrument library, the GW Instek GSM-20H10 takes 47 SCPI commands, 12 of them queries, and the Keithley 2400 takes 54 SCPI commands, 12 of them queries. That is 7 more on the 2400. Counting distinct command headers (the command path without its arguments), 29 are accepted by both, 6 exist only on the GSM-20H10, and 13 only on the 2400. 83% of the GSM-20H10's command headers also exist on the 2400.
Both libraries have commands under SENSe, SOURce, OUTPut, SYSTem, MEASure, READ, FETCh, and TRIGger, plus 2 more roots. 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 2401, 2410, 2420, 2425, 2430, and 2440 the same command set as the 2400, so the 2400 column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your GW Instek GSM-20H10 or Keithley 2400 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.
| GW Instek GSM-20H10 | Keithley 2400 | |
|---|---|---|
| Commands in TestFlow's library | 47 | 54 |
| Queries (read a value or state) | 12 | 12 |
| Settings and actions | 35 | 42 |
| Subsystems | 14 | 14 |
| Distinct command headers | 35 | 42 |
| Headers the other lacks | 6 | 13 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | GSM-20H10 | 2400, 2401, 2410, 2420, 2425, 2430, 2440 |
29 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What it does |
|---|---|
| :SENSe:FUNCtion "VOLTage" | Set Sense Function Voltage. Selects voltage as the measurement function. |
| :SOURce:FUNCtion <Function> | Set Source Function. Sets the source function to voltage or current mode. |
| :OUTPut ON | Turn On. Enables the source output. |
| :SYSTem:RSENse ON | Set Four Wire On. Enables 4-wire (remote sense) measurement. |
| :MEASure:VOLTage? | Measure Voltage. Triggers and returns the measured voltage in volts. |
| :READ? | Read Value. Triggers and returns one measurement of the active sense function. |
| :FETCh? | Fetch Value. Returns the last measurement without re-triggering. |
| :TRIGger:COUNt <Count> | Set Measure Count. Sets the number of measurements made per trigger. |
| :INITiate | Initiate. Places the instrument in the wait-for-trigger state. |
| :ABORt | Abort. Aborts the current operation and returns to idle. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| :SENSe:VOLTage:RANGe <Range> | Set Voltage Sense Range. Sets the voltage measurement range in volts. |
6 command headers in the GSM-20H10 library have no match in the 2400 library. Below are 6 of them from the 3 largest subsystems; the full list is in the GW Instek GSM-20H10 command reference.
| Command | What it does |
|---|---|
| :SENSe:VOLTage:PROTection:LEVel <Voltage> | Set Voltage Limit. Sets the voltage limit (compliance) when sourcing current. |
| :SENSe:CURRent:PROTection:LEVel <Amp> | Set Current Limit. Sets the current limit (compliance) when sourcing voltage. |
| :SENSe:CURRent:PROTection:TRIPped? | Read Source Limit Tripped. Reads whether the source limit has been tripped. |
| Command | What it does |
|---|---|
| :SOURce:VOLTage <Voltage> | Set Voltage Source. Sets the output voltage level in volts when in voltage source mode. |
| :SOURce:CURRent <Amp> | Set Current Source. Sets the output current level in amps when in current source mode. |
| Command | What it does |
|---|---|
| :OUTPut:SMODe HIMPedance | Set Output Off Mode Himp. Sets the output-off state to high impedance. |
13 command headers in the 2400 library have no match in the GSM-20H10 library. Below are 9 of them from the 5 largest subsystems; the full list is in the Keithley 2400 command reference.
| Command | What it does |
|---|---|
| :SOURce:VOLTage:LEVel <Voltage> | Set Voltage Source. Sets the output voltage level in volts when in voltage source mode. |
| :SOURce:CURRent:LEVel <Amp> | Set Current Source. Sets the output current level in amps when in current source mode. |
| :SOURce:CURRent:RANGe:AUTO ON | Source Current Autorange On. Enables source current autorange. |
| :SOURce:VOLTage:MODE FIXed | Set Source Mode Fixed. Sets the source to fixed (DC) output mode. |
| Command | What it does |
|---|---|
| :SENSe:VOLTage:PROTection <Voltage> | Set Voltage Compliance. Sets the voltage compliance (limit) in volts. |
| :SENSe:CURRent:PROTection <Amp> | Set Current Compliance. Sets the current compliance (limit) in amps. |
| Command | What it does |
|---|---|
| :MEASure? | Measure All. Triggers and returns the measured voltage, current, resistance and timestamp. |
| Command | What it does |
|---|---|
| :SYSTem:AZERo ON | Set Auto Zero On. Enables autozero. |
| Command | What it does |
|---|---|
| :TRIGger:DELay <Seconds> | Set Trigger Delay. Sets the trigger delay in seconds. |
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 (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_GSM_20H10_ADDRESS") # GW Instek GSM-20H10
b = rm.open_resource("PASTE_2400_ADDRESS") # Keithley 2400
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Turn On
a.write(":OUTPut ON")
b.write(":OUTPut ON")
# The same reading on both: Measure Voltage
print(a.query(":MEASure:VOLTage?"))
print(b.query(":MEASure:VOLTage?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your GW Instek GSM-20H10 or Keithley 2400 and writes the report from the measured results.
In TestFlow's library the GSM-20H10 has 47 SCPI commands and the 2400 has 54 SCPI commands. 29 command headers are common to both, 6 are only on the GSM-20H10 (mostly SENSe and SOURce), and 13 are only on the 2400 (mostly SOURce and SENSe).
Partly. 29 command headers are accepted by both, including :SENSe:FUNCtion, :SOURce:FUNCtion, and :OUTPut. 19 are not, for example :SENSe:VOLTage:PROTection:LEVel on the GSM-20H10 and :SOURce:VOLTage:LEVel on the 2400, so a script that uses those needs a separate branch for each instrument.
The 2400: 47 commands for the GSM-20H10 against 54 for the 2400 in TestFlow's library. Of those, 12 on the GSM-20H10 and 12 on the 2400 are queries that read a value or state, and the library splits them into 14 and 14 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.