9.2.3.2.1. qumada.instrument.custom_drivers.Harvard.Decadac

exception qumada.instrument.custom_drivers.Harvard.Decadac.DACException[source]

Bases: Exception

class qumada.instrument.custom_drivers.Harvard.Decadac.DacChannel(parent, name, channel, min_val=-5, max_val=5)[source]

Bases: InstrumentChannel, DacReader

A single DAC channel of the DECADAC

ask(cmd)[source]

Overload ask to set channel prior to operations

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.

class qumada.instrument.custom_drivers.Harvard.Decadac.DacReader[source]

Bases: object

class qumada.instrument.custom_drivers.Harvard.Decadac.DacSlot(parent, name, slot, min_val=-5, max_val=5)[source]

Bases: InstrumentChannel, DacReader

A single DAC Slot of the DECADAC

SLOT_MODE_DEFAULT = 'Coarse'
ask(cmd)[source]

Overload ask to set channel prior to operations

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.

class qumada.instrument.custom_drivers.Harvard.Decadac.Decadac(name, address, min_val=-10, max_val=10, **kwargs)[source]

Bases: VisaInstrument, DacReader

The qcodes driver for the Decadac.

Tested with a Decadec 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 (str) – What this instrument is called locally.

  • address (str) – 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 (Union[float, int]) – The minimum value in volts that can be output by the DAC. This value should correspond to the DAC code 0.

  • max_val (Union[float, int]) – The maximum value in volts that can be output by the DAC. This value should correspond to the DAC code 65536.

DAC_CHANNEL_CLASS

alias of DacChannel

DAC_SLOT_CLASS

alias of DacSlot

__init__(name, address, min_val=-10, max_val=10, **kwargs)[source]

Creates an instance of the Decadac instruments

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

  • address (str) – 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 (Union[float, int]) – The minimum value in volts that can be output by the DAC. This value should correspond to the DAC code 0.

  • max_val (Union[float, int]) – The maximum value in volts that can be output by the DAC. This value should correspond to the DAC code 65536.

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:

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

end_script()[source]
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

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

run_script()[source]
set_all(volt)[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.

Return type:

None

start_script()[source]
trigger(trigger_setting)[source]

The trigger threshold is around 1.687 volts, but you shouldn’t be near the values

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.