Adapt sim_* cfg's to current syntax

+ make 'limit' usable as type in cfg files
+ minor fixes

Change-Id: Ib94b2645c7a0d978d64d4c86c4415d4b5b0d485f
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21485
Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Enrico Faulhaber
2019-10-30 17:24:03 +01:00
parent ac873ed546
commit 5458911b67
20 changed files with 246 additions and 226 deletions

View File

@ -20,60 +20,54 @@ bindport=10767
[module enable]
class=secop.simulation.SimWritable
value.datatype=["enum", {'On':1,'Off':0}]
target.datatype=["enum", {'On':1,'Off':0}]
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=secop.simulation.SimWritable
value.datatype=["enum", {'+1':1,'0':0,'-1':-1}]
target.datatype=["enum", {'+1':1,'0':0,'-1':-1}]
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
#comtries = 50
[module symmetry]
class=secop.simulation.SimWritable
value.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]
target.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}]
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'
value.value = 'symmetric'
[module T1]
class=secop.simulation.SimReadable
.description=Temperature1 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
value.default = 23.45
[module T2]
class=secop.simulation.SimReadable
.description=Temperature2 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
value.default = 23.45
[module T3]
class=secop.simulation.SimReadable
.description=Temperature3 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
value.default = 23.45
[module T4]
class=secop.simulation.SimReadable
.description=Temperature4 of the coils system
#warnlimits=(0, 50)
value.unit='degC'
value.default = 23.45
@ -86,31 +80,22 @@ ramp=60
precision=0.02
current=0
voltage=10
#unit=A
.visibility=advanced
.extra_params = abslimits, speed, ramp, precision, current, voltage, window
abslimits.datatype = ["tuple", [["double"], ["double"]]]
abslimits.value = (0, 200)
abslimits.datatype = {"type":"limit", "members":{"type":"double", "min":0, "max":200, "unit":"A"}}
abslimits.default = (0, 200)
abslimits.unit = 'A'
speed.datatype = ["double", 0, 10]
speed.datatype = {"type":"double", "min":0, "max":10, "unit":"A/s"}
speed.default = 10
speed.unit = 'A/s'
ramp.datatype = ["double", 0, 600]
ramp.datatype = {"type":"double", "min":0, "max":600, "unit":"A/min"}
ramp.default = 600
ramp.unit = 'A/min'
precision.datatype = ["double"]
precision.datatype = {"type":"double", "unit":"A"}
precision.default = 0.1
precision.unit = 'A'
current.datatype = ["double", 0, 200]
current.datatype = {"type":"double", "min":0, "max":200, "unit":"A"}
current.default = 0
current.unit = 'A'
voltage.datatype = ["double", 0, 10]
voltage.datatype = {"type":"double", "min":0, "max":10, "unit":"V"}
voltage.default = 0
voltage.unit = 'V'
window.datatype = ["double", 0, 120]
window.datatype = {"type":"double", "min":0, "max":120, "unit":"s"}
window.default = 10
window.unit = 's'
[module mf]
class=secop_mlz.amagnet.GarfieldMagnet
@ -125,8 +110,7 @@ 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
.meaning=["magneticfield", 20]
.visibility=user
abslimits.default=-0.4,0.4