Convert example configs to python

Fixes: #4627

Change-Id: I1049af9fa2f3f9ec06e55811dc9ecfa5f359c805
This commit is contained in:
Alexander Zaft
2023-01-19 14:38:15 +01:00
committed by Markus Zolliker
parent e1d5170a90
commit 8799710b38
42 changed files with 1209 additions and 1474 deletions

View File

@ -1,17 +0,0 @@
[node AH2700Test.psi.ch]
description = AH2700 capacitance bridge test
[interface tcp]
type = tcp
bindto = 0.0.0.0
bindport = 5000
[module cap]
class = frappy_psi.ah2700.Capacitance
description = capacitance
uri=ldmse3-ts:3015
#[module ahcom]
#class = frappy_psi.ah2700.StringIO
#uri=ldmse3-ts:3015
#description = serial communicator to an AH2700

10
cfg/ah2700test_cfg.py Normal file
View File

@ -0,0 +1,10 @@
Node('AH2700Test.psi.ch',
'AH2700 capacitance bridge test',
'tcp://5000',
)
Mod('cap',
'frappy_psi.ah2700.Capacitance',
'capacitance',
uri='ldmse3-ts:3015',
)

View File

@ -1,111 +0,0 @@
[node MLZ_amagnet(Garfield)]
description=MLZ-Amagnet
.
Water cooled magnet from ANTARES@MLZ.
.
Use module to control the magnetic field.
Don't forget to select symmetry first (can be moved only at zero field!).
.
Monitor T1..T4 (Coil temps), if they get to hot, field will ramp down!
.
In case of Problems, contact the ANTARES people at MLZ.
visibility=expert
foo=bar
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module enable]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice='tango://localhost:10000/box/plc/_enable'
value.datatype=["enum", {'On':1,'Off':0}]
target.datatype=["enum", {'On':1,'Off':0}]
.description='Enables to Output of the Powersupply'
.visibility='advanced'
[module polarity]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_polarity
value.datatype=["enum", {'+1':1,'0':0,'-1':-1}]
target.datatype=["enum", {'+1':1,'0':0,'-1':-1}]
.description=polarity (+/-) switch
.
there is an interlock in the plc:
if there is current, switching polarity is forbidden
if polarity is short, powersupply is disabled
.visibility=advanced
comtries=50
[module symmetry]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_symmetric
value.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]
target.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]
.description=par/ser switch selecting (a)symmetric mode
.
symmetric is ser, asymmetric is par
.visibility=advanced
[module T1]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_t1
.description=Temperature1 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
[module T2]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_t2
.description=Temperature2 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
[module T3]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_t3
.description=Temperature3 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
[module T4]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_t4
.description=Temperature4 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
[module currentsource]
class=frappy_mlz.entangle.PowerSupply
tangodevice=tango://localhost:10000/box/lambda/curr
.description=Device for the magnet power supply (current mode)
abslimits=(0,200)
speed=1
ramp=60
precision=0.02
current=0
voltage=10
#unit=A
.visibility=advanced
[module mf]
class=frappy_mlz.amagnet.GarfieldMagnet
.description=magnetic field module, handling polarity switching and stuff
subdev_currentsource=currentsource
subdev_enable=enable
subdev_polswitch=polarity
subdev_symmetry=symmetry
target.unit='T'
value.unit='T'
userlimits=(-0.35, 0.35)
calibrationtable={'symmetric':[0.00186517, 0.0431937, -0.185956, 0.0599757, 0.194042],
'short': [0.0, 0.0, 0.0, 0.0, 0.0],
'asymmetric':[0.00136154, 0.027454, -0.120951, 0.0495289, 0.110689]}
.meaning=The magnetic field
.priority=100
.visibility=user
abslimits.default=-0.4,0.4

91
cfg/amagnet_cfg.py Normal file
View File

@ -0,0 +1,91 @@
Node('MLZ_amagnet(Garfield)',
'MLZ-Amagnet\n'
'\n'
'Water cooled magnet from ANTARES@MLZ.\n'
'\n'
'Use module to control the magnetic field.\n'
'Don\'t forget to select symmetry first (can be moved only at zero field!).\n'
'\n'
'Monitor T1..T4 (Coil temps), if they get to hot, field will ramp down!\n'
'\n'
'In case of Problems, contact the ANTARES people at MLZ.',
'tcp://10767',
visibility = 'expert',
foo = 'bar',
)
Mod('enable',
'frappy_mlz.entangle.NamedDigitalOutput',
'Enables to Output of the Powersupply',
tangodevice = 'tango://localhost:10000/box/plc/_enable',
value = Param(datatype=["enum", {'On':1,'Off':0}]),
target = Param(datatype=["enum", {'On':1,'Off':0}]),
visibility = 'advanced',
)
Mod('polarity',
'frappy_mlz.entangle.NamedDigitalOutput',
'polarity (+/-) switch\n'
'\n'
'there is an interlock in the plc:\n'
'if there is current, switching polarity is forbidden\n'
'if polarity is short, powersupply is disabled',
tangodevice = 'tango://localhost:10000/box/plc/_polarity',
value = Param(datatype=["enum", {'+1':1,'0':0,'-1':-1}]),
target = Param(datatype=["enum", {'+1':1,'0':0,'-1':-1}]),
visibility = 'advanced',
comtries = 50,
)
Mod('symmetry',
'frappy_mlz.entangle.NamedDigitalOutput',
'par/ser switch selecting (a)symmetric mode\n'
'\n'
'symmetric is ser, asymmetric is par',
tangodevice = 'tango://localhost:10000/box/plc/_symmetric',
value = Param(datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]),
target = Param(datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]),
visibility = 'advanced',
)
for i in range(1,5):
Mod('T%d' % i,
'frappy_mlz.entangle.AnalogInput',
'Temperature %d of the coils system' % i,
tangodevice = 'tango://localhost:10000/box/plc/_t%d' % i,
#warnlimits=(0, 50),
value = Param(unit='degC'),
)
Mod('currentsource',
'frappy_mlz.entangle.PowerSupply',
'Device for the magnet power supply (current mode)',
tangodevice = 'tango://localhost:10000/box/lambda/curr',
abslimits = (0,200),
speed = 1,
ramp = 60,
precision = 0.02,
current = 0,
voltage = 10,
#value=Param(unit='A')
visibility = 'advanced',
)
Mod('mf',
'frappy_mlz.amagnet.GarfieldMagnet',
'magnetic field module, handling polarity switching and stuff',
subdev_currentsource = 'currentsource',
subdev_enable = 'enable',
subdev_polswitch = 'polarity',
subdev_symmetry = 'symmetry',
target = Param(unit='T'),
value = Param(unit='T'),
userlimits = (-0.35, 0.35),
calibrationtable = {'symmetric':[0.00186517, 0.0431937, -0.185956, 0.0599757, 0.194042],
'short': [0.0, 0.0, 0.0, 0.0, 0.0],
'asymmetric':[0.00136154, 0.027454, -0.120951, 0.0495289, 0.110689]},
meaning = ['The magnetic field', 1],
#priority=100,
visibility = 'user',
abslimits = (-0.4,0.4,),
)

View File

@ -1,150 +0,0 @@
[node MLZ_ccr12]
description = CCR box of MLZ Sample environment group
.
Contains a Lakeshore 336 and an PLC controlling the compressor
and some valves.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module automatik]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_automatik
mapping=dict(Off=0,p1=1,p2=2)
description="controls the (simple) pressure regulation
.
selects between off, regulate on p1 or regulate on p2 sensor"
[module compressor]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_cooler_onoff
mapping=dict(Off=0,On=1)
description=control the compressor (on/off)
[module gas]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_gas_onoff
mapping=dict(Off=0,On=1)
description=control the gas inlet into the ccr (on/off)
.
note: this switches off automatically after 15 min.
note: activation de-activates the vacuum inlet
note: if the pressure regulation is active, it enslave this device
[module vacuum]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_vacuum_Onoff
mapping=dict(Off=0,On=1)
description=control the vacuum inlet into the ccr (on/off)
.
note: activation de-activates the gas inlet
note: if the pressure regulation is active, it enslave this device
[module p1]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_p1
value.unit='mbar'
description=pressure sensor 1 (linear scale)
[module p2]
class=frappy_mlz.entangle.AnalogInput
tangodevice=tango://localhost:10000/box/plc/_p2
value.unit='mbar'
description=pressure sensor 2 (selectable curve)
[module curve_p2]
class=frappy_mlz.entangle.NamedDigitalInput
tangodevice=tango://localhost:10000/box/plc/_curve
value.default=0
description=calibration curve for pressure sensor 2
mapping="{'0-10V':0, '0-1000mbar':1, '1-9V to 0-1 mbar':2,
'DI200':3, 'DI2000':4, 'TTR100':7, 'PTR90':8,
'PTR225/237':9, 'ITR90':10, 'ITR100-D':11,
'ITR100-2':12, 'ITR100-3':13, 'ITR100-4':14,
'ITR100-5':15, 'ITR100-6':16, 'ITR100-7':17,
'ITR100-8':18, 'ITR100-9':19, 'ITR100-A':20,
'CMR361':21, 'CMR362':22, 'CMR363':23,
'CMR364':24, 'CMR365':25}"
# sensors
[module T_sample]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/sample/sensora
value.unit='K'
description=sample temperature
[module T_stick]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/stick/sensorb
value.unit='K'
description=temperature at bottom of sample stick
[module T_coldhead]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/coldhead/sensorc
value.unit='K'
description=temperature at coldhead
[module T_tube]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/tube/sensord
value.unit='K'
description=temperature at thermal coupling tube <-> stick
# regulations
[module T_stick_regulation]
class=frappy_mlz.entangle.TemperatureController
tangodevice=tango://localhost:10000/box/stick/control2
heateroutput.default=0
description=regulation of stick temperature
ramp.default=6
speed.default=0.1
setpoint.default=0
pid.default=(40,10,1)
p.default=40
i.default=10
d.default=1
abslimits=(0,500)
value.unit='K'
# OMG! a NamedDigitalOutput, but with float'ints' 0..3
[module T_stick_regulation_heaterrange]
class=frappy_mlz.entangle.AnalogOutput
tangodevice=tango://localhost:10000/box/stick/range2
precision.default=1
abslimits=(0,3)
description=heaterrange for stick regulation
[module T_tube_regulation]
class=frappy_mlz.entangle.TemperatureController
tangodevice=tango://localhost:10000/box/tube/control1
description=regulation of tube temperature
heateroutput.default=0
ramp.default=6
speed.default=0.1
setpoint.default=0
pid.default=(40,10,1)
p.default=40
i.default=10
d.default=1
abslimits=(0,500)
value.unit='K'
# OMG! a NamedDigitalOutput, but with float'ints' 0..3
#[module T_tube_regulation_heaterrange]
#class=frappy_mlz.entangle.AnalogOutput
#tangodevice=tango://localhost:10000/box/tube/range1
#precision.default=1
#abslimits=(0,3)
[module T_tube_regulation_heaterrange]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/tube/range1
mapping=dict(Off=0, Low=1, Medium=2, High=3)
description=heaterrange for tube regulation

159
cfg/ccr_cfg.py Normal file
View File

@ -0,0 +1,159 @@
Node('MLZ_ccr12',
'CCR box of MLZ Sample environment group\n'
'\n'
'Contains a Lakeshore 336 and an PLC controlling the compressor\n'
'and some valves.',
'localhost:10767',
)
Mod('automatik',
'frappy_mlz.entangle.NamedDigitalOutput',
'controls the (simple) pressure regulation\n'
'\n'
'selects between off, regulate on p1 or regulate on p2 sensor',
tangodevice = 'tango://localhost:10000/box/plc/_automatik',
mapping={'Off':0,'p1':1,'p2':2},
)
Mod('compressor',
'frappy_mlz.entangle.NamedDigitalOutput',
'control the compressor (on/off)',
tangodevice = 'tango://localhost:10000/box/plc/_cooler_onoff',
mapping={'Off':0,'On':1},
)
Mod('gas',
'frappy_mlz.entangle.NamedDigitalOutput',
'control the gas inlet into the ccr (on/off)\n'
'\n'
'note: this switches off automatically after 15 min.\n'
'note: activation de-activates the vacuum inlet\n'
'note: if the pressure regulation is active, it enslave this device',
tangodevice = 'tango://localhost:10000/box/plc/_gas_onoff',
mapping={'Off':0,'On':1},
)
Mod('vacuum',
'frappy_mlz.entangle.NamedDigitalOutput',
'control the vacuum inlet into the ccr (on/off)\n'
'\n'
'note: activation de-activates the gas inlet\n'
'note: if the pressure regulation is active, it enslave this device',
tangodevice = 'tango://localhost:10000/box/plc/_vacuum_Onoff',
mapping={'Off':0,'On':1},
)
Mod('p1',
'frappy_mlz.entangle.AnalogInput',
'pressure sensor 1 (linear scale)',
tangodevice = 'tango://localhost:10000/box/plc/_p1',
value = Param(unit='mbar')
)
Mod('p2',
'frappy_mlz.entangle.AnalogInput',
'pressure sensor 2 (selectable curve)',
tangodevice = 'tango://localhost:10000/box/plc/_p2',
value = Param(unit='mbar'),
)
Mod('curve_p2',
'frappy_mlz.entangle.NamedDigitalInput',
'calibration curve for pressure sensor 2',
tangodevice = 'tango://localhost:10000/box/plc/_curve',
value = 0,
mapping = "{'0-10V':0, '0-1000mbar':1, '1-9V to 0-1 mbar':2, \
'DI200':3, 'DI2000':4, 'TTR100':7, 'PTR90':8, \
'PTR225/237':9, 'ITR90':10, 'ITR100-D':11, \
'ITR100-2':12, 'ITR100-3':13, 'ITR100-4':14, \
'ITR100-5':15, 'ITR100-6':16, 'ITR100-7':17, \
'ITR100-8':18, 'ITR100-9':19, 'ITR100-A':20, \
'CMR361':21, 'CMR362':22, 'CMR363':23, \
'CMR364':24, 'CMR365':25}",
)
# sensors
Mod('T_sample',
'frappy_mlz.entangle.Sensor',
'sample temperature',
tangodevice = 'tango://localhost:10000/box/sample/sensora',
value = Param(unit='K'),
)
Mod('T_stick',
'frappy_mlz.entangle.Sensor',
'temperature at bottom of sample stick',
tangodevice = 'tango://localhost:10000/box/stick/sensorb',
value = Param(unit='K'),
)
Mod('T_coldhead',
'frappy_mlz.entangle.Sensor',
'temperature at coldhead',
tangodevice = 'tango://localhost:10000/box/stick/sensorc',
value = Param(unit='K'),
)
Mod('T_tube',
'frappy_mlz.entangle.Sensor',
'temperature at thermal coupling tube <-> stick',
tangodevice = 'tango://localhost:10000/box/tube/sensord',
value = Param(unit='K'),
)
# regulations
Mod('T_stick_regulation',
'frappy_mlz.entangle.TemperatureController',
'regulation of stick temperature',
tangodevice = 'tango://localhost:10000/box/stick/control2',
heateroutput = 0,
ramp = 6,
speed = 0.1,
setpoint = 0,
pid = (40,10,1),
p = 40,
i = 10,
d = 1,
abslimits = (0,500),
value = Param(unit='K'),
)
# OMG! a NamedDigitalOutput, but with float'ints' 0..3
Mod('T_stick_regulation_heaterrange',
'frappy_mlz.entangle.AnalogOutput',
'heaterrange for stick regulation',
tangodevice = 'tango://localhost:10000/box/stick/range2',
precision = 1,
abslimits = (0,3),
)
Mod('module T_tube_regulation',
'frappy_mlz.entangle.TemperatureController',
'regulation of tube temperature',
tangodevice = 'tango://localhost:10000/box/tube/control1',
heateroutput = 0,
ramp = 6,
speed = 0.1,
setpoint = 0,
pid = (40,10,1),
p = 40,
i = 10,
d = 1,
abslimits = (0,500),
value = Param(unit='K'),
)
# OMG! a NamedDigitalOutput, but with float'ints' 0..3
#[module T_tube_regulation_heaterrange]
#class=frappy_mlz.entangle.AnalogOutput
#tangodevice=tango://localhost:10000/box/tube/range1
#precision.default=1
#abslimits=(0,3)
Mod('T_tube_regulation_heaterrange',
'frappy_mlz.entangle.NamedDigitalOutput',
'heaterrange for tube regulation',
tangodevice = 'tango://localhost:10000/box/tube/range1',
mapping={'Off':0,'Low':1,'Medium':2,'High':3},
)

View File

@ -1,50 +0,0 @@
[node see_demo_equipment]
description=Do not use, it needs to be rewritten....
[interface testing]
type=tcp
bindto=0.0.0.0
bindport=10767
[module tc1]
class=frappy_demo.modules.CoilTemp
sensor="X34598T7"
[module tc2]
class=frappy_demo.modules.CoilTemp
sensor="X39284Q8'
[module sensor1]
class=frappy_ess.epics.EpicsReadable
epics_version="v4"
.group="Lakeshore336"
value_pv="DEV:KRDG1"
[module loop1]
class=frappy_ess.epics.EpicsTempCtrl
epics_version="v4"
.group="Lakeshore336"
value_pv="DEV:KRDG1"
target_pv="DEV:SETP_S1"
heaterrange_pv="DEV:RANGE_S1"
[module sensor2]
class=frappy_ess.epics.EpicsReadable
epics_version="v4"
.group="Lakeshore336"
value_pv="DEV:KRDG2"
[module loop2]
class=frappy_ess.epics.EpicsTempCtrl
epics_version="v4"
.group="Lakeshore336"
value_pv="DEV:KRDG2"
target_pv="DEV:SETP_S2"
heaterrange_pv="DEV:RANGE_S2"

36
cfg/epics_cfg.py Normal file
View File

@ -0,0 +1,36 @@
Node('see_demo_equipment',
'Do not use, it needs to be rewritten....',
'tcp://10767',
)
Mod('tc1',
'frappy_demo.modules.CoilTemp',
'',
sensor="X34598T7",
)
Mod('tc2',
'frappy_demo.modules.CoilTemp',
'',
sensor="X39284Q8",
)
for i in [1,2]:
Mod('sensor%d' % i,
'frappy_ess.epics.EpicsReadable',
'',
epics_version="v4",
value_pv="DEV:KRDG%d" % i,
group="Lakeshore336",
)
Mod('loop%d' % i,
'frappy_ess.epics.EpicsTempCtrl',
'',
epics_version="v4",
group="Lakeshore336",
value_pv="DEV:KRDG%d" % i,
target_pv="DEV:SETP_S%d" % i,
heaterrange_pv="DEV:RANGE_S%d" % i,
)

View File

@ -1,28 +0,0 @@
[NODE]
id = LscSIM.psi.ch
description = Lsc Simulation at PSI
[INTERFACE]
uri = tcp://5000
[lscom]
class = frappy_psi.ls370sim.Ls370Sim
description = simulated serial communicator to a LS 370
visibility = 3
[sw]
class = frappy_psi.ls370res.Switcher
description = channel switcher for Lsc controller
io = lscom
[a]
class = frappy_psi.ls370res.ResChannel
channel = 1
description = resistivity
switcher = sw
[b]
class = frappy_psi.ls370res.ResChannel
channel = 3
description = resistivity
switcher = sw

30
cfg/ls370sim_cfg.py Normal file
View File

@ -0,0 +1,30 @@
Node('LscSIM.psi.ch',
'Lsc Simulation at PSI',
'tcp://5000',
)
Mod('lscom',
'frappy_psi.ls370sim.Ls370Sim',
'simulated serial communicator to a LS 370',
visibility = 3
)
Mod('sw',
'frappy_psi.ls370res.Switcher',
'channel switcher for Lsc controller',
io = 'lscom',
)
Mod('a',
'frappy_psi.ls370res.ResChannel',
'resistivity',
channel = 1,
switcher = 'sw',
)
Mod('b',
'frappy_psi.ls370res.ResChannel',
'resistivity',
channel = 3,
switcher = 'sw',
)

View File

@ -1,21 +0,0 @@
[node LscSIM.psi.ch]
description = Lsc370 Test
[interface tcp]
type = tcp
bindto = 0.0.0.0
bindport = 5000
[module lsmain]
class = frappy_psi.ls370res.Main
description = main control of Lsc controller
uri = localhost:4567
[module res]
class = frappy_psi.ls370res.ResChannel
vexc = '2mV'
channel = 3
description = resistivity
main = lsmain
# the auto created iodev from lsmain:
iodev = lsmain_iodev

20
cfg/ls370test_cfg.py Normal file
View File

@ -0,0 +1,20 @@
Node('LscSIM.psi.ch',
'Lsc370 Test',
'tcp://5000',
)
Mod('lsmain',
'frappy_psi.ls370res.Main',
'main control of Lsc controller',
uri = 'localhost:4567',
)
Mod('res',
'frappy_psi.ls370res.ResChannel',
'resistivity',
vexc = '2mV',
channel = 3,
main = 'lsmain',
# the auto created iodev from lsmain:
iodev = 'lsmain_iodev',
)

View File

@ -1,8 +0,0 @@
[NODE]
class = protocol.router.Router
id = multiplexer
description = multiplexer node
nodes = ['localhost:5000', 'localhost:10769']
[INTERFACE]
uri = tcp://5000

6
cfg/multiplexer_cfg.py Normal file
View File

@ -0,0 +1,6 @@
Node('multiplexer',
'multiplexer node',
'tcp://5000',
cls = 'protocol.router.Router',
nodes = ['localhost:10768', 'localhost:10769'],
)

View File

@ -1,124 +0,0 @@
[NODE]
id = PPMS.psi.ch
description = PPMS at PSI
[INTERFACE]
uri = tcp://5000
[tt]
class = frappy_psi.ppms.Temp
description = main temperature
io = ppms
[mf]
class = frappy_psi.ppms.Field
target.min = -9
target.max = 9
description = magnetic field
io = ppms
[pos]
class = frappy_psi.ppms.Position
description = sample rotator
io = ppms
[lev]
class = frappy_psi.ppms.Level
description = helium level
io = ppms
[chamber]
class = frappy_psi.ppms.Chamber
description = chamber state
io = ppms
[r1]
class = frappy_psi.ppms.BridgeChannel
description = resistivity channel 1
no = 1
value.unit = Ohm
io = ppms
[r2]
class = frappy_psi.ppms.BridgeChannel
description = resistivity channel 2
no = 2
value.unit = Ohm
io = ppms
[r3]
class = frappy_psi.ppms.BridgeChannel
description = resistivity channel 3
no = 3
value.unit = Ohm
io = ppms
[r4]
class = frappy_psi.ppms.BridgeChannel
description = resistivity channel 4
no = 4
value.unit = Ohm
io = ppms
[i1]
class = frappy_psi.ppms.Channel
description = current channel 1
no = 1
value.unit = uA
io = ppms
[i2]
class = frappy_psi.ppms.Channel
description = current channel 2
no = 2
value.unit = uA
io = ppms
[i3]
class = frappy_psi.ppms.Channel
description = current channel 3
no = 3
value.unit = uA
io = ppms
[i4]
class = frappy_psi.ppms.Channel
description = current channel 4
no = 4
value.unit = uA
io = ppms
[v1]
class = frappy_psi.ppms.DriverChannel
description = voltage channel 1
no = 1
value.unit = V
io = ppms
[v2]
class = frappy_psi.ppms.DriverChannel
description = voltage channel 2
no = 2
value.unit = V
io = ppms
[tv]
class = frappy_psi.ppms.UserChannel
description = VTI temperature
enabled = 1
value.unit = K
io = ppms
[ts]
class = frappy_psi.ppms.UserChannel
description = sample temperature
enabled = 1
value.unit = K
io = ppms
[ppms]
class = frappy_psi.ppms.Main
description = the main and poller module
class_id = QD.MULTIVU.PPMS.1
visibility = 3
pollinterval = 2

93
cfg/ppms_cfg.py Normal file
View File

@ -0,0 +1,93 @@
Node('PPMS.psi.ch',
'PPMS at PSI',
'tcp://5000',
)
Mod('tt',
'frappy_psi.ppms.Temp',
'main temperature',
io = 'ppms',
)
Mod('mf',
'frappy_psi.ppms.Field',
'magnetic field',
target = Param(min=-9, max=9),
io = 'ppms',
)
Mod('pos',
'frappy_psi.ppms.Position',
'sample rotator',
io = 'ppms',
)
Mod('lev',
'frappy_psi.ppms.Level',
'helium level',
io = 'ppms',
)
Mod('chamber',
'frappy_psi.ppms.Chamber',
'chamber state',
io = 'ppms',
)
for i in range(1,5):
Mod('r%d' % i,
'frappy_psi.ppms.BridgeChannel',
'resistivity channel %d' % i,
no = i,
value = Param(unit = 'Ohm'),
io = 'ppms',
)
for i in range(1,5):
Mod('i%d' % i,
'frappy_psi.ppms.Channel',
'current channel %d' % i,
no = i,
value = Param(unit = 'uA'),
io = 'ppms',
)
Mod('v1',
'frappy_psi.ppms.DriverChannel',
'voltage channel 1',
no = 1,
value = Param(unit = 'V'),
io = 'ppms',
)
Mod('v2',
'frappy_psi.ppms.DriverChannel',
'voltage channel 2',
no = 2,
value = Param(unit = 'V'),
io = 'ppms',
)
Mod('tv',
'frappy_psi.ppms.UserChannel',
'VTI temperature',
enabled = 1,
value = Param(unit = 'K'),
io = 'ppms',
)
Mod('ts',
'frappy_psi.ppms.UserChannel',
'sample temperature',
enabled = 1,
value = Param(unit = 'K'),
io = 'ppms',
)
Mod('ppms',
'frappy_psi.ppms.Main',
'the main and poller module',
class_id = 'QD.MULTIVU.PPMS.1',
visibility = 3,
pollinterval = 2,
)

View File

@ -1,22 +0,0 @@
[node filtered.PPMS.psi.ch]
description = filtered PPMS at PSI
[interface tcp]
type = tcp
bindto = 0.0.0.0
bindport = 5002
[module secnode]
class = frappy.SecNode
description = a SEC node
uri = tcp://localhost:5000
[module mf]
class = frappy.Proxy
remote_class = frappy_psi.ppms.Field
description = magnetic field
iodev = secnode
value.min = -0.1
value.max = 0.1
target.min = -8
target.max = 8

View File

@ -0,0 +1,21 @@
Node('filtered.PPMS.psi.ch',
'filtered PPMS at PSI',
'localhost:5002',
)
Mod('secnode',
'frappy.proxy.SecNode',
'a SEC node',
uri = 'tcp://localhost:5000',
)
Mod('mf',
'frappy.proxy.Proxy',
'magnetic field',
remote_class = 'frappy_psi.ppms.Field',
io = 'secnode',
value = Param(min = -0.1, max = 0.1),
target = Param(min = -8, max = 8),
)

View File

@ -1,8 +0,0 @@
[NODE]
id = router
class = protocol.router.Router
description = router node
node = localhost:5000
[INTERFACE]
uri=tcp://5002

6
cfg/router_cfg.py Normal file
View File

@ -0,0 +1,6 @@
Node('router',
'router node',
'tcp://5002',
cls = 'protocol.router.Router',
node = 'localhost:5000',
)

View File

@ -1,23 +0,0 @@
[node test config]
description=description of the simulation sec-node
.
Testing simulation dummy setup.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module sim]
class=frappy.simulation.SimDrivable
.description=simulation stuff
.extra_params=param3,param4,jitter,ramp
param3.datatype={"type":"bool"}
param3.default=True
param3.readonly=False
jitter.default=1
ramp.default=60
value.default=123
target.default=42

18
cfg/sim_cfg.py Normal file
View File

@ -0,0 +1,18 @@
Node('sim.test.config',
'description of the simulation sec-node\n'
'\n'
'Testing simulation dummy setup.',
'tcp://10767',
)
Mod('sim',
'frappy.simulation.SimDrivable',
'simulation stuff',
extra_params = 'param3,param4,jitter,ramp',
param3 = Param(default=True, datatype={'type': 'bool'}, readonly=False),
jitter = 1,
ramp = 60,
value = 123,
target = 42,
)

View File

@ -1,116 +0,0 @@
[node SIM_MLZ_amagnet(Garfield)]
description=MLZ-Amagnet
.
Water cooled magnet from ANTARES@MLZ.
.
Use module to control the magnetic field.
Don't forget to select symmetry first (can be moved only at zero field!).
.
Monitor T1..T4 (Coil temps), if they get to hot, field will ramp down!
.
In case of Problems, contact the ANTARES people at MLZ.
visibility=expert
foo=bar
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module enable]
class=frappy.simulation.SimWritable
value.datatype={"type":"enum", "members":{'On':1,'Off':0}}
target.datatype={"type":"enum", "members":{'On':1,'Off':0}}
.description='Enables to Output of the Powersupply'
.visibility='advanced'
[module polarity]
class=frappy.simulation.SimWritable
value.datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}}
target.datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}}
.description=polarity (+/-) switch
.
there is an interlock in the plc:
if there is current, switching polarity is forbidden
if polarity is short, powersupply is disabled
.visibility=advanced
[module symmetry]
class=frappy.simulation.SimWritable
value.datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}}
target.datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}}
.description=par/ser switch selecting (a)symmetric mode
.
note: on the front panel symmetric is ser, asymmetric is par
.visibility=advanced
value.default = 'symmetric'
[module T1]
class=frappy.simulation.SimReadable
.description=Temperature1 of the coils system
value.unit='degC'
value.default = 23.45
[module T2]
class=frappy.simulation.SimReadable
.description=Temperature2 of the coils system
value.unit='degC'
value.default = 23.45
[module T3]
class=frappy.simulation.SimReadable
.description=Temperature3 of the coils system
value.unit='degC'
value.default = 23.45
[module T4]
class=frappy.simulation.SimReadable
.description=Temperature4 of the coils system
value.unit='degC'
value.default = 23.45
[module currentsource]
class=frappy.simulation.SimDrivable
.description=Device for the magnet power supply (current mode)
abslimits=(0,200)
speed=1
ramp=60
precision=0.02
current=0
voltage=10
.visibility=advanced
.extra_params = abslimits, speed, ramp, precision, current, voltage, window
abslimits.datatype = {"type":"limit", "members":{"type":"double", "min":0, "max":200, "unit":"A"}}
abslimits.default = (0, 200)
speed.datatype = {"type":"double", "min":0, "max":10, "unit":"A/s"}
speed.default = 10
ramp.datatype = {"type":"double", "min":0, "max":600, "unit":"A/min"}
ramp.default = 600
precision.datatype = {"type":"double", "unit":"A"}
precision.default = 0.1
current.datatype = {"type":"double", "min":0, "max":200, "unit":"A"}
current.default = 0
voltage.datatype = {"type":"double", "min":0, "max":10, "unit":"V"}
voltage.default = 0
window.datatype = {"type":"double", "min":0, "max":120, "unit":"s"}
window.default = 10
[module mf]
class=frappy_mlz.amagnet.GarfieldMagnet
.description=magnetic field module, handling polarity switching and stuff
subdev_currentsource=currentsource
subdev_enable=enable
subdev_polswitch=polarity
subdev_symmetry=symmetry
target.unit='T'
value.unit='T'
userlimits=(-0.35, 0.35)
calibrationtable={'symmetric':[0.00186517, 0.0431937, -0.185956, 0.0599757, 0.194042],
'short': [0.0, 0.0, 0.0, 0.0, 0.0],
'asymmetric':[0.00136154, 0.027454, -0.120951, 0.0495289, 0.110689]}
.meaning=["magneticfield", 20]
.visibility=user
abslimits.default=-0.4,0.4

116
cfg/sim_mlz_amagnet_cfg.py Normal file
View File

@ -0,0 +1,116 @@
Node('SIM_MLZ_amagnet(Garfield)',
'MLZ-Amagnet\n'
'\n'
'Water cooled magnet from ANTARES@MLZ.\n'
'\n'
' Use module to control the magnetic field.\n'
'Don\'t forget to select symmetry first (can be moved only at zero field!).\n'
'\n'
'Monitor T1..T4 (Coil temps), if they get to hot, field will ramp down!\n'
'\n'
'In case of Problems, contact the ANTARES people at MLZ.',
'tcp://10767',
visibility = 'expert',
foo = 'bar',
)
Mod('enable',
'frappy.simulation.SimWritable',
'Enables to Output of the Powersupply',
value = Param(datatype={"type":"enum", "members":{'On':1,'Off':0}}),
target = Param(datatype={"type":"enum", "members":{'On':1,'Off':0}}),
visibility = 'advanced',
)
Mod('polarity',
'frappy.simulation.SimWritable',
'polarity (+/-) switch\n'
'\n'
'there is an interlock in the plc:\n'
'if there is current, switching polarity is forbidden\n'
'if polarity is short, powersupply is disabled',
value = Param(datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}}),
target = Param(datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}}),
visibility = 'advanced',
)
Mod('symmetry',
'frappy.simulation.SimWritable',
'par/ser switch selecting (a)symmetric mode\n'
'\n'
'note: on the front panel symmetric is ser, asymmetric is par',
value = Param(
datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}},
default = 'symmetric'
),
target = Param(datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}}),
visibility = 'advanced',
)
for i in range(1,5):
Mod('T%d' % i,
'frappy.simulation.SimReadable',
'Temperature%d of the coils system' % i,
value = Param(default = 23.45, unit='degC'),
)
Mod('currentsource',
'frappy.simulation.SimDrivable',
'Device for the magnet power supply (current mode)',
value = 0,
#abslimits = (0,200),
#speed = 1,
#ramp = 60,
#precision = 0.02,
#current = 0,
#voltage = 10,
visibility = 'advanced',
extra_params = 'abslimits, speed, ramp, precision, current, voltage, window',
abslimits = Param(
default = (0, 200),
datatype = {"type":"limit", "members":{"type":"double", "min":0, "max":200, "unit":"A"}}
),
speed = Param(
default = 10,
datatype = {"type":"double", "min":0, "max":10, "unit":"A/s"}
),
ramp = Param(
default = 600,
datatype = {"type":"double", "min":0, "max":600, "unit":"A/min"}
),
precision = Param(
default = 0.1,
datatype = {"type":"double", "unit":"A"}
),
current = Param(
default = 0,
datatype = {"type":"double", "min":0, "max":200, "unit":"A"}
),
voltage = Param(
default = 0,
datatype = {"type":"double", "min":0, "max":10, "unit":"V"}
),
window = Param(
default = 10,
datatype = {"type":"double", "min":0, "max":120, "unit":"s"}
)
)
Mod('mf',
'frappy_mlz.amagnet.GarfieldMagnet',
'magnetic field module, handling polarity switching and stuff',
subdev_currentsource='currentsource',
subdev_enable='enable',
subdev_polswitch='polarity',
subdev_symmetry='symmetry',
target = Param(unit='T'),
value = Param(unit='T'),
userlimits=(-0.35, 0.35),
calibrationtable={'symmetric':[0.00186517, 0.0431937, -0.185956, 0.0599757, 0.194042],
'short': [0.0, 0.0, 0.0, 0.0, 0.0],
'asymmetric':[0.00136154, 0.027454, -0.120951, 0.0495289, 0.110689]},
meaning=("magneticfield", 20),
visibility='user',
abslimits=(-0.4,0.4),
)

View File

@ -1,93 +0,0 @@
[node cci3he1]
description = [sim] cci3he box of MLZ Sample environment group
.
Controls an 3He insert with an ls370 and an PLC controlling
the compressor and the valves of the gas handling.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_cci3he1]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of cci3he1.
.
Controls the regulation loop of the ls370.
value.datatype={"type":"double","unit":"K"}
value.default=300
target.datatype={"type":"double", "min":0, "max":300, "unit":"K"}
target.default=300
.extra_params=ramp
ramp.datatype={"type":"double","min":0,"max":600,"unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
.meaning=["temperature_regulation",40]
[module T_cci3he1_A]
class=frappy.simulation.SimReadable
.description=3He pot temperature sensor. Also used for the regulation.
.visibility=expert
value.default=300
value.datatype={"type":"double","unit":"K"}
.meaning=["temperature",38]
[module T_cci3he1_B]
class=frappy.simulation.SimReadable
.description=(optional) sample temperature sensor close to sample.
.visibility=user
value.default=300
value.datatype={"type":"double","unit":"K"}
.meaning=["temperature",39]
[module cci3he1_p1]
class=frappy.simulation.SimReadable
.description=Pressure at turbo pump inlet.
.visibility=expert
value.default=2e-3
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_p2]
class=frappy.simulation.SimReadable
.description=Pressure at turbo pump outlet.
.visibility=expert
value.default=9.87
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_p3]
class=frappy.simulation.SimReadable
.description=Pressure at compressor inlet.
.visibility=expert
value.default=19.99
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_p4]
class=frappy.simulation.SimReadable
.description=Pressure at compressor outlet.
.visibility=expert
value.default=999
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_p5]
class=frappy.simulation.SimReadable
.description=Pressure in dump tank.
.visibility=expert
value.default=567
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_p6]
class=frappy.simulation.SimReadable
.description=Pressure in the vacuum dewar (ivc).
.visibility=expert
value.default=1e-3
value.datatype={"type":"double","unit":"mbar"}
[module cci3he1_flow]
class=frappy.simulation.SimReadable
.description=Gas Flow (condensing line).
.visibility=expert
value.default=12.34
value.datatype={"type":"double","unit":"mln/min"}
# note: all valves and switches are missing: use VNC to control them

View File

@ -0,0 +1,88 @@
Node('cci3he1',
'[sim] cci3he box of MLZ Sample environment group\n'
'\n'
'Controls an 3He insert with an ls370 and an PLC controlling \n'
'the compressor and the valves of the gas handling.',
'tcp://10767',
)
Mod('T_cci3he1',
'frappy.simulation.SimDrivable',
'Main temperature control node of cci3he1.\n'
'\n'
'Controls the regulation loop of the ls370.',
value = Param(default=300, datatype={"type":"double","unit":"K"}),
target = Param(default=300, datatype={"type":"double", "min":0, "max":300, "unit":"K"}),
extra_params='ramp',
ramp = Param(default=60,
datatype={"type":"double","min":0,"max":600,"unit":"K/min"},
description='target ramping speed in K/min.',
),
meaning=["temperature_regulation",40]
)
Mod('T_cci3he1_A',
'frappy.simulation.SimReadable',
'3He pot temperature sensor. Also used for the regulation.',
visibility='expert',
value = Param(default=300, datatype={"type":"double","unit":"K"}),
meaning=["temperature",38]
)
Mod('T_cci3he1_B',
'frappy.simulation.SimReadable',
'(optional) sample temperature sensor close to sample.',
visibility='user',
value = Param(default=300, datatype={"type":"double","unit":"K"}),
meaning=["temperature",39]
)
Mod('cci3he1_p1',
'frappy.simulation.SimReadable',
'Pressure at turbo pump inlet.',
value = Param(default=2e-3, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_p2',
'frappy.simulation.SimReadable',
'Pressure at turbo pump outlet.',
value = Param(default=9.87, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_p3',
'frappy.simulation.SimReadable',
'Pressure at compressor inlet.',
value = Param(default=19.99, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_p4',
'frappy.simulation.SimReadable',
'Pressure at compressor outlet.',
value = Param(default=999, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_p5',
'frappy.simulation.SimReadable',
'Pressure in dump tank.',
value = Param(default=567, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_p6',
'frappy.simulation.SimReadable',
'Pressure in the vacuum dewar (ivc).',
value = Param(default=1e-3, datatype={"type":"double","unit":"mbar"}),
visibility='expert',
)
Mod('cci3he1_flow',
'frappy.simulation.SimReadable',
'Gas Flow (condensing line).',
value = Param(default=12.34, datatype={"type":"double","unit":"mln/min"}),
visibility='expert',
)
# note: all valves and switches are missing: use VNC to control them

View File

@ -1,107 +0,0 @@
[node ccidu1]
description = [sim] ccidu box of MLZ Sample environment group
.
Controls an 3He/4He dilution insert with an ls372 and an PLC controlling
the compressor and the valves of the gas handling.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_ccidu1]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of ccidu1.
.
Controls the regulation loop of the ls372.
value.unit='K'
value.default=300
target.datatype={"type":"double", "min":0, "max":300, "unit":"K"}
target.default=300
.extra_params=ramp
ramp.datatype={"type":"double", "min":0, "max":600, "unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
.meaning=["temperature_regulation",40]
[module T_ccidu1_A]
class=frappy.simulation.SimReadable
.description=mixing chamber temperature sensor. Also used for the regulation.
.visibility=expert
value.default=300
value.datatype={"type":"double", "unit":"K"}
.meaning=["temperature",38]
[module T_ccidu1_B]
class=frappy.simulation.SimReadable
.description=(optional) sample temperature sensor close to sample.
.visibility=user
value.default=300
value.datatype={"type":"double", "unit":"K"}
.meaning=["temperature",39]
[module ccidu1_pstill]
class=frappy.simulation.SimReadable
.description=Pressure at the still/turbo pump inlet.
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_pinlet]
class=frappy.simulation.SimReadable
.description=Pressure at forepump inlet/turbo pump outlet.
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_poutlet]
class=frappy.simulation.SimReadable
.description=Pressure at forepump outlet/compressor inlet.
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_pkond]
class=frappy.simulation.SimReadable
.description=Pressure at condensing line/compressor outlet.
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_ptank]
class=frappy.simulation.SimReadable
.description=Pressure in dump tank.
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_pvac]
class=frappy.simulation.SimReadable
.description=Pressure in the vacuum dewar (ivc).
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
[module ccidu1_flow]
class=frappy.simulation.SimReadable
.description=Gas Flow (condensing line).
.visibility=expert
value.default=999
value.datatype={"type":"double", "unit":"mbar"}
# note: all valves and switches are missing: use VNC to control them
[module ccidu1_V6]
class=frappy.simulation.SimDrivable
.description=Needle valve
.visibility=expert
value.default=99
value.datatype={"type":"double", "min":0, "max":100, "unit":"%%"}
[module ccidu1_V3]
class=frappy.simulation.SimWritable
.description=Dump Valve
.visibility=expert
value.default="OFF"
value.datatype={"type":"enum", "members":{"on": 1, "OFF":0}}
target.datatype={"type":"enum", "members":{"on": 1, "OFF":0}}

106
cfg/sim_mlz_ccidu1_cfg.py Normal file
View File

@ -0,0 +1,106 @@
Node('ccidu1',
'[sim] ccidu box of MLZ Sample environment group\n'
'\n'
'Controls an 3He/4He dilution insert with an ls372 and an PLC controlling\n'
'the compressor and the valves of the gas handling.',
'tcp://10767',
)
Mod('T_ccidu1',
'frappy.simulation.SimDrivable',
'Main temperature control node of ccidu1.\n'
'\n'
'Controls the regulation loop of the ls372.',
value = Param(default=300, unit='K'),
target = Param(default=300, datatype={"type":"double", "min":0, "max":300, "unit":"K"}),
extra_params='ramp',
ramp = Param(default=60,
datatype={"type":"double", "min":0, "max":600, "unit":"K/min"},
description='target ramping speed in K/min.',
),
meaning=["temperature_regulation",40]
)
Mod('T_ccidu1_A',
'frappy.simulation.SimReadable',
'mixing chamber temperature sensor. Also used for the regulation.',
value = Param(default=300, datatype={"type":"double", "unit":"K"}),
visibility='expert',
meaning=["temperature",38],
)
Mod('T_ccidu1_B',
'frappy.simulation.SimReadable',
'(optional) sample temperature sensor close to sample.',
value = Param(default=300, datatype={"type":"double", "unit":"K"}),
visibility='user',
meaning=["temperature",39],
)
Mod('ccidu1_pstill',
'frappy.simulation.SimReadable',
'Pressure at the still/turbo pump inlet.',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_pinlet',
'frappy.simulation.SimReadable',
'Pressure at forepump inlet/turbo pump outlet.',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_poutlet',
'frappy.simulation.SimReadable',
'Pressure at forepump outlet/compressor inlet.',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_pkond',
'frappy.simulation.SimReadable',
'Pressure at condensing line/compressor outlet.',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_ptank',
'frappy.simulation.SimReadable',
'Pressure in dump tank.',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_pvac',
'frappy.simulation.SimReadable',
'Pressure in the vacuum dewar (ivc).',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
Mod('ccidu1_flow',
'frappy.simulation.SimReadable',
'Gas Flow (condensing line).',
value = Param(default=999, datatype={"type":"double", "unit":"mbar"}),
visibility='expert',
)
# note: all valves and switches are missing: use VNC to control them
Mod('ccidu1_V6',
'frappy.simulation.SimDrivable',
'Needle valve',
value = Param(default=99, datatype={"type":"double", "min":0, "max":100, "unit":"%%"}),
visibility='expert',
)
Mod('ccidu1_V3',
'frappy.simulation.SimWritable',
'Dump Valve',
value = Param(
default="OFF",
datatype={"type":"enum", "members":{"on": 1, "OFF":0}}
),
target = Param(datatype={"type":"enum", "members":{"on": 1, "OFF":0}}),
visibility='expert',
)

View File

@ -1,164 +0,0 @@
[node ccr12]
description = [sim] CCR12 box of MLZ Sample environment group
.
Contains a Lakeshore 336 and an PLC controlling the compressor
and some valves.
.
This is how we use it now.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_ccr12]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of CCR12.
.
Switches between regulation on stick and regulation on tube depending on temperature requested.
May also pump gas for higher temperatures, if configured.
.
Note: in nicos this is handled by its own class which manages T_ccr12_stick and T_ccr12_tube.
in this simulation this module is isolated.
.extra_params=ramp
ramp.datatype={"type":"double", "min":0,"max":60, "unit":"K/min"}
ramp.default=60
value.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
value.default=300
target.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
target.default=300
.meaning=["temperature_regulation", 20]
[module T_ccr12_stick]
class=frappy.simulation.SimDrivable
.description=Temperature regulation for the sample stick in ccr12.
.extra_params=ramp
ramp.datatype={"type":"double", "min":0,"max":60, "unit":"K/min"}
ramp.default=60
value.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
value.default=300
target.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
target.default=300
.meaning=["temperature_regulation", 15]
[module T_ccr12_tube]
class=frappy.simulation.SimDrivable
.description=Temperature regulation for the tube of ccr12.
.extra_params=ramp
ramp.datatype={"type":"double", "min":0,"max":60, "unit":"K/min"}
ramp.default=60
value.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
value.default=300
target.datatype={"type":"double", "min":0,"max":600, "unit":"K"}
target.default=300
.meaning=["temperature_regulation", 10]
[module T_ccr12_A]
class=frappy.simulation.SimReadable
.description=(optional) Sample temperature sensor.
value.datatype={"type":"double", "unit":"K"}
value.default=300
.meaning=["temperature", 9]
[module T_ccr12_B]
class=frappy.simulation.SimReadable
.description=(regulation) temperature sensor on stick.
value.datatype={"type":"double", "unit":"K"}
value.default=300
.meaning=["temperature", 10]
[module T_ccr12_C]
class=frappy.simulation.SimReadable
.description=Temperature at the coldhead.
value.datatype={"type":"double", "unit":"K"}
value.default=70
.meaning=["temperature", 1]
[module T_ccr12_D]
class=frappy.simulation.SimReadable
.description=(regulation) temperature at coupling to stick.
value.datatype={"type":"double", "unit":"K"}
value.default=80
.meaning=["temperature", 2]
[module ccr12_pressure_regulate]
class=frappy.simulation.SimWritable
.description=Selects on which Sensor the pressure regulation works, or switches it off.
.visibility=expert
value.datatype={"type":"enum", "members":{'off':0,'p1':1,'p2':2}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'p1':1,'p2':2}}
target.default='off'
[module ccr12_compressor]
class=frappy.simulation.SimDrivable
.description=Switches the compressor for the cooling stage on or off.
.
Note: This should always be on, except for fast heatup for sample change.
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='on'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='on'
[module ccr12_gas_switch]
class=frappy.simulation.SimWritable
.description=Switches the gas inlet on or off.
.
note: in reality this switches itself off after 15min.
note: in reality this is interlocked with ccr12_vacuum_switch, only one can be on!
note: in this simulation this module is isolated.
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module ccr12_vacuum_switch]
class=frappy.simulation.SimWritable
.description=Switches the vacuum pumping valve on or off.
.
note: in reality this is interlocked with ccr12_gas_switch, only one can be on!
note: in this simulation this module is isolated.
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module ccr12_p1]
class=frappy.simulation.SimReadable
.description=Default pressure Sensor, linear scale 0..1000mbar
value.datatype={"type":"double", "unit":"mbar"}
value.default=999
[module ccr12_p2]
class=frappy.simulation.SimReadable
.description=Auxillary pressure Sensor.
value.datatype={"type":"double", "unit":"mbar"}
value.default=1e-6
[module ccr12_curve_p2]
class=frappy.simulation.SimWritable
.description=Curve for Aux pressure Sensor p2
.visibility=expert
value.default='TTR100'
value.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}}
target.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}}
[module ccr12_p1_limits]
class=frappy.simulation.SimWritable
.description=Limits for pressure regulation in P1.
.visibility=expert
value.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
value.default=[0,10]
target.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
target.default=[0,10]
[module ccr12_p2_limits]
class=frappy.simulation.SimWritable
.description=Limits for pressure regulation in P2.
.visibility=expert
value.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
value.default=[1e-5,1e-3]
target.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
target.default=[1e-5,1e-3]

View File

@ -1,155 +0,0 @@
[node ccr12]
description = [sim] CCR12 box of MLZ Sample environment group
.
Contains a Lakeshore 336 and an PLC controlling the compressor
and some valves.
.
This is an improved version, how we think it should be.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_ccr12]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of CCR12.
.
Switches between regulation on stick and regulation on tube depending on temperature requested.
May also pump gas for higher temperatures, if configured.
Manual switching of the regulation node is supported via the regulationmode parameter.
value.datatype={"type":"double", "min":0, "max":600, "unit":"K"}
value.default=300
target.datatype={"type":"double", "min":0, "max":600, "unit":"K"}
target.default=300
.extra_params=ramp,regulationmode,abslimits,userlimits
ramp.datatype={"type":"double", "min":0, "max":60, "unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
ramp.readonly=False
regulationmode.datatype={"type":"enum","members":{"stick":1,"tube":2,"both":3}}
regulationmode.default='both'
regulationmode.description=regulate only stick, tube or select based upon the target value.
regulationmode.readonly=False
abslimits.datatype={"type":"limit","members":{"type":"double", "min":0,"max":600, "unit":"K"}}
abslimits.default=[0,600]
abslimits.description=currently active absolute limits for the setpoint. depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).
userlimits.datatype={"type":"limit","members":{"type":"double", "min":0,"max":600, "unit":"K"}}
userlimits.default=[0,300]
userlimits.description=current user set limits for the setpoint. must be inside abslimits.
userlimits.readonly=False
.meaning=["temperature_regulation", 20]
[module T_ccr12_A]
class=frappy.simulation.SimReadable
.description=(optional) Sample temperature sensor.
.visibility=expert
value.datatype={"type":"double", "min":0, "unit":"K"}
value.default=300
.meaning=["temperature", 9]
[module T_ccr12_B]
class=frappy.simulation.SimReadable
.description=(regulation) temperature sensor on stick.
.visibility=expert
value.datatype={"type":"double", "min":0, "unit":"K"}
value.default=300
.meaning=["temperature", 10]
[module T_ccr12_C]
class=frappy.simulation.SimReadable
.description=Temperature at the coldhead.
.visibility=expert
value.datatype={"type":"double", "min":0, "unit":"K"}
value.default=70
.meaning=["temperature", 1]
[module T_ccr12_D]
class=frappy.simulation.SimReadable
.description=(regulation) temperature at coupling to stick.
.visibility=expert
value.datatype={"type":"double", "min":0, "unit":"K"}
value.default=80
.meaning=["temperature", 2]
[module ccr12_pressure_regulation]
class=frappy.simulation.SimReadable
.description=Simple two-point presssure regulation. the mode parameter selects the readout on which to regulate, or 'none' for no regulation.
.visibility=user
.extra_params=switchpoints, mode
mode.datatype={"type":"enum", "members":{"none":0,"p1":1,"p2":2}}
mode.description=Select pressure sensor to regulate on, or 'none' to disable regulation.
mode.default='none'
# struct is more explicit, but ugly to read....
switchpoints.datatype={"type":"struct", "members":{"lower":{"type":"double", "unit":"mbar"},"upper":{"type":"double", "unit":"mbar"}}, "optional":["upper","lower"]}
switchpoints.description=Switching points for regulation. If the selected pressure is below 'lower' value, the gas valve is opened, above 'upper' the value vacuum valve is openend, else both are closed. values for switchpoints are taken from the selected pressure sensors userlimits.
switchpoints.default={'lower':1e-6,'upper':1e-3}
switchpoints.readonly=True
value.datatype={"type":"double", "min":0, "max":1000, "unit":"mbar"}
value.default = 1e-5
[module ccr12_compressor]
class=frappy.simulation.SimDrivable
.description=Switches the compressor for the cooling stage on or off.
.
Note: This should always be on, except for fast heatup for sample change.
.visibility=user
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
[module ccr12_gas_switch]
class=frappy.simulation.SimWritable
.description=Switches the gas inlet on or off.
.
note: in reality this switches itself off after 15min.
note: in reality this is interlocked with ccr12_vacuum_switch, only one can be on!
note: in this simulation this module is isolated.
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module ccr12_vacuum_switch]
class=frappy.simulation.SimWritable
.description=Switches the vacuum pumping valve on or off.
.
note: in reality this is interlocked with ccr12_gas_switch, only one can be on!
note: in this simulation this module is isolated.
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
value.default='off'
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module ccr12_p1]
class=frappy.simulation.SimReadable
.description=Default pressure Sensor, linear scale 0..1000 mbar
.
Good candidate for a 'Sensor' Interface class!
value.default=999
value.unit=mbar
.extra_params=curve, userlimits
curve.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}}
curve.description=Calibration curve for pressure sensor
curve.default='TTR100'
userlimits.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
userlimits.default=[1, 100]
userlimits.description=current user set limits for the pressure regulation.
userlimits.readonly=False
[module ccr12_p2]
class=frappy.simulation.SimReadable
.description=Auxillary pressure Sensor.
value.default=1e-6
value.unit=mbar
.extra_params=curve,userlimits
curve.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}}
curve.description=Calibration curve for pressure sensor
curve.default='PTR90'
userlimits.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}}
userlimits.default=[1e-6, 1e-3]
userlimits.description=current user set limits for the pressure regulation.
userlimits.readonly=False
pollinterval.visibility='expert'

177
cfg/sim_mlz_ccr12_v2_cfg.py Normal file
View File

@ -0,0 +1,177 @@
# pylint: skip-file
Node('ccr12',
'[sim] CCR12 box of MLZ Sample environment group'
''
'Contains a Lakeshore 336 and an PLC controlling the compressor'
'and some valves.'
''
'This is an improved version, how we think it should be.',
'tcp://10767',
)
Mod('T_ccr12',
'frappy.simulation.SimDrivable',
'Main temperature control node of CCR12.'
''
'Switches between regulation on stick and regulation on tube depending on temperature requested.'
'May also pump gas for higher temperatures, if configured.'
'Manual switching of the regulation node is supported via the regulationmode parameter.',
value = Param(default=300,
datatype={"type":"double", "min":0, "max":600, "unit":"K"}),
target = Param(default=300,
datatype={"type":"double", "min":0, "max":600, "unit":"K"}),
extra_params='ramp,regulationmode,abslimits,userlimits',
ramp = Param(
default=60,
datatype={"type":"double", "min":0, "max":60, "unit":"K/min"},
description='target ramping speed in K/min.',
readonly=False,
),
regulationmode = Param(
default='both',
datatype={"type":"enum","members":{"stick":1,"tube":2,"both":3}},
description='regulate only stick, tube or select based upon the target value.',
readonly=False,
),
abslimits = Param(
default=[0,600],
datatype={"type":"limit","members":{"type":"double", "min":0,"max":600, "unit":"K"}},
description='currently active absolute limits for the setpoint. depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).',
),
userlimits = Param(
default=[0,300],
datatype={"type":"limit","members":{"type":"double", "min":0,"max":600, "unit":"K"}},
description='current user set limits for the setpoint. must be inside abslimits.',
readonly=False,
),
meaning=["temperature_regulation", 20],
)
Mod('T_ccr12_A',
'frappy.simulation.SimReadable',
'(optional) Sample temperature sensor.',
value = Param(default=300,
datatype={"type":"double", "min":0, "unit":"K"}),
visibility='expert',
meaning=["temperature", 9],
)
Mod('T_ccr12_B',
'frappy.simulation.SimReadable',
'(regulation) temperature sensor on stick.',
value = Param(default=300, datatype={"type":"double", "min":0, "unit":"K"}),
visibility='expert',
meaning=["temperature", 10],
)
Mod('T_ccr12_C',
'frappy.simulation.SimReadable',
'Temperature at the coldhead.',
value = Param(default=70, datatype={"type":"double", "min":0, "unit":"K"}),
visibility='expert',
meaning=["temperature", 1],
)
Mod('T_ccr12_D',
'frappy.simulation.SimReadable',
'(regulation) temperature at coupling to stick.',
value = Param(default=80, datatype={"type":"double", "min":0, "unit":"K"}),
visibility='expert',
meaning=["temperature", 2],
)
Mod('ccr12_pressure_regulation',
'frappy.simulation.SimReadable',
'Simple two-point presssure regulation. the mode parameter selects the readout on which to regulate, or, \'none\' for no regulation.',
value = Param(default = 1e-5,
datatype={"type":"double", "min":0, "max":1000, "unit":"mbar"}),
extra_params='switchpoints, mode',
mode = Param(
default='none',
datatype={"type":"enum", "members":{"none":0,"p1":1,"p2":2}},
description='Select pressure sensor to regulate on, or \'none\' to disable regulation.',
),
switchpoints = Param(
default={'lower':1e-6,'upper':1e-3},
# struct is more explicit, but ugly to read....
datatype={"type":"struct", "members":{"lower":{"type":"double", "unit":"mbar"},"upper":{"type":"double", "unit":"mbar"}}, "optional":["upper","lower"]},
description='Switching points for regulation. If the selected pressure is below \'lower\' value, the gas valve is opened, above \'upper\' the value vacuum valve is openend, else both are closed. values for switchpoints are taken from the selected pressure sensors userlimits.',
readonly=True,
),
visibility='user',
)
Mod('ccr12_compressor',
'frappy.simulation.SimDrivable',
'Switches the compressor for the cooling stage on or off.\n'
'\n'
'Note: This should always be on, except for fast heatup for sample change.',
value = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(datatype={"type":"enum", "members":{'off':0,'on':1}}),
visibility='user',
)
Mod('ccr12_gas_switch',
'frappy.simulation.SimWritable',
'Switches the gas inlet on or off.\n'
'\n'
'note: in reality this switches itself off after 15min.\n'
'note: in reality this is interlocked with ccr12_vacuum_switch, only one can be on!\n'
'note: in this simulation this module is isolated.',
value = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
)
Mod('ccr12_vacuum_switch',
'frappy.simulation.SimWritable',
'Switches the vacuum pumping valve on or off.\n'
'\n'
'note: in reality this is interlocked with ccr12_gas_switch, only one can be on!\n'
'note: in this simulation this module is isolated.',
value = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
)
Mod('ccr12_p1',
'frappy.simulation.SimReadable',
'Default pressure Sensor, linear scale 0..1000 mbar\n'
'\n'
'Good candidate for a \'Sensor\' Interface class!',
value = Param(default=999, unit='mbar'),
extra_params='curve, userlimits',
curve = Param(
default='TTR100',
datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}},
description='Calibration curve for pressure sensor',
),
userlimits = Param(
default=[1, 100],
datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}},
description='current user set limits for the pressure regulation.',
readonly=False,
),
)
Mod('ccr12_p2',
'frappy.simulation.SimReadable',
'Auxillary pressure Sensor.',
value = Param(default=1e-6, unit='mbar'),
extra_params='curve,userlimits',
curve = Param(
default='PTR90',
datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}},
description='Calibration curve for pressure sensor',
),
userlimits = Param(
default=[1e-6, 1e-3],
datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}},
description='current user set limits for the pressure regulation.',
readonly=False,
),
pollinterval = Param(visibility='expert'),
)

View File

@ -1,33 +0,0 @@
[node htf02]
description = [sim] htf02 box of MLZ Sample environment group
.
Controls an High Temperature Furnace with an eurotherm controller and an PLC checking the cooing water.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_htf02]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of htf02.
.
Controls the regulation loop of the Eurotherm.
value.datatype={"type":"double", "min":0, "unit":"degC"}
value.default=300
target.datatype={"type":"double", "min":0, "max": 2000, "unit":"degC"}
target.default=300
.extra_params=ramp
ramp.datatype={"type":"double", "min":0, "max": 600, "unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
ramp.readonly=False
.meaning=["temperature", 10]
[module htf02_p]
class=frappy.simulation.SimReadable
.description=Pressure Sensor at sample space (ivc).
value.datatype={"type":"double", "min":0, "unit":"mbar"}
value.default=989

30
cfg/sim_mlz_htf02_cfg.py Normal file
View File

@ -0,0 +1,30 @@
Node('htf02',
'[sim] htf02 box of MLZ Sample environment group\n'
'\n'
'Controls an High Temperature Furnace with an eurotherm controller and an PLC checking the cooing water.',
'tcp://10767',
)
Mod('T_htf02',
'frappy.simulation.SimDrivable',
'Main temperature control node of htf02.\n'
'\n'
'Controls the regulation loop of the Eurotherm.',
value = Param(default=300,
datatype={"type":"double", "min":0, "unit":"degC"}),
target = Param(default=300,
datatype={"type":"double", "min":0, "max": 2000, "unit":"degC"}),
extra_params='ramp',
ramp = Param(default=60,
datatype={"type":"double", "min":0, "max": 600, "unit":"K/min"},
description='target ramping speed in K/min.',
readonly=False,
),
meaning=["temperature", 10],
)
Mod('htf02_p',
'frappy.simulation.SimReadable',
'Pressure Sensor at sample space (ivc).',
value = Param(default=989, datatype={"type":"double", "min":0, "unit":"mbar"}),
)

View File

@ -1,73 +0,0 @@
[node stressihtf2]
description = [sim] Stressihtf2 box of MLZ Sample environment group
.
Controls an High Temperature Furnace with an Eurotherm and an PLC controlling some valves and checking cooling water.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T_stressihtf2]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of Stressihtf2.
value.datatype={"type":"double", "min":0, "unit":"degC"}
value.default=20
target.datatype={"type":"double", "min":0, "max":2000, "unit":"degC"}
target.default=20
.extra_params=ramp,regulationmode,abslimits,userlimits
ramp.datatype={"type":"double", "min":0, "max":600, "unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
abslimits.datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}}
abslimits.default=[0,2000]
abslimits.description=currently active absolute limits for the setpoint. depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).
userlimits.datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}}
userlimits.default=[0,300]
userlimits.description=current user set limits for the setpoint. must be inside abslimits.
userlimits.readonly=False
.meaning=['temperature_regulation', 10]
[module T_stressihtf2_sample]
class=frappy.simulation.SimReadable
.description=(optional) Sample temperature sensor.
.visibility=expert
value.default=300
value.datatype={"type":"double", "min":0, "unit":"degC"}
.meaning=["temperature", 9]
[module stressihtf2_n2]
class=frappy.simulation.SimWritable
.description=Switches the N2 gas inlet on or off.
.visibility=expert
value.default='off'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module stressihtf2_he]
class=frappy.simulation.SimWritable
.description=Switches the He gas inlet on or off.
.visibility=expert
value.default='off'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module stressihtf2_lamps]
class=frappy.simulation.SimWritable
.description=Switches the heating lamps on or off.
.visibility=expert
value.default='on'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='on'
[module stressihtf2_water_ok]
class=frappy.simulation.SimReadable
.description=Readout of the cooling water state.
.visibility=expert
value.default='ok'
value.datatype={"type":"enum", "members":{'failed':0,'ok':1}}

View File

@ -1,73 +0,0 @@
[node stressihtf2_v2]
description = [sim] Stressihtf2 box of MLZ Sample environment group
.
Controls an High Temperature Furnace with an Eurotherm and an PLC controlling some valves and checking cooling water.
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T]
class=frappy.simulation.SimDrivable
.description=Main temperature control node of Stressihtf2.
value.datatype={"type":"double", "min":0, "unit":"degC"}
value.default=20
target.datatype={"type":"double", "min":0, "max":2000, "unit":"degC"}
target.default=20
.extra_params=ramp,regulationmode,abslimits,userlimits
ramp.datatype={"type":"double", "min":0, "max":600, "unit":"K/min"}
ramp.description=target ramping speed in K/min.
ramp.default=60
abslimits.datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}}
abslimits.default=[0,2000]
abslimits.description=currently active absolute limits for the setpoint. depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).
userlimits.datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}}
userlimits.default=[0,300]
userlimits.description=current user set limits for the setpoint. must be inside abslimits.
userlimits.readonly=False
.meaning=['temperature_regulation', 10]
[module T_sample]
class=frappy.simulation.SimReadable
.description=(optional) Sample temperature sensor.
.visibility=expert
value.default=300
value.datatype={"type":"double", "min":0, "unit":"degC"}
.meaning=["temperature", 9]
[module N2]
class=frappy.simulation.SimWritable
.description=Switches the N2 gas inlet on or off.
.visibility=expert
value.default='off'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module He]
class=frappy.simulation.SimWritable
.description=Switches the He gas inlet on or off.
.visibility=expert
value.default='off'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='off'
[module lamps]
class=frappy.simulation.SimWritable
.description=Switches the heating lamps on or off.
.visibility=expert
value.default='on'
value.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.datatype={"type":"enum", "members":{'off':0,'on':1}}
target.default='on'
[module water_ok]
class=frappy.simulation.SimReadable
.description=Readout of the cooling water state.
.visibility=expert
value.default='ok'
value.datatype={"type":"enum", "members":{'failed':0,'ok':1}}

View File

@ -0,0 +1,82 @@
Node('stressihtf2_v2',
'[sim] Stressihtf2 box of MLZ Sample environment group\n'
'\n'
'Controls an High Temperature Furnace with an Eurotherm and an PLC controlling some valves and checking cooling water.',
'tcp://10767',
)
Mod('T',
'frappy.simulation.SimDrivable',
'Main temperature control node of Stressihtf2.',
value = Param(default=20,
datatype={"type":"double", "min":0, "unit":"degC"}),
target = Param(default=20,
datatype={"type":"double", "min":0, "max":2000, "unit":"degC"}),
extra_params='ramp,regulationmode,abslimits,userlimits',
ramp = Param(
default=60,
datatype={"type":"double", "min":0, "max":600, "unit":"K/min"},
description='target ramping speed in K/min.',
),
abslimits = Param(
default=[0,2000],
datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}},
description='currently active absolute limits for the setpoint. depend \
on the regulationmode parameter (both/stick->0..600, tube->0..300K).',
),
userlimits = Param(
default=[0,300],
datatype={"type":"limit", "members":{"type":"double", "min":0, "max":2000, "unit":"degC"}},
description='current user set limits for the setpoint. must be inside abslimits.',
readonly=False,
),
meaning=['temperature_regulation', 10],
)
Mod('T_sample',
'frappy.simulation.SimReadable',
'(optional) Sample temperature sensor.',
value = Param(default=300,
datatype={"type":"double", "min":0, "unit":"degC"}),
visibility='expert',
meaning=["temperature", 9],
)
Mod('N2',
'frappy.simulation.SimWritable',
'Switches the N2 gas inlet on or off.',
value = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
visibility='expert',
)
Mod('He',
'frappy.simulation.SimWritable',
'Switches the He gas inlet on or off.',
value = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(default='off',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
visibility='expert',
)
Mod('lamps',
'frappy.simulation.SimWritable',
'Switches the heating lamps on or off.',
value = Param(default='on',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
target = Param(default='on',
datatype={"type":"enum", "members":{'off':0,'on':1}}),
visibility='expert',
)
Mod('water_ok',
'frappy.simulation.SimReadable',
'Readout of the cooling water state.',
value = Param(default='ok',
datatype={"type":"enum", "members":{'failed':0,'ok':1}}),
visibility='expert',
)

View File

@ -1,12 +0,0 @@
[r3]
class = frappy.core.Proxy
remote_class = frappy.core.Readable
description = temp sensor on 3He system
uri = tcp://pc12694:5000
export = False
[t3]
class = frappy_psi.softcal.Sensor
rawsensor = r3
calib = X131346
value.unit = K

16
cfg/softcal_cfg.py Normal file
View File

@ -0,0 +1,16 @@
Node('r3',
'temp sensor on 3He system',
'tcp://pc12694:5000',
cls = 'frappy.core.Proxy',
remote_class = 'frappy_mlz.amagnet.GarfieldMagnet',
#remote_class = 'frappy.core.Readable',
export = False,
)
Mod('t3',
'frappy_psi.softcal.Sensor',
'',
value = Param(unit = 'K'),
rawsensor = 'r3',
calib = 'X131346',
)

View File

@ -1,83 +0,0 @@
[node stressihtf2]
description = Stressihtf2 box of MLZ Sample environment group
.
Controls an High Temperature Furnace with an Eurotherm and an PLC controlling some valves and checking cooling water.
meaning={'T_regulation':{'T':100}, 'T_sample':{'T_sample':100}}
[interface tcp]
type=tcp
bindto=0.0.0.0
bindport=10767
[module T]
class=frappy_mlz.entangle.TemperatureController
tangodevice=tango://localhost:10000/box/eurotherm/ctrl
.description=Main temperature control node of Stressihtf2.
value.unit='degC'
target.datatype=["double", 0, 2000]
ramp.datatype=["double",0,9999]
ramp.description=target ramping speed in K/min.
ramp.default=60
ramp.unit=K/min
abslimits.datatype=["tuple",[["double"],["double"]]]
abslimits.default=[0,2000]
abslimits.description=currently active absolute limits for the setpoint. depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).
abslimits.unit='degC'
abslimits.readonly=True
userlimits.datatype=["tuple",[["double"],["double"]]]
userlimits.default=[0,300]
userlimits.description=current user set limits for the setpoint. must be inside abslimits.
userlimits.unit='degC'
heateroutput.datatype=["double",0,100]
heateroutput.description=output to the heater
heateroutput.unit='%%'
heateroutput.default=0
setpoint.default=0
p.default=1
i.default=0
d.default=0
pid.default=[1,0,0]
speed.default=0
[module T_sample_a]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/eurotherm/sensora
.description=Regulation temperature sensor.
.visibility=user
value.unit='degC'
[module T_sample_b]
class=frappy_mlz.entangle.Sensor
tangodevice=tango://localhost:10000/box/eurotherm/sensorb
.description=(optional) Sample temperature sensor.
.visibility=expert
value.unit='degC'
[module N2]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_gas1
.description=Switches the N2 gas inlet on or off.
.visibility=expert
mapping=dict(off=0,on=1)
[module He]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_gas2
.description=Switches the He gas inlet on or off.
.visibility=expert
mapping=dict(off=0,on=1)
[module lamps]
class=frappy_mlz.entangle.NamedDigitalOutput
tangodevice=tango://localhost:10000/box/plc/_onoff
.description=Switches the heating lamps on or off.
.visibility=expert
mapping=dict(off=0,on=1)
[module water_ok]
class=frappy_mlz.entangle.NamedDigitalInput
tangodevice=tango://localhost:10000/box/plc/_waterok
.description=Readout of the cooling water state.
.visibility=expert
mapping=dict(failed=0,ok=1)

96
cfg/stressihtf2_cfg.py Normal file
View File

@ -0,0 +1,96 @@
Node('stressihtf2',
'Stressihtf2 box of MLZ Sample environment group\n'
'\n'
'Controls an High Temperature Furnace with an Eurotherm and an PLC controlling some valves and checking cooling water.',
'localhost:10767',
meaning={'T_regulation':{'T':100}, 'T_sample':{'T_sample':100}},
)
Mod('T',
'frappy_mlz.entangle.TemperatureController',
'Main temperature control node of Stressihtf2.',
tangodevice='tango://localhost:10000/box/eurotherm/ctrl',
value = Param(unit='degC'),
target = Param(datatype=["double", 0, 2000]),
ramp = Param(
default=60,
datatype=["double",0,9999],
unit='K/min',
description='target ramping speed in K/min.',
),
abslimits = Param(
default=[0,2000],
datatype=["tuple",[["double"],["double"]]],
unit='degC',
description='currently active absolute limits for the setpoint.\
depend on the regulationmode parameter (both/stick->0..600, tube->0..300K).',
readonly=True,
),
userlimits = Param(
default=[0,300],
datatype=["tuple",[["double"],["double"]]],
unit='degC',
description='current user set limits for the setpoint. must be inside abslimits.',
),
heateroutput = Param(
default=0,
datatype=["double",0,100],
unit='%%',
description='output to the heater',
),
setpoint = 0,
p = 1,
i = 0,
d = 0,
pid = [1,0,0],
speed = 0,
)
Mod('T_sample_a',
'frappy_mlz.entangle.Sensor',
'Regulation temperature sensor.',
tangodevice='tango://localhost:10000/box/eurotherm/sensora',
value = Param(unit='degC'),
visibility='user',
)
Mod('T_sample_b',
'frappy_mlz.entangle.Sensor',
'(optional) Sample temperature sensor.',
tangodevice='tango://localhost:10000/box/eurotherm/sensorb',
value = Param(unit='degC'),
visibility='expert',
)
Mod('N2',
'frappy_mlz.entangle.NamedDigitalOutput',
'Switches the N2 gas inlet on or off.',
tangodevice='tango://localhost:10000/box/plc/_gas1',
mapping={'off':0,'on':1},
visibility='expert',
)
Mod('He',
'frappy_mlz.entangle.NamedDigitalOutput',
'Switches the He gas inlet on or off.',
tangodevice='tango://localhost:10000/box/plc/_gas2',
mapping={'off':0,'on':1},
visibility='expert',
)
Mod('lamps',
'frappy_mlz.entangle.NamedDigitalOutput',
'Switches the heating lamps on or off.',
tangodevice='tango://localhost:10000/box/plc/_onoff',
mapping={'off':0,'on':1},
visibility='expert',
)
Mod('water_ok',
'frappy_mlz.entangle.NamedDigitalInput',
'Readout of the cooling water state.',
tangodevice='tango://localhost:10000/box/plc/_waterok',
mapping={'failed':0,'ok':1},
visibility='expert',
)

View File

@ -185,7 +185,7 @@ def proxy_class(remote_class, name=None):
for aname, aobj in rcls.accessibles.items():
if isinstance(aobj, Parameter):
pobj = aobj.copy()
pobj.merge(dict(needscfg=False))
pobj.merge({'needscfg': False})
attrs[aname] = pobj
def rfunc(self, pname=aname):
@ -226,7 +226,12 @@ def Proxy(name, logger, cfgdict, srv):
title cased as it acts like a class
"""
remote_class = cfgdict.pop('remote_class')
if isinstance(remote_class, dict):
remote_class = remote_class['default']
if 'description' not in cfgdict:
cfgdict['description'] = 'remote module %s on %s' % (
cfgdict.get('module', name), cfgdict.get('io', '?'))
cfgdict.get('module', name),
cfgdict.get('io', {'default:': '?'})['default'])
return proxy_class(remote_class)(name, logger, cfgdict, srv)

View File

@ -35,7 +35,7 @@ class SimBase:
extra_params = cfgdict.pop('extra_params', '') or cfgdict.pop('.extra_params', '')
attrs = {}
if extra_params:
for k in extra_params.split(','):
for k in extra_params['default'].split(','):
k = k.strip()
attrs[k] = Parameter('extra_param: %s' % k.strip(),
datatype=FloatRange(),