fixed ls370 issue when dwell time is too short

This commit is contained in:
l_samenv 2021-02-26 16:13:22 +01:00
parent fa71b8ee25
commit 3cc8db881e

View File

@ -120,6 +120,11 @@ class Main(HasIodev, Drivable):
self.status = [Status.BUSY, 'switching']
return channel
def write_autoscan(self, value):
scan.send_change(self, self.value, value)
# self.sendRecv('SCAN %d,%d;SCAN?' % (channel, self.autoscan))
return value
class ResChannel(HasIodev, Readable):
"""temperature channel on Lakeshore 336"""
@ -158,16 +163,24 @@ class ResChannel(HasIodev, Readable):
dwell = Parameter('dwell time with autoscan', datatype=FloatRange(1, 200), readonly=False, handler=inset)
filter = Parameter('filter time', datatype=FloatRange(1, 200), readonly=False, handler=filterhdl)
_trigger_read = False
def initModule(self):
self._main = self.DISPATCHER.get_module(self.main)
self._main.register_channel(self)
def read_value(self):
if self.channel != self._main.value:
return Done
if not self.enabled:
self.status = [self.Status.DISABLED, 'disabled']
return Done
if self.channel != self._main.value:
if self.channel == self._main.target:
self._trigger_read = True
return Done
if not self._trigger_read:
return Done
# we got here, when we missed the idle state of self._main
self._trigger_read = False
result = self.sendRecv('RDGR?%d' % self.channel)
result = float(result)
if self.autorange == 'soft':