In TestFlow's instrument library, the Keithley 2400 takes 54 SCPI commands, 12 of them queries, and the Keithley 2450 takes 49 SCPI commands, 12 of them queries. That is 5 more on the 2400. Counting distinct command headers (the command path without its arguments), 27 are accepted by both, 15 exist only on the 2400, and 9 only on the 2450. 64% of the 2400's command headers also exist on the 2450.
Both libraries have commands under SOURce, SENSe, SYSTem, MEASure, OUTPut, READ, FETCh, and INITiate, plus 1 more root. Only the 2400 has TRIGger.
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. TestFlow's library gives the 2460 and 2470 the same command set as the 2450, so the 2450 column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Keithley 2400 or Keithley 2450 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.
| Keithley 2400 | Keithley 2450 | |
|---|---|---|
| Commands in TestFlow's library | 54 | 49 |
| Queries (read a value or state) | 12 | 12 |
| Settings and actions | 42 | 37 |
| Subsystems | 14 | 13 |
| Distinct command headers | 42 | 36 |
| Headers the other lacks | 15 | 9 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | 2400, 2401, 2410, 2420, 2425, 2430, 2440 | 2450, 2460, 2470 |
27 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What it does |
|---|---|
| :SOURce:FUNCtion <Function> | Set Source Function. Sets the source function to voltage or current mode. |
| :SENSe:FUNCtion "VOLTage" | Set Sense Function Voltage. Selects voltage as the measurement (sense) function. |
| :SYSTem:ERRor? | Read Error. Reads the first message from the error queue. |
| :MEASure:VOLTage? | Measure Voltage. Triggers and returns the measured voltage in volts. |
| :OUTPut ON | Turn On. Enables the source output. |
| :READ? | Read Value. Triggers and returns one measurement of the configured sense functions. |
| :FETCh? | Fetch Value. Returns the last measurement without re-triggering. |
| :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). |
| :SOURce:FUNCtion? | Read Source Function. Reads the present source function. |
| :SENSe:VOLTage:RANGe <Range> | Set Voltage Sense Range. Sets the voltage measurement range in volts. |
15 command headers in the 2400 library have no match in the 2450 library. Below are 11 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 |
|---|---|
| :SYSTem:RSENse ON | Set Four Wire On. Enables 4-wire (remote sense) measurement. |
| :SYSTem:AZERo ON | Set Auto Zero On. Enables autozero. |
| Command | What it does |
|---|---|
| :TRIGger:COUNt <Count> | Set Trigger Count. Sets the number of triggers before returning to idle. |
| :TRIGger:DELay <Seconds> | Set Trigger Delay. Sets the trigger delay in seconds. |
| Command | What it does |
|---|---|
| :MEASure? | Measure All. Triggers and returns the measured voltage, current, resistance and timestamp. |
9 command headers in the 2450 library have no match in the 2400 library. Below are 8 of them from the 3 largest subsystems; the full list is in the Keithley 2450 command reference.
| 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. |
| :SOURce:VOLTage:ILIMit:LEVel <Voltage> | Set Voltage Limit. Sets the voltage limit (compliance) when sourcing current. |
| :SOURce:CURRent:VLIMit:LEVel <Amp> | Set Current Limit. Sets the current limit (compliance) when sourcing voltage. |
| Command | What it does |
|---|---|
| :SENSe:CURRent:RSENse ON | Set Four Wire On. Enables 4-wire (remote sense) measurement. |
| :SENSe:COUNt <Count> | Set Measure Count. Sets the number of measurements made per trigger. |
| :SENSe:AZERo ON | Set Auto Zero On. Enables autozero. |
| Command | What it does |
|---|---|
| :OUTPut:SMODe HIMPedance | Set Output Off Mode Himp. Sets the output-off state to high impedance. |
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_2400_ADDRESS") # Keithley 2400
b = rm.open_resource("PASTE_2450_ADDRESS") # Keithley 2450
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 Keithley 2400 or Keithley 2450 and writes the report from the measured results.
In TestFlow's library the 2400 has 54 SCPI commands and the 2450 has 49 SCPI commands. 27 command headers are common to both, 15 are only on the 2400 (mostly SOURce and SENSe), and 9 are only on the 2450 (mostly SOURce and SENSe).
Partly. 27 command headers are accepted by both, including :SOURce:FUNCtion, :SENSe:FUNCtion, and :SYSTem:ERRor?. 24 are not, for example :SOURce:VOLTage:LEVel on the 2400 and :SOURce:VOLTage on the 2450, so a script that uses those needs a separate branch for each instrument.
The 2400: 54 commands for the 2400 against 49 for the 2450 in TestFlow's library. Of those, 12 on the 2400 and 12 on the 2450 are queries that read a value or state, and the library splits them into 14 and 13 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.