[WIP] fixes for linse-fi
Change-Id: Iac28e9654a764331cd903896879834cd6127a919
This commit is contained in:
@ -17,12 +17,16 @@
|
||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
||||
# *****************************************************************************
|
||||
|
||||
"""interlocks for furnance"""
|
||||
"""interlocks for furnace"""
|
||||
|
||||
import time
|
||||
from frappy.core import Module, Writable, Attached, Parameter, FloatRange, Readable,\
|
||||
BoolType, ERROR, IDLE
|
||||
from frappy.mixins import HasControlledBy
|
||||
from frappy_psi.picontrol import PImixin
|
||||
from frappy_psi.convergence import HasConvergence
|
||||
import frappy_psi.tdkpower as tdkpower
|
||||
import frappy_psi.bkpower as bkpower
|
||||
|
||||
|
||||
class Interlocks(Module):
|
||||
@ -76,8 +80,8 @@ class Interlocks(Module):
|
||||
self.relais.write_target(False)
|
||||
|
||||
|
||||
class PI(PImixin, Writable):
|
||||
input = Attached(Readable, 'the input module')
|
||||
class PI(HasConvergence, PImixin):
|
||||
input_module = Attached(Readable, 'the input module')
|
||||
relais = Attached(Writable, 'the interlock relais', mandatory=False)
|
||||
|
||||
def read_value(self):
|
||||
@ -87,3 +91,11 @@ class PI(PImixin, Writable):
|
||||
super().write_target(value)
|
||||
if self.relais:
|
||||
self.relais.write_target(1)
|
||||
|
||||
|
||||
class TdkOutput(HasControlledBy, tdkpower.Output):
|
||||
pass
|
||||
|
||||
|
||||
class BkOutput(HasControlledBy, bkpower.Output):
|
||||
pass
|
||||
|
@ -48,8 +48,8 @@ example cfg:
|
||||
Mod('T_softloop',
|
||||
'frappy_psi.picontrol.PI',
|
||||
'softloop controlled Temperature mixing chamber',
|
||||
input = 'ts',
|
||||
output = 'htr_mix',
|
||||
input_module = 'ts',
|
||||
output_module = 'htr_mix',
|
||||
control_active = 1,
|
||||
output_max = 80000,
|
||||
p = 2E6,
|
||||
|
@ -41,7 +41,7 @@ class Power(HasIO, Readable):
|
||||
|
||||
|
||||
class Output(HasIO, Writable):
|
||||
value = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
||||
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||
mode = Parameter('regulation mode', EnumType(voltage=1, current=2, both=3),
|
||||
default='voltage', readonly=False)
|
||||
|
Reference in New Issue
Block a user