Rigol Drivers

Classes:

RigolDG1062(name, address, **kwargs)

Instrument driver for the Rigol DG1062

RigolDG1062Burst(parent, name, channel, **kwargs)

Burst commands for the DG1062.

RigolDG1062Channel(parent, name, channel, ...)

param parent:

The instrument this channel belongs to

RigolDG4000(name, address[, reset])

Driver for the Rigol DG4000 series arbitrary waveform generator.

RigolDP8xxBase(name, address, ...)

This is the general DP8xx Power Supply driver class that implements shared parameters and functionality among all similar power supply from Rigol.

RigolDP821(name, address, **kwargs)

This is the qcodes driver for the Rigol DP821(A) Power Supply

RigolDP831(name, address, **kwargs)

This is the qcodes driver for the Rigol DP831(A) Power Supply

RigolDP832(name, address, **kwargs)

This is the qcodes driver for the Rigol DP832(A) Power Supply

RigolDS1074Z(name, address, **kwargs)

The QCoDeS drivers for Oscilloscope Rigol DS1074Z.

RigolDS1074ZChannel(parent, name, channel, ...)

Contains methods and attributes specific to the Rigol oscilloscope channels.

RigolDS4000(name, address, **kwargs)

This is the QCoDeS driver for the Rigol DS4000 series oscilloscopes.

RigolDS4000Channel(parent, name, channel, ...)

class qcodes.instrument_drivers.rigol.RigolDG1062(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Instrument driver for the Rigol DG1062

Attributes:

waveforms

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
waveforms = ('HARM', 'NOIS', 'RAMP', 'SIN', 'SQU', 'TRI', 'USER', 'PULS', 'DC', 'ARB')
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

class qcodes.instrument_drivers.rigol.RigolDG1062Burst(parent: RigolDG1062, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Burst commands for the DG1062. We make a separate channel for these to group burst commands together.

Attributes:

on

Parameter on

polarity

Parameter polarity

period

Parameter period

mode

Parameter mode

ncycles

Parameter ncycles

phase

Parameter phase

time_delay

Parameter time_delay

trigger_slope

Parameter trigger_slope

source

Parameter source

idle

Parameter idle

Methods:

trigger()

Send a software trigger to the instrument.

on: Parameter = self.add_parameter( "on", get_cmd=f":SOUR{channel}:BURS?", set_cmd=f":SOUR{channel}:BURS {{}}", vals=vals.Enum(0, 1, "ON", "OFF"), )

Parameter on

polarity: Parameter = self.add_parameter( "polarity", get_cmd=f":SOUR{channel}:BURS:GATE:POL?", set_cmd=f":SOUR{channel}:BURS:GATE:POL {{}}", vals=vals.Enum("NORM", "INV"), )

Parameter polarity

period: Parameter = self.add_parameter( "period", get_cmd=f":SOUR{channel}:BURS:INT:PER?", set_cmd=f":SOUR{channel}:BURS:INT:PER {{}}", vals=vals.MultiType( vals.Numbers(min_value=3e-6, max_value=500), vals.Enum("MIN", "MAX") ), )

Parameter period

mode: Parameter = self.add_parameter( "mode", get_cmd=f":SOUR{channel}:BURS:MODE?", set_cmd=f":SOUR{channel}:BURS:MODE {{}}", vals=vals.Enum("TRIG", "INF", "GAT"), )

Parameter mode

ncycles: Parameter = self.add_parameter( "ncycles", get_cmd=f":SOUR{channel}:BURS:NCYC?", set_cmd=f":SOUR{channel}:BURS:NCYC {{}}", vals=vals.Numbers(min_value=1, max_value=500000), )

Parameter ncycles

phase: Parameter = self.add_parameter( "phase", get_cmd=f":SOUR{channel}:BURS:PHAS?", set_cmd=f":SOUR{channel}:BURS:PHAS {{}}", vals=vals.Numbers(min_value=0, max_value=360), )

Parameter phase

time_delay: Parameter = self.add_parameter( "time_delay", get_cmd=f":SOUR{channel}:BURS:TDEL?", set_cmd=f":SOUR{channel}:BURS:TDEL {{}}", vals=vals.Numbers(min_value=0), )

Parameter time_delay

trigger_slope: Parameter = self.add_parameter( "trigger_slope", get_cmd=f":SOUR{channel}:BURS:TRIG:SLOP?", set_cmd=f":SOUR{channel}:BURS:TRIG:SLOP {{}}", vals=vals.Enum("POS", "NEG"), )

Parameter trigger_slope

source: Parameter = self.add_parameter( "source", get_cmd=f":SOUR{channel}:BURS:TRIG:SOUR?", set_cmd=f":SOUR{channel}:BURS:TRIG:SOUR {{}}", vals=vals.Enum("INT", "EXT", "MAN"), )

Parameter source

idle: Parameter = self.add_parameter( "idle", get_cmd=f":SOUR{channel}:BURST:IDLE?", set_cmd=f":SOUR{channel}:BURST:IDLE {{}}", vals=vals.MultiType( vals.Enum("FPT", "TOP", "BOTTOM", "CENTER"), vals.Numbers() # DIY ), )

Parameter idle

trigger() None[source]

Send a software trigger to the instrument. This only works if the trigger source is set to manual.

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.rigol.RigolDG1062Channel(parent: RigolDG1062, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Parameters:
  • parent – The instrument this channel belongs to

  • name – Name of the channel.

  • channel – Number of the channel.

  • **kwargs – Forwarded to base class.

Attributes:

min_impedance

max_impedance

waveform_params

waveform_translate

waveforms

waveform

Parameter waveform

impedance

Parameter impedance

sync

Parameter sync

polarity

Parameter polarity

state

Parameter state

duty_cycle

This functions reads/sets the duty cycle for a square and pulse wave since these inherit a duty cycle.

Methods:

apply(**kwargs)

Public interface to apply a waveform on the channel Example: >>> gd = RigolDG1062("gd", "TCPIP0::169.254.187.99::inst0::INSTR") >>> gd.channels[0].apply(waveform="SIN", freq=1E3, ampl=1.0, offset=0, phase=0) Valid waveforms are: HARM, NOIS, RAMP, SIN, SQU, TRI, USER, DC, ARB To find the correct arguments of each waveform we can e.g. do: >>> help(gd.channels[0].sin) Notice the lower case when accessing the waveform through convenience functions.

current_waveform()

Public interface to get the current waveform

min_impedance = 1
max_impedance = 10000
waveform_params: ClassVar[dict[str, tuple[str, ...]]] = {'ARB': ('sample_rate', 'ampl', 'offset'), 'DC': ('freq', 'ampl', 'offset'), 'HARM': ('freq', 'ampl', 'offset', 'phase'), 'NOIS': ('freq', 'ampl', 'offset', 'phase'), 'PULS': ('freq', 'ampl', 'offset', 'phase'), 'RAMP': ('freq', 'ampl', 'offset', 'phase'), 'SIN': ('freq', 'ampl', 'offset', 'phase'), 'SQU': ('freq', 'ampl', 'offset', 'phase'), 'TRI': ('freq', 'ampl', 'offset', 'phase'), 'USER': ('freq', 'ampl', 'offset', 'phase')}
waveform_translate: ClassVar[dict[str, str]] = {'HARM': 'HARM', 'NOISE': 'NOIS', 'PULSE': 'PULS', 'RAMP': 'RAMP', 'SIN': 'SIN', 'SQU': 'SQU', 'TRI': 'TRI', 'USER': 'USER'}
waveforms: ClassVar[tuple[str, ...]] = ('HARM', 'NOIS', 'RAMP', 'SIN', 'SQU', 'TRI', 'USER', 'PULS', 'DC', 'ARB')
waveform: Parameter = self.add_parameter( "waveform", get_cmd=partial(self._get_waveform_param, "waveform") )

Parameter waveform

impedance: Parameter = self.add_parameter( "impedance", get_cmd=f":OUTPUT{channel}:IMP?", set_cmd=f":OUTPUT{channel}:IMP {{}}", unit="Ohm", vals=vals.MultiType( vals.Ints( min_value=RigolDG1062Channel.min_impedance, max_value=RigolDG1062Channel.max_impedance, ), vals.Enum("INF", "MIN", "MAX", "HighZ"), ), get_parser=( lambda value: "HighZ" if float(value) > RigolDG1062Channel.max_impedance else float(value) ), set_parser=lambda value: "INF" if value == "HighZ" else value, )

Parameter impedance

sync: Parameter = self.add_parameter( "sync", get_cmd=f":OUTPUT{channel}:SYNC?", set_cmd=f"OUTPUT{channel}:SYNC {{}}", vals=vals.Enum(0, 1, "ON", "OFF"), )

Parameter sync

polarity: Parameter = self.add_parameter( "polarity", get_cmd=f":OUTPUT{channel}:GAT:POL?", set_cmd=f":OUTPUT{channel}:GAT:POL {{}}", vals=vals.OnOff(), val_mapping={1: "POSITIVE", 0: "NEGATIVE"}, )

Parameter polarity

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
state: Parameter = self.add_parameter( "state", get_cmd=f"OUTPUT{channel}:STATE?", set_cmd=f"OUTPUT{channel}:STATE {{}}", )

Parameter state

duty_cycle: Parameter = self.add_parameter( "duty_cycle", get_cmd=self._get_duty_cycle, set_cmd=self._set_duty_cycle, unit="%", vals=vals.Numbers(min_value=1, max_value=99), docstring=( "This functions reads/sets the duty " "cycle for a square and pulse wave " "since these inherit a duty cycle.\n" "For other waveforms it will give " "the user an error" ), )

This functions reads/sets the duty cycle for a square and pulse wave since these inherit a duty cycle. For other waveforms it will give the user an error

apply(**kwargs: Any) None[source]

Public interface to apply a waveform on the channel Example: >>> gd = RigolDG1062(“gd”, “TCPIP0::169.254.187.99::inst0::INSTR”) >>> gd.channels[0].apply(waveform=”SIN”, freq=1E3, ampl=1.0, offset=0, phase=0) Valid waveforms are: HARM, NOIS, RAMP, SIN, SQU, TRI, USER, DC, ARB To find the correct arguments of each waveform we can e.g. do: >>> help(gd.channels[0].sin) Notice the lower case when accessing the waveform through convenience functions. If not kwargs are given a dictionary with the current waveform parameters are returned.

current_waveform() dict[Any, Any][source]

Public interface to get the current waveform

class qcodes.instrument_drivers.rigol.RigolDG4000(name: str, address: str, reset: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Driver for the Rigol DG4000 series arbitrary waveform generator.

This driver works for all four models (DG4202, DG4162, DG4102, DG4062).

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

counter_attenuation

Parameter counter_attenuation

counter_coupling

Parameter counter_coupling

counter_gate_time

Parameter counter_gate_time

counter_hf_reject_enabled

Parameter counter_hf_reject_enabled

counter_impedance

Parameter counter_impedance

counter_trigger_level

Parameter counter_trigger_level

counter_enabled

Parameter counter_enabled

counter_trigger_sensitivity

Parameter counter_trigger_sensitivity

beeper_enabled

Parameter beeper_enabled

keyboard_locked

Parameter keyboard_locked

startup_mode

Parameter startup_mode

reference_clock_source

Parameter reference_clock_source

scpi_version

Parameter scpi_version

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

counter_attenuation: Parameter = self.add_parameter( "counter_attenuation", get_cmd="COUN:ATT?", set_cmd="COUN:ATT {}", val_mapping={1: "1X", 10: "10X"}, )

Parameter counter_attenuation

counter_coupling: Parameter = self.add_parameter( "counter_coupling", get_cmd="COUN:COUP?", set_cmd="COUN:COUP {}", vals=Enum("AC", "DC"), )

Parameter counter_coupling

counter_gate_time: Parameter = self.add_parameter( "counter_gate_time", get_cmd="COUN:GATE?", set_cmd="COUN:GATE {}", unit="s", val_mapping={ "auto": "AUTO", 0.001: "USER1", 0.01: "USER2", 0.1: "USER3", 1: "USER4", 10: "USER5", ">10": "USER6", }, )

Parameter counter_gate_time

counter_hf_reject_enabled: Parameter = self.add_parameter( "counter_hf_reject_enabled", get_cmd="COUN:HF?", set_cmd="COUN:HF {}", val_mapping=on_off_map, )

Parameter counter_hf_reject_enabled

counter_impedance: Parameter = self.add_parameter( "counter_impedance", get_cmd="COUN:IMP?", set_cmd="COUN:IMP {}", unit="Ohm", val_mapping={50: "50", 1e6: "1M"}, )

Parameter counter_impedance

counter_trigger_level: Parameter = self.add_parameter( "counter_trigger_level", get_cmd="COUN:LEVE?", get_parser=float, set_cmd="COUN:LEVE {}", unit="V", vals=Numbers(min_value=-2.5, max_value=2.5), )

Parameter counter_trigger_level

counter_enabled: Parameter = self.add_parameter( "counter_enabled", get_cmd="COUN:STAT?", set_cmd="COUN:STAT {}", val_mapping=on_off_map, )

Parameter counter_enabled

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
counter_trigger_sensitivity: Parameter = self.add_parameter( "counter_trigger_sensitivity", get_cmd="COUN:SENS?", get_parser=float, set_cmd="COUN:SENS {}", unit="%", vals=Numbers(min_value=0, max_value=100), )

Parameter counter_trigger_sensitivity

beeper_enabled: Parameter = self.add_parameter( "beeper_enabled", get_cmd="SYST:BEEP:STAT?", set_cmd="SYST:BEEP:STAT {}", val_mapping=on_off_map, )

Parameter beeper_enabled

keyboard_locked: Parameter = self.add_parameter( "keyboard_locked", get_cmd="SYST:KLOCK?", set_cmd="SYST:KLOCK {}", val_mapping=on_off_map, )

Parameter keyboard_locked

startup_mode: Parameter = self.add_parameter( "startup_mode", get_cmd="SYST:POWS?", get_parser=str.lower, set_cmd="SYST:POWS {}", vals=Enum("user", "auto"), )

Parameter startup_mode

reference_clock_source: Parameter = self.add_parameter( "reference_clock_source", get_cmd="SYST:ROSC:SOUR?", set_cmd="SYST:ROSC:SOUR {}", val_mapping={"internal": "INT", "external": "EXT"}, )

Parameter reference_clock_source

scpi_version: Parameter = self.add_parameter( "scpi_version", get_cmd="SYST:VERS?" )

Parameter scpi_version

class qcodes.instrument_drivers.rigol.RigolDP8xxBase(name: str, address: str, channels_ranges: Sequence[tuple[float, float]], ovp_ranges: tuple[Sequence[tuple[float, float]], Sequence[tuple[float, float]]], ocp_ranges: tuple[Sequence[tuple[float, float]], Sequence[tuple[float, float]]], **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the general DP8xx Power Supply driver class that implements shared parameters and functionality among all similar power supply from Rigol.

This driver was written to be inherited from by a specific driver (e.g. RigolDP832). This baseClass should not be instantiated directly.

Methods:

installed_options()

Return the installed options

installed_options() list[str][source]

Return the installed options

class qcodes.instrument_drivers.rigol.RigolDP821(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: RigolDP8xxBase

This is the qcodes driver for the Rigol DP821(A) Power Supply

class qcodes.instrument_drivers.rigol.RigolDP831(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: RigolDP8xxBase

This is the qcodes driver for the Rigol DP831(A) Power Supply

class qcodes.instrument_drivers.rigol.RigolDP832(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: RigolDP8xxBase

This is the qcodes driver for the Rigol DP832(A) Power Supply

class qcodes.instrument_drivers.rigol.RigolDS1074Z(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

The QCoDeS drivers for Oscilloscope Rigol DS1074Z.

Parameters:
  • name – name of the instrument.

  • address – VISA address of the instrument.

  • timeout – Seconds to allow for responses.

  • terminator – terminator for SCPI commands.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

default_timeout

The default timeout in seconds if the timeout is not specified when creating the instrument.

waveform_xorigin

Parameter waveform_xorigin

waveform_xincrem

Parameter waveform_xincrem

waveform_npoints

Parameter waveform_npoints

waveform_yorigin

Parameter waveform_yorigin

waveform_yincrem

Parameter waveform_yincrem

waveform_yref

Parameter waveform_yref

trigger_mode

Parameter trigger_mode

trigger_level

Parameter trigger_level

trigger_edge_source

Parameter trigger_edge_source

trigger_edge_slope

Parameter trigger_edge_slope

data_source

Parameter data_source

time_axis

Parameter time_axis

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

default_timeout: float | None = 5

The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.

waveform_xorigin: Parameter = self.add_parameter( "waveform_xorigin", get_cmd="WAVeform:XORigin?", unit="s", get_parser=float )

Parameter waveform_xorigin

waveform_xincrem: Parameter = self.add_parameter( "waveform_xincrem", get_cmd=":WAVeform:XINCrement?", unit="s", get_parser=float, )

Parameter waveform_xincrem

waveform_npoints: Parameter = self.add_parameter( "waveform_npoints", get_cmd="WAV:POIN?", set_cmd="WAV:POIN {}", unit="s", get_parser=int, )

Parameter waveform_npoints

waveform_yorigin: Parameter = self.add_parameter( "waveform_yorigin", get_cmd="WAVeform:YORigin?", unit="V", get_parser=float )

Parameter waveform_yorigin

waveform_yincrem: Parameter = self.add_parameter( "waveform_yincrem", get_cmd=":WAVeform:YINCrement?", unit="V", get_parser=float, )

Parameter waveform_yincrem

waveform_yref: Parameter = self.add_parameter( "waveform_yref", get_cmd=":WAVeform:YREFerence?", unit="V", get_parser=float )

Parameter waveform_yref

trigger_mode: Parameter = self.add_parameter( "trigger_mode", get_cmd=":TRIGger:MODE?", set_cmd=":TRIGger:MODE {}", unit="V", vals=Enum("edge", "pulse", "video", "pattern"), get_parser=str, )

Parameter trigger_mode

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
trigger_level: Parameter = self.add_parameter( "trigger_level", unit="V", get_cmd=self._get_trigger_level, set_cmd=self._set_trigger_level, vals=Numbers(), )

Parameter trigger_level

trigger_edge_source: Parameter = self.add_parameter( "trigger_edge_source", label="Source channel for the edge trigger", get_cmd=":TRIGger:EDGE:SOURce?", set_cmd=":TRIGger:EDGE:SOURce {}", val_mapping={ "ch1": "CHAN1", "ch2": "CHAN2", "ch3": "CHAN3", "ch4": "CHAN4", }, )

Parameter trigger_edge_source

trigger_edge_slope: Parameter = self.add_parameter( "trigger_edge_slope", label="Slope of the edge trigger", get_cmd=":TRIGger:EDGE:SLOPe?", set_cmd=":TRIGger:EDGE:SLOPe {}", vals=Enum("positive", "negative", "neither"), )

Parameter trigger_edge_slope

data_source: Parameter = self.add_parameter( "data_source", label="Waveform Data source", get_cmd=":WAVeform:SOURce?", set_cmd=":WAVeform:SOURce {}", val_mapping={ "ch1": "CHAN1", "ch2": "CHAN2", "ch3": "CHAN3", "ch4": "CHAN4", }, )

Parameter data_source

time_axis: Parameter = self.add_parameter( "time_axis", unit="s", label="Time", set_cmd=False, get_cmd=self._get_time_axis, vals=Arrays(shape=(self.waveform_npoints,)), snapshot_value=False, )

Parameter time_axis

class qcodes.instrument_drivers.rigol.RigolDS1074ZChannel(parent: RigolDS1074Z, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Contains methods and attributes specific to the Rigol oscilloscope channels.

The output trace from each channel of the oscilloscope can be obtained using ‘trace’ parameter.

Attributes:

vertical_scale

Parameter vertical_scale

trace

Parameter trace

vertical_scale: Parameter = self.add_parameter( "vertical_scale", get_cmd=f":CHANnel{channel}:SCALe?", set_cmd=":CHANnel{}:SCALe {}".format(channel, "{}"), get_parser=float, )

Parameter vertical_scale

trace: ParameterWithSetpoints = self.add_parameter( "trace", get_cmd=self._get_full_trace, vals=Arrays(shape=(self.parent.waveform_npoints,)), setpoints=(self.parent.time_axis,), unit="V", parameter_class=ParameterWithSetpoints, snapshot_value=False, )

Parameter trace

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.rigol.RigolDS4000(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the QCoDeS driver for the Rigol DS4000 series oscilloscopes.

Initialises the DS4000.

Parameters:
  • name – Name of the instrument used by QCoDeS

  • address – Instrument address as used by VISA

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_timeout

The default timeout in seconds if the timeout is not specified when creating the instrument.

trigger_type

Parameter trigger_type

trigger_mode

Parameter trigger_mode

time_base

Parameter time_base

sample_point_count

Parameter sample_point_count

enable_auto_scale

Parameter enable_auto_scale

default_timeout: float | None = 20

The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.

trigger_type: Parameter = self.add_parameter( "trigger_type", label="Type of the trigger", get_cmd=":TRIGger:MODE?", set_cmd=":TRIGger:MODE {}", vals=vals.Enum( "EDGE", "PULS", "RUNT", "NEDG", "SLOP", "VID", "PATT", "RS232", "IIC", "SPI", "CAN", "FLEX", "USB", ), )

Parameter trigger_type

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
trigger_mode: Parameter = self.add_parameter( "trigger_mode", label="Mode of the trigger", get_cmd=":TRIGger:SWEep?", set_cmd=":TRIGger:SWEep {}", vals=vals.Enum("AUTO", "NORM", "SING"), )

Parameter trigger_mode

time_base: Parameter = self.add_parameter( "time_base", label="Horizontal time base", get_cmd=":TIMebase:MAIN:SCALe?", set_cmd=":TIMebase:MAIN:SCALe {}", get_parser=float, unit="s/div", )

Parameter time_base

sample_point_count: Parameter = self.add_parameter( "sample_point_count", label="Number of the waveform points", get_cmd=":WAVeform:POINts?", set_cmd=":WAVeform:POINts {}", get_parser=int, vals=vals.Ints(min_value=1), )

Parameter sample_point_count

enable_auto_scale: Parameter = self.add_parameter( "enable_auto_scale", label="Enable or disable autoscale", get_cmd=":SYSTem:AUToscale?", set_cmd=":SYSTem:AUToscale {}", get_parser=bool, vals=vals.Bool(), )

Parameter enable_auto_scale

class qcodes.instrument_drivers.rigol.RigolDS4000Channel(parent: RigolDS4000, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Attributes:

amplitude

Parameter amplitude

vertical_scale

Parameter vertical_scale

curvedata

Parameter curvedata

curvedata_raw

Parameter curvedata_raw

amplitude: Parameter = self.add_parameter( "amplitude", get_cmd=f":MEASure:VAMP? chan{channel}", get_parser=float )

Parameter amplitude

vertical_scale: Parameter = self.add_parameter( "vertical_scale", get_cmd=f":CHANnel{channel}:SCALe?", set_cmd=":CHANnel{}:SCALe {}".format(channel, "{}"), get_parser=float, )

Parameter vertical_scale

curvedata: ScopeArray = self.add_parameter( "curvedata", channel=channel, parameter_class=ScopeArray, raw=False )

Parameter curvedata

curvedata_raw: ScopeArray = self.add_parameter( "curvedata_raw", channel=channel, parameter_class=ScopeArray, raw=True )

Parameter curvedata_raw

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}