update flamesample

including fixes on frappy_psi.ls372
This commit is contained in:
2026-05-12 16:40:49 +02:00
parent fa76d87e19
commit c65e7aa07c
3 changed files with 64 additions and 19 deletions
+55
View File
@@ -0,0 +1,55 @@
Node('flamesample2.psi.ch',
'flame sample low and high thermometers and heater',
interface = 'tcp://5000',
)
Mod('lscio',
'frappy_psi.ls372.StringIO',
'sample channels LS372 io',
uri = 'flamedil-ls.psi.ch:7777',
)
Mod('lsc_channel',
'frappy_psi.ls372.Switcher',
'channel switcher sample ls372',
io='lscio',
value = 3,
)
Mod('ts_low',
'frappy_psi.ls372.TemperatureLoop',
'sample RuOX',
channel = 3,
switcher = 'lsc_channel',
minrange=13,
range=22,
tolerance = 0.1,
vexc = 3,
htrrng=4,
)
Mod('ts_high',
'frappy_psi.ls372.TemperatureLoop',
'sample Cernox',
channel = 1,
switcher = 'lsc_channel',
minrange=11,
vexc = 5,
range=22,
tolerance = 0.1,
htrrng=5,
minheater=5e-4,
)
Mod('ts',
'frappy_psi.parmod.SwitchDriv',
'automatically switching between ts_low and ts_high',
value=Param(unit='K'),
low='ts_low',
high='ts_high',
#min_high=0.6035,
#max_low=1.6965,
min_high=0.6,
max_low=1.7,
tolerance=0.1,
)
+2 -17
View File
@@ -28,9 +28,9 @@ Mod('ts_low',
htrrng=4,
)
Mod('ts_high',
Mod('ts',
'frappy_psi.ls372.TemperatureLoop',
'sample Cernox',
'sample combined sensor',
channel = 1,
switcher = 'lsc_channel',
minrange=11,
@@ -38,19 +38,4 @@ Mod('ts_high',
range=22,
tolerance = 0.1,
htrrng=5,
minheater=5e-4,
)
Mod('ts',
'frappy_psi.parmod.SwitchDriv',
'automatically switching between ts_low and ts_high',
meaning=['temperature', 40],
value=Param(unit='K'),
low='ts_low',
high='ts_high',
#min_high=0.6035,
#max_low=1.6965,
min_high=0.6,
max_low=1.7,
tolerance=0.1,
)
+7 -2
View File
@@ -216,7 +216,7 @@ class ResChannel(Channel):
def change(self, command, *args):
cmd, _, qarg = command.partition(' ')
args = ','.join([qarg] + [f'{a:g}' for a in args])
return parse(self.switcher.communicate(f'{command} {args};{command}?{qarg}'))
return parse(self.switcher.communicate(f'{cmd} {args};{cmd}?{qarg}'))
def read_status(self):
if not self.enabled:
@@ -388,13 +388,15 @@ class TemperatureLoop(HasConvergence, TemperatureChannel, Drivable):
'p': Parameter('proportional heat parameter', FloatRange()),
'i': Parameter('integral heat parameter', FloatRange()),
'd': Parameter('derivative heat parameter', FloatRange()),
}, readonly=False)
}, readonly=False, export=False)
htr = Parameter('heater percentage', FloatRange(unit='%'))
_control_active = False
def doPoll(self):
super().doPoll()
self.set_htrrng()
self.read_htr()
@Command
def control_off(self):
@@ -426,6 +428,9 @@ class TemperatureLoop(HasConvergence, TemperatureChannel, Drivable):
return float(self.communicate(f'SETP?{self.loop}'))
return 0
def read_htr(self):
return float(self.communicate(f'HTR?{self.loop}'))
def write_htrrng(self, value):
if self._control_active:
self.communicate('RANGE {self.loop},{int(value)};*OPC?')