Bring demo up to date
* Add python config for test and demo server * Remove old configs * Fix issue with slow start of test server Change-Id: If0e576f4e4dda8b03489fdbb79b209dfcdca29ff
This commit is contained in:
parent
09d48ea913
commit
05593d80f6
6
Makefile
6
Makefile
@ -3,13 +3,15 @@
|
||||
|
||||
all: clean doc
|
||||
|
||||
# Make spawns a new shell for each command.
|
||||
# Save each PID in temporary file
|
||||
# sleep in order for "test" to have started reliably
|
||||
demo:
|
||||
# Make spawns a new shell for each command.
|
||||
# Save each PID in temporary file
|
||||
@rm -f frappydemo.PID || true
|
||||
@{ bin/frappy-server -q demo & echo $$! >> frappydemo.PID; }
|
||||
@{ bin/frappy-server -q test & echo $$! >> frappydemo.PID; }
|
||||
@{ bin/frappy-server -q cryo & echo $$! >> frappydemo.PID; }
|
||||
@sleep 0.2
|
||||
@bin/frappy-gui localhost:10767 localhost:10768 localhost:10769
|
||||
@cat frappydemo.PID | xargs kill || true
|
||||
@rm frappydemo.PID
|
||||
|
50
cfg/cryo.cfg
50
cfg/cryo.cfg
@ -1,50 +0,0 @@
|
||||
[node cryo_7]
|
||||
# set SEC-node properties
|
||||
description = short description
|
||||
.
|
||||
This is a very long description providing all the glory details in all the glory details about the stuff we are describing
|
||||
|
||||
|
||||
[interface tcp]
|
||||
type=tcp
|
||||
bindto=0.0.0.0
|
||||
bindport=10769
|
||||
|
||||
[module cryo]
|
||||
# some (non-defaut) module properties
|
||||
.group=very important/stuff
|
||||
.description=A simulated cc cryostat with heat-load, specific heat for the sample
|
||||
and a temperature dependend heat-link between sample and regulation.
|
||||
|
||||
# class of module:
|
||||
class=frappy_demo.cryo.Cryostat
|
||||
|
||||
# some parameters
|
||||
jitter=0.1
|
||||
T_start=10.0
|
||||
target=10.0
|
||||
looptime=1
|
||||
ramp=6
|
||||
maxpower=20.0
|
||||
heater=4.1
|
||||
p=40
|
||||
i=10
|
||||
d=2
|
||||
mode=pid
|
||||
tolerance=0.1
|
||||
window=30
|
||||
timeout=900
|
||||
|
||||
# some (non-default) parameter properties
|
||||
pollinterval.export=False
|
||||
|
||||
# some parameter grouping
|
||||
p.group=pid
|
||||
i.group=pid
|
||||
d.group=pid
|
||||
|
||||
value.unit=K
|
||||
|
||||
# test custom properties
|
||||
value.test=customized value
|
||||
|
@ -12,7 +12,6 @@ Node('cryo_7.frappy.demo',
|
||||
more="blub",
|
||||
)
|
||||
|
||||
# obviously not final form
|
||||
Mod('cryo',
|
||||
'frappy_demo.cryo.Cryostat',
|
||||
'A simulated cc cryostat with heat-load, specific heat for the sample and a ' \
|
||||
|
43
cfg/demo.cfg
43
cfg/demo.cfg
@ -1,43 +0,0 @@
|
||||
[node Equipment_ID_for_demonstration]
|
||||
description = virtual modules to play around with
|
||||
|
||||
[interface tcp]
|
||||
bindto=0.0.0.0
|
||||
bindport=10767
|
||||
|
||||
[module heatswitch]
|
||||
class=frappy_demo.modules.Switch
|
||||
switch_on_time=5
|
||||
switch_off_time=10
|
||||
.description="Heatswitch for `mf` device"
|
||||
|
||||
[module mf]
|
||||
class=frappy_demo.modules.MagneticField
|
||||
heatswitch = heatswitch
|
||||
.description="simulates some cryomagnet with persistent/non-persistent switching"
|
||||
|
||||
[module ts]
|
||||
class=frappy_demo.modules.SampleTemp
|
||||
sensor = 'Q1329V7R3'
|
||||
ramp = 4
|
||||
target = 10
|
||||
value = 10
|
||||
.description = "some temperature"
|
||||
|
||||
[module tc1]
|
||||
class=frappy_demo.modules.CoilTemp
|
||||
sensor="X34598T7"
|
||||
.description = "some temperature"
|
||||
|
||||
[module tc2]
|
||||
class=frappy_demo.modules.CoilTemp
|
||||
sensor="X39284Q8'
|
||||
.description = "some temperature"
|
||||
|
||||
[module label]
|
||||
class=frappy_demo.modules.Label
|
||||
system=Cryomagnet MX15
|
||||
subdev_mf=mf
|
||||
subdev_ts=ts
|
||||
.description = "some label indicating the state of the magnet `mf`."
|
||||
|
45
cfg/demo_cfg.py
Normal file
45
cfg/demo_cfg.py
Normal file
@ -0,0 +1,45 @@
|
||||
Node('demo.frappy.demo',
|
||||
'Basic demo server for frappy',
|
||||
'tcp://10767',
|
||||
)
|
||||
|
||||
Mod('heatswitch',
|
||||
'frappy_demo.modules.Switch',
|
||||
'Heatswitch for `mf` device',
|
||||
switch_on_time = 5,
|
||||
switch_off_time = 10,
|
||||
)
|
||||
|
||||
Mod('mf',
|
||||
'frappy_demo.modules.MagneticField',
|
||||
'simulates some cryomagnet with persistent/non-persistent switching',
|
||||
heatswitch = 'heatswitch',
|
||||
)
|
||||
|
||||
Mod('ts',
|
||||
'frappy_demo.modules.SampleTemp',
|
||||
'some temperature',
|
||||
sensor = 'Q1329V7R3',
|
||||
ramp = 4,
|
||||
target = 10,
|
||||
value = 10,
|
||||
)
|
||||
|
||||
Mod('tc1',
|
||||
'frappy_demo.modules.CoilTemp',
|
||||
'some temperature',
|
||||
sensor = 'X34598T7',
|
||||
)
|
||||
|
||||
Mod('tc2',
|
||||
'frappy_demo.modules.CoilTemp',
|
||||
'some temperature',
|
||||
sensor = 'X39284Q8',
|
||||
)
|
||||
|
||||
Mod('label',
|
||||
'frappy_demo.modules.Label',
|
||||
'some label indicating the state of the magnet `,f`.',
|
||||
subdev_mf = 'mf',
|
||||
subdev_ts = 'ts',
|
||||
)
|
46
cfg/test.cfg
46
cfg/test.cfg
@ -1,46 +0,0 @@
|
||||
[node test config]
|
||||
description=description of the testing sec-node
|
||||
.
|
||||
Here should be the long description.
|
||||
It can be very long.
|
||||
.
|
||||
a single . on a line gets stripped so you can make paragraphs.
|
||||
.
|
||||
These texts are supposed to be possibly very long.
|
||||
|
||||
[interface tcp]
|
||||
type=tcp
|
||||
bindto=0.0.0.0
|
||||
bindport=10768
|
||||
|
||||
|
||||
[module LN2]
|
||||
class=frappy_demo.test.LN2
|
||||
.description="random value between 0..100%%"
|
||||
value.unit = "%%"
|
||||
|
||||
[module heater]
|
||||
class=frappy_demo.test.Heater
|
||||
maxheaterpower=10
|
||||
.description="some heater"
|
||||
|
||||
[module T1]
|
||||
class=frappy_demo.test.Temp
|
||||
sensor="X34598T7"
|
||||
.description="some temperature"
|
||||
|
||||
[module T2]
|
||||
class=frappy_demo.modules.CoilTemp
|
||||
sensor="X34598T8"
|
||||
.description="some temperature"
|
||||
|
||||
[module T3]
|
||||
class=frappy_demo.modules.CoilTemp
|
||||
sensor="X34598T9"
|
||||
.description="some temperature"
|
||||
|
||||
|
||||
[module Lower]
|
||||
class=frappy_demo.test.Lower
|
||||
.description="something else"
|
||||
|
46
cfg/test_cfg.py
Normal file
46
cfg/test_cfg.py
Normal file
@ -0,0 +1,46 @@
|
||||
Node('test.config.frappy.demo',
|
||||
'''short description of the testing sec-node
|
||||
|
||||
This description for the Nodecan be as long as you need if you use a multiline string.
|
||||
|
||||
Very long!
|
||||
The needed fields are Equipment id (1st argument), description (this)
|
||||
and the main interface of the node (3rd arg)
|
||||
''',
|
||||
'tcp://10768',
|
||||
)
|
||||
|
||||
Mod('LN2',
|
||||
'frappy_demo.test.LN2',
|
||||
'random value between 0..100%',
|
||||
value = Param(default = 0, unit = '%'),
|
||||
)
|
||||
|
||||
Mod('heater',
|
||||
'frappy_demo.test.Heater',
|
||||
'some heater',
|
||||
maxheaterpower = 10,
|
||||
)
|
||||
|
||||
Mod('T1',
|
||||
'frappy_demo.test.Temp',
|
||||
'some temperature',
|
||||
sensor = 'X34598T7',
|
||||
)
|
||||
|
||||
Mod('T2',
|
||||
'frappy_demo.test.Temp',
|
||||
'some temperature',
|
||||
sensor = 'X34598T8',
|
||||
)
|
||||
|
||||
Mod('T3',
|
||||
'frappy_demo.test.Temp',
|
||||
'some temperature',
|
||||
sensor = 'X34598T9',
|
||||
)
|
||||
|
||||
Mod('Lower',
|
||||
'frappy_demo.test.Lower',
|
||||
'something else',
|
||||
)
|
@ -110,7 +110,7 @@ class MagneticField(Drivable):
|
||||
"""
|
||||
|
||||
value = Parameter('current field in T',
|
||||
unit='T', datatype=FloatRange(-15, 15), default=0,
|
||||
unit='T', datatype=FloatRange(-16, 16), default=0,
|
||||
)
|
||||
target = Parameter('target field in T',
|
||||
unit='T', datatype=FloatRange(-15, 15), default=0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user