Power Supply · SCPI command reference

Rigol DP821, DP832, and DP832A SCPI commands

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.

Get started

SCPI command reference

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)

CommandWhat it doesArguments
:TRIGger:IN:ENABle <State>Trigger Input Enable. Enables trigger inputText: ON,OFF
:TRIGger:IN:SOURce <Channel>Trigger Input Source. Selects trigger sourceText: CH1,CH2
:TRIGger:IN:IMMEdiateTrigger Immediate. Issues immediate triggerNone
:TRIGger:IN:TYPE <Type>Set Trigger Input Type. Sets trigger condition typeText: RISE,FALL,HIGH,LOW
:TRIGger:IN:VOLTage <Channel>,<Voltage>Set Trigger Input Voltage. Sets trigger voltage thresholdText: CH1,CH2; Number
:TRIGger:IN:CURRent <Channel>,<Current>Set Trigger Input Current. Sets trigger current thresholdText: CH1,CH2; Number
:TRIGger:IN:SENSitivity <Sensitivity>Set Trigger Input Sensitivity. Sets trigger input sensitivityText: LOW,MID,HIGH
:TRIGger:DELay <Time>Set Trigger Delay. Sets trigger delay timeNumber
:TRIGger:DELay?Read Trigger Delay. Reads trigger delay timeNone
:TRIGger:OUT:ENABle <State>Enable Trigger Output. Enables trigger outputText: ON,OFF
:TRIGger:OUT:SOURce <Channel>Set Trigger Output Source. Sets trigger output sourceText: CH1,CH2
:TRIGger:OUT:POLArity <Polarity>Set Trigger Output Polarity. Sets trigger output polarityText: POSItive,NEGAtive
:TRIGger:OUT:PERIod <Time>Set Trigger Output Period. Sets trigger output signal periodNumber
:TRIGger:OUT:DUTY <Percent>Set Trigger Output Duty. Sets trigger output duty cycleNumber

Output (OUTPut) (10)

CommandWhat it doesArguments
:OUTPut ONTurn On. Turns output ONNone
:OUTPut OFFTurn Off. Turns output OFFNone
:OUTPut?Read Output State. Reads output ON/OFF stateNone
:OUTPut:OVP:VALue <Voltage>Set OVP Level. Sets over-voltage protection levelNumber
:OUTPut:OVP:STATe <State>Enable OVP. Enables/disables OVPText: ON,OFF
:OUTPut:OVP:CLEARClear OVP. Clears OVP faultNone
:OUTPut:OCP:VALue <Current>Set OCP Level. Sets over-current protection levelNumber
:OUTPut:OCP:STATe <State>Enable OCP. Enables/disables OCPText: ON,OFF
:OUTPut:OCP:CLEARClear OCP. Clears OCP faultNone
:OUTPut:CVCC?Read CVCC Mode. Reads CV or CC operating modeNone

Source (SOURce) (4)

CommandWhat it doesArguments
:SOURce:VOLTage <Voltage>Set Voltage. Sets output voltageNumber
:SOURce:CURRent <Current>Set Current. Sets current limitNumber
:SOURce:VOLTage?Read Voltage Set. Reads programmed voltageNone
:SOURce:CURRent?Read Current Set. Reads programmed current limitNone

System (SYSTem) (4)

CommandWhat it doesArguments
:SYSTem:ERRor?Read Error. Reads system error queueNone
:SYSTem:BEEPer <State>Beeper Control. Enables or disables system beeperText: ON,OFF
:SYSTem:LOCalGo Local. Returns instrument to local controlNone
:SYSTem:REMoteGo Remote. Forces remote control modeNone

Measurement (MEASure) (3)

CommandWhat it doesArguments
:MEASure:VOLTage?Measure Voltage. Measures actual output voltageNone
:MEASure:CURRent?Measure Current. Measures actual output currentNone
:MEASure:POWer?Measure Power. Measures output powerNone

TIME subsystem (3)

CommandWhat it doesArguments
:TIMEr <State>Enable Timer. Enables or disables timer functionText: ON,OFF
:TIMEr:CYCLEs <Mode>,<Count>Set Timer Cycles. Sets number of timer cyclesText: N,I; Number: 1-99999
:TIMEr:ENDState <State>Set Timer End State. Sets output state after timer completesText: OFF,LAST

DELAY subsystem (3)

CommandWhat it doesArguments
:DELAY <State>Enable Delay. Enables or disables delay functionText: ON,OFF
:DELAY:ENDState <State>Set Delay End State. Sets output state after delay completesText: ON,OFF
:DELAY:STOP <Condition>,<Value>Stop Delay. Stops delay executionText: <V,>V,<C,>C,<P,>P; Number

Instrument (INSTrument) (1)

CommandWhat it doesArguments
:INST:NSEL <Channel>Select channel. Selects the channel (always use first)Text: 1,2

Apply (APPLy) (1)

CommandWhat it doesArguments
:APPLy <Voltage>,<Current>Apply VI. Sets voltage and current in one commandNumber; Number

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last mearurment to a variableText

IEEE 488.2 common commands (3)

CommandWhat it doesArguments
*IDN?Identify. Reads instrument identification stringNone
*RSTReset. Resets instrument to default stateNone
*CLSClear Status. Clears status and error registersNone

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.