Skip to content

Commit

Permalink
fix: Respond to issue #546 (#552)
Browse files Browse the repository at this point in the history
* fix: Respond to issue #546

Unfortunately not tested.

Should fix #546

* fix: Remove fine mode

Remove the high res mode
  • Loading branch information
WilliamHPNielsen authored and giulioungaretti committed May 8, 2017
1 parent eb9dc20 commit b8c0065
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions qcodes/instrument_drivers/Harvard/Decadac.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,23 @@ def __init__(self, name, port, slot, timeout=2, baudrate=9600,

self.add_parameter('mode',
label='Output mode',
set_cmd='B {}; M {};'.format(self.slot, '{}'),
vals=vals.Enum(0, 1),
set_cmd=partial(self._setmode, self.slot),
vals=vals.Enum(0, 2),
docstring="""
The operational mode of the slot.
0: output off, 1: output on.
0: output off,
2: 4-channel (low res) mode.
""")

# initialise hardware settings
self.mode.set(1)
self.mode.set(2)

def _setmode(slot, mode):
"""
set_cmd for the mode parameter
"""
self.visa_handle.write('B {}; M {};'.format(slot, mode)
self.visa_handle.read()

def _getoffset(self, n):
return self._offsets[n]
Expand Down Expand Up @@ -256,4 +264,3 @@ def _voltage2code(self, voltage, channel):
3: lambda x: 2**16/10*(x-2**-16+10)}
voltage_float = translationdict[self._voltranges[channel]](voltage)
return str(int(voltage_float))

0 comments on commit b8c0065

Please sign in to comment.