fixes in lakeshore alarm
Change-Id: Ibbcbe94d9a64d1c074025183e1310506a2cb00f4
This commit is contained in:
parent
4ebb15ca6c
commit
3a52f9d31c
@ -18,7 +18,7 @@
|
||||
# Module authors:
|
||||
# Oksana Shliakhtun <oksana.shliakhtun@psi.ch>
|
||||
# *****************************************************************************
|
||||
from math import log2
|
||||
|
||||
|
||||
from frappy.core import Readable, Parameter, IntRange, EnumType, FloatRange, \
|
||||
StringIO, HasIO, StringType, Property, Writable, Drivable, IDLE, ERROR, \
|
||||
@ -52,8 +52,6 @@ class Sensor340(LakeShore, Readable):
|
||||
# define the communication class to create the IO module
|
||||
ioClass = Ls340IO
|
||||
channel = Property('lakeshore channel', StringType())
|
||||
# relay_mode = Property('relay setting mode', IntRange(0, 2))
|
||||
# relay = Property('relay high/low', IntRange(1, 2))
|
||||
alarm = Parameter('alarm limit', FloatRange(unit='K'), readonly=False)
|
||||
# # define or alter the parameters
|
||||
# as Readable.value exists already, we give only the modified property 'unit'
|
||||
@ -77,8 +75,8 @@ class Sensor340(LakeShore, Readable):
|
||||
if c % 2:
|
||||
return ERROR, 'invalid reading'
|
||||
# ask for high alarm status and return warning
|
||||
if '1' in str(self.communicate(f'ALARMST? {self.channel}')):
|
||||
return Warning
|
||||
if '1' in self.communicate(f'ALARMST? {self.channel}'):
|
||||
return WARN, 'alarm triggered'
|
||||
return IDLE, ''
|
||||
|
||||
def write_alarm(self, alarm):
|
||||
|
Loading…
x
Reference in New Issue
Block a user