improvements on PPMS and LS370

- improved machanism for 10 K waiting
- fixed an issue with auto range

Change-Id: Ia6454141917893f0e5c6c4351df3a864942bb629
This commit is contained in:
2020-06-25 12:02:17 +02:00
parent 1655e252fc
commit ab00c45db0
3 changed files with 64 additions and 29 deletions

View File

@ -50,7 +50,7 @@ scan = IOHandler('scan', 'SCAN?', '%d,%d')
STATUS_TEXT = {0: ''}
for bit, text in enumerate('CS_OVL VCM_OVL VMIX_OVL R_OVER R_UNDER T_OVER T_UNDER'.split()):
for bit, text in enumerate('CS_OVL VCM_OVL VMIX_OVL VDIF_OVL R_OVER R_UNDER T_OVER T_UNDER'.split()):
for i in range(1 << bit, 2 << bit):
STATUS_TEXT[i] = text
@ -177,10 +177,10 @@ class ResChannel(HasIodev, Readable):
return result
def read_status(self):
if self.channel != self._main.channel:
return Done
if not self.enabled:
return [self.Status.DISABLED, 'disabled']
if self.channel != self._main.channel:
return Done
result = int(self.sendRecv('RDGST?%d' % self.channel))
result &= 0x37 # mask T_OVER and T_UNDER (change this when implementing temperatures instead of resistivities)
statustext = STATUS_TEXT[result]
@ -191,10 +191,11 @@ class ResChannel(HasIodev, Readable):
def analyze_rdgrng(self, iscur, exc, rng, autorange, excoff):
result = dict(range=rng)
if autorange:
result['auotrange'] = 'hard'
elif self.autorange == 'hard':
result['autorange'] = 'soft'
result['autorange'] = 'hard'
#elif self.autorange == 'hard':
# result['autorange'] = 'soft'
# else: do not change autorange
self.log.info('%s range %r %r %r' % (self.name, rng, autorange, self.autorange))
if excoff:
result.update(iexc=0, vexc=0)
elif iscur:
@ -225,6 +226,7 @@ class ResChannel(HasIodev, Readable):
if change.autorange == 'soft':
if rng < self.minrange:
rng = self.minrange
self.autorange = change.autorange
return iscur, exc, rng, autorange, excoff
def analyze_inset(self, on, dwell, pause, curve, tempco):