fs furnace: move PI with relais to frappy_psi/furnace.py

Change-Id: Ia8bec296035b3ae23a698f041fe8be39d925d996
This commit is contained in:
zolliker 2024-06-12 11:24:26 +02:00
parent 26f9c177f7
commit 8bc0671f73
2 changed files with 18 additions and 4 deletions

View File

@ -67,7 +67,7 @@ Mod('T_wall',
)
Mod('T',
'frappy_psi.picontrol.PI',
'frappy_psi.furnace.PI',
'controlled Temperature',
input = 'T_htr',
output = 'out',

View File

@ -20,7 +20,10 @@
"""interlocks for furnance"""
import time
from frappy.core import Module, Writable, Attached, Parameter, FloatRange, Readable, BoolType, ERROR, IDLE
from frappy.core import Module, Writable, Attached, Parameter, FloatRange, Readable,\
BoolType, ERROR, IDLE
from frappy_psi.picontrol import PImixin
class Interlocks(Module):
input = Attached(Readable, 'the input module')
@ -45,5 +48,16 @@ class Interlocks(Module):
return
self.control.write_control_active(False)
self.relais.write_target(False)
class PI(PImixin, Writable):
input = Attached(Readable, 'the input module')
relais = Attached(Writable, 'the interlock relais', mandatory=False)
def read_value(self):
return self.input.value
def write_target(self, value):
super().write_target(value)
if self.relais:
self.relais.write_target(1)