RigolDL30xx#

class RigolDL30xx(visa_resource: str | VisaConfig)[source]#

Bases: ELoadDriverBase

Rigol DL3000-series DC E-Load (DL3021/DL3021A/DL3031/DL3031A/DL3041).

Hardware-validated over USB against the DL3031A and DL3021 (firmware 00.01.05.00.01); others share the SCPI surface but have not been bench-tested. Battery, OCP, and OPP commands need firmware newer than 00.01.02.

Methods

close

Close the underlying transport.

get_current

Measure the current the load is sinking on channel (amperes).

get_voltage

Measure the voltage at channel's terminals (volts).

open

Open the underlying transport and put the load in remote mode.

output_enable

Enable or disable load draw on channel.

set_battery_params

Configure battery mode.

set_cc_params

Configure CC mode (except slew).

set_cp_params

Configure CP mode.

set_cr_params

Configure CR mode.

set_cv_params

Configure CV mode.

set_function_mode

Sets input regulation mode.

set_input_state

Set eload input to be on/off.

set_level

Set the operating level on channel in the units appropriate for mode.

set_list_params

Configure list mode.

set_list_step_params

Configure individual step within list mode.

set_mode

Set the operating mode on channel: CC, CV, CP, or CR.

set_ocp_params

Write provided parameters to configure OCP test.

set_opp_params

Write provided parameters to configure OPP test.

set_range

Set the operating range on channel from the expected maximum.

set_sense_state

Enable/disable sense function.

set_slewrate

POS/NEG slew rate directions only take effect in transient mode.

set_transient_curr_params

Configure transient operation in CC mode.

set_transient_trigger

Set trigger function to be on or off.

set_trigger_source

Select trigger source.

set_wave_params

Configure wave mode.

short_output

Apply or release the load's short on channel.

trigger

Initiate trigger when Bus is selected as trigger source.

open() → None[source]#

Open the underlying transport and put the load in remote mode.

close() → None[source]#

Close the underlying transport. Idempotent.

short_output(enable: bool, channel: int) → None[source]#

Apply or release the load’s short on channel. Takes effect immediately.

set_mode(
mode: LoadMode,
channel: int,
) → None[source]#

Set the operating mode on channel: CC, CV, CP, or CR.

Not every model supports every mode; drivers should raise NotImplementedError for unsupported combinations.

set_level(
mode: LoadMode,
value: float,
channel: int,
curr_limit: float | None,
) → None[source]#

Set the operating level on channel in the units appropriate for mode.

Parameters:
  • mode

    Active load mode — caller passes it explicitly so the driver doesn’t need to track state. Units: CC → amperes, CV → volts, CP → watts, CR → ohms.

  • value

    Operating level in mode’s units.

  • channel

    Target channel (1-indexed).

  • curr_limit

    Optional current limit; only meaningful in CV mode. Drivers may ignore it in other modes.

set_range(
mode: LoadMode,
value: float,
channel: int,
) → None[source]#

Set the operating range on channel from the expected maximum.

value is the maximum operating value in mode’s units (see set_level()). Drivers typically snap to the closest hardware range that covers value.

set_slewrate(
direction: SlewRateDirection,
rate: float,
channel: int,
) → None[source]#

POS/NEG slew rate directions only take effect in transient mode.

output_enable(enable: bool, channel: int) → None[source]#

Enable or disable load draw on channel.

get_current(channel: int) → float[source]#

Measure the current the load is sinking on channel (amperes).

get_voltage(channel: int) → float[source]#

Measure the voltage at channel’s terminals (volts).

trigger() → None[source]#

Initiate trigger when Bus is selected as trigger source.

Triggering enables input and transient mode.

set_trigger_source(
source: Literal['BUS', 'EXTernal', 'MANual'],
) → None[source]#

Select trigger source.

BUS: triggers when receiving remote :TRIGger command EXTernal: triggers when receiving low pulse over trigger terminal in rear panel I/O interface MANual (default): triggers when pressing TRAN key on front panel

set_input_state(
enable: Literal[0, 1, 'ON', 'OFF'],
) → None[source]#

Set eload input to be on/off.

set_function_mode(
mode: Literal['FIXed', 'LIST', 'WAVe', 'BATTery', 'OCP', 'OPP', 'FIX', 'WAV', 'BATT'],
) → None[source]#

Sets input regulation mode.

FIXed: controlled by FUNCtion command LIST: controlled by activated list command WAVe: controlled by waveform display command BATTery: controlled by battery discharge command OCP: controlled by OCP command OPP: controlled by OPP command

set_transient_trigger(
state: Literal[0, 1, 'ON', 'OFF'],
) → None[source]#

Set trigger function to be on or off.

set_cc_params(
*,
range: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_on: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Configure CC mode (except slew).

set_transient_curr_params(
*,
mode: Literal['CONT', 'CONTinuous', 'PULS', 'PULSe', 'TOGG', 'TOGGle'] | None = None,
a_level: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
b_level: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
a_width: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
b_width: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
freq: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
period: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
a_duty: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Configure transient operation in CC mode.

set_cv_params(
*,
range: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Configure CV mode.

set_cr_params(
*,
range: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Configure CR mode.

set_cp_params(
*,
v_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_limit: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Configure CP mode.

set_list_params(
*,
mode: LoadMode | None = None,
range: float | None = None,
count: int | Literal['MIN', 'MINimum', 'MAX', 'MAXimum'] | None = None,
step: int | Literal['MIN', 'MINimum', 'MAX', 'MAXimum'] | None = None,
end_state: Literal['LAST', 'OFF'] | None = None,
) → None[source]#

Configure list mode.

set_list_step_params(
*,
step_num: int,
level: float | None = None,
width: float | None = None,
slew: float | None = None,
) → None[source]#

Configure individual step within list mode.

set_battery_params(
*,
range: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
level: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_stop: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
c_stop: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
time_stop: float | None = None,
v_on: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_enab_stop: Literal[0, 1, 'ON', 'OFF'] | None = None,
c_enab_stop: Literal[0, 1, 'ON', 'OFF'] | None = None,
t_enab_stop: Literal[0, 1, 'ON', 'OFF'] | None = None,
) → None[source]#

Configure battery mode.

set_ocp_params(
*,
range: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_on: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_on_delay: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_set: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_step: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_delay_step: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_max: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
i_min: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_ocp: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
t_ocp: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Write provided parameters to configure OCP test.

set_opp_params(
*,
v_on: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_on_delay: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
p_set: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
p_step: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
p_delay_step: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
p_max: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
p_min: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
v_opp: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
t_opp: float | Literal['MIN', 'MINimum', 'MAX', 'MAXimum', 'DEF', 'DEFault'] | None = None,
) → None[source]#

Write provided parameters to configure OPP test.

set_wave_params(
*,
time: Literal['ADD', 'SUB'] | None = None,
t_step: Literal[1, 10] | None = None,
) → None[source]#

Configure wave mode.

set_sense_state(
enable: Literal[0, 1, 'ON', 'OFF'],
) → None[source]#

Enable/disable sense function.