Source Meter · SCPI command comparison

GW Instek GSM-20H10 vs Keithley 2400: SCPI commands and remote control compared

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.

GSM-20H10 commands
47
2400 commands
54
Shared headers
29
Unique headers
19

Run this on your bench

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.

Get started

GSM-20H10 vs 2400 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.

GW Instek GSM-20H10Keithley 2400
Commands in TestFlow's library4754
Queries (read a value or state)1212
Settings and actions3542
Subsystems1414
Distinct command headers3542
Headers the other lacks613
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setGSM-20H102400, 2401, 2410, 2420, 2425, 2430, 2440

Commands both accept

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

CommandWhat 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 ONTurn On. Enables the source output.
:SYSTem:RSENse ONSet 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.
:INITiateInitiate. Places the instrument in the wait-for-trigger state.
:ABORtAbort. 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.

Only on the GW Instek GSM-20H10

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.

SENSe (3 only on the GSM-20H10)

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

SOURce (2 only on the GSM-20H10)

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

OUTPut (1 only on the GSM-20H10)

CommandWhat it does
:OUTPut:SMODe HIMPedanceSet Output Off Mode Himp. Sets the output-off state to high impedance.

Only on the Keithley 2400

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.

SOURce (8 only on the 2400)

CommandWhat 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 ONSource Current Autorange On. Enables source current autorange.
:SOURce:VOLTage:MODE FIXedSet Source Mode Fixed. Sets the source to fixed (DC) output mode.

SENSe (2 only on the 2400)

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

MEASure (1 only on the 2400)

CommandWhat it does
:MEASure?Measure All. Triggers and returns the measured voltage, current, resistance and timestamp.

SYSTem (1 only on the 2400)

CommandWhat it does
:SYSTem:AZERo ONSet Auto Zero On. Enables autozero.

TRIGger (1 only on the 2400)

CommandWhat it does
:TRIGger:DELay <Seconds>Set Trigger Delay. Sets the trigger delay in seconds.

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 (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()

Run this on your bench

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.

Get started

Frequently asked questions

What is the difference between the GW Instek GSM-20H10 and the Keithley 2400 for remote control?

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

Can I use the same SCPI code for the GW Instek GSM-20H10 and the Keithley 2400?

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.

Which has more remote commands, the GSM-20H10 or the 2400?

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.

How do the GSM-20H10 and 2400 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.