[WIP] fixes for linse-fi
Change-Id: Iac28e9654a764331cd903896879834cd6127a919
This commit is contained in:
parent
fcf867675e
commit
94859fe2ef
@ -9,14 +9,14 @@ Mod('htr_io',
|
||||
uri='serial:///dev/ttyUSB0?baudrate=9600',
|
||||
)
|
||||
|
||||
Mod('htr',
|
||||
Mod('htr_power',
|
||||
'frappy_psi.tdkpower.Power',
|
||||
'heater power',
|
||||
io='htr_io',
|
||||
)
|
||||
|
||||
Mod('out',
|
||||
'frappy_psi.tdkpower.Output',
|
||||
Mod('htr',
|
||||
'frappy_psi.furnace.TdkOutput',
|
||||
'heater output',
|
||||
io='htr_io',
|
||||
maxvolt=8,
|
||||
@ -29,7 +29,6 @@ Mod('T_main',
|
||||
addr='ai4',
|
||||
valuerange=(0, 1372),
|
||||
value=Param(unit='degC'),
|
||||
|
||||
)
|
||||
|
||||
Mod('T_extra',
|
||||
@ -38,7 +37,6 @@ Mod('T_extra',
|
||||
addr='ai3',
|
||||
valuerange=(0, 1372),
|
||||
value=Param(unit='degC'),
|
||||
|
||||
)
|
||||
|
||||
Mod('T_wall',
|
||||
@ -51,11 +49,11 @@ Mod('T_wall',
|
||||
)
|
||||
|
||||
Mod('T',
|
||||
'frappy_psi.furnace.PI',
|
||||
'frappy_psi.picontrol.PI',
|
||||
'controlled Temperature',
|
||||
input='T_htr',
|
||||
output='htr',
|
||||
relais='relais',
|
||||
input_module='T_main',
|
||||
output_module='htr',
|
||||
# relais='relais',
|
||||
p=2,
|
||||
i=0.01,
|
||||
)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user