Skip to content

Commit

Permalink
Slot number and label (#869)
Browse files Browse the repository at this point in the history
- Changed number of slots to 5 (slot 6 doesnt exist).
- Changed voltage label to refer to channel name.
  • Loading branch information
ThorvaldLarsen authored and WilliamHPNielsen committed Nov 14, 2017
1 parent ec86193 commit 27567bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qcodes/instrument_drivers/Harvard/Decadac.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __init__(self, parent, name, channel, min_val=-5, max_val=5):
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="Voltage", unit="V")
label="channel {}".format(channel+self._slot*4), unit="V")
# The limit commands are used to sweep dac voltages. They are not safety features.
self.add_parameter("lower_ramp_limit", get_cmd=partial(self._query_address, self._base_addr+5),
get_parser=self._dac_code_to_v,
Expand Down Expand Up @@ -291,7 +291,7 @@ class DacSlot(InstrumentChannel, DacReader):
"""
A single DAC Slot of the DECADAC
"""
_SLOT_VAL = vals.Ints(0, 5)
_SLOT_VAL = vals.Ints(0, 4)
SLOT_MODE_DEFAULT = "Coarse"

def __init__(self, parent, name, slot, min_val=-5, max_val=5):
Expand Down Expand Up @@ -397,7 +397,7 @@ def __init__(self, name, address, min_val=-5, max_val=5, **kwargs):
# Create channels
channels = ChannelList(self, "Channels", DacChannel, snapshotable=False)
slots = ChannelList(self, "Slots", DacSlot)
for i in range(6): # Create the 6 DAC slots
for i in range(5): # Create the 5 DAC slots
slots.append(DacSlot(self, "Slot{}".format(i), i, min_val, max_val))
channels.extend(slots[i].channels)
slots.lock()
Expand Down

0 comments on commit 27567bf

Please sign in to comment.