The Rigol DP821, DP832, and DP832A power supply is controlled remotely with SCPI commands. TestFlow's instrument library holds 49 commands for it, 10 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the DP821 on a real bench.
Commands
49
Queries
10
Subsystems
13
Models covered
3
Control the Rigol DP821 from Python
With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Rigol DP821's VISA address
# Paste the address of your Rigol DP821 (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000 # ms
print(inst.query("*IDN?")) # identify the instrument
inst.write(":OUTPut ON") # Turn On
print(inst.query(":MEASure:VOLTage?")) # Measure Voltage
inst.close()
Run a DP821 test without writing code
Describe the test in a sentence, for example “turn on on the DP821, then measure voltage and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.
49 commands in 13 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The DP821, DP832, and DP832A share this command set in TestFlow's library.
Trigger (TRIGger) (14)
Command
What it does
Arguments
:TRIGger:IN:ENABle <State>
Trigger Input Enable. Enables trigger input
Text: ON,OFF
:TRIGger:IN:SOURce <Channel>
Trigger Input Source. Selects trigger source
Text: CH1,CH2
:TRIGger:IN:IMMEdiate
Trigger Immediate. Issues immediate trigger
None
:TRIGger:IN:TYPE <Type>
Set Trigger Input Type. Sets trigger condition type
Text: RISE,FALL,HIGH,LOW
:TRIGger:IN:VOLTage <Channel>,<Voltage>
Set Trigger Input Voltage. Sets trigger voltage threshold
Text: CH1,CH2; Number
:TRIGger:IN:CURRent <Channel>,<Current>
Set Trigger Input Current. Sets trigger current threshold
Text: CH1,CH2; Number
:TRIGger:IN:SENSitivity <Sensitivity>
Set Trigger Input Sensitivity. Sets trigger input sensitivity
Text: LOW,MID,HIGH
:TRIGger:DELay <Time>
Set Trigger Delay. Sets trigger delay time
Number
:TRIGger:DELay?
Read Trigger Delay. Reads trigger delay time
None
:TRIGger:OUT:ENABle <State>
Enable Trigger Output. Enables trigger output
Text: ON,OFF
:TRIGger:OUT:SOURce <Channel>
Set Trigger Output Source. Sets trigger output source
Text: CH1,CH2
:TRIGger:OUT:POLArity <Polarity>
Set Trigger Output Polarity. Sets trigger output polarity
Text: POSItive,NEGAtive
:TRIGger:OUT:PERIod <Time>
Set Trigger Output Period. Sets trigger output signal period
Number
:TRIGger:OUT:DUTY <Percent>
Set Trigger Output Duty. Sets trigger output duty cycle
Number
Output (OUTPut) (10)
Command
What it does
Arguments
:OUTPut ON
Turn On. Turns output ON
None
:OUTPut OFF
Turn Off. Turns output OFF
None
:OUTPut?
Read Output State. Reads output ON/OFF state
None
:OUTPut:OVP:VALue <Voltage>
Set OVP Level. Sets over-voltage protection level
Number
:OUTPut:OVP:STATe <State>
Enable OVP. Enables/disables OVP
Text: ON,OFF
:OUTPut:OVP:CLEAR
Clear OVP. Clears OVP fault
None
:OUTPut:OCP:VALue <Current>
Set OCP Level. Sets over-current protection level
Number
:OUTPut:OCP:STATe <State>
Enable OCP. Enables/disables OCP
Text: ON,OFF
:OUTPut:OCP:CLEAR
Clear OCP. Clears OCP fault
None
:OUTPut:CVCC?
Read CVCC Mode. Reads CV or CC operating mode
None
Source (SOURce) (4)
Command
What it does
Arguments
:SOURce:VOLTage <Voltage>
Set Voltage. Sets output voltage
Number
:SOURce:CURRent <Current>
Set Current. Sets current limit
Number
:SOURce:VOLTage?
Read Voltage Set. Reads programmed voltage
None
:SOURce:CURRent?
Read Current Set. Reads programmed current limit
None
System (SYSTem) (4)
Command
What it does
Arguments
:SYSTem:ERRor?
Read Error. Reads system error queue
None
:SYSTem:BEEPer <State>
Beeper Control. Enables or disables system beeper
Text: ON,OFF
:SYSTem:LOCal
Go Local. Returns instrument to local control
None
:SYSTem:REMote
Go Remote. Forces remote control mode
None
Measurement (MEASure) (3)
Command
What it does
Arguments
:MEASure:VOLTage?
Measure Voltage. Measures actual output voltage
None
:MEASure:CURRent?
Measure Current. Measures actual output current
None
:MEASure:POWer?
Measure Power. Measures output power
None
TIME subsystem (3)
Command
What it does
Arguments
:TIMEr <State>
Enable Timer. Enables or disables timer function
Text: ON,OFF
:TIMEr:CYCLEs <Mode>,<Count>
Set Timer Cycles. Sets number of timer cycles
Text: N,I; Number: 1-99999
:TIMEr:ENDState <State>
Set Timer End State. Sets output state after timer completes
Text: OFF,LAST
DELAY subsystem (3)
Command
What it does
Arguments
:DELAY <State>
Enable Delay. Enables or disables delay function
Text: ON,OFF
:DELAY:ENDState <State>
Set Delay End State. Sets output state after delay completes
Text: ON,OFF
:DELAY:STOP <Condition>,<Value>
Stop Delay. Stops delay execution
Text: <V,>V,<C,>C,<P,>P; Number
Instrument (INSTrument) (1)
Command
What it does
Arguments
:INST:NSEL <Channel>
Select channel. Selects the channel (always use first)
Text: 1,2
Apply (APPLy) (1)
Command
What it does
Arguments
:APPLy <Voltage>,<Current>
Apply VI. Sets voltage and current in one command
Number; Number
Other subsystem (1)
Command
What it does
Arguments
<Output Variable>=<Equation>
Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)
Number; Text
WAIT subsystem (1)
Command
What it does
Arguments
wait(<ms>)
Wait. Waits for number of milliseconds
Number
SAVE subsystem (1)
Command
What it does
Arguments
save2var <Variable_name>
Save2Variable. Saves last mearurment to a variable
Text
IEEE 488.2 common commands (3)
Command
What it does
Arguments
*IDN?
Identify. Reads instrument identification string
None
*RST
Reset. Resets instrument to default state
None
*CLS
Clear Status. Clears status and error registers
None
Where these commands come from
This reference is generated from TestFlow's instrument library, which is drafted from Rigol's programming documentation for the DP821, DP832, and DP832A and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Rigol's programming manual: check it before you rely on an edge case. Last updated November 17, 2026.
Frequently asked questions
Does the Rigol DP821 support SCPI remote control?
Yes. The Rigol DP821 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 49 SCPI commands for it: 10 queries that read values or state, and 39 settings and actions.
How do I control the Rigol DP821 from Python?
Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :OUTPut ON and :MEASure:VOLTage?.
Which command reads a value from the Rigol DP821?
:MEASure:VOLTage? (measure voltage). Measures actual output voltage The full list of queries is in the command reference on this page, grouped by subsystem.
Can I automate the Rigol DP821 without writing code?
Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the Rigol DP821 through the TestFlow desktop app, and writes the report from the measured results.
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.