Commit 78c13da2 authored by bliss administrator's avatar bliss administrator

to make 340 working with the 332, temporary fix before refactoring

parent efa324b1
Pipeline #8575 failed with stages
in 18 seconds
......@@ -97,7 +97,7 @@ class LakeShore330(object):
(float): current temperature [K]
"""
self._channel = channel
return self.send_cmd("KRDG?")
return float(self.send_cmd("KRDG?"))
def setpoint(self, channel, value=None):
""" Set/Read the control setpoint
......@@ -115,7 +115,7 @@ class LakeShore330(object):
# send the setpoint
self.send_cmd("SETP", value)
def range(self, channel, range=None):
def range(self, channel, value=None):
""" Set/Read the heater range (0=off 1=low 2=medium 3=high)
Args:
channel (int): output channel. Valid entries: 1 or 2
......@@ -127,7 +127,7 @@ class LakeShore330(object):
"""
self._channel = channel
if value is None:
return float(self.send_cmd("RANGE?"))
return int(self.send_cmd("RANGE?"))
# send the range
self.send_cmd("RANGE", value)
......
......@@ -26,7 +26,7 @@ class LakeShore332(LakeShore330):
channel(int): loop channel. Valid entries: 1 or 2
Kwargs:
input (str): which input to control from. Valid entries: A or B
off (bool): switch on (True) or off (False) the control loop
enable (bool): switch on (True) or off (False) the control loop
Returns:
None if set
input (str): which input to control from
......@@ -34,12 +34,13 @@ class LakeShore332(LakeShore330):
"""
self._channel = channel
inp = kwargs.get("input", "")
off = kwargs.get("off")
off = kwargs.get("enable")
if isinstance(off, bool):
self.send_cmd("CSET", inp, 1, int(off))
else:
asw = send_cmd("CSET?").split(",")
return asw[1], bool(asw[3])
asw = self.send_cmd("CSET?").split(",")
# return asw[1], bool(asw[3])
return asw[0], asw[1], bool(asw[2]), bool(asw[3])
def cmode(self, channel, mode=None):
""" Read/Set Control Loop Mode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment