Harvard Drivers

Classes:

HarvardDecadac(name, address[, min_val, max_val])

The qcodes driver for the Decadac.

HarvardDecadacChannel(parent, name, channel)

A single DAC channel of the DECADAC

HarvardDecadacSlot(parent, name, slot[, ...])

A single DAC Slot of the DECADAC

Exceptions:

HarvardDecadacException

class qcodes.instrument_drivers.Harvard.HarvardDecadac(name: str, address: str, min_val: float = -5, max_val: float = 5, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument, DacReader

The qcodes driver for the Decadac.

Tested with a Decadac firmware revion number 14081 (Decadac 139).

The message strategy is the following: always keep the queue empty, so that self.visa_handle.ask(XXX) will return the answer to XXX and not some previous event.

_ramp_state

If True, ramp state is ON. Default False.

Type:

bool

_ramp_time

The ramp time in ms. Default 100 ms.

Type:

int

Creates an instance of the Decadac instruments

Parameters:
  • name – What this instrument is called locally.

  • address – The address of the DAC. For a serial port this is ASRLn::INSTR where n is replaced with the address set in the VISA control panel. Baud rate and other serial parameters must also be set in the VISA control panel.

  • min_val – The minimum value in volts that can be output by the DAC. This value should correspond to the DAC code 0.

  • max_val – The maximum value in volts that can be output by the DAC. This value should correspond to the DAC code 65536.

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

Classes:

DAC_CHANNEL_CLASS

alias of HarvardDecadacChannel

DAC_SLOT_CLASS

alias of HarvardDecadacSlot

Methods:

set_all(volt)

Set all dac channels to a specific voltage.

ramp_all(volt, ramp_rate)

Ramp all dac channels to a specific voltage at the given rate simultaneously.

get_idn()

Attempt to identify the dac.

connect_message([idn_param, begin_time])

Print a connect message, taking into account the lack of a standard *IDN on the Harvard DAC

__repr__()

Simplified repr giving just the class and name.

write(cmd)

Since all commands are echoed back, we must keep track of responses as well, otherwise commands receive the wrong response.

DAC_CHANNEL_CLASS

alias of HarvardDecadacChannel Methods:

ask(cmd)

Overload ask to set channel prior to operations

write(cmd)

Overload write to set channel prior to any channel operations.

Attributes:

volt

Parameter volt

lower_ramp_limit

Parameter lower_ramp_limit

upper_ramp_limit

Parameter upper_ramp_limit

update_period

Parameter update_period

slope

Parameter slope

enable_ramp

Parameter enable_ramp

ramp_rate

Parameter ramp_rate

initial_value

Parameter initial_value

DAC_SLOT_CLASS

alias of HarvardDecadacSlot Attributes:

SLOT_MODE_DEFAULT

slot_mode

Parameter slot_mode

Methods:

ask(cmd)

Overload ask to set channel prior to operations

write(cmd)

Overload write to set channel prior to any channel operations.

set_all(volt: float) None[source]

Set all dac channels to a specific voltage. If channels are set to ramp then the ramps will occur in sequence, not simultaneously.

Parameters:

volt (float) – The voltage to set all gates to.

ramp_all(volt, ramp_rate)[source]

Ramp all dac channels to a specific voltage at the given rate simultaneously. Note that the ramps are not synchronized due to communications time and DAC ramps starting as soon as the commands are in.

Parameters:
  • volt (float) – The voltage to ramp all channels to.

  • ramp_rate (float) – The rate in volts per second to ramp

get_idn()[source]

Attempt to identify the dac. Since we don’t have standard SCPI commands, *IDN will do nothing on this DAC.

Returns:

A dict containing a serial and hardware version

connect_message(idn_param='IDN', begin_time=None)[source]

Print a connect message, taking into account the lack of a standard *IDN on the Harvard DAC

Parameters:
  • idn_param – Unused

  • begin_time – time.time() when init started. Default is self._t0, set at start of Instrument.__init__.

__repr__()[source]

Simplified repr giving just the class and name.

write(cmd)[source]

Since all commands are echoed back, we must keep track of responses as well, otherwise commands receive the wrong response. Hence all writes must also read a response.

class qcodes.instrument_drivers.Harvard.HarvardDecadacChannel(parent: HarvardDecadacSlot, name: str, channel, min_val=-5, max_val=5)[source]

Bases: InstrumentChannel, DacReader

A single DAC channel of the DECADAC

Attributes:

volt

Parameter volt

lower_ramp_limit

Parameter lower_ramp_limit

upper_ramp_limit

Parameter upper_ramp_limit

update_period

Parameter update_period

slope

Parameter slope

enable_ramp

Parameter enable_ramp

ramp_rate

Parameter ramp_rate

initial_value

Parameter initial_value

parameters

All the parameters supported by this instrument.

functions

All the functions supported by this instrument.

submodules

All the submodules of this instrument such as channel lists or logical groupings of parameters.

instrument_modules

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

log

metadata

Methods:

write(cmd)

Overload write to set channel prior to any channel operations.

ask(cmd)

Overload ask to set channel prior to operations

volt: Parameter = self.add_parameter( "volt", get_cmd=partial(self._query_address, self._base_addr + 9, 1), get_parser=self._dac_code_to_v, set_cmd=self._set_dac, set_parser=self._dac_v_to_code, vals=self._volt_val, label=f"channel {channel+self._slot*4}", unit="V", )

Parameter volt

lower_ramp_limit: Parameter = self.add_parameter( "lower_ramp_limit", get_cmd=partial(self._query_address, self._base_addr + 5), get_parser=self._dac_code_to_v, set_cmd="L{};", set_parser=self._dac_v_to_code, vals=self._volt_val, label="Lower_Ramp_Limit", unit="V", )

Parameter lower_ramp_limit

upper_ramp_limit: Parameter = self.add_parameter( "upper_ramp_limit", get_cmd=partial(self._query_address, self._base_addr + 4), get_parser=self._dac_code_to_v, set_cmd="U{};", set_parser=self._dac_v_to_code, vals=self._volt_val, label="Upper_Ramp_Limit", unit="V", )

Parameter upper_ramp_limit

update_period: Parameter = self.add_parameter( "update_period", get_cmd=partial(self._query_address, self._base_addr), get_parser=int, set_cmd="T{};", set_parser=int, vals=vals.Ints(50, 65535), label="Update_Period", unit="us", )

Parameter update_period

slope: Parameter = self.add_parameter( "slope", get_cmd=partial(self._query_address, self._base_addr + 6, 2), get_parser=int, set_cmd="S{};", set_parser=int, vals=vals.Ints(-(2**32), 2**32), label="Ramp_Slope", )

Parameter slope

enable_ramp: Parameter = self.add_parameter( "enable_ramp", get_cmd=None, set_cmd=None, initial_value=False, vals=vals.Bool(), )

Parameter enable_ramp

ramp_rate: Parameter = self.add_parameter( "ramp_rate", get_cmd=None, set_cmd=None, initial_value=0.1, vals=self._ramp_val, unit="V/s", )

Parameter ramp_rate

initial_value: Parameter

Parameter initial_value

write(cmd)[source]

Overload write to set channel prior to any channel operations. Since all commands are echoed back, we must keep track of responses as well, otherwise commands receive the wrong response.

ask(cmd)[source]

Overload ask to set channel prior to operations

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] = {}
exception qcodes.instrument_drivers.Harvard.HarvardDecadacException[source]

Bases: Exception

class qcodes.instrument_drivers.Harvard.HarvardDecadacSlot(parent: HarvardDecadac, name: str, slot, min_val=-5, max_val=5)[source]

Bases: InstrumentChannel, DacReader

A single DAC Slot of the DECADAC

Attributes:

SLOT_MODE_DEFAULT

slot_mode

Parameter slot_mode

parameters

All the parameters supported by this instrument.

functions

All the functions supported by this instrument.

submodules

All the submodules of this instrument such as channel lists or logical groupings of parameters.

instrument_modules

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

log

metadata

Methods:

write(cmd)

Overload write to set channel prior to any channel operations.

ask(cmd)

Overload ask to set channel prior to operations

SLOT_MODE_DEFAULT = 'Coarse'
slot_mode: Parameter = self.add_parameter( "slot_mode", get_cmd="m;", get_parser=self._dac_parse, set_cmd="M{};", val_mapping=slot_modes, )

Parameter slot_mode

write(cmd)[source]

Overload write to set channel prior to any channel operations. Since all commands are echoed back, we must keep track of responses as well, otherwise commands receive the wrong response.

ask(cmd)[source]

Overload ask to set channel prior to operations

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] = {}