Source Meter · TSP and SCPI command comparison

Keithley 2601B vs Keysight B2901B: SCPI and TSP commands and remote control compared

In TestFlow's instrument library, the Keithley 2601B takes 39 TSP commands, 8 of them queries, and the Keysight B2901B takes 61 SCPI commands, 15 of them queries. That is 22 more on the B2901B. Counting distinct command headers (the command path without its arguments), 0 are accepted by both, 29 exist only on the 2601B, and 57 only on the B2901B. The 2601B is programmed in TSP and the B2901B in SCPI, so a script written for one does not run on the other without translating each command.

Only the 2601B has smua, errorqueue, localnode, beeper, reset, and status and 1 more. Only the B2901B has SOURce, SENSe, OUTPut, FETCh, MEASure, and READ and 6 more.

Only the 2601B library has an operation-complete command (waitcomplete()); the B2901B library has none. Only the 2601B library has an error-queue read (errorqueue.next()); the B2901B library has none.

TestFlow's library gives the 2611B and 2635B the same command set as the 2601B, so the 2601B column applies to them too. TestFlow's library gives the B2901BL, B2910BL, and B2911B the same command set as the B2901B, so the B2901B column applies to them too.

2601B commands
39
B2901B commands
61
Shared headers
0
Unique headers
86

Run this on your bench

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

Get started

2601B vs B2901B 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 2601BKeysight B2901B
Commands in TestFlow's library3961
Queries (read a value or state)815
Settings and actions3146
Subsystems916
Distinct command headers2957
Headers the other lacks2957
Command languageTSPSCPI
Operation completewaitcomplete()Not in library
Error queueerrorqueue.next()Not in library
Models on this command set2601B, 2611B, 2635BB2901B, B2901BL, B2910BL, B2911B

Commands both accept

None. No command header in TestFlow's 2601B library matches one in its B2901B library: the 2601B speaks TSP and the B2901B speaks SCPI.

Only on the Keithley 2601B

29 command headers in the 2601B library have no match in the B2901B library. Below are 9 of them from the 6 largest subsystems; the full list is in the Keithley 2601B command reference.

smua (23 only on the 2601B)

CommandWhat it does
smua.source.output = smua.OUTPUT_ONTurn On. Enables the output of SMU channel A (TSP command).
smua.source.func = smua.OUTPUT_DCVOLTSSet Source Function Voltage. Sets the source function of channel A to DC voltage.
smua.source.levelv = <Voltage>Set Voltage Source. Sets the output voltage level in volts on channel A.
smua.source.leveli = <Amp>Set Current Source. Sets the output current level in amps on channel A.

beeper (1 only on the 2601B)

CommandWhat it does
beeper.beep(<Duration>, <Frequency>)Beep. Sounds the beeper for the given duration and frequency.

errorqueue (1 only on the 2601B)

CommandWhat it does
print(errorqueue.next())Read Error. Reads the next message from the error queue.

localnode (1 only on the 2601B)

CommandWhat it does
print(localnode.description)Identify. Returns the instrument identification string.

reset (1 only on the 2601B)

CommandWhat it does
reset()Reset. Resets the entire instrument to its default state.

status (1 only on the 2601B)

CommandWhat it does
status.reset()Clear Status. Clears all status registers and the error queue.

Only on the Keysight B2901B

57 command headers in the B2901B library have no match in the 2601B library. Below are 23 of them from the 6 largest subsystems; the full list is in the Keysight B2901B command reference.

SOURce (14 only on the B2901B)

CommandWhat it does
:SOURce:FUNCtion:SHAPe <Function>Set Source Function. Sets the source output shape to DC or Pulse mode.
:SOURce:FUNCtion:MODE <Mode>Set Source Mode. Sets the source function mode to voltage or current sourcing.
:SOURce:VOLTage:LEVel:IMMediate:AMPLitude <Voltage>Set Voltage. Sets the DC output voltage level in volts (range: -21 V to +21 V).
:SOURce:CURRent:LEVel:IMMediate:AMPLitude <Current>Set Current. Sets the DC output current level in amperes (range: -3 A to +3 A).

SENSe (10 only on the B2901B)

CommandWhat it does
:SENSe:VOLTage:PROTection:LEVel <Voltage>Set Voltage Compliance. Sets the voltage compliance (protection) limit in volts when sourcing current.
:SENSe:CURRent:PROTection:LEVel <Current>Set Current Compliance. Sets the current compliance (protection) limit in amperes when sourcing voltage.
:SENSe:FUNCtion:ON "<Function>"Set Sense Function. Selects the measurement (sense) function.
:SENSe:VOLTage:RANGe:UPPer <Range>Set Sense Voltage Range. Sets the measurement range for voltage sensing in volts.

IEEE 488.2 common (*) (9 only on the B2901B)

CommandWhat it does
*SAV <Register>Save State. Saves the current instrument settings to non-volatile memory register (0 to 4).
*RCL <Register>Recall State. Recalls and restores instrument settings from the specified non-volatile memory register.
*IDN?Identify. Queries and returns the instrument identification string (manufacturer model serial firmware).
*RSTReset. Resets the instrument to factory default settings and aborts any pending operations.

FETCh (5 only on the B2901B)

CommandWhat it does
:FETCh:SCALar:VOLTage?Fetch Voltage. Returns the last measured voltage from the instrument buffer without re-triggering.
:FETCh:SCALar:CURRent?Fetch Current. Returns the last measured current from the instrument buffer without re-triggering.
:FETCh:SCALar?Fetch All. Returns all last measured data (voltage current resistance status timestamp) from buffer.
:FETCh:ARRay:VOLTage?Fetch Array Voltage. Returns the array of measured voltage data points from the last sweep without re-triggering.

OUTPut (5 only on the B2901B)

CommandWhat it does
:OUTPut ONTurn On. Enables the SMU output channel.
:OUTPut:STATe?Read Output State. Queries and returns the current output state (0=OFF / 1=ON).
:OUTPut:OFF:MODE <Mode>Set Output Off Mode. Sets the output terminal condition when the output is turned off.
:OUTPut:LOW <State>Set Output Low. Sets the output LO terminal to ground or floating when output is off.

MEASure (3 only on the B2901B)

CommandWhat it does
:MEASure:VOLTage?Measure Voltage. Triggers a measurement and returns the measured voltage in volts.
:MEASure:CURRent?Measure Current. Triggers a measurement and returns the measured current in amperes.
:MEASure:RESistance?Measure Resistance. Triggers a measurement and returns the measured resistance in ohms.

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, the two libraries have no common command with a worked example on both, so each instrument uses its own: smua.source.output = smua.OUTPUT_ON on the 2601B and :OUTPut ON on the B2901B. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: print(smua.measure.v()) on the 2601B and :MEASure:VOLTage? on the B2901B. 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_2601B_ADDRESS")  # Keithley 2601B
b = rm.open_resource("PASTE_B2901B_ADDRESS")  # Keysight B2901B
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# No shared setting with an example on both, so each uses its own command
a.write("smua.source.output = smua.OUTPUT_ON")  # Turn On
b.write(":OUTPut ON")  # Turn On

# No shared reading with an example on both, so each uses its own command
print(a.query("print(smua.measure.v())"))  # Measure Voltage
print(b.query(":MEASure:VOLTage?"))  # Measure Voltage

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

What is the difference between the Keithley 2601B and the Keysight B2901B for remote control?

In TestFlow's library the 2601B has 39 TSP commands and the B2901B has 61 SCPI commands. 0 command headers are common to both, 29 are only on the 2601B (mostly smua and beeper), and 57 are only on the B2901B (mostly SOURce and SENSe).

Can I use the same code for the Keithley 2601B and the Keysight B2901B?

Not directly. The 2601B uses TSP and the B2901B uses SCPI, so each command has to be rewritten for the other instrument. PyVISA opens both the same way, and both answer *IDN?, but the commands that set and read values differ.

Which has more remote commands, the 2601B or the B2901B?

The B2901B: 39 commands for the 2601B against 61 for the B2901B in TestFlow's library. Of those, 8 on the 2601B and 15 on the B2901B are queries that read a value or state, and the library splits them into 9 and 16 subsystems.

How do the 2601B and B2901B signal operation complete and report errors?

Only the 2601B library has an operation-complete command (waitcomplete()); the B2901B library has none. Only the 2601B library has an error-queue read (errorqueue.next()); the B2901B library has none. 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.