Harvard Drivers¶
Classes:
|
The qcodes driver for the Decadac. |
|
A single DAC channel of the DECADAC |
|
A single DAC Slot of the DECADAC |
Exceptions:
- 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.
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:
alias of
HarvardDecadacChannel
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
- DAC_SLOT_CLASS¶
alias of
HarvardDecadacSlot
- 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.
- 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
- 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:
Parameter volt
Parameter lower_ramp_limit
Parameter upper_ramp_limit
Parameter update_period
Parameter slope
Parameter enable_ramp
Parameter ramp_rate
Parameter initial_value
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
- 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.
- 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 viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- 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:
Parameter slot_mode
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.
- 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 viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶