In TestFlow's instrument library, the Keysight E36311A takes 26 SCPI commands, 9 of them queries, and the Rigol DP821 takes 49 SCPI commands, 10 of them queries. That is 23 more on the DP821. Counting distinct command headers (the command path without its arguments), 12 are accepted by both, 6 exist only on the E36311A, and 33 only on the DP821. 67% of the E36311A's command headers also exist on the DP821.
Both libraries have commands under OUTPut, SOURce, MEASure, and SYSTem. Only the DP821 has TRIGger, TIMEr, DELAY, INST, and APPLy.
Only the E36311A library has an operation-complete command (*OPC?); the DP821 library has none. Both libraries read errors with SYSTem:ERRor?.
TestFlow's library gives the E36312A the same command set as the E36311A, so the E36311A column applies to it too. TestFlow's library gives the DP832 and DP832A the same command set as the DP821, so the DP821 column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight E36311A or Rigol DP821 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 E36311A | Rigol DP821 | |
|---|---|---|
| Commands in TestFlow's library | 26 | 49 |
| Queries (read a value or state) | 9 | 10 |
| Settings and actions | 17 | 39 |
| Subsystems | 8 | 13 |
| Distinct command headers | 18 | 45 |
| Headers the other lacks | 6 | 33 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | E36311A, E36312A | DP821, DP832, DP832A |
12 command headers are in both libraries. Where the DP821 library writes the command differently, its form is shown under the E36311A's.
| Command | What it does |
|---|---|
| OUTPut ON,(@1)DP821: :OUTPut ON | Turn On CH1. Enables the output of channel 1. |
| SOURce:VOLTage <Volt>,(@<Channel>)DP821: :SOURce:VOLTage <Voltage> | Set Voltage. Sets the output voltage of the selected channel in volts. |
| MEASure:VOLTage? (@<Channel>)DP821: :MEASure:VOLTage? | Measure Voltage. Measures the output voltage of the selected channel in volts. |
| SYSTem:ERRor? | Read Error. Reads the first message from the error queue. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| OUTPut? (@<Channel>)DP821: :OUTPut? | Read Output State. Reads whether the selected channel output is ON or OFF. |
| SOURce:VOLTage? (@<Channel>)DP821: :SOURce:VOLTage? | Read Voltage Setting. Reads the set output voltage of the selected channel. |
| MEASure:CURRent? (@<Channel>)DP821: :MEASure:CURRent? | Measure Current. Measures the output current of the selected channel in amps. |
| *RST | Reset. Resets the instrument to its default state. |
| SOURce:CURRent <Amp>,(@<Channel>)DP821: :SOURce:CURRent <Current> | Set Current. Sets the output current limit of the selected channel in amps. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| SOURce:CURRent? (@<Channel>)DP821: :SOURce:CURRent? | Read Current Setting. Reads the set output current limit of the selected channel. |
6 command headers in the E36311A library have no match in the DP821 library. Below are 5 of them from the 2 largest subsystems; the full list is in the Keysight E36311A command reference.
| Command | What it does |
|---|---|
| *SAV <Slot> | Save State. Saves the current instrument state to the specified storage slot. |
| *RCL <Slot> | Recall State. Recalls an instrument state from the specified storage slot. |
| *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. |
| Command | What it does |
|---|---|
| SOURce:VOLTage:PROTection:LEVel <Volt>,(@<Channel>) | Set OVP. Sets the over-voltage protection level of the selected channel. |
33 command headers in the DP821 library have no match in the E36311A library. Below are 18 of them from the 6 largest subsystems; the full list is in the Rigol DP821 command reference.
| Command | What it does |
|---|---|
| :TRIGger:IN:ENABle <State> | Trigger Input Enable. Enables trigger input |
| :TRIGger:IN:SOURce <Channel> | Trigger Input Source. Selects trigger source |
| :TRIGger:IN:IMMEdiate | Trigger Immediate. Issues immediate trigger |
| :TRIGger:IN:TYPE <Type> | Set Trigger Input Type. Sets trigger condition type |
| Command | What it does |
|---|---|
| :OUTPut:OVP:VALue <Voltage> | Set OVP Level. Sets over-voltage protection level |
| :OUTPut:OVP:STATe <State> | Enable OVP. Enables/disables OVP |
| :OUTPut:OVP:CLEAR | Clear OVP. Clears OVP fault |
| :OUTPut:OCP:VALue <Current> | Set OCP Level. Sets over-current protection level |
| Command | What it does |
|---|---|
| :DELAY <State> | Enable Delay. Enables or disables delay function |
| :DELAY:ENDState <State> | Set Delay End State. Sets output state after delay completes |
| :DELAY:STOP <Condition>,<Value> | Stop Delay. Stops delay execution |
| Command | What it does |
|---|---|
| :SYSTem:BEEPer <State> | Beeper Control. Enables or disables system beeper |
| :SYSTem:LOCal | Go Local. Returns instrument to local control |
| :SYSTem:REMote | Go Remote. Forces remote control mode |
| Command | What it does |
|---|---|
| :TIMEr <State> | Enable Timer. Enables or disables timer function |
| :TIMEr:CYCLEs <Mode>,<Count> | Set Timer Cycles. Sets number of timer cycles |
| :TIMEr:ENDState <State> | Set Timer End State. Sets output state after timer completes |
| Command | What it does |
|---|---|
| :APPLy <Voltage>,<Current> | Apply VI. Sets voltage and current in one command |
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 OUTPut (turn on ch1); the DP821 library writes it as :OUTPut ON. For the reading, both libraries hold MEASure:VOLTage? (measure voltage); the DP821 library writes it as :MEASure:VOLTage?. 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_E36311A_ADDRESS") # Keysight E36311A
b = rm.open_resource("PASTE_DP821_ADDRESS") # Rigol DP821
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Turn On CH1
a.write("OUTPut ON,(@1)")
b.write(":OUTPut ON")
# The same reading on both: Measure Voltage
print(a.query("MEASure:VOLTage? (@1)"))
print(b.query(":MEASure:VOLTage?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Keysight E36311A or Rigol DP821 and writes the report from the measured results.
In TestFlow's library the E36311A has 26 SCPI commands and the DP821 has 49 SCPI commands. 12 command headers are common to both, 6 are only on the E36311A (mostly IEEE 488.2 common (*) and SOURce), and 33 are only on the DP821 (mostly TRIGger and OUTPut).
Partly. 12 command headers are accepted by both, including OUTPut, SOURce:VOLTage, and MEASure:VOLTage?. 39 are not, for example *SAV on the E36311A and :TRIGger:IN:ENABle on the DP821, so a script that uses those needs a separate branch for each instrument.
The DP821: 26 commands for the E36311A against 49 for the DP821 in TestFlow's library. Of those, 9 on the E36311A and 10 on the DP821 are queries that read a value or state, and the library splits them into 8 and 13 subsystems.
Only the E36311A library has an operation-complete command (*OPC?); the DP821 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.