In TestFlow's instrument library, the Keithley 2400 takes 54 SCPI commands, 12 of them queries, and the Rohde & Schwarz NGU201 takes 58 SCPI commands, 17 of them queries. That is 4 more on the NGU201. Counting distinct command headers (the command path without its arguments), 12 are accepted by both, 30 exist only on the 2400, and 42 only on the NGU201. 29% of the 2400's command headers also exist on the NGU201.
Both libraries have commands under SOURce, SENSe, SYSTem, MEASure, OUTPut, and TRIGger. Only the 2400 has READ, FETCh, INITiate, and ABORt. Only the NGU201 has APPLy.
Only the 2400 library has an operation-complete command (*OPC?); the NGU201 library has none. 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.
Describe the test; TestFlow's agent uses these command sets to drive your Keithley 2400 or Rohde & Schwarz NGU201 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 | Rohde & Schwarz NGU201 | |
|---|---|---|
| Commands in TestFlow's library | 54 | 58 |
| Queries (read a value or state) | 12 | 17 |
| Settings and actions | 42 | 41 |
| Subsystems | 14 | 11 |
| Distinct command headers | 42 | 54 |
| Headers the other lacks | 30 | 42 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | 2400, 2401, 2410, 2420, 2425, 2430, 2440 | NGU201 |
12 command headers are in both libraries. Where the NGU201 library writes the command differently, its form is shown under the 2400's.
| Command | What it does |
|---|---|
| :SENSe:VOLTage:RANGe <Range> | Set Voltage Sense Range. Sets the voltage measurement range in volts. |
| :SYSTem:ERRor? | Read Error. Reads the first message from the error queue. |
| :MEASure:VOLTage? | Measure Voltage. Triggers and returns the measured voltage in volts. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| :SENSe:CURRent:RANGe <Range> | Set Current Sense Range. Sets the current measurement range in amps. |
| :MEASure:CURRent? | Measure Current. Triggers and returns the measured current in amps. |
| *RST | Reset. Resets the instrument to its default state. |
| :SENSe:VOLTage:RANGe:AUTO ONNGU201: :SENSe:VOLTage:RANGe:AUTO <State> | Voltage Sense Autorange On. Enables voltage measurement autorange. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. |
| *TRG | Trigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state. |
30 command headers in the 2400 library have no match in the NGU201 library. Below are 16 of them from the 6 largest subsystems; the full list is in the Keithley 2400 command reference.
| Command | What it does |
|---|---|
| :SOURce:FUNCtion <Function> | Set Source Function. Sets the source function to voltage or current mode. |
| :SOURce:FUNCtion? | Read Source Function. Reads the present source function. |
| :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. |
| Command | What it does |
|---|---|
| :SENSe:FUNCtion "VOLTage" | Set Sense Function Voltage. Selects voltage as the measurement (sense) function. |
| :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. |
| :SENSe:CURRent:NPLCycles <Cycles> | Set NPLC. Sets the integration time in power line cycles for current measurement. |
| Command | What it does |
|---|---|
| :MEASure? | Measure All. Triggers and returns the measured voltage, current, resistance and timestamp. |
| :MEASure:RESistance? | Measure Resistance. Triggers and returns the measured resistance in ohms. |
| Command | What it does |
|---|---|
| :OUTPut ON | Turn On. Enables the source output. |
| :OUTPut? | Read Output State. Reads whether the output is ON or OFF. |
| 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. |
42 command headers in the NGU201 library have no match in the 2400 library. Below are 17 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz NGU201 command reference.
| Command | What 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. |
| Command | What it does |
|---|---|
| :OUTPut:STATe ON | Turn On. Enables the SMU channel output. |
| :OUTPut:STATe? | Read Output State. Queries if the channel output is ON or OFF. |
| :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. |
| Command | What it does |
|---|---|
| *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. |
| *SRE <Value> | Set Service Request Enable. Sets the service request enable register to control which status bits generate a SRQ. |
| Command | What it does |
|---|---|
| :SENSe:CURRent:RANGe:AUTO <State> | Set Current Range Auto. Enables or disables automatic current measurement range selection. |
| :SENSe:NPLCycles <Cycles> | Set PLC. Sets the number of power line cycles (NPLC) used for measurement integration time. |
| :SENSe:NPLCycles? | Read PLC. Queries the currently configured number of power line cycles for measurement. |
| Command | What it does |
|---|---|
| :APPLy <Voltage>, <Current> | Set Voltage And Current. |
| Command | What it does |
|---|---|
| :MEASure:POWer? | Measure Power. Measures and returns the actual output power in watts. |
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:VOLTage:RANGe:AUTO (voltage sense autorange 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_NGU201_ADDRESS") # Rohde & Schwarz NGU201
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Voltage Sense Autorange On
a.write(":SENSe:VOLTage:RANGe:AUTO ON")
b.write(":SENSe:VOLTage:RANGe:AUTO 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 Rohde & Schwarz NGU201 and writes the report from the measured results.
In TestFlow's library the 2400 has 54 SCPI commands and the NGU201 has 58 SCPI commands. 12 command headers are common to both, 30 are only on the 2400 (mostly SOURce and SENSe), and 42 are only on the NGU201 (mostly SOURce and OUTPut).
Partly. 12 command headers are accepted by both, including :SENSe:VOLTage:RANGe, :SYSTem:ERRor?, and :MEASure:VOLTage?. 72 are not, for example :SOURce:FUNCtion on the 2400 and :SOURce:VOLTage on the NGU201, so a script that uses those needs a separate branch for each instrument.
The NGU201: 54 commands for the 2400 against 58 for the NGU201 in TestFlow's library. Of those, 12 on the 2400 and 17 on the NGU201 are queries that read a value or state, and the library splits them into 14 and 11 subsystems.
Only the 2400 library has an operation-complete command (*OPC?); the NGU201 library has none. 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.