# RigolDP800

Control the Rigol DP800 power supply from Python through [`InstroPSU`](https://dev.nominal.io/instro/psu.md).

![Rigol DP800](https://dev.nominal.io/instro/_images/RigolDP800.png)

The [`RigolDP800`](https://dev.nominal.io/instro/ref/instruments/instro.psu.drivers.rigol_dp800.RigolDP800.md#instro.psu.drivers.rigol_dp800.RigolDP800 "instro.psu.drivers.rigol_dp800.RigolDP800") provides a driver that can be used to instantiate an [InstroPSU](https://dev.nominal.io/instro/psu.md).

## Creating an [`InstroPSU`](https://dev.nominal.io/instro/psu.md) with [`RigolDP800`](https://dev.nominal.io/instro/ref/instruments/instro.psu.drivers.rigol_dp800.RigolDP800.md#instro.psu.drivers.rigol_dp800.RigolDP800 "instro.psu.drivers.rigol_dp800.RigolDP800")

```python
from instro.psu.drivers import RigolDP800
from instro.psu import InstroPSU

psu = InstroPSU(
    name="myPSU",
    driver=RigolDP800(visa_resource="USB0::..."),
    num_channels=3,  # DP811 has 1, DP821 has 2, DP831/DP832 have 3
)
```

## Operating mode

`get_operating_mode` reads the channel’s questionable-status condition register (`:STAT:QUES:INST:ISUM<n>:COND?`) in a single query. Its low two bits give `OperatingMode.OFF`, `OperatingMode.CONSTANT_CURRENT`, `OperatingMode.CONSTANT_VOLTAGE`, or `OperatingMode.UNREGULATED` (the DP800’s critical state between CV and CC). The `:OUTP:MODE?` query is not used because it still answers `CV` for a disabled channel.

Parameters and methods specific to [`RigolDP800`](https://dev.nominal.io/instro/ref/instruments/instro.psu.drivers.rigol_dp800.RigolDP800.md#instro.psu.drivers.rigol_dp800.RigolDP800 "instro.psu.drivers.rigol_dp800.RigolDP800") can be found in the [Reference](https://dev.nominal.io/instro/ref.md).
