Source Meter · SCPI command comparison

Keysight B2901B vs Rohde & Schwarz NGU201: SCPI commands and remote control compared

In TestFlow's instrument library, the Keysight B2901B takes 61 SCPI commands, 15 of them queries, and the Rohde & Schwarz NGU201 takes 58 SCPI commands, 17 of them queries. That is 3 more on the B2901B. Counting distinct command headers (the command path without its arguments), 8 are accepted by both, 49 exist only on the B2901B, and 46 only on the NGU201. 14% of the B2901B's command headers also exist on the NGU201.

Both libraries have commands under SOURce, SENSe, OUTPut, MEASure, and TRIGger. Only the B2901B has FETCh, READ, DISPlay, FORMat, ARM, and INITiate and 1 more. Only the NGU201 has SYSTem and APPLy.

Neither library has an operation-complete command such as *OPC?. Only the NGU201 library has an error-queue read (SYSTem:ERRor?); the B2901B library has none.

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

B2901B commands
61
NGU201 commands
58
Shared headers
8
Unique headers
95

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Keysight B2901B or Rohde & Schwarz NGU201 and writes the report from the measured results.

Get started

B2901B vs NGU201 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.

Keysight B2901BRohde & Schwarz NGU201
Commands in TestFlow's library6158
Queries (read a value or state)1517
Settings and actions4641
Subsystems1611
Distinct command headers5754
Headers the other lacks4946
Command languageSCPISCPI
Operation completeNot in libraryNot in library
Error queueNot in librarySYSTem:ERRor?
Models on this command setB2901B, B2901BL, B2910BL, B2911BNGU201

Commands both accept

8 command headers are in both libraries.

CommandWhat it does
:OUTPut:STATe?Read Output State. Queries and returns the current output state (0=OFF / 1=ON).
:MEASure:VOLTage?Measure Voltage. Triggers a measurement and returns the measured voltage in volts.
*IDN?Identify. Queries and returns the instrument identification string (manufacturer model serial firmware).
:MEASure:CURRent?Measure Current. Triggers a measurement and returns the measured current in amperes.
*RSTReset. Resets the instrument to factory default settings and aborts any pending operations.
*TST?Self Test. Executes the instrument self-test and returns 0 if passed or a non-zero error code if failed.
*CLSClear Status. Clears the event status registers and the error queue.
*WAIWait For Complete. Prevents the instrument from executing further commands until all pending operations are complete.

Only on the Keysight B2901B

49 command headers in the B2901B library have no match in the NGU201 library. Below are 22 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.

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.

IEEE 488.2 common (*) (4 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.
*CAL?Self Calibration. Executes self-calibration and returns 0 if successful or a non-zero error code if failed.
*OPCOperation Complete. Sets the OPC bit in the Event Status Register when all pending operations are complete.

OUTPut (4 only on the B2901B)

CommandWhat it does
:OUTPut ONTurn On. Enables the SMU output channel.
: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.
:OUTPut:FILTer:LPASs:STATe <State>Set Output Filter. Enables or disables the output low-pass filter.

DISPlay (2 only on the B2901B)

CommandWhat it does
:DISPlay:ENABle <State>Set Display Enable. Enables or disables the front-panel display. Disabling improves measurement throughput.
:DISPlay:WINDow:TEXT:DATA <String>Set Display Text. Sends a user-defined text string to be displayed on the front panel display.

Only on the Rohde & Schwarz NGU201

46 command headers in the NGU201 library have no match in the B2901B library. Below are 19 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz NGU201 command reference.

SOURce (22 only on the NGU201)

CommandWhat it does
:SOURce:VOLTage <Voltage>Set Voltage. Sets the output voltage level of the SMU channel.
:SOURce:CURRent <Current>Set Current. Sets the output current level or current limit of the SMU channel.
:SOURce:VOLTage?Read Voltage Setting. Queries the currently set output voltage value.
:SOURce:CURRent?Read Current Setting. Queries the currently set output current limit value.

OUTPut (8 only on the NGU201)

CommandWhat it does
:OUTPut:STATe ONTurn On. Enables the SMU channel output.
:OUTPut:MODE <Mode>Set Output Mode. Sets the output operating mode to AUTO SINK or SOURCE.
:OUTPut:MODE?Read Output Mode. Queries the current output mode setting.
:OUTPut:IMPedance <Impedance>Set Output Impedance. Sets the emulated internal output impedance in ohms.

SENSe (6 only on the NGU201)

CommandWhat it does
:SENSe:VOLTage:RANGe <Range>Set Voltage Range. Sets the voltage measurement range (5 V or 20 V).
:SENSe:CURRent:RANGe <Range>Set Current Range. Sets the current measurement range in amperes.
:SENSe:VOLTage:RANGe:AUTO <State>Set Voltage Range Auto. Enables or disables automatic voltage measurement range selection.
:SENSe:CURRent:RANGe:AUTO <State>Set Current Range Auto. Enables or disables automatic current measurement range selection.

IEEE 488.2 common (*) (5 only on the NGU201)

CommandWhat it does
*TRGSend Software Trigger. Sends an immediate software trigger to start a triggered measurement or sequence.
*ESE <Value>Set Event Status Enable. Sets the event status enable register to control which events set the ESB bit.
*ESR?Read Event Status. Queries and clears the event status register returning the accumulated event byte.
*STB?Read Status Byte. Queries the status byte register without clearing it.

SYSTem (2 only on the NGU201)

CommandWhat it does
:SYSTem:ERRor?System Error. Queries the first error in the error queue returning an error code and message string.
:SYSTem:VERSion?System Version. Queries the SCPI version to which the instrument conforms.

APPLy (1 only on the NGU201)

CommandWhat it does
:APPLy <Voltage>, <Current>Set Voltage And Current.

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: :OUTPut ON on the B2901B and :OUTPut:STATe ON on the NGU201. 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_B2901B_ADDRESS")  # Keysight B2901B
b = rm.open_resource("PASTE_NGU201_ADDRESS")  # Rohde & Schwarz NGU201
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(":OUTPut ON")  # Turn On
b.write(":OUTPut:STATe ON")  # Turn 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 Keysight B2901B or Rohde & Schwarz NGU201 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Keysight B2901B and the Rohde & Schwarz NGU201 for remote control?

In TestFlow's library the B2901B has 61 SCPI commands and the NGU201 has 58 SCPI commands. 8 command headers are common to both, 49 are only on the B2901B (mostly SOURce and SENSe), and 46 are only on the NGU201 (mostly SOURce and OUTPut).

Can I use the same SCPI code for the Keysight B2901B and the Rohde & Schwarz NGU201?

Partly. 8 command headers are accepted by both, including :OUTPut:STATe?, :MEASure:VOLTage?, and :MEASure:CURRent?. 95 are not, for example :SOURce:FUNCtion:SHAPe on the B2901B and :SOURce:VOLTage on the NGU201, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the B2901B or the NGU201?

The B2901B: 61 commands for the B2901B against 58 for the NGU201 in TestFlow's library. Of those, 15 on the B2901B and 17 on the NGU201 are queries that read a value or state, and the library splits them into 16 and 11 subsystems.

How do the B2901B and NGU201 signal operation complete and report errors?

Neither library has an operation-complete command such as *OPC?. Only the NGU201 library has an error-queue read (SYSTem:ERRor?); 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.