Multimeter · SCPI command comparison

Keithley 2000 vs Keysight 34401A: SCPI commands and remote control compared

In TestFlow's instrument library, the Keithley 2000 takes 91 SCPI commands, 25 of them queries, and the Keysight 34401A takes 94 SCPI commands, 27 of them queries. That is 3 more on the 34401A. Counting distinct command headers (the command path without its arguments), 39 are accepted by both, 23 exist only on the 2000, and 40 only on the 34401A. 63% of the 2000's command headers also exist on the 34401A.

Both libraries have commands under SENSe, MEASure, SYSTem, CALCulate, SAMPle, TRIGger, READ, and FETCh, plus 1 more root. Only the 2000 has UNIT, TRACe, and ABORt. Only the 34401A has CONFigure, DISPlay, INPut, and DATA.

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.

2000 commands
91
34401A commands
94
Shared headers
39
Unique headers
63

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Keithley 2000 or Keysight 34401A and writes the report from the measured results.

Get started

2000 vs 34401A 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.

Keithley 2000Keysight 34401A
Commands in TestFlow's library9194
Queries (read a value or state)2527
Settings and actions6667
Subsystems1617
Distinct command headers6279
Headers the other lacks2340
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command set200034401A

Commands both accept

39 command headers are in both libraries. Here are 12, taken across subsystems. Where the 34401A library writes the command differently, its form is shown under the 2000's.

CommandWhat it does
:SENSe:FUNCtion "VOLT:DC"34401A: SENSe:FUNCtion "<Function>"Func DCV. Selects DC voltage as the active measurement function.
:MEASure:VOLTage:DC?34401A: MEASure:VOLTage:DC? <Range>,<Resolution>Measure DCV. Sets the function to DC voltage and returns one measured reading in volts.
:SYSTem:BEEPer:STATe ONContinuity Beeper On. Enables the audible beeper used during continuity testing.
:SAMPle:COUNt <Count>Set Sample Count. Sets the number of measurements made when a measurement is requested (1 to 1000000).
:TRIGger:SOURce <Source>Set Trigger Source. Defines a trigger-model block that makes measurements at the specified block number.
:READ?Read. Triggers and returns one reading from the active function using the default reading buffer.
:FETCh?Fetch. Returns the latest reading from the buffer without triggering a new measurement.
:INITiateInit Trigger Model. Starts the trigger model and begins the configured measurement sequence.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
:SENSe:FUNCtion?Read Function. Queries the currently selected measurement function string.
:MEASure:VOLTage:AC?34401A: MEASure:VOLTage:AC? <Range>,<Resolution>Measure ACV. Sets the function to AC voltage and returns one measured reading in volts.
:SAMPle:COUNt?Read Sample Count. Queries the number of measurements made per measurement request.

Only on the Keithley 2000

23 command headers in the 2000 library have no match in the 34401A library. Below are 15 of them from the 6 largest subsystems; the full list is in the Keithley 2000 command reference.

SENSe (10 only on the 2000)

CommandWhat it does
:SENSe:VOLTage:AC:DETector:BANDwidth <Bandwidth>Set ACV Detector BW. Sets the AC voltage detector bandwidth in Hz (3, 30 or 300).
:SENSe:CURRent:AC:DETector:BANDwidth <Bandwidth>Set ACI Detector BW. Sets the AC current detector bandwidth in Hz (3, 30 or 300).
:SENSe:VOLTage:DC:AVERage:COUNt <Count>Set DCV Average Count. Sets the number of readings in the DC voltage filter average (1 to 100).
:SENSe:VOLTage:DC:AVERage:TCONtrol <Type>Set DCV Average TCon. Sets the DC voltage averaging filter type to repeating or moving.

UNIT (4 only on the 2000)

CommandWhat it does
:UNIT:VOLTage:AC DBSet ACV Unit dB. Sets the AC voltage measurement unit to dB.
:UNIT:VOLTage:AC:DB:REFerence <Reference>Set ACV dB Reference. Sets the dB reference voltage for the AC voltage function (1e-7 to 1000 V).
:UNIT:VOLTage:AC:DBM:IMPedance <Impedance>Set ACV dBm Reference. Sets the dBm reference impedance for the AC voltage function (1 to 9999 ohms).
:UNIT:TEMPerature <Unit>Set Temp Unit. Sets the units used for temperature measurements.

MEASure (2 only on the 2000)

CommandWhat it does
:MEASure?Measure. Makes a measurement using the active function and returns the reading.
:MEASure:TEMPerature?Measure Temperature. Sets the function to temperature and returns one reading in the configured units.

SYSTem (2 only on the 2000)

CommandWhat it does
:SYSTem:AZERo:STATe ONSet DCV AZero On. Enables autozero for the DC voltage function.
:SYSTem:ERRor:NEXT?Read Error. Reads and removes the oldest message from the error queue (0,"No error" if empty).

TRACe (2 only on the 2000)

CommandWhat it does
:TRACe:CLEarClear Buffer. Clears all readings and statistics from the default reading buffer.
:TRACe:FREE?Read Buffer Actual. Returns the number of readings currently stored in the default reading buffer.

ABORt (1 only on the 2000)

CommandWhat it does
:ABORtAbort Trigger Model. Stops all trigger-model commands and returns the instrument to idle.

Only on the Keysight 34401A

40 command headers in the 34401A library have no match in the 2000 library. Below are 21 of them from the 6 largest subsystems; the full list is in the Keysight 34401A command reference.

CALCulate (11 only on the 34401A)

CommandWhat it does
CALCulate:STATe ONMath Null On. Enables the scaling (null/dB/dBm) math operation on measurements.
CALCulate:FUNCtion <Function>Set Scale Function. Selects the scaling function applied to measurements.
CALCulate:NULL:OFFSet <Reference>Set Null Reference. Sets the reference (null) value used by the scaling function.
CALCulate:DB:REFerence <Reference>Set dBm Reference. Sets the relative dB reference value in dBm.

CONFigure (11 only on the 34401A)

CommandWhat it does
CONFigure:VOLTage:DC <Range>,<Resolution>Conf DCV. Configures the instrument for DC voltage measurement with the given range and resolution.
CONFigure:VOLTage:AC <Range>,<Resolution>Conf ACV. Configures the instrument for AC voltage measurement with the given range and resolution.
CONFigure:CURRent:DC <Range>,<Resolution>Conf DCI. Configures the instrument for DC current measurement with the given range and resolution.
CONFigure:CURRent:AC <Range>,<Resolution>Conf ACI. Configures the instrument for AC current measurement with the given range and resolution.

SYSTem (5 only on the 34401A)

CommandWhat it does
SYSTem:BEEPerBeep. Issues a single beep from the instrument.
SYSTem:ERRor?Read Error. Reads and clears one error from the error queue (returns 0,"No error" if empty).
SYSTem:VERSion?Read SCPI Version. Returns the SCPI version to which the instrument complies.
SYSTem:LOCalLocal. Returns the instrument to local (front-panel) control.

DISPlay (3 only on the 34401A)

CommandWhat it does
DISPlay:STATe ONDisplay On. Turns the front-panel display on.
DISPlay:TEXT "<Message>"Set Display Text. Displays the specified text message on the front-panel display.
DISPlay:TEXT:CLEarClear Display Text. Clears the text message shown on the front-panel display.

SENSe (3 only on the 34401A)

CommandWhat it does
SENSe:VOLTage:DC:RESolution <Resolution>Set DCV Resolution. Sets the measurement resolution for DC voltage measurements.
SENSe:DETector:BANDwidth 3ACV Filter 3Hz. Sets the AC voltage filter bandwidth to 3 Hz (slow).
SENSe:ZERO:AUTO <State>Set AutoZero. Enables or disables the autozero mode for DC voltage measurements.

TRIGger (3 only on the 34401A)

CommandWhat it does
TRIGger:SOURce?Read Trigger Source. Returns the present trigger source.
TRIGger:DELay <Seconds>Set Trigger Delay. Sets the delay between the trigger signal and the first measurement.
TRIGger:DELay:AUTO ONTrigger Delay Auto On. Enables automatic trigger delay based on function and range.

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 :SENSe:FUNCtion (func dcv); the 34401A library writes it as SENSe:FUNCtion "VOLTage:DC". For the reading, both libraries hold :MEASure:VOLTage:DC? (measure dcv); the 34401A library writes it as MEASure:VOLTage:DC? AUTO,MIN. 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_2000_ADDRESS")  # Keithley 2000
b = rm.open_resource("PASTE_34401A_ADDRESS")  # Keysight 34401A
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Func DCV
a.write(":SENSe:FUNCtion \"VOLT:DC\"")
b.write("SENSe:FUNCtion \"VOLTage:DC\"")

# The same reading on both: Measure DCV
print(a.query(":MEASure:VOLTage:DC?"))
print(b.query("MEASure:VOLTage:DC? AUTO,MIN"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Keithley 2000 or Keysight 34401A and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Keithley 2000 and the Keysight 34401A for remote control?

In TestFlow's library the 2000 has 91 SCPI commands and the 34401A has 94 SCPI commands. 39 command headers are common to both, 23 are only on the 2000 (mostly SENSe and UNIT), and 40 are only on the 34401A (mostly CALCulate and CONFigure).

Can I use the same SCPI code for the Keithley 2000 and the Keysight 34401A?

Partly. 39 command headers are accepted by both, including :SENSe:FUNCtion, :MEASure:VOLTage:DC?, and :SYSTem:BEEPer:STATe. 63 are not, for example :SENSe:VOLTage:AC:DETector:BANDwidth on the 2000 and CALCulate:STATe on the 34401A, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the 2000 or the 34401A?

The 34401A: 91 commands for the 2000 against 94 for the 34401A in TestFlow's library. Of those, 25 on the 2000 and 27 on the 34401A are queries that read a value or state, and the library splits them into 16 and 17 subsystems.

How do the 2000 and 34401A 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.