In TestFlow's instrument library, the Keysight E36231A takes 24 SCPI commands, 3 of them queries, and the Rohde & Schwarz NGL202 takes 24 SCPI commands, 9 of them queries. The two libraries are the same size, but they do not hold the same commands. Counting distinct command headers (the command path without its arguments), 3 are accepted by both, 18 exist only on the E36231A, and 14 only on the NGL202. 14% of the E36231A's command headers also exist on the NGL202.
Both libraries have commands under OUTPut, SOURce, MEASure, and SYSTem. Only the E36231A has DISPlay and SENSe.
Only the NGL202 library has an operation-complete command (*OPC?); the E36231A library has none. Only the NGL202 library has an error-queue read (SYSTem:ERRor?); the E36231A library has none.
TestFlow's library gives the NGM202 the same command set as the NGL202, so the NGL202 column applies to it too.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight E36231A or Rohde & Schwarz NGL202 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.
| Keysight E36231A | Rohde & Schwarz NGL202 | |
|---|---|---|
| Commands in TestFlow's library | 24 | 24 |
| Queries (read a value or state) | 3 | 9 |
| Settings and actions | 21 | 15 |
| Subsystems | 8 | 8 |
| Distinct command headers | 21 | 17 |
| Headers the other lacks | 18 | 14 |
| Command language | SCPI | SCPI |
| Operation complete | Not in library | *OPC? |
| Error queue | Not in library | SYSTem:ERRor? |
| Models on this command set | E36231A | NGL202, NGM202 |
3 command headers are in both libraries. Where the NGL202 library writes the command differently, its form is shown under the E36231A's.
| Command | What it does |
|---|---|
| MEASure:CURRent?NGL202: MEASure:CURRent? (@<Channel>) | Measure current. |
| *CLS | CLS. |
| *RST | RST. |
18 command headers in the E36231A library have no match in the NGL202 library. Below are 15 of them from the 6 largest subsystems; the full list is in the Keysight E36231A command reference.
| Command | What it does |
|---|---|
| OUTPut:STATe ON | Turn On. |
| OUTPut:STATe? | Status. |
| OUTPut:STATe:DELay:FALL <delay> | State fall delay. |
| OUTPut:STATe:DELay:RISE <delay> | State rise delay. |
| Command | What it does |
|---|---|
| SOURce:CURRent:LEVel:IMMediate:AMPLitude <current> | Set Current. |
| SOURce:VOLTage:LEVel:IMMediate:AMPLitude <voltage> | Set voltage. |
| SOURce:CURRent:TRIGgered <current> | Current trigger. |
| SOURce:CURRent:LEVel:IMMediate:STEP:INCRement <current> | Current step. |
| Command | What it does |
|---|---|
| DISPlay:TEXT:DATA "<Message>" | Display text. |
| DISPlay:WINDow:TEXT:DATA "" | Display clear. |
| DISPlay:WINDow:STATe ON | Display ON. |
| Command | What it does |
|---|---|
| SENSe:DLOG:FUNCtion:CURRent <ON | OFF> | Sense current. |
| SENSe:DLOG:FUNCtion:VOLTage <ON | OFF> | Sense volt. |
| Command | What it does |
|---|---|
| MEASure:VOLTage:DC? | Measure voltage. |
| Command | What it does |
|---|---|
| SYSTem:BEEPer:STATe <ON | OFF> | Beep. |
14 command headers in the NGL202 library have no match in the E36231A library. Below are 12 of them from the 5 largest subsystems; the full list is in the Rohde & Schwarz NGL202 command reference.
| Command | What it does |
|---|---|
| SOURce:VOLTage <Volt>,(@<Channel>) | Set Voltage. Sets the output voltage of the selected channel in volts. |
| SOURce:VOLTage? (@<Channel>) | Read Voltage Setting. Reads the set output voltage of the selected channel. |
| SOURce:CURRent <Amp>,(@<Channel>) | Set Current. Sets the output current limit of the selected channel in amps. |
| SOURce:CURRent? (@<Channel>) | Read Current Setting. Reads the set output current limit of the selected channel. |
| Command | What it does |
|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. |
| Command | What it does |
|---|---|
| OUTPut ON,(@1) | Turn On CH1. Enables the output of channel 1. |
| OUTPut? (@<Channel>) | Read Output State. Reads whether the selected channel output is ON or OFF. |
| Command | What it does |
|---|---|
| MEASure:VOLTage? (@<Channel>) | Measure Voltage. Measures the output voltage of the selected channel in volts. |
| Command | What it does |
|---|---|
| SYSTem:ERRor? | Read Error. Reads the first message from the error queue. |
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:STATe ON on the E36231A and OUTPut ON,(@1) on the NGL202. For the reading, both libraries hold MEASure:CURRent? (measure current); the NGL202 library writes it as MEASure:CURRent? (@1). 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_E36231A_ADDRESS") # Keysight E36231A
b = rm.open_resource("PASTE_NGL202_ADDRESS") # Rohde & Schwarz NGL202
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:STATe ON") # Turn On
b.write("OUTPut ON,(@1)") # Turn On CH1
# The same reading on both: Measure current
print(a.query("MEASure:CURRent?"))
print(b.query("MEASure:CURRent? (@1)"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Keysight E36231A or Rohde & Schwarz NGL202 and writes the report from the measured results.
In TestFlow's library the E36231A has 24 SCPI commands and the NGL202 has 24 SCPI commands. 3 command headers are common to both, 18 are only on the E36231A (mostly OUTPut and SOURce), and 14 are only on the NGL202 (mostly SOURce and IEEE 488.2 common (*)).
Partly. 3 command headers are accepted by both, including MEASure:CURRent?. 32 are not, for example OUTPut:STATe on the E36231A and SOURce:VOLTage on the NGL202, so a script that uses those needs a separate branch for each instrument.
Neither: both have 24 commands in TestFlow's library. Of those, 3 on the E36231A and 9 on the NGL202 are queries that read a value or state, and the library splits them into 8 and 8 subsystems.
Only the NGL202 library has an operation-complete command (*OPC?); the E36231A library has none. Only the NGL202 library has an error-queue read (SYSTem:ERRor?); the E36231A library has none. 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.