Compare commits
43 Commits
work
...
trinamic_p
Author | SHA1 | Date | |
---|---|---|---|
42637ef6f4 | |||
071f933982 | |||
d06cb0414d | |||
fe5a2caac7 | |||
1409959f53 | |||
10147b0db5 | |||
e2f258658c | |||
3d67fef557 | |||
eb3d35e1a6 | |||
2863c2bca0 | |||
390c955a8a | |||
539d97a733 | |||
1fd16bbc43 | |||
5e77a43f6c | |||
3e7b008a59 | |||
2f96a2db92 | |||
fab950550d | |||
801eab4b13 | |||
06551b17e2 | |||
4a0796a1bd | |||
48d5fe5ea2 | |||
331dc544ad | |||
a5cc98d0b0 | |||
d3fc01689f | |||
dec286460d | |||
d768d84ea1 | |||
4d8390c1fe | |||
6ec8348355 | |||
10dad6da47 | |||
185bf7bc88 | |||
499ae69f29 | |||
4d7e5d3cdc | |||
48230334af | |||
6538500881 | |||
bcf57f53c3 | |||
fb01f81cb6 | |||
3b03e578bb | |||
804581546d | |||
1ca35cf8e9 | |||
adc9a6da71 | |||
7f22a270e6 | |||
7d133bacfe | |||
1760881f56 |
18
README.md
18
README.md
@ -15,8 +15,9 @@ branches:
|
||||
- work: current working version, usually in use on /home/l_samenv/frappy (and on neutron instruments)
|
||||
this should be a copy of an earlier state of the wip branch
|
||||
- wip: current test version, usually in use on /home/l_samenv/frappy_wip
|
||||
IMPORTANT: make commits containing either only files to be pushed to Gerrit or only
|
||||
PSI internal files, not mixed. Mark local commits with '[PSI]' in the commit message.
|
||||
|
||||
IMPORTANT: make commits containing either only files to be pushed to Gerrit or only
|
||||
PSI internal files, not mixed. Mark local commits with '[PSI]' in the commit message.
|
||||
|
||||
|
||||
master --> mlz # these branches match after a sync step, but they might have a different history
|
||||
@ -34,7 +35,7 @@ where commits may be cherry picked for input to Gerrit. As generally in the revi
|
||||
changes are done, eventually a sync step should happen:
|
||||
|
||||
1) ideally, this is done when work and wip match
|
||||
2) make sure branches mlz, master, wip and work are in syns with remote, push/pull otherwise
|
||||
2) make sure branches mlz, master, wip and work are in synv with remote, push/pull otherwise
|
||||
3) cherry-pick commits from mlz to master
|
||||
4) make sure master and mlz branches match (git diff --name-only master..wip should only return README.md)
|
||||
5) create branch new_work from master
|
||||
@ -42,12 +43,11 @@ changes are done, eventually a sync step should happen:
|
||||
- core commits already pushed through gerrit are skipped
|
||||
- all other commits are to be cherry-picked
|
||||
7) when arrived at the point where the new working version should be,
|
||||
copy new_wip branch to work with 'git checkout -B work'.
|
||||
Not sure if this works, as work is to be pushed to git.psi.ch.
|
||||
We might first remove the remote branch with 'git push origin --delete work'.
|
||||
And then create again (git push origin work)?
|
||||
8) continue with (6) if wip and work should differ, and do like (7) for wip branch
|
||||
9) delete new_wip branch, push master, wip and work branches
|
||||
copy new_wip branch to work with 'git checkout work;git checkout new_wip .'
|
||||
(note the dot!) and then commit this.
|
||||
8) continue with (6) if wip and work should differ
|
||||
9) do like (7), but for wip branch
|
||||
10) delete new_wip branch, push master, wip and work branches
|
||||
|
||||
|
||||
## Procedure to update PPMS
|
||||
|
13
cfg/addons/ah2700.cfg
Normal file
13
cfg/addons/ah2700.cfg
Normal file
@ -0,0 +1,13 @@
|
||||
[NODE]
|
||||
description = Andeen Hagerlin 2700 Capacitance Bridge
|
||||
id = ah2700.frappy.psi.ch
|
||||
|
||||
[module cap]
|
||||
class = secop_psi.ah2700.Capacitance
|
||||
description = capacitance
|
||||
uri=lollypop-ts:3002
|
||||
|
||||
#[module ahcom]
|
||||
#class = secop_psi.ah2700.StringIO
|
||||
#uri=ldmse3-ts:3015
|
||||
#description = serial communicator to an AH2700
|
20
cfg/addons/ah2700sea.cfg
Normal file
20
cfg/addons/ah2700sea.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
[NODE]
|
||||
description = Andeen Hagerlin 2700 Capacitance Bridge using SEA
|
||||
id = ah2700.addon.sea.psi.ch
|
||||
|
||||
[sea_addons]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to mbe_ah2700
|
||||
config = ah2700.addon
|
||||
export = False
|
||||
service = addons
|
||||
|
||||
[cap]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_addons
|
||||
sea_object = cap
|
||||
|
||||
[capslope]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_addons
|
||||
sea_object = capslope
|
14
cfg/addons/focus-be-filter.cfg
Normal file
14
cfg/addons/focus-be-filter.cfg
Normal file
@ -0,0 +1,14 @@
|
||||
[NODE]
|
||||
description = FOCUS Beryllium filter with cryotel closed cycle
|
||||
id = focus-be-filter.addon.sea.psi.ch
|
||||
|
||||
[sea_addons]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to addons
|
||||
config = focus-be-filter.addon
|
||||
service = addons
|
||||
|
||||
[befilter]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_addons
|
||||
sea_object = cryo
|
35
cfg/develop/sea.cfg
Normal file
35
cfg/develop/sea.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
[node seatest.psi.ch]
|
||||
description = SEA test
|
||||
|
||||
[interface tcp]
|
||||
type = tcp
|
||||
bindto = 0.0.0.0
|
||||
bindport = 5002
|
||||
|
||||
[module seaconn]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = a SEA connection
|
||||
uri = tcp://samenv.psi.ch:8645
|
||||
|
||||
#[module t1]
|
||||
#class = secop_psi.sea.SeaDrivable
|
||||
#iodev = seaconn
|
||||
#json_descr = tt.flamp.config
|
||||
#remote_paths = . t1
|
||||
|
||||
#[module tw1]
|
||||
#class = secop_psi.sea.SeaReadable
|
||||
#iodev = seaconn
|
||||
#json_descr = wall.lampovenwall.addon
|
||||
#remote_paths = tw1
|
||||
|
||||
#[module pv]
|
||||
#class = secop_psi.sea.SeaReadable
|
||||
#iodev = seaconn
|
||||
#json_descr = pv.flamp.config
|
||||
|
||||
#[module mf]
|
||||
#class = secop.Proxy
|
||||
#remote_class = secop_psi.ppms.Field
|
||||
#description = magnetic field
|
||||
#iodev = secnode
|
15
cfg/dpm.cfg
Normal file
15
cfg/dpm.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
[NODE]
|
||||
description = DPM driver for pressure cell
|
||||
id = dpm.psi.ch
|
||||
|
||||
[INTERFACE]
|
||||
uri = tcp://5000
|
||||
|
||||
[force]
|
||||
description = DPM driver to read out the transducer value, write and read the offset and scale factor
|
||||
class = secop_psi.dpm.DPM3
|
||||
# uri = ldmse-d910-ts.psi.ch:3001
|
||||
uri = serial:///dev/ttyUSB1
|
||||
digits = 2
|
||||
scale_factor = 0.0156
|
||||
|
20
cfg/main/ccr2.cfg
Normal file
20
cfg/main/ccr2.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
[NODE]
|
||||
description = sumitomo 4 K closed cycle refrigerator (FOCUS)
|
||||
id = ccr2.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to main
|
||||
config = ccr2.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
#[tscreen]
|
||||
#class = secop_psi.sea.SeaReadable
|
||||
#iodev = sea_main
|
||||
#sea_object = tt
|
||||
#rel_paths = te
|
27
cfg/main/ccr2ht.cfg
Normal file
27
cfg/main/ccr2ht.cfg
Normal file
@ -0,0 +1,27 @@
|
||||
[NODE]
|
||||
description = sumitomo 4 K closed cycle refrigerator with hot stage (FOCUS)
|
||||
id = ccr2ht.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = main SEA connection
|
||||
config = ccr2ht.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
#[tscreen]
|
||||
#class = secop_psi.sea.SeaReadable
|
||||
#iodev = sea_main
|
||||
#sea_object = tt
|
||||
#rel_paths = te
|
||||
|
||||
[tcoldfinger]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
rel_paths = tk
|
||||
|
55
cfg/main/ill5.cfg
Normal file
55
cfg/main/ill5.cfg
Normal file
@ -0,0 +1,55 @@
|
||||
[NODE]
|
||||
description = orange cryostat with 100 mm sample space
|
||||
id = ill5.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = main SEA connection to ill5.config
|
||||
config = ill5.config
|
||||
service = main
|
||||
|
||||
[t]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
[tm]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
rel_paths = tm
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[nv]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = nv
|
||||
|
||||
[ln2fill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = ln2fill
|
||||
|
||||
[hefill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hefill
|
||||
|
||||
[hepump]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hepump
|
||||
|
||||
[hemot]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = hemot
|
||||
|
||||
[table]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = table
|
85
cfg/main/ma11.cfg
Normal file
85
cfg/main/ma11.cfg
Normal file
@ -0,0 +1,85 @@
|
||||
[NODE]
|
||||
description = MA11 cryomagnet for SANS
|
||||
id = ma11.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = main sea connection for ma11.config
|
||||
config = ma11.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
rel_paths = . tm
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[nv]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = nv
|
||||
|
||||
[hepump]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hepump
|
||||
|
||||
[hemot]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = hemot
|
||||
|
||||
[ln2fill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = ln2fill
|
||||
|
||||
[hefill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hefill
|
||||
|
||||
[lev]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = lev
|
||||
|
||||
[mf]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = mf
|
||||
|
||||
[tcoil]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = tcoil
|
||||
|
||||
[table]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = table
|
||||
|
||||
[ccu2]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = ccu2
|
||||
|
||||
[lnv]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = lnv
|
||||
|
||||
[lpr]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = lpr
|
||||
|
||||
[lambdawatch]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = lambdawatch
|
73
cfg/main/ma7.cfg
Normal file
73
cfg/main/ma7.cfg
Normal file
@ -0,0 +1,73 @@
|
||||
[NODE]
|
||||
description = 6.8 Tesla horizontal cryomagnet
|
||||
id = ma7.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = main sea connection for ma7.config
|
||||
config = ma7.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
rel_paths = . tm
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[nv]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = nv
|
||||
|
||||
[hefill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hefill
|
||||
|
||||
[hepump]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hepump
|
||||
|
||||
[hemot]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = hemot
|
||||
|
||||
[ln2fill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = ln2fill
|
||||
|
||||
[mf]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = mf
|
||||
|
||||
[lev]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = lev
|
||||
|
||||
[tcoil1]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = tcoil
|
||||
rel_paths = ta
|
||||
|
||||
[tcoil2]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = tcoil
|
||||
rel_paths = tb
|
||||
|
||||
[table]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = table
|
||||
|
35
cfg/main/mbe.cfg
Normal file
35
cfg/main/mbe.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
[NODE]
|
||||
description = thin film oven for AMOR
|
||||
id = mbe.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to mbe
|
||||
config = mbe.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[p]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = p
|
||||
extra_modules = vacuumpump, gasflow
|
||||
|
||||
[vacuumpump]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
single_module = p.vacuumpump
|
||||
|
||||
[gasflow]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
single_module = p.gasflow
|
60
cfg/main/ori4.cfg
Normal file
60
cfg/main/ori4.cfg
Normal file
@ -0,0 +1,60 @@
|
||||
[NODE]
|
||||
description = orange cryostat with 100 mm sample space (HRPT)
|
||||
id = ori4.config.sea.psi.ch
|
||||
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to ori4
|
||||
config = ori4.config
|
||||
service = main
|
||||
|
||||
[t]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
[tm]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
rel_paths = tm
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[nv]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = nv
|
||||
|
||||
[nvmot]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = nvmot
|
||||
|
||||
[ln2fill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = ln2fill
|
||||
|
||||
[hefill]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hefill
|
||||
|
||||
[hepump]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_main
|
||||
sea_object = hepump
|
||||
|
||||
[hemot]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = hemot
|
||||
|
||||
[table]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = table
|
15
cfg/sea/ah2700.addon.json
Normal file
15
cfg/sea/ah2700.addon.json
Normal file
@ -0,0 +1,15 @@
|
||||
{"cap": {"base": "/cap", "params": [{"path": "", "type": "none", "kids": 8},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cap send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "cap", "type": "float"},
|
||||
{"path": "loss", "type": "float"},
|
||||
{"path": "period", "type": "float", "readonly": false, "cmd": "cap period"},
|
||||
{"path": "freq", "type": "float", "readonly": false, "cmd": "cap freq"},
|
||||
{"path": "V", "type": "float", "readonly": false, "cmd": "cap V"},
|
||||
{"path": "average", "type": "int", "readonly": false, "cmd": "cap average"}]}, "capslope": {"base": "/capslope", "params": [{"path": "", "type": "float", "kids": 6},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "capslope send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "node", "type": "text", "readonly": false, "cmd": "capslope node"},
|
||||
{"path": "unit", "type": "float", "readonly": false, "cmd": "capslope unit", "description": "unit=60: mainunits/minutes, unit=1: mainunits/sec"},
|
||||
{"path": "ref", "type": "float", "readonly": false, "cmd": "capslope ref"},
|
||||
{"path": "buffersize", "type": "float", "readonly": false, "cmd": "capslope buffersize"}]}}
|
155
cfg/sea/ccr2.config.json
Normal file
155
cfg/sea/ccr2.config.json
Normal file
@ -0,0 +1,155 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 17},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "visibility": 3, "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift", "visibility": 3},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode", "visibility": 3},
|
||||
{"path": "dblctrl/shift_up", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/shift_lo", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_min", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_max", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2", "visibility": 3},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up", "visibility": 3},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "te", "type": "float", "kids": 4},
|
||||
{"path": "te/curve", "type": "text", "readonly": false, "cmd": "tt te/curve", "kids": 1},
|
||||
{"path": "te/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt te/curve/points", "visibility": 3},
|
||||
{"path": "te/alarm", "type": "float", "readonly": false, "cmd": "tt te/alarm"},
|
||||
{"path": "te/stddev", "type": "float"},
|
||||
{"path": "te/raw", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "dout", "type": "int", "readonly": false, "cmd": "tt dout"},
|
||||
{"path": "dinp", "type": "int"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch"},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0"},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)"},
|
||||
{"path": "h0", "type": "float"},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h1", "type": "float"},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h2", "type": "float"},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h3", "type": "float"},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h4", "type": "float"},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h5", "type": "float"},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float"},
|
||||
{"path": "tn", "type": "float"},
|
||||
{"path": "th", "type": "float"},
|
||||
{"path": "tf", "type": "float"},
|
||||
{"path": "tm", "type": "float"},
|
||||
{"path": "tv", "type": "float"},
|
||||
{"path": "tq", "type": "float"},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}}
|
20
cfg/sea/ccr2ht.cfg
Normal file
20
cfg/sea/ccr2ht.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
[sea_main]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to ccr2ht_focus-be-filter
|
||||
config = ccr2ht.config
|
||||
service = main
|
||||
|
||||
[tt]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = sea_main
|
||||
sea_object = tt
|
||||
|
||||
[cc]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = cc
|
||||
|
||||
[table]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_main
|
||||
sea_object = table
|
169
cfg/sea/ccr2ht.config.json
Normal file
169
cfg/sea/ccr2ht.config.json
Normal file
@ -0,0 +1,169 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "visibility": 3, "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift", "visibility": 3},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode", "visibility": 3},
|
||||
{"path": "dblctrl/shift_up", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/shift_lo", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_min", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_max", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2", "visibility": 3},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up", "visibility": 3},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "te", "type": "float", "kids": 4},
|
||||
{"path": "te/curve", "type": "text", "readonly": false, "cmd": "tt te/curve", "kids": 1},
|
||||
{"path": "te/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt te/curve/points", "visibility": 3},
|
||||
{"path": "te/alarm", "type": "float", "readonly": false, "cmd": "tt te/alarm"},
|
||||
{"path": "te/stddev", "type": "float"},
|
||||
{"path": "te/raw", "type": "float"},
|
||||
{"path": "tk", "type": "float", "kids": 4},
|
||||
{"path": "tk/curve", "type": "text", "readonly": false, "cmd": "tt tk/curve", "kids": 1},
|
||||
{"path": "tk/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tk/curve/points", "visibility": 3},
|
||||
{"path": "tk/alarm", "type": "float", "readonly": false, "cmd": "tt tk/alarm"},
|
||||
{"path": "tk/stddev", "type": "float"},
|
||||
{"path": "tk/raw", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "dout", "type": "int", "readonly": false, "cmd": "tt dout"},
|
||||
{"path": "dinp", "type": "int"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch"},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0"},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)"},
|
||||
{"path": "h0", "type": "float"},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h1", "type": "float"},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h2", "type": "float"},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h3", "type": "float"},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h4", "type": "float"},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h5", "type": "float"},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float"},
|
||||
{"path": "tn", "type": "float"},
|
||||
{"path": "th", "type": "float"},
|
||||
{"path": "tf", "type": "float"},
|
||||
{"path": "tm", "type": "float"},
|
||||
{"path": "tv", "type": "float"},
|
||||
{"path": "tq", "type": "float"},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "table": {"base": "/table", "params": [{"path": "", "type": "none", "kids": 8},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
||||
{"path": "val_tt_set_prop", "type": "float"},
|
||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
||||
{"path": "val_tt_set_integ", "type": "float"},
|
||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}}
|
20
cfg/sea/focus-be-filter.addon.json
Normal file
20
cfg/sea/focus-be-filter.addon.json
Normal file
@ -0,0 +1,20 @@
|
||||
{"cryo": {"base": "/cryo", "params": [{"path": "", "type": "float", "kids": 14},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cryo send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "cool", "type": "enum", "enum": {"on": 0, "off": 1}, "readonly": false, "cmd": "cryo cool"},
|
||||
{"path": "control", "type": "enum", "enum": {"auto_power": 1, "manual_power": 0, "controlled_T": 2}, "readonly": false, "cmd": "cryo control", "description": "recommended mode: auto_power, use coolpower or holdpower depending on T"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "cryo set"},
|
||||
{"path": "setpower", "type": "float", "readonly": false, "cmd": "cryo setpower", "visibility": 3},
|
||||
{"path": "prop", "type": "float", "readonly": false, "cmd": "cryo prop"},
|
||||
{"path": "integ", "type": "float", "readonly": false, "cmd": "cryo integ"},
|
||||
{"path": "coolpower", "type": "float", "readonly": false, "cmd": "cryo coolpower", "visibility": 3},
|
||||
{"path": "holdpower", "type": "float", "readonly": false, "cmd": "cryo holdpower", "visibility": 3},
|
||||
{"path": "cool_threshold", "type": "float", "readonly": false, "cmd": "cryo cool_threshold", "description": "switch to coolpower above this value", "visibility": 3},
|
||||
{"path": "hold_threshold", "type": "float", "readonly": false, "cmd": "cryo hold_threshold", "description": "switch to holdpower below this value", "visibility": 3},
|
||||
{"path": "power", "type": "float"},
|
||||
{"path": "filter", "type": "none", "kids": 5},
|
||||
{"path": "filter/period", "type": "float", "readonly": false, "cmd": "cryo filter/period", "description": "oszillation period / sec"},
|
||||
{"path": "filter/amplitude", "type": "float", "readonly": false, "cmd": "cryo filter/amplitude", "description": "oszillation amplitude / K (+/-)"},
|
||||
{"path": "filter/precision", "type": "float", "readonly": false, "cmd": "cryo filter/precision"},
|
||||
{"path": "filter/raw", "type": "float"},
|
||||
{"path": "filter/intdif", "type": "float"}]}, "addonlock_focus-be-filter": {"base": "/addonlock_focus-be-filter", "params": [{"path": "", "type": "text", "readonly": false, "cmd": "addonlock_focus-be-filter = "}]}}
|
15
cfg/sea/focus-be-filter.cfg
Normal file
15
cfg/sea/focus-be-filter.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
[sea_addons]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to ccr2ht_focus-be-filter
|
||||
config = focus-be-filter.addon
|
||||
service = addons
|
||||
|
||||
[cryo]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_addons
|
||||
sea_object = cryo
|
||||
|
||||
[addonlock_focus-be-filter]
|
||||
class = secop_psi.sea.SeaWritable
|
||||
iodev = sea_addons
|
||||
sea_object = addonlock_focus-be-filter
|
277
cfg/sea/ill5.config.json
Normal file
277
cfg/sea/ill5.config.json
Normal file
@ -0,0 +1,277 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
||||
{"path": "dblctrl/shift_up", "type": "float"},
|
||||
{"path": "dblctrl/shift_lo", "type": "float"},
|
||||
{"path": "dblctrl/t_min", "type": "float"},
|
||||
{"path": "dblctrl/t_max", "type": "float"},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "ts", "type": "float", "kids": 4},
|
||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||
{"path": "ts/stddev", "type": "float"},
|
||||
{"path": "ts/raw", "type": "float"},
|
||||
{"path": "ts_2", "type": "float", "visibility": 3, "kids": 4},
|
||||
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "visibility": 3, "kids": 1},
|
||||
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
||||
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm", "visibility": 3},
|
||||
{"path": "ts_2/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "ts_2/raw", "type": "float", "visibility": 3},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "dout", "type": "int", "readonly": false, "cmd": "tt dout"},
|
||||
{"path": "dinp", "type": "int"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch", "visibility": 3},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0", "visibility": 3},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos.", "visibility": 3},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos.", "visibility": 3},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)", "visibility": 3},
|
||||
{"path": "h0", "type": "float", "visibility": 3},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h1", "type": "float", "visibility": 3},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h2", "type": "float", "visibility": 3},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h3", "type": "float", "visibility": 3},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h4", "type": "float", "visibility": 3},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h5", "type": "float", "visibility": 3},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float", "visibility": 3},
|
||||
{"path": "tn", "type": "float", "visibility": 3},
|
||||
{"path": "th", "type": "float", "visibility": 3},
|
||||
{"path": "tf", "type": "float", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "visibility": 3},
|
||||
{"path": "tv", "type": "float", "visibility": 3},
|
||||
{"path": "tq", "type": "float", "visibility": 3},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "nv": {"base": "/nv", "params": [{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 11},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "motstat", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "flow", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
||||
{"path": "flowp", "type": "float"},
|
||||
{"path": "span", "type": "float"},
|
||||
{"path": "ctrl", "type": "none", "kids": 13},
|
||||
{"path": "ctrl/regtext", "type": "text"},
|
||||
{"path": "ctrl/prop_o", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_o", "description": "prop [sec/mbar] when opening. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/prop_c", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_c", "description": "prop [sec/mbar] when closing. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/deriv_o", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_o", "description": "convergence target time [sec] when opening"},
|
||||
{"path": "ctrl/deriv_c", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_c", "description": "convergence target time [sec] when closing"},
|
||||
{"path": "ctrl/minpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_o", "description": "minimum close pulse [sec]"},
|
||||
{"path": "ctrl/minpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_c", "description": "standard close pulse [sec]"},
|
||||
{"path": "ctrl/hystpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_o", "description": "motor pulse to overcome hysteresis when opening"},
|
||||
{"path": "ctrl/hystpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_c", "description": "motor pulse to overcome hysteresis when closing"},
|
||||
{"path": "ctrl/tol", "type": "float", "readonly": false, "cmd": "nv ctrl/tol", "description": "valid below 3 mbar"},
|
||||
{"path": "ctrl/tolhigh", "type": "float", "readonly": false, "cmd": "nv ctrl/tolhigh", "description": "valid above 4 mbar"},
|
||||
{"path": "ctrl/openpulse", "type": "float", "readonly": false, "cmd": "nv ctrl/openpulse", "description": "time to open from completely closed to a significant opening"},
|
||||
{"path": "ctrl/adjust_minpulse", "type": "bool", "readonly": false, "cmd": "nv ctrl/adjust_minpulse", "description": "adjust minpulse automatically"},
|
||||
{"path": "autoflow", "type": "none", "kids": 24},
|
||||
{"path": "autoflow/suspended", "type": "bool", "readonly": false, "cmd": "nv autoflow/suspended"},
|
||||
{"path": "autoflow/prop", "type": "float", "readonly": false, "cmd": "nv autoflow/prop"},
|
||||
{"path": "autoflow/flowstd", "type": "float", "readonly": false, "cmd": "nv autoflow/flowstd"},
|
||||
{"path": "autoflow/flowlim", "type": "float", "readonly": false, "cmd": "nv autoflow/flowlim"},
|
||||
{"path": "autoflow/smooth", "type": "float", "readonly": false, "cmd": "nv autoflow/smooth"},
|
||||
{"path": "autoflow/difSize", "type": "float", "readonly": false, "cmd": "nv autoflow/difSize"},
|
||||
{"path": "autoflow/difRange", "type": "float", "readonly": false, "cmd": "nv autoflow/difRange"},
|
||||
{"path": "autoflow/flowSize", "type": "float", "readonly": false, "cmd": "nv autoflow/flowSize"},
|
||||
{"path": "autoflow/convTime", "type": "float", "readonly": false, "cmd": "nv autoflow/convTime"},
|
||||
{"path": "autoflow/Tmin", "type": "float", "readonly": false, "cmd": "nv autoflow/Tmin"},
|
||||
{"path": "autoflow/script", "type": "text", "readonly": false, "cmd": "nv autoflow/script"},
|
||||
{"path": "autoflow/getTemp", "type": "text", "readonly": false, "cmd": "nv autoflow/getTemp"},
|
||||
{"path": "autoflow/getTset", "type": "text", "readonly": false, "cmd": "nv autoflow/getTset"},
|
||||
{"path": "autoflow/getFlow", "type": "text", "readonly": false, "cmd": "nv autoflow/getFlow"},
|
||||
{"path": "autoflow/difBuf", "type": "text"},
|
||||
{"path": "autoflow/flowBuf", "type": "text"},
|
||||
{"path": "autoflow/flowset", "type": "float"},
|
||||
{"path": "autoflow/flowmin", "type": "float"},
|
||||
{"path": "autoflow/flowmax", "type": "float"},
|
||||
{"path": "autoflow/difmin", "type": "float"},
|
||||
{"path": "autoflow/difmax", "type": "float"},
|
||||
{"path": "autoflow/setmin", "type": "float"},
|
||||
{"path": "autoflow/setmax", "type": "float"},
|
||||
{"path": "autoflow/flowtarget", "type": "float"},
|
||||
{"path": "calib", "type": "none", "kids": 2},
|
||||
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
||||
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]}, "ln2fill": {"base": "/ln2fill", "params": [{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 3},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"}]}, "hefill": {"base": "/hefill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "hefill", "kids": 6},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fast", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "hefull", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "helow", "type": "float", "readonly": false, "cmd": "cc hl"}]}, "hepump": {"base": "/hepump", "params": [{"path": "", "type": "enum", "enum": {"xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 9},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running", "visibility": 3},
|
||||
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco", "visibility": 3},
|
||||
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto", "visibility": 3},
|
||||
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve", "visibility": 3},
|
||||
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2", "visibility": 3},
|
||||
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3}]}, "hemot": {"base": "/hepump/hemot", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run hemot", "visibility": 3, "kids": 32},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hemot send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "hemot is_running", "visibility": 3},
|
||||
{"path": "pos", "type": "float"},
|
||||
{"path": "encoder", "type": "float"},
|
||||
{"path": "zero", "type": "float", "readonly": false, "cmd": "hemot zero"},
|
||||
{"path": "lowerlimit", "type": "float", "readonly": false, "cmd": "hemot lowerlimit"},
|
||||
{"path": "upperlimit", "type": "float", "readonly": false, "cmd": "hemot upperlimit"},
|
||||
{"path": "disablelimits", "type": "bool", "readonly": false, "cmd": "hemot disablelimits"},
|
||||
{"path": "verbose", "type": "bool", "readonly": false, "cmd": "hemot verbose"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "runstate", "type": "enum", "enum": {"idle": 0, "running": 1, "finished": 2, "error": 3}},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "hemot precision"},
|
||||
{"path": "maxencdif", "type": "float", "readonly": false, "cmd": "hemot maxencdif"},
|
||||
{"path": "id", "type": "float", "readonly": false, "cmd": "hemot id"},
|
||||
{"path": "pump_number", "type": "float", "readonly": false, "cmd": "hemot pump_number"},
|
||||
{"path": "init", "type": "float", "readonly": false, "cmd": "hemot init"},
|
||||
{"path": "maxspeed", "type": "float", "readonly": false, "cmd": "hemot maxspeed"},
|
||||
{"path": "acceleration", "type": "float", "readonly": false, "cmd": "hemot acceleration"},
|
||||
{"path": "maxcurrent", "type": "float", "readonly": false, "cmd": "hemot maxcurrent"},
|
||||
{"path": "standbycurrent", "type": "float", "readonly": false, "cmd": "hemot standbycurrent"},
|
||||
{"path": "freewheeling", "type": "bool", "readonly": false, "cmd": "hemot freewheeling"},
|
||||
{"path": "output0", "type": "bool", "readonly": false, "cmd": "hemot output0"},
|
||||
{"path": "output1", "type": "bool", "readonly": false, "cmd": "hemot output1"},
|
||||
{"path": "input3", "type": "bool"},
|
||||
{"path": "input0", "type": "float"},
|
||||
{"path": "input0raw", "type": "float"},
|
||||
{"path": "pullup", "type": "float", "readonly": false, "cmd": "hemot pullup"},
|
||||
{"path": "nopumpfeedback", "type": "bool", "readonly": false, "cmd": "hemot nopumpfeedback"},
|
||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]}, "table": {"base": "/table", "params": [{"path": "", "type": "none", "kids": 17},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
||||
{"path": "val_tt_set_prop", "type": "float"},
|
||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
||||
{"path": "val_tt_set_integ", "type": "float"},
|
||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_int2", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_int2"},
|
||||
{"path": "val_tt_dblctrl_int2", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_int2", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_int2", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_up", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_up"},
|
||||
{"path": "val_tt_dblctrl_prop_up", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_up", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_up", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_lo", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_lo"},
|
||||
{"path": "val_tt_dblctrl_prop_lo", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_lo", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_lo", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}}
|
465
cfg/sea/ma11.config.json
Normal file
465
cfg/sea/ma11.config.json
Normal file
@ -0,0 +1,465 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
||||
{"path": "dblctrl/shift_up", "type": "float"},
|
||||
{"path": "dblctrl/shift_lo", "type": "float"},
|
||||
{"path": "dblctrl/t_min", "type": "float"},
|
||||
{"path": "dblctrl/t_max", "type": "float"},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "ts", "type": "float", "kids": 4},
|
||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||
{"path": "ts/stddev", "type": "float"},
|
||||
{"path": "ts/raw", "type": "float"},
|
||||
{"path": "tm_pt", "type": "float", "kids": 4},
|
||||
{"path": "tm_pt/curve", "type": "text", "readonly": false, "cmd": "tt tm_pt/curve", "kids": 1},
|
||||
{"path": "tm_pt/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm_pt/curve/points", "visibility": 3},
|
||||
{"path": "tm_pt/alarm", "type": "float", "readonly": false, "cmd": "tt tm_pt/alarm"},
|
||||
{"path": "tm_pt/stddev", "type": "float"},
|
||||
{"path": "tm_pt/raw", "type": "float"},
|
||||
{"path": "ts_2", "type": "float", "visibility": 3, "kids": 4},
|
||||
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "visibility": 3, "kids": 1},
|
||||
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
||||
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm", "visibility": 3},
|
||||
{"path": "ts_2/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "ts_2/raw", "type": "float", "visibility": 3},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "setsamp", "type": "float", "readonly": false, "cmd": "tt setsamp", "kids": 18},
|
||||
{"path": "setsamp/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt setsamp/mode"},
|
||||
{"path": "setsamp/reg", "type": "float"},
|
||||
{"path": "setsamp/ramp", "type": "float", "readonly": false, "cmd": "tt setsamp/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "setsamp/wramp", "type": "float", "readonly": false, "cmd": "tt setsamp/wramp"},
|
||||
{"path": "setsamp/smooth", "type": "float", "readonly": false, "cmd": "tt setsamp/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "setsamp/channel", "type": "text", "readonly": false, "cmd": "tt setsamp/channel"},
|
||||
{"path": "setsamp/limit", "type": "float", "readonly": false, "cmd": "tt setsamp/limit"},
|
||||
{"path": "setsamp/resist", "type": "float", "readonly": false, "cmd": "tt setsamp/resist"},
|
||||
{"path": "setsamp/maxheater", "type": "text", "readonly": false, "cmd": "tt setsamp/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "setsamp/linearpower", "type": "float", "readonly": false, "cmd": "tt setsamp/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "setsamp/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "setsamp/maxpower", "type": "float", "readonly": false, "cmd": "tt setsamp/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "setsamp/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "setsamp/manualpower", "type": "float", "readonly": false, "cmd": "tt setsamp/manualpower"},
|
||||
{"path": "setsamp/power", "type": "float"},
|
||||
{"path": "setsamp/prop", "type": "float", "readonly": false, "cmd": "tt setsamp/prop", "description": "bigger means more gain"},
|
||||
{"path": "setsamp/integ", "type": "float", "readonly": false, "cmd": "tt setsamp/integ", "description": "bigger means faster"},
|
||||
{"path": "setsamp/deriv", "type": "float", "readonly": false, "cmd": "tt setsamp/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch", "visibility": 3},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0", "visibility": 3},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos.", "visibility": 3},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos.", "visibility": 3},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)", "visibility": 3},
|
||||
{"path": "h0", "type": "float", "visibility": 3},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h1", "type": "float", "visibility": 3},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h2", "type": "float", "visibility": 3},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h3", "type": "float", "visibility": 3},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h4", "type": "float", "visibility": 3},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h5", "type": "float", "visibility": 3},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float", "visibility": 3},
|
||||
{"path": "tn", "type": "float", "visibility": 3},
|
||||
{"path": "th", "type": "float", "visibility": 3},
|
||||
{"path": "tf", "type": "float", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "visibility": 3},
|
||||
{"path": "tv", "type": "float", "visibility": 3},
|
||||
{"path": "tq", "type": "float", "visibility": 3},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "nv": {"base": "/nv", "params": [{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 11},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "motstat", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "flow", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
||||
{"path": "flowp", "type": "float"},
|
||||
{"path": "span", "type": "float"},
|
||||
{"path": "ctrl", "type": "none", "kids": 13},
|
||||
{"path": "ctrl/regtext", "type": "text"},
|
||||
{"path": "ctrl/prop_o", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_o", "description": "prop [sec/mbar] when opening. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/prop_c", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_c", "description": "prop [sec/mbar] when closing. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/deriv_o", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_o", "description": "convergence target time [sec] when opening"},
|
||||
{"path": "ctrl/deriv_c", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_c", "description": "convergence target time [sec] when closing"},
|
||||
{"path": "ctrl/minpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_o", "description": "minimum close pulse [sec]"},
|
||||
{"path": "ctrl/minpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_c", "description": "standard close pulse [sec]"},
|
||||
{"path": "ctrl/hystpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_o", "description": "motor pulse to overcome hysteresis when opening"},
|
||||
{"path": "ctrl/hystpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_c", "description": "motor pulse to overcome hysteresis when closing"},
|
||||
{"path": "ctrl/tol", "type": "float", "readonly": false, "cmd": "nv ctrl/tol", "description": "valid below 3 mbar"},
|
||||
{"path": "ctrl/tolhigh", "type": "float", "readonly": false, "cmd": "nv ctrl/tolhigh", "description": "valid above 4 mbar"},
|
||||
{"path": "ctrl/openpulse", "type": "float", "readonly": false, "cmd": "nv ctrl/openpulse", "description": "time to open from completely closed to a significant opening"},
|
||||
{"path": "ctrl/adjust_minpulse", "type": "bool", "readonly": false, "cmd": "nv ctrl/adjust_minpulse", "description": "adjust minpulse automatically"},
|
||||
{"path": "autoflow", "type": "none", "kids": 24},
|
||||
{"path": "autoflow/suspended", "type": "bool", "readonly": false, "cmd": "nv autoflow/suspended"},
|
||||
{"path": "autoflow/prop", "type": "float", "readonly": false, "cmd": "nv autoflow/prop"},
|
||||
{"path": "autoflow/flowstd", "type": "float", "readonly": false, "cmd": "nv autoflow/flowstd"},
|
||||
{"path": "autoflow/flowlim", "type": "float", "readonly": false, "cmd": "nv autoflow/flowlim"},
|
||||
{"path": "autoflow/smooth", "type": "float", "readonly": false, "cmd": "nv autoflow/smooth"},
|
||||
{"path": "autoflow/difSize", "type": "float", "readonly": false, "cmd": "nv autoflow/difSize"},
|
||||
{"path": "autoflow/difRange", "type": "float", "readonly": false, "cmd": "nv autoflow/difRange"},
|
||||
{"path": "autoflow/flowSize", "type": "float", "readonly": false, "cmd": "nv autoflow/flowSize"},
|
||||
{"path": "autoflow/convTime", "type": "float", "readonly": false, "cmd": "nv autoflow/convTime"},
|
||||
{"path": "autoflow/Tmin", "type": "float", "readonly": false, "cmd": "nv autoflow/Tmin"},
|
||||
{"path": "autoflow/script", "type": "text", "readonly": false, "cmd": "nv autoflow/script"},
|
||||
{"path": "autoflow/getTemp", "type": "text", "readonly": false, "cmd": "nv autoflow/getTemp"},
|
||||
{"path": "autoflow/getTset", "type": "text", "readonly": false, "cmd": "nv autoflow/getTset"},
|
||||
{"path": "autoflow/getFlow", "type": "text", "readonly": false, "cmd": "nv autoflow/getFlow"},
|
||||
{"path": "autoflow/difBuf", "type": "text"},
|
||||
{"path": "autoflow/flowBuf", "type": "text"},
|
||||
{"path": "autoflow/flowset", "type": "float"},
|
||||
{"path": "autoflow/flowmin", "type": "float"},
|
||||
{"path": "autoflow/flowmax", "type": "float"},
|
||||
{"path": "autoflow/difmin", "type": "float"},
|
||||
{"path": "autoflow/difmax", "type": "float"},
|
||||
{"path": "autoflow/setmin", "type": "float"},
|
||||
{"path": "autoflow/setmax", "type": "float"},
|
||||
{"path": "autoflow/flowtarget", "type": "float"},
|
||||
{"path": "calib", "type": "none", "kids": 2},
|
||||
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
||||
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]}, "hepump": {"base": "/hepump", "params": [{"path": "", "type": "enum", "enum": {"xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 9},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running"},
|
||||
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco"},
|
||||
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto"},
|
||||
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve"},
|
||||
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2"},
|
||||
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3}]}, "hemot": {"base": "/hepump/hemot", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run hemot", "kids": 30},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hemot send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "hemot is_running", "visibility": 3},
|
||||
{"path": "pos", "type": "float"},
|
||||
{"path": "encoder", "type": "float"},
|
||||
{"path": "zero", "type": "float", "readonly": false, "cmd": "hemot zero"},
|
||||
{"path": "lowerlimit", "type": "float", "readonly": false, "cmd": "hemot lowerlimit"},
|
||||
{"path": "upperlimit", "type": "float", "readonly": false, "cmd": "hemot upperlimit"},
|
||||
{"path": "disablelimits", "type": "bool", "readonly": false, "cmd": "hemot disablelimits"},
|
||||
{"path": "verbose", "type": "bool", "readonly": false, "cmd": "hemot verbose"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "runstate", "type": "enum", "enum": {"idle": 0, "running": 1, "finished": 2, "error": 3}},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "hemot precision"},
|
||||
{"path": "maxencdif", "type": "float", "readonly": false, "cmd": "hemot maxencdif"},
|
||||
{"path": "id", "type": "float", "readonly": false, "cmd": "hemot id"},
|
||||
{"path": "init", "type": "float", "readonly": false, "cmd": "hemot init"},
|
||||
{"path": "maxspeed", "type": "float", "readonly": false, "cmd": "hemot maxspeed"},
|
||||
{"path": "acceleration", "type": "float", "readonly": false, "cmd": "hemot acceleration"},
|
||||
{"path": "maxcurrent", "type": "float", "readonly": false, "cmd": "hemot maxcurrent"},
|
||||
{"path": "standbycurrent", "type": "float", "readonly": false, "cmd": "hemot standbycurrent"},
|
||||
{"path": "freewheeling", "type": "bool", "readonly": false, "cmd": "hemot freewheeling"},
|
||||
{"path": "output0", "type": "bool", "readonly": false, "cmd": "hemot output0"},
|
||||
{"path": "output1", "type": "bool", "readonly": false, "cmd": "hemot output1"},
|
||||
{"path": "input3", "type": "bool"},
|
||||
{"path": "input0", "type": "float"},
|
||||
{"path": "input0raw", "type": "float"},
|
||||
{"path": "pullup", "type": "float", "readonly": false, "cmd": "hemot pullup"},
|
||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]}, "ln2fill": {"base": "/ln2fill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "ln2fill readlevel", "visibility": 3},
|
||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "ln2fill lowlevel"},
|
||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "ln2fill highlevel"},
|
||||
{"path": "smooth", "type": "float"},
|
||||
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "ln2fill minfillminutes"},
|
||||
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "ln2fill maxfillminutes"},
|
||||
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "ln2fill minholdhours"},
|
||||
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "ln2fill maxholdhours"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "ln2fill tolerance"},
|
||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "ln2fill badreadingminutes"},
|
||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "ln2fill tubecoolingminutes"}]}, "hefill": {"base": "/hefill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "hefill", "kids": 16},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "hefill readlevel", "visibility": 3},
|
||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "hefill lowlevel"},
|
||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "hefill highlevel"},
|
||||
{"path": "smooth", "type": "float"},
|
||||
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "hefill minfillminutes"},
|
||||
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "hefill maxfillminutes"},
|
||||
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "hefill minholdhours"},
|
||||
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "hefill maxholdhours"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "hefill tolerance"},
|
||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "hefill badreadingminutes"},
|
||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "hefill tubecoolingminutes"},
|
||||
{"path": "vessellimit", "type": "float", "readonly": false, "cmd": "hefill vessellimit"},
|
||||
{"path": "vext", "type": "float"}]}, "lev": {"base": "/lev", "params": [{"path": "", "type": "float", "kids": 4},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "lev send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "mode", "type": "enum", "enum": {"slow": 0, "fast (switches to slow automatically after filling)": 1}, "readonly": false, "cmd": "lev mode"},
|
||||
{"path": "n2", "type": "float"}]}, "mf": {"base": "/mf", "params": [{"path": "", "type": "float", "kids": 26},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "mf is_running", "visibility": 3},
|
||||
{"path": "persmode", "type": "int", "readonly": false, "cmd": "mf persmode"},
|
||||
{"path": "perswitch", "type": "int"},
|
||||
{"path": "nowait", "type": "int", "readonly": false, "cmd": "mf nowait"},
|
||||
{"path": "maxlimit", "type": "float", "visibility": 3},
|
||||
{"path": "limit", "type": "float", "readonly": false, "cmd": "mf limit"},
|
||||
{"path": "ramp", "type": "float", "readonly": false, "cmd": "mf ramp"},
|
||||
{"path": "perscurrent", "type": "float", "readonly": false, "cmd": "mf perscurrent"},
|
||||
{"path": "perslimit", "type": "float", "readonly": false, "cmd": "mf perslimit"},
|
||||
{"path": "perswait", "type": "int", "readonly": false, "cmd": "mf perswait"},
|
||||
{"path": "persdelay", "type": "int", "readonly": false, "cmd": "mf persdelay"},
|
||||
{"path": "current", "type": "float"},
|
||||
{"path": "measured", "type": "float"},
|
||||
{"path": "voltage", "type": "float"},
|
||||
{"path": "lastfield", "type": "float", "visibility": 3},
|
||||
{"path": "ampRamp", "type": "float", "visibility": 3},
|
||||
{"path": "inductance", "type": "float", "visibility": 3},
|
||||
{"path": "trainedTo", "type": "float", "readonly": false, "cmd": "mf trainedTo"},
|
||||
{"path": "trainMode", "type": "int"},
|
||||
{"path": "external", "type": "int", "readonly": false, "cmd": "mf external"},
|
||||
{"path": "startScript", "type": "text", "readonly": false, "cmd": "mf startScript", "visibility": 3},
|
||||
{"path": "verbose", "type": "int", "readonly": false, "cmd": "mf verbose", "visibility": 3},
|
||||
{"path": "driver", "type": "text", "visibility": 3},
|
||||
{"path": "creationCmd", "type": "text", "visibility": 3},
|
||||
{"path": "targetValue", "type": "float"},
|
||||
{"path": "status", "type": "text", "readonly": false, "cmd": "mf status", "visibility": 3}]}, "tcoil": {"base": "/tcoil", "params": [{"path": "", "type": "float", "kids": 11},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tcoil send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "excitation", "type": "float", "readonly": false, "cmd": "tcoil excitation", "visibility": 3},
|
||||
{"path": "td", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "td/enable", "type": "bool", "readonly": false, "cmd": "tcoil td/enable"},
|
||||
{"path": "td/r", "type": "float"},
|
||||
{"path": "td/curve", "type": "text", "readonly": false, "cmd": "tcoil td/curve", "kids": 3},
|
||||
{"path": "td/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil td/curve/adjust"},
|
||||
{"path": "td/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil td/curve/points"},
|
||||
{"path": "td/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil td/curve/cpoints"},
|
||||
{"path": "tc", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "tc/enable", "type": "bool", "readonly": false, "cmd": "tcoil tc/enable"},
|
||||
{"path": "tc/r", "type": "float"},
|
||||
{"path": "tc/curve", "type": "text", "readonly": false, "cmd": "tcoil tc/curve", "kids": 3},
|
||||
{"path": "tc/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil tc/curve/adjust"},
|
||||
{"path": "tc/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil tc/curve/points"},
|
||||
{"path": "tc/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil tc/curve/cpoints"},
|
||||
{"path": "tb", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "tb/enable", "type": "bool", "readonly": false, "cmd": "tcoil tb/enable"},
|
||||
{"path": "tb/r", "type": "float"},
|
||||
{"path": "tb/curve", "type": "text", "readonly": false, "cmd": "tcoil tb/curve", "kids": 3},
|
||||
{"path": "tb/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil tb/curve/adjust"},
|
||||
{"path": "tb/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil tb/curve/points"},
|
||||
{"path": "tb/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil tb/curve/cpoints"},
|
||||
{"path": "ta", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "ta/enable", "type": "bool", "readonly": false, "cmd": "tcoil ta/enable"},
|
||||
{"path": "ta/r", "type": "float"},
|
||||
{"path": "ta/curve", "type": "text", "readonly": false, "cmd": "tcoil ta/curve", "kids": 3},
|
||||
{"path": "ta/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil ta/curve/adjust"},
|
||||
{"path": "ta/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil ta/curve/points"},
|
||||
{"path": "ta/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil ta/curve/cpoints"},
|
||||
{"path": "ref", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "ref/enable", "type": "bool", "readonly": false, "cmd": "tcoil ref/enable"},
|
||||
{"path": "ref/r", "type": "float"},
|
||||
{"path": "ref/curve", "type": "text", "readonly": false, "cmd": "tcoil ref/curve", "kids": 3},
|
||||
{"path": "ref/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil ref/curve/adjust"},
|
||||
{"path": "ref/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil ref/curve/points"},
|
||||
{"path": "ref/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil ref/curve/cpoints"},
|
||||
{"path": "ext", "type": "float", "visibility": 3},
|
||||
{"path": "com", "type": "float", "visibility": 3},
|
||||
{"path": "gnd", "type": "float", "visibility": 3}]}, "table": {"base": "/table", "params": [{"path": "", "type": "none", "kids": 17},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
||||
{"path": "val_tt_set_prop", "type": "float"},
|
||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
||||
{"path": "val_tt_set_integ", "type": "float"},
|
||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_int2", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_int2"},
|
||||
{"path": "val_tt_dblctrl_int2", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_int2", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_int2", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_up", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_up"},
|
||||
{"path": "val_tt_dblctrl_prop_up", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_up", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_up", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_lo", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_lo"},
|
||||
{"path": "val_tt_dblctrl_prop_lo", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_lo", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_lo", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}, "ccu2": {"base": "/sics/ccu2", "params": [{"path": "", "type": "text", "readonly": false, "cmd": "ccu2", "kids": 23},
|
||||
{"path": "tasks", "type": "none", "visibility": 3}]}, "lnv": {"base": "/lnv", "params": [{"path": "", "type": "enum", "enum": {"off": 5, "fixed": 0, "controlling": 1, "close": 3, "open": 4}, "readonly": false, "cmd": "lnv", "kids": 12},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "lnv send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "lnv set"},
|
||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "lnv flowmax"},
|
||||
{"path": "prop", "type": "float", "readonly": false, "cmd": "lnv prop"},
|
||||
{"path": "int", "type": "float", "readonly": false, "cmd": "lnv int"},
|
||||
{"path": "minpulse", "type": "enum", "enum": {"micro": 1, "short": 10, "long": 100}, "readonly": false, "cmd": "lnv minpulse", "description": "micro: 1 ms, short: 10 ms, long: 100 ms"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "lnv tolerance"},
|
||||
{"path": "speed", "type": "float"},
|
||||
{"path": "flow", "type": "float"},
|
||||
{"path": "pos", "type": "float", "kids": 2},
|
||||
{"path": "pos/norm", "type": "float", "readonly": false, "cmd": "lnv pos/norm"},
|
||||
{"path": "pos/max", "type": "float", "readonly": false, "cmd": "lnv pos/max"},
|
||||
{"path": "autoflow", "type": "none", "kids": 24},
|
||||
{"path": "autoflow/suspended", "type": "bool", "readonly": false, "cmd": "lnv autoflow/suspended"},
|
||||
{"path": "autoflow/prop", "type": "float", "readonly": false, "cmd": "lnv autoflow/prop"},
|
||||
{"path": "autoflow/flowstd", "type": "float", "readonly": false, "cmd": "lnv autoflow/flowstd"},
|
||||
{"path": "autoflow/flowlim", "type": "float", "readonly": false, "cmd": "lnv autoflow/flowlim"},
|
||||
{"path": "autoflow/smooth", "type": "float", "readonly": false, "cmd": "lnv autoflow/smooth"},
|
||||
{"path": "autoflow/difSize", "type": "float", "readonly": false, "cmd": "lnv autoflow/difSize"},
|
||||
{"path": "autoflow/difRange", "type": "float", "readonly": false, "cmd": "lnv autoflow/difRange"},
|
||||
{"path": "autoflow/flowSize", "type": "float", "readonly": false, "cmd": "lnv autoflow/flowSize"},
|
||||
{"path": "autoflow/convTime", "type": "float", "readonly": false, "cmd": "lnv autoflow/convTime"},
|
||||
{"path": "autoflow/Tmin", "type": "float", "readonly": false, "cmd": "lnv autoflow/Tmin"},
|
||||
{"path": "autoflow/script", "type": "text", "readonly": false, "cmd": "lnv autoflow/script"},
|
||||
{"path": "autoflow/getTemp", "type": "text", "readonly": false, "cmd": "lnv autoflow/getTemp"},
|
||||
{"path": "autoflow/getTset", "type": "text", "readonly": false, "cmd": "lnv autoflow/getTset"},
|
||||
{"path": "autoflow/getFlow", "type": "text", "readonly": false, "cmd": "lnv autoflow/getFlow"},
|
||||
{"path": "autoflow/difBuf", "type": "text"},
|
||||
{"path": "autoflow/flowBuf", "type": "text"},
|
||||
{"path": "autoflow/flowset", "type": "float"},
|
||||
{"path": "autoflow/flowmin", "type": "float"},
|
||||
{"path": "autoflow/flowmax", "type": "float"},
|
||||
{"path": "autoflow/difmin", "type": "float"},
|
||||
{"path": "autoflow/difmax", "type": "float"},
|
||||
{"path": "autoflow/setmin", "type": "float"},
|
||||
{"path": "autoflow/setmax", "type": "float"},
|
||||
{"path": "autoflow/flowtarget", "type": "float"}]}, "lpr": {"base": "/lpr", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run lpr", "description": "lpr", "kids": 28},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "lpr send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "lpr is_running", "visibility": 3},
|
||||
{"path": "mode", "type": "enum", "enum": {"off": 0, "on": 1}, "readonly": false, "cmd": "lpr mode"},
|
||||
{"path": "reg", "type": "float"},
|
||||
{"path": "output", "type": "float", "readonly": false, "cmd": "lpr output"},
|
||||
{"path": "ramptime", "type": "float", "readonly": false, "cmd": "lpr ramptime", "description": "time for ramping [sec] deltax = 1 or a factor 10"},
|
||||
{"path": "ramptol", "type": "float", "readonly": false, "cmd": "lpr ramptol", "description": "log of max. deviation when ramping"},
|
||||
{"path": "smoothtime", "type": "float", "readonly": false, "cmd": "lpr smoothtime", "description": "time for smoothing ramp near setpoint"},
|
||||
{"path": "invar", "type": "text", "readonly": false, "cmd": "lpr invar", "visibility": 3},
|
||||
{"path": "outvar", "type": "text", "readonly": false, "cmd": "lpr outvar", "visibility": 3},
|
||||
{"path": "prop", "type": "float", "readonly": false, "cmd": "lpr prop", "description": "smaller means more sensitive. a change of 'prop' on input -> a change of 100 % or a factor 10 on output"},
|
||||
{"path": "int", "type": "float", "readonly": false, "cmd": "lpr int", "description": "integration time (sec)"},
|
||||
{"path": "outmin", "type": "float", "readonly": false, "cmd": "lpr outmin", "description": "output for maximal decrease of input var."},
|
||||
{"path": "outmax", "type": "float", "readonly": false, "cmd": "lpr outmax", "description": "output for maximal increase of input var."},
|
||||
{"path": "inpfunction", "type": "enum", "enum": {"linear": 0, "logarithmic": 1}, "readonly": false, "cmd": "lpr inpfunction"},
|
||||
{"path": "inplinear", "type": "float", "readonly": false, "cmd": "lpr inplinear", "description": "function gets linear below about this value"},
|
||||
{"path": "outfunction", "type": "enum", "enum": {"linear": 0, "exponential": 1}, "readonly": false, "cmd": "lpr outfunction"},
|
||||
{"path": "outlinear", "type": "float", "readonly": false, "cmd": "lpr outlinear", "description": "function gets linear below about this value"},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "lpr precision"},
|
||||
{"path": "deadband", "type": "float", "readonly": false, "cmd": "lpr deadband"},
|
||||
{"path": "maxdelta", "type": "float", "readonly": false, "cmd": "lpr maxdelta"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "lpr set"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "lpr tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "lpr maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "lpr settle"}]}, "lambdawatch": {"base": "/lambdawatch", "params": [{"path": "", "type": "float", "kids": 6},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "lambdawatch send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "safefield", "type": "float", "readonly": false, "cmd": "lambdawatch safefield"},
|
||||
{"path": "maxfield", "type": "float", "readonly": false, "cmd": "lambdawatch maxfield"},
|
||||
{"path": "safetemp", "type": "float", "readonly": false, "cmd": "lambdawatch safetemp"},
|
||||
{"path": "coiltemp", "type": "text", "readonly": false, "cmd": "lambdawatch coiltemp"}]}, "prep0": {"base": "/prep0", "params": [{"path": "", "type": "text", "readonly": false, "cmd": "prep0", "kids": 2},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "prep0 send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3}]}}
|
371
cfg/sea/ma7.config.json
Normal file
371
cfg/sea/ma7.config.json
Normal file
@ -0,0 +1,371 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
||||
{"path": "dblctrl/shift_up", "type": "float"},
|
||||
{"path": "dblctrl/shift_lo", "type": "float"},
|
||||
{"path": "dblctrl/t_min", "type": "float"},
|
||||
{"path": "dblctrl/t_max", "type": "float"},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "ts", "type": "float", "kids": 4},
|
||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||
{"path": "ts/stddev", "type": "float"},
|
||||
{"path": "ts/raw", "type": "float"},
|
||||
{"path": "ts_2", "type": "float", "visibility": 3, "kids": 4},
|
||||
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "visibility": 3, "kids": 1},
|
||||
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
||||
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm", "visibility": 3},
|
||||
{"path": "ts_2/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "ts_2/raw", "type": "float", "visibility": 3},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "dout", "type": "int", "readonly": false, "cmd": "tt dout"},
|
||||
{"path": "dinp", "type": "int"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch"},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0"},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)"},
|
||||
{"path": "h0", "type": "float"},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h1", "type": "float"},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h2", "type": "float"},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h3", "type": "float"},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h4", "type": "float"},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "h5", "type": "float"},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float", "visibility": 3},
|
||||
{"path": "tn", "type": "float", "visibility": 3},
|
||||
{"path": "th", "type": "float", "visibility": 3},
|
||||
{"path": "tf", "type": "float", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "visibility": 3},
|
||||
{"path": "tv", "type": "float", "visibility": 3},
|
||||
{"path": "tq", "type": "float", "visibility": 3},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "nv": {"base": "/nv", "params": [{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 11},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "motstat", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "flow", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
||||
{"path": "flowp", "type": "float"},
|
||||
{"path": "span", "type": "float"},
|
||||
{"path": "ctrl", "type": "none", "kids": 13},
|
||||
{"path": "ctrl/regtext", "type": "text"},
|
||||
{"path": "ctrl/prop_o", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_o", "description": "prop [sec/mbar] when opening. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/prop_c", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_c", "description": "prop [sec/mbar] when closing. above 4 mbar a 10 times lower value is used"},
|
||||
{"path": "ctrl/deriv_o", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_o", "description": "convergence target time [sec] when opening"},
|
||||
{"path": "ctrl/deriv_c", "type": "float", "readonly": false, "cmd": "nv ctrl/deriv_c", "description": "convergence target time [sec] when closing"},
|
||||
{"path": "ctrl/minpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_o", "description": "minimum close pulse [sec]"},
|
||||
{"path": "ctrl/minpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/minpulse_c", "description": "standard close pulse [sec]"},
|
||||
{"path": "ctrl/hystpulse_o", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_o", "description": "motor pulse to overcome hysteresis when opening"},
|
||||
{"path": "ctrl/hystpulse_c", "type": "float", "readonly": false, "cmd": "nv ctrl/hystpulse_c", "description": "motor pulse to overcome hysteresis when closing"},
|
||||
{"path": "ctrl/tol", "type": "float", "readonly": false, "cmd": "nv ctrl/tol", "description": "valid below 3 mbar"},
|
||||
{"path": "ctrl/tolhigh", "type": "float", "readonly": false, "cmd": "nv ctrl/tolhigh", "description": "valid above 4 mbar"},
|
||||
{"path": "ctrl/openpulse", "type": "float", "readonly": false, "cmd": "nv ctrl/openpulse", "description": "time to open from completely closed to a significant opening"},
|
||||
{"path": "ctrl/adjust_minpulse", "type": "bool", "readonly": false, "cmd": "nv ctrl/adjust_minpulse", "description": "adjust minpulse automatically"},
|
||||
{"path": "autoflow", "type": "none", "kids": 24},
|
||||
{"path": "autoflow/suspended", "type": "bool", "readonly": false, "cmd": "nv autoflow/suspended"},
|
||||
{"path": "autoflow/prop", "type": "float", "readonly": false, "cmd": "nv autoflow/prop"},
|
||||
{"path": "autoflow/flowstd", "type": "float", "readonly": false, "cmd": "nv autoflow/flowstd"},
|
||||
{"path": "autoflow/flowlim", "type": "float", "readonly": false, "cmd": "nv autoflow/flowlim"},
|
||||
{"path": "autoflow/smooth", "type": "float", "readonly": false, "cmd": "nv autoflow/smooth"},
|
||||
{"path": "autoflow/difSize", "type": "float", "readonly": false, "cmd": "nv autoflow/difSize"},
|
||||
{"path": "autoflow/difRange", "type": "float", "readonly": false, "cmd": "nv autoflow/difRange"},
|
||||
{"path": "autoflow/flowSize", "type": "float", "readonly": false, "cmd": "nv autoflow/flowSize"},
|
||||
{"path": "autoflow/convTime", "type": "float", "readonly": false, "cmd": "nv autoflow/convTime"},
|
||||
{"path": "autoflow/Tmin", "type": "float", "readonly": false, "cmd": "nv autoflow/Tmin"},
|
||||
{"path": "autoflow/script", "type": "text", "readonly": false, "cmd": "nv autoflow/script"},
|
||||
{"path": "autoflow/getTemp", "type": "text", "readonly": false, "cmd": "nv autoflow/getTemp"},
|
||||
{"path": "autoflow/getTset", "type": "text", "readonly": false, "cmd": "nv autoflow/getTset"},
|
||||
{"path": "autoflow/getFlow", "type": "text", "readonly": false, "cmd": "nv autoflow/getFlow"},
|
||||
{"path": "autoflow/difBuf", "type": "text"},
|
||||
{"path": "autoflow/flowBuf", "type": "text"},
|
||||
{"path": "autoflow/flowset", "type": "float"},
|
||||
{"path": "autoflow/flowmin", "type": "float"},
|
||||
{"path": "autoflow/flowmax", "type": "float"},
|
||||
{"path": "autoflow/difmin", "type": "float"},
|
||||
{"path": "autoflow/difmax", "type": "float"},
|
||||
{"path": "autoflow/setmin", "type": "float"},
|
||||
{"path": "autoflow/setmax", "type": "float"},
|
||||
{"path": "autoflow/flowtarget", "type": "float"},
|
||||
{"path": "calib", "type": "none", "kids": 2},
|
||||
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
||||
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]}, "hefill": {"base": "/hefill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "hefill", "kids": 16},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "hefill readlevel", "visibility": 3},
|
||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "hefill lowlevel"},
|
||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "hefill highlevel"},
|
||||
{"path": "smooth", "type": "float"},
|
||||
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "hefill minfillminutes"},
|
||||
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "hefill maxfillminutes"},
|
||||
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "hefill minholdhours"},
|
||||
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "hefill maxholdhours"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "hefill tolerance"},
|
||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "hefill badreadingminutes"},
|
||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "hefill tubecoolingminutes"},
|
||||
{"path": "vessellimit", "type": "float", "readonly": false, "cmd": "hefill vessellimit"},
|
||||
{"path": "vext", "type": "float"}]}, "hepump": {"base": "/hepump", "params": [{"path": "", "type": "enum", "enum": {"xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 9},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running", "visibility": 3},
|
||||
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco", "visibility": 3},
|
||||
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto", "visibility": 3},
|
||||
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve", "visibility": 3},
|
||||
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2", "visibility": 3},
|
||||
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3}]}, "hemot": {"base": "/hepump/hemot", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run hemot", "visibility": 3, "kids": 32},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hemot send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "hemot is_running", "visibility": 3},
|
||||
{"path": "pos", "type": "float"},
|
||||
{"path": "encoder", "type": "float"},
|
||||
{"path": "zero", "type": "float", "readonly": false, "cmd": "hemot zero"},
|
||||
{"path": "lowerlimit", "type": "float", "readonly": false, "cmd": "hemot lowerlimit"},
|
||||
{"path": "upperlimit", "type": "float", "readonly": false, "cmd": "hemot upperlimit"},
|
||||
{"path": "disablelimits", "type": "bool", "readonly": false, "cmd": "hemot disablelimits"},
|
||||
{"path": "verbose", "type": "bool", "readonly": false, "cmd": "hemot verbose"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "runstate", "type": "enum", "enum": {"idle": 0, "running": 1, "finished": 2, "error": 3}},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "hemot precision"},
|
||||
{"path": "maxencdif", "type": "float", "readonly": false, "cmd": "hemot maxencdif"},
|
||||
{"path": "id", "type": "float", "readonly": false, "cmd": "hemot id"},
|
||||
{"path": "pump_number", "type": "float", "readonly": false, "cmd": "hemot pump_number"},
|
||||
{"path": "init", "type": "float", "readonly": false, "cmd": "hemot init"},
|
||||
{"path": "maxspeed", "type": "float", "readonly": false, "cmd": "hemot maxspeed"},
|
||||
{"path": "acceleration", "type": "float", "readonly": false, "cmd": "hemot acceleration"},
|
||||
{"path": "maxcurrent", "type": "float", "readonly": false, "cmd": "hemot maxcurrent"},
|
||||
{"path": "standbycurrent", "type": "float", "readonly": false, "cmd": "hemot standbycurrent"},
|
||||
{"path": "freewheeling", "type": "bool", "readonly": false, "cmd": "hemot freewheeling"},
|
||||
{"path": "output0", "type": "bool", "readonly": false, "cmd": "hemot output0"},
|
||||
{"path": "output1", "type": "bool", "readonly": false, "cmd": "hemot output1"},
|
||||
{"path": "input3", "type": "bool"},
|
||||
{"path": "input0", "type": "float"},
|
||||
{"path": "input0raw", "type": "float"},
|
||||
{"path": "pullup", "type": "float", "readonly": false, "cmd": "hemot pullup"},
|
||||
{"path": "nopumpfeedback", "type": "bool", "readonly": false, "cmd": "hemot nopumpfeedback"},
|
||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]}, "ln2fill": {"base": "/ln2fill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "ln2fill readlevel", "visibility": 3},
|
||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "ln2fill lowlevel"},
|
||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "ln2fill highlevel"},
|
||||
{"path": "smooth", "type": "float"},
|
||||
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "ln2fill minfillminutes"},
|
||||
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "ln2fill maxfillminutes"},
|
||||
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "ln2fill minholdhours"},
|
||||
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "ln2fill maxholdhours"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "ln2fill tolerance"},
|
||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "ln2fill badreadingminutes"},
|
||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "ln2fill tubecoolingminutes"}]}, "mf": {"base": "/mf", "params": [{"path": "", "type": "float", "kids": 26},
|
||||
{"path": "persmode", "type": "int", "readonly": false, "cmd": "mf persmode"},
|
||||
{"path": "perswitch", "type": "int"},
|
||||
{"path": "nowait", "type": "int", "readonly": false, "cmd": "mf nowait"},
|
||||
{"path": "maxlimit", "type": "float", "visibility": 3},
|
||||
{"path": "limit", "type": "float", "readonly": false, "cmd": "mf limit"},
|
||||
{"path": "ramp", "type": "float", "readonly": false, "cmd": "mf ramp"},
|
||||
{"path": "perscurrent", "type": "float", "readonly": false, "cmd": "mf perscurrent"},
|
||||
{"path": "perslimit", "type": "float", "readonly": false, "cmd": "mf perslimit"},
|
||||
{"path": "perswait", "type": "int", "readonly": false, "cmd": "mf perswait"},
|
||||
{"path": "persdelay", "type": "int", "readonly": false, "cmd": "mf persdelay"},
|
||||
{"path": "current", "type": "float"},
|
||||
{"path": "measured", "type": "float"},
|
||||
{"path": "voltage", "type": "float"},
|
||||
{"path": "lastfield", "type": "float", "visibility": 3},
|
||||
{"path": "ampRamp", "type": "float", "visibility": 3},
|
||||
{"path": "inductance", "type": "float", "visibility": 3},
|
||||
{"path": "trainedTo", "type": "float", "readonly": false, "cmd": "mf trainedTo"},
|
||||
{"path": "trainMode", "type": "int"},
|
||||
{"path": "external", "type": "int", "readonly": false, "cmd": "mf external"},
|
||||
{"path": "startScript", "type": "text", "readonly": false, "cmd": "mf startScript", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "visibility": 3},
|
||||
{"path": "verbose", "type": "int", "readonly": false, "cmd": "mf verbose", "visibility": 3},
|
||||
{"path": "driver", "type": "text", "visibility": 3},
|
||||
{"path": "creationCmd", "type": "text", "visibility": 3},
|
||||
{"path": "targetValue", "type": "float"},
|
||||
{"path": "status", "type": "text", "readonly": false, "cmd": "mf status"}]}, "lev": {"base": "/lev", "params": [{"path": "", "type": "float", "kids": 4},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "lev send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "mode", "type": "enum", "enum": {"slow": 0, "fast (switches to slow automatically after filling)": 1}, "readonly": false, "cmd": "lev mode"},
|
||||
{"path": "n2", "type": "float"}]}, "tcoil": {"base": "/tcoil", "params": [{"path": "", "type": "float", "kids": 11},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tcoil send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "excitation", "type": "float", "readonly": false, "cmd": "tcoil excitation", "visibility": 3},
|
||||
{"path": "ta", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "ta/enable", "type": "bool", "readonly": false, "cmd": "tcoil ta/enable"},
|
||||
{"path": "ta/r", "type": "float"},
|
||||
{"path": "ta/curve", "type": "text", "readonly": false, "cmd": "tcoil ta/curve", "kids": 3},
|
||||
{"path": "ta/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil ta/curve/adjust"},
|
||||
{"path": "ta/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil ta/curve/points"},
|
||||
{"path": "ta/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil ta/curve/cpoints"},
|
||||
{"path": "tb", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "tb/enable", "type": "bool", "readonly": false, "cmd": "tcoil tb/enable"},
|
||||
{"path": "tb/r", "type": "float"},
|
||||
{"path": "tb/curve", "type": "text", "readonly": false, "cmd": "tcoil tb/curve", "kids": 3},
|
||||
{"path": "tb/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil tb/curve/adjust"},
|
||||
{"path": "tb/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil tb/curve/points"},
|
||||
{"path": "tb/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil tb/curve/cpoints"},
|
||||
{"path": "td", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "td/enable", "type": "bool", "readonly": false, "cmd": "tcoil td/enable"},
|
||||
{"path": "td/r", "type": "float"},
|
||||
{"path": "td/curve", "type": "text", "readonly": false, "cmd": "tcoil td/curve", "kids": 3},
|
||||
{"path": "td/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil td/curve/adjust"},
|
||||
{"path": "td/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil td/curve/points"},
|
||||
{"path": "td/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil td/curve/cpoints"},
|
||||
{"path": "ref", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "ref/enable", "type": "bool", "readonly": false, "cmd": "tcoil ref/enable"},
|
||||
{"path": "ref/r", "type": "float"},
|
||||
{"path": "ref/curve", "type": "text", "readonly": false, "cmd": "tcoil ref/curve", "kids": 3},
|
||||
{"path": "ref/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil ref/curve/adjust"},
|
||||
{"path": "ref/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil ref/curve/points"},
|
||||
{"path": "ref/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil ref/curve/cpoints"},
|
||||
{"path": "tc", "type": "float", "visibility": 3, "kids": 3},
|
||||
{"path": "tc/enable", "type": "bool", "readonly": false, "cmd": "tcoil tc/enable"},
|
||||
{"path": "tc/r", "type": "float"},
|
||||
{"path": "tc/curve", "type": "text", "readonly": false, "cmd": "tcoil tc/curve", "kids": 3},
|
||||
{"path": "tc/curve/adjust", "type": "text", "readonly": false, "cmd": "tcoil tc/curve/adjust"},
|
||||
{"path": "tc/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tcoil tc/curve/points"},
|
||||
{"path": "tc/curve/cpoints", "type": "floatvarar", "readonly": false, "cmd": "tcoil tc/curve/cpoints"},
|
||||
{"path": "ext", "type": "float", "visibility": 3},
|
||||
{"path": "com", "type": "float", "visibility": 3},
|
||||
{"path": "gnd", "type": "float", "visibility": 3}]}, "table": {"base": "/table", "params": [{"path": "", "type": "none", "kids": 17},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
||||
{"path": "val_tt_set_prop", "type": "float"},
|
||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
||||
{"path": "val_tt_set_integ", "type": "float"},
|
||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_int2", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_int2"},
|
||||
{"path": "val_tt_dblctrl_int2", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_int2", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_int2", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_up", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_up"},
|
||||
{"path": "val_tt_dblctrl_prop_up", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_up", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_up", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_lo", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_lo"},
|
||||
{"path": "val_tt_dblctrl_prop_lo", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_lo", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_lo", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}, "prep0": {"base": "/prep0", "params": [{"path": "", "type": "text", "readonly": false, "cmd": "prep0", "kids": 2},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "prep0 send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3}]}}
|
153
cfg/sea/mbe.config.json
Normal file
153
cfg/sea/mbe.config.json
Normal file
@ -0,0 +1,153 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 14},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "visibility": 3, "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift", "visibility": 3},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode", "visibility": 3},
|
||||
{"path": "dblctrl/shift_up", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/shift_lo", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_min", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/t_max", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2", "visibility": 3},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up", "visibility": 3},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo", "visibility": 3},
|
||||
{"path": "ts", "type": "float", "kids": 4},
|
||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||
{"path": "ts/stddev", "type": "float"},
|
||||
{"path": "ts/raw", "type": "float"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch", "visibility": 3},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0", "visibility": 3},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos.", "visibility": 3},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos.", "visibility": 3},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)", "visibility": 3},
|
||||
{"path": "h0", "type": "float", "visibility": 3},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h1", "type": "float", "visibility": 3},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h2", "type": "float", "visibility": 3},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h3", "type": "float", "visibility": 3},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h4", "type": "float", "visibility": 3},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h5", "type": "float", "visibility": 3},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float", "visibility": 3},
|
||||
{"path": "tn", "type": "float", "visibility": 3},
|
||||
{"path": "th", "type": "float", "visibility": 3},
|
||||
{"path": "tf", "type": "float", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "visibility": 3},
|
||||
{"path": "tv", "type": "float", "visibility": 3},
|
||||
{"path": "tq", "type": "float", "visibility": 3},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "p": {"base": "/p", "params": [{"path": "", "type": "float", "kids": 6},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "p send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "vacuumpump", "type": "bool", "readonly": false, "cmd": "p vacuumpump"},
|
||||
{"path": "gasflow", "type": "bool", "readonly": false, "cmd": "p gasflow"},
|
||||
{"path": "tlimit", "type": "float", "readonly": false, "cmd": "p tlimit"},
|
||||
{"path": "tlimit_without_vacuum", "type": "float", "readonly": false, "cmd": "p tlimit_without_vacuum"}]}}
|
303
cfg/sea/ori4.config.json
Normal file
303
cfg/sea/ori4.config.json
Normal file
@ -0,0 +1,303 @@
|
||||
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "running", "type": "int"},
|
||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "log/n", "type": "float", "visibility": 3},
|
||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
||||
{"path": "dblctrl/shift_up", "type": "float"},
|
||||
{"path": "dblctrl/shift_lo", "type": "float"},
|
||||
{"path": "dblctrl/t_min", "type": "float"},
|
||||
{"path": "dblctrl/t_max", "type": "float"},
|
||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
||||
{"path": "tm", "type": "float", "kids": 4},
|
||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||
{"path": "tm/stddev", "type": "float"},
|
||||
{"path": "tm/raw", "type": "float"},
|
||||
{"path": "ts", "type": "float", "kids": 4},
|
||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||
{"path": "ts/stddev", "type": "float"},
|
||||
{"path": "ts/raw", "type": "float"},
|
||||
{"path": "ts_2", "type": "float", "visibility": 3, "kids": 4},
|
||||
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "visibility": 3, "kids": 1},
|
||||
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
||||
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm", "visibility": 3},
|
||||
{"path": "ts_2/stddev", "type": "float", "visibility": 3},
|
||||
{"path": "ts_2/raw", "type": "float", "visibility": 3},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||
{"path": "set/reg", "type": "float"},
|
||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||
{"path": "set/channel", "type": "text", "readonly": false, "cmd": "tt set/channel"},
|
||||
{"path": "set/limit", "type": "float", "readonly": false, "cmd": "tt set/limit"},
|
||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||
{"path": "set/power", "type": "float"},
|
||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||
{"path": "dout", "type": "int", "readonly": false, "cmd": "tt dout"},
|
||||
{"path": "dinp", "type": "int"},
|
||||
{"path": "remote", "type": "bool"}]}, "cc": {"base": "/cc", "params": [{"path": "", "type": "bool", "kids": 96},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cc send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "autodevice", "type": "bool", "readonly": false, "cmd": "cc autodevice"},
|
||||
{"path": "fav", "type": "bool", "readonly": false, "cmd": "cc fav"},
|
||||
{"path": "f", "type": "float"},
|
||||
{"path": "fs", "type": "enum", "enum": {"ok": 0, "no_sens": 1}, "readonly": false, "cmd": "cc fs"},
|
||||
{"path": "mav", "type": "bool", "readonly": false, "cmd": "cc mav"},
|
||||
{"path": "fm", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||
{"path": "fa", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "offline": 3}, "readonly": false, "cmd": "cc fa"},
|
||||
{"path": "mp", "type": "float", "readonly": false, "cmd": "cc mp"},
|
||||
{"path": "msp", "type": "float"},
|
||||
{"path": "mmp", "type": "float"},
|
||||
{"path": "mc", "type": "float", "readonly": false, "cmd": "cc mc"},
|
||||
{"path": "mfc", "type": "float", "readonly": false, "cmd": "cc mfc"},
|
||||
{"path": "moc", "type": "float", "readonly": false, "cmd": "cc moc"},
|
||||
{"path": "mtc", "type": "float", "readonly": false, "cmd": "cc mtc"},
|
||||
{"path": "mtl", "type": "float"},
|
||||
{"path": "mft", "type": "float", "readonly": false, "cmd": "cc mft"},
|
||||
{"path": "mt", "type": "float"},
|
||||
{"path": "mo", "type": "float"},
|
||||
{"path": "mcr", "type": "float"},
|
||||
{"path": "mot", "type": "float"},
|
||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||
{"path": "hav", "type": "bool", "readonly": false, "cmd": "cc hav"},
|
||||
{"path": "h", "type": "float"},
|
||||
{"path": "hr", "type": "float"},
|
||||
{"path": "hc", "type": "float"},
|
||||
{"path": "hu", "type": "float"},
|
||||
{"path": "hh", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "hl", "type": "float", "readonly": false, "cmd": "cc hl"},
|
||||
{"path": "htf", "type": "float", "readonly": false, "cmd": "cc htf", "description": "meas. period in fast mode"},
|
||||
{"path": "hts", "type": "float", "readonly": false, "cmd": "cc hts", "description": "meas. period in slow mode"},
|
||||
{"path": "hd", "type": "float", "readonly": false, "cmd": "cc hd"},
|
||||
{"path": "hwr", "type": "float", "readonly": false, "cmd": "cc hwr"},
|
||||
{"path": "hem", "type": "float", "readonly": false, "cmd": "cc hem", "description": "sensor length in mm from top to empty pos."},
|
||||
{"path": "hfu", "type": "float", "readonly": false, "cmd": "cc hfu", "description": "sensor length in mm from top to full pos."},
|
||||
{"path": "hcd", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3, "manual": 7}, "readonly": false, "cmd": "cc hcd"},
|
||||
{"path": "hv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4}},
|
||||
{"path": "hsf", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
||||
{"path": "ha", "type": "bool", "readonly": false, "cmd": "cc ha"},
|
||||
{"path": "hm", "type": "bool"},
|
||||
{"path": "hf", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "hbe", "type": "bool", "readonly": false, "cmd": "cc hbe"},
|
||||
{"path": "hmf", "type": "float"},
|
||||
{"path": "hms", "type": "float"},
|
||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch", "visibility": 3},
|
||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0", "visibility": 3},
|
||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos.", "visibility": 3},
|
||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos.", "visibility": 3},
|
||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)", "visibility": 3},
|
||||
{"path": "h0", "type": "float", "visibility": 3},
|
||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h1", "type": "float", "visibility": 3},
|
||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h2", "type": "float", "visibility": 3},
|
||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h3", "type": "float", "visibility": 3},
|
||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h4", "type": "float", "visibility": 3},
|
||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "h5", "type": "float", "visibility": 3},
|
||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||
{"path": "hfb", "type": "float"},
|
||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
||||
{"path": "nu", "type": "float"},
|
||||
{"path": "nl", "type": "float"},
|
||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||
{"path": "ntc", "type": "float", "readonly": false, "cmd": "cc ntc"},
|
||||
{"path": "ntm", "type": "float", "readonly": false, "cmd": "cc ntm"},
|
||||
{"path": "ns", "type": "enum", "enum": {"sens_ok": 0, "no_sens": 1, "short_circuit": 2, "upside_down": 3, "sens_warm": 4, "empty": 5}},
|
||||
{"path": "na", "type": "bool", "readonly": false, "cmd": "cc na"},
|
||||
{"path": "nv", "type": "enum", "enum": {"fill_valve_off": 0, "filling": 1, "no_fill_valve": 2, "timeout": 3, "timeout1": 4, "boost": 5}},
|
||||
{"path": "nc", "type": "enum", "enum": {"stop": 0, "fill": 1, "off": 2, "auto": 3}, "readonly": false, "cmd": "cc nc"},
|
||||
{"path": "nfb", "type": "float"},
|
||||
{"path": "cda", "type": "float"},
|
||||
{"path": "cdb", "type": "float"},
|
||||
{"path": "cba", "type": "float"},
|
||||
{"path": "cbb", "type": "float"},
|
||||
{"path": "cvs", "type": "int"},
|
||||
{"path": "csp", "type": "int"},
|
||||
{"path": "cdv", "type": "text", "readonly": false, "cmd": "cc cdv"},
|
||||
{"path": "cic", "type": "text", "readonly": false, "cmd": "cc cic"},
|
||||
{"path": "cin", "type": "text"},
|
||||
{"path": "cds", "type": "enum", "enum": {"local": 0, "remote": 1, "loading": 2, "by_code": 3, "by_touch": 4}, "readonly": false, "cmd": "cc cds"},
|
||||
{"path": "timing", "type": "bool", "readonly": false, "cmd": "cc timing"},
|
||||
{"path": "tc", "type": "float", "visibility": 3},
|
||||
{"path": "tn", "type": "float", "visibility": 3},
|
||||
{"path": "th", "type": "float", "visibility": 3},
|
||||
{"path": "tf", "type": "float", "visibility": 3},
|
||||
{"path": "tm", "type": "float", "visibility": 3},
|
||||
{"path": "tv", "type": "float", "visibility": 3},
|
||||
{"path": "tq", "type": "float", "visibility": 3},
|
||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]}, "nv": {"base": "/nv", "params": [{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 12},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "flow", "type": "float"},
|
||||
{"path": "motstat", "type": "text"},
|
||||
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
||||
{"path": "ctrl", "type": "none", "kids": 4},
|
||||
{"path": "ctrl/prop", "type": "float", "readonly": false, "cmd": "nv ctrl/prop"},
|
||||
{"path": "ctrl/int", "type": "float", "readonly": false, "cmd": "nv ctrl/int"},
|
||||
{"path": "ctrl/delay", "type": "float", "readonly": false, "cmd": "nv ctrl/delay"},
|
||||
{"path": "ctrl/tol", "type": "float", "readonly": false, "cmd": "nv ctrl/tol"},
|
||||
{"path": "autoflow", "type": "none", "kids": 24},
|
||||
{"path": "autoflow/suspended", "type": "bool", "readonly": false, "cmd": "nv autoflow/suspended"},
|
||||
{"path": "autoflow/prop", "type": "float", "readonly": false, "cmd": "nv autoflow/prop"},
|
||||
{"path": "autoflow/flowstd", "type": "float", "readonly": false, "cmd": "nv autoflow/flowstd"},
|
||||
{"path": "autoflow/flowlim", "type": "float", "readonly": false, "cmd": "nv autoflow/flowlim"},
|
||||
{"path": "autoflow/smooth", "type": "float", "readonly": false, "cmd": "nv autoflow/smooth"},
|
||||
{"path": "autoflow/difSize", "type": "float", "readonly": false, "cmd": "nv autoflow/difSize"},
|
||||
{"path": "autoflow/difRange", "type": "float", "readonly": false, "cmd": "nv autoflow/difRange"},
|
||||
{"path": "autoflow/flowSize", "type": "float", "readonly": false, "cmd": "nv autoflow/flowSize"},
|
||||
{"path": "autoflow/convTime", "type": "float", "readonly": false, "cmd": "nv autoflow/convTime"},
|
||||
{"path": "autoflow/Tmin", "type": "float", "readonly": false, "cmd": "nv autoflow/Tmin"},
|
||||
{"path": "autoflow/script", "type": "text", "readonly": false, "cmd": "nv autoflow/script"},
|
||||
{"path": "autoflow/getTemp", "type": "text", "readonly": false, "cmd": "nv autoflow/getTemp"},
|
||||
{"path": "autoflow/getTset", "type": "text", "readonly": false, "cmd": "nv autoflow/getTset"},
|
||||
{"path": "autoflow/getFlow", "type": "text", "readonly": false, "cmd": "nv autoflow/getFlow"},
|
||||
{"path": "autoflow/difBuf", "type": "text"},
|
||||
{"path": "autoflow/flowBuf", "type": "text"},
|
||||
{"path": "autoflow/flowset", "type": "float"},
|
||||
{"path": "autoflow/flowmin", "type": "float"},
|
||||
{"path": "autoflow/flowmax", "type": "float"},
|
||||
{"path": "autoflow/difmin", "type": "float"},
|
||||
{"path": "autoflow/difmax", "type": "float"},
|
||||
{"path": "autoflow/setmin", "type": "float"},
|
||||
{"path": "autoflow/setmax", "type": "float"},
|
||||
{"path": "autoflow/flowtarget", "type": "float"},
|
||||
{"path": "calib", "type": "none", "kids": 2},
|
||||
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
||||
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"},
|
||||
{"path": "initialize", "type": "enum", "enum": {"check": 1, "adjust": 2, "stop": 3}, "readonly": false, "cmd": "nv initialize", "visibility": 3},
|
||||
{"path": "initstate", "type": "text", "visibility": 3}]}, "nvmot": {"base": "/nv/nvmot", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run nvmot", "kids": 32},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nvmot send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "nvmot is_running", "visibility": 3},
|
||||
{"path": "pos", "type": "float"},
|
||||
{"path": "encoder", "type": "float"},
|
||||
{"path": "zero", "type": "float", "readonly": false, "cmd": "nvmot zero"},
|
||||
{"path": "lowerlimit", "type": "float", "readonly": false, "cmd": "nvmot lowerlimit"},
|
||||
{"path": "upperlimit", "type": "float", "readonly": false, "cmd": "nvmot upperlimit"},
|
||||
{"path": "disablelimits", "type": "bool", "readonly": false, "cmd": "nvmot disablelimits"},
|
||||
{"path": "verbose", "type": "bool", "readonly": false, "cmd": "nvmot verbose"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "runstate", "type": "enum", "enum": {"idle": 0, "running": 1, "finished": 2, "error": 3}},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "nvmot precision"},
|
||||
{"path": "maxencdif", "type": "float", "readonly": false, "cmd": "nvmot maxencdif"},
|
||||
{"path": "id", "type": "float", "readonly": false, "cmd": "nvmot id"},
|
||||
{"path": "pump_number", "type": "float", "readonly": false, "cmd": "nvmot pump_number"},
|
||||
{"path": "init", "type": "float", "readonly": false, "cmd": "nvmot init"},
|
||||
{"path": "maxspeed", "type": "float", "readonly": false, "cmd": "nvmot maxspeed"},
|
||||
{"path": "acceleration", "type": "float", "readonly": false, "cmd": "nvmot acceleration"},
|
||||
{"path": "maxcurrent", "type": "float", "readonly": false, "cmd": "nvmot maxcurrent"},
|
||||
{"path": "standbycurrent", "type": "float", "readonly": false, "cmd": "nvmot standbycurrent"},
|
||||
{"path": "freewheeling", "type": "bool", "readonly": false, "cmd": "nvmot freewheeling"},
|
||||
{"path": "output0", "type": "bool", "readonly": false, "cmd": "nvmot output0"},
|
||||
{"path": "output1", "type": "bool", "readonly": false, "cmd": "nvmot output1"},
|
||||
{"path": "input3", "type": "bool"},
|
||||
{"path": "input0", "type": "float"},
|
||||
{"path": "input0raw", "type": "float"},
|
||||
{"path": "pullup", "type": "float", "readonly": false, "cmd": "nvmot pullup"},
|
||||
{"path": "nopumpfeedback", "type": "bool", "readonly": false, "cmd": "nvmot nopumpfeedback"},
|
||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "nvmot eeprom"},
|
||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "nvmot customadr"},
|
||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "nvmot custompar"}]}, "ln2fill": {"base": "/ln2fill", "params": [{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 3},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "state", "type": "text"}]}, "hefill": {"base": "/hefill", "params": [{"path": "", "type": "enum", "enum": {"no fill valve": 2}, "readonly": false, "cmd": "hefill", "kids": 6},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fast", "type": "enum", "enum": {"slow": 0, "fast": 1}, "readonly": false, "cmd": "cc hf"},
|
||||
{"path": "state", "type": "text"},
|
||||
{"path": "hefull", "type": "float", "readonly": false, "cmd": "cc hh"},
|
||||
{"path": "helow", "type": "float", "readonly": false, "cmd": "cc hl"}]}, "hepump": {"base": "/hepump", "params": [{"path": "", "type": "enum", "enum": {"xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 9},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running"},
|
||||
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco"},
|
||||
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto"},
|
||||
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve"},
|
||||
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2"},
|
||||
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3}]}, "hemot": {"base": "/hepump/hemot", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run hemot", "kids": 32},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hemot send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "hemot is_running", "visibility": 3},
|
||||
{"path": "pos", "type": "float"},
|
||||
{"path": "encoder", "type": "float"},
|
||||
{"path": "zero", "type": "float", "readonly": false, "cmd": "hemot zero"},
|
||||
{"path": "lowerlimit", "type": "float", "readonly": false, "cmd": "hemot lowerlimit"},
|
||||
{"path": "upperlimit", "type": "float", "readonly": false, "cmd": "hemot upperlimit"},
|
||||
{"path": "disablelimits", "type": "bool", "readonly": false, "cmd": "hemot disablelimits"},
|
||||
{"path": "verbose", "type": "bool", "readonly": false, "cmd": "hemot verbose"},
|
||||
{"path": "target", "type": "float"},
|
||||
{"path": "runstate", "type": "enum", "enum": {"idle": 0, "running": 1, "finished": 2, "error": 3}},
|
||||
{"path": "precision", "type": "float", "readonly": false, "cmd": "hemot precision"},
|
||||
{"path": "maxencdif", "type": "float", "readonly": false, "cmd": "hemot maxencdif"},
|
||||
{"path": "id", "type": "float", "readonly": false, "cmd": "hemot id"},
|
||||
{"path": "pump_number", "type": "float", "readonly": false, "cmd": "hemot pump_number"},
|
||||
{"path": "init", "type": "float", "readonly": false, "cmd": "hemot init"},
|
||||
{"path": "maxspeed", "type": "float", "readonly": false, "cmd": "hemot maxspeed"},
|
||||
{"path": "acceleration", "type": "float", "readonly": false, "cmd": "hemot acceleration"},
|
||||
{"path": "maxcurrent", "type": "float", "readonly": false, "cmd": "hemot maxcurrent"},
|
||||
{"path": "standbycurrent", "type": "float", "readonly": false, "cmd": "hemot standbycurrent"},
|
||||
{"path": "freewheeling", "type": "bool", "readonly": false, "cmd": "hemot freewheeling"},
|
||||
{"path": "output0", "type": "bool", "readonly": false, "cmd": "hemot output0"},
|
||||
{"path": "output1", "type": "bool", "readonly": false, "cmd": "hemot output1"},
|
||||
{"path": "input3", "type": "bool"},
|
||||
{"path": "input0", "type": "float"},
|
||||
{"path": "input0raw", "type": "float"},
|
||||
{"path": "pullup", "type": "float", "readonly": false, "cmd": "hemot pullup"},
|
||||
{"path": "nopumpfeedback", "type": "bool", "readonly": false, "cmd": "hemot nopumpfeedback"},
|
||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]}, "table": {"base": "/table", "params": [{"path": "", "type": "none", "kids": 20},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
||||
{"path": "val_tt_set_prop", "type": "float"},
|
||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
||||
{"path": "val_tt_set_integ", "type": "float"},
|
||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_int2", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_int2"},
|
||||
{"path": "val_tt_dblctrl_int2", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_int2", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_int2", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_up", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_up"},
|
||||
{"path": "val_tt_dblctrl_prop_up", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_up", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_up", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_tt_dblctrl_prop_lo", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_lo"},
|
||||
{"path": "val_tt_dblctrl_prop_lo", "type": "float"},
|
||||
{"path": "tbl_tt_dblctrl_prop_lo", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_lo", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
||||
{"path": "fix_warmup_weight", "type": "bool", "readonly": false, "cmd": "table fix_warmup_weight"},
|
||||
{"path": "val_warmup_weight", "type": "float"},
|
||||
{"path": "tbl_warmup_weight", "type": "text", "readonly": false, "cmd": "table tbl_warmup_weight", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}}
|
9
cfg/sea/sch5.stick.json
Normal file
9
cfg/sea/sch5.stick.json
Normal file
@ -0,0 +1,9 @@
|
||||
{"warmup": {"base": "/warmup", "params": [{"path": "", "type": "bool", "readonly": false, "cmd": "warmup", "kids": 8},
|
||||
{"path": "send", "type": "text", "readonly": false, "cmd": "warmup send", "visibility": 3},
|
||||
{"path": "status", "type": "text", "visibility": 3},
|
||||
{"path": "trig", "type": "float", "readonly": false, "cmd": "warmup trig", "description": "switch on sample heater when ts < target - trig and tm < target"},
|
||||
{"path": "weight", "type": "float", "readonly": false, "cmd": "warmup weight", "description": "switch off sample heater when ts > target - weight * (target - ts)"},
|
||||
{"path": "limit", "type": "float", "readonly": false, "cmd": "warmup limit", "description": "do not use warmup when target < limit"},
|
||||
{"path": "timef", "type": "float", "readonly": false, "cmd": "warmup timef", "description": "reset double control after (timef * int2) sec"},
|
||||
{"path": "abruptstop", "type": "bool", "readonly": false, "cmd": "warmup abruptstop", "description": "switch off sample heater immediately after tm > treg"},
|
||||
{"path": "warmup", "type": "enum", "enum": {"off": 0, "warmup": 1, "htroff": 2, "settle": 3}, "readonly": false, "cmd": "warmup warmup"}]}}
|
16
cfg/stick/ill5stick.cfg
Normal file
16
cfg/stick/ill5stick.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
[NODE]
|
||||
description = ILL5 standard sample stick
|
||||
id = ill5.stick.sea.psi.ch
|
||||
|
||||
[sea_stick]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = stick SEA connection to ill5.stick
|
||||
config = ill5.stick
|
||||
service = stick
|
||||
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_stick
|
||||
sea_object = tt
|
||||
json_file = ill5.config.json
|
||||
rel_paths = ts
|
17
cfg/stick/ma11stick.cfg
Normal file
17
cfg/stick/ma11stick.cfg
Normal file
@ -0,0 +1,17 @@
|
||||
[NODE]
|
||||
description = MA11 standard sample stick
|
||||
id = ma11.stick.sea.psi.ch
|
||||
|
||||
[sea_stick]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA stick connection
|
||||
config = ma11.stick
|
||||
service = stick
|
||||
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_stick
|
||||
sea_object = tt
|
||||
json_file = ma11.config.json
|
||||
rel_paths = ts
|
||||
|
17
cfg/stick/ma7stick.cfg
Normal file
17
cfg/stick/ma7stick.cfg
Normal file
@ -0,0 +1,17 @@
|
||||
[NODE]
|
||||
description = MA7 standard sample stick
|
||||
id = ma7.stick.sea.psi.ch
|
||||
|
||||
[sea_stick]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA stick connection
|
||||
config = ma7.stick
|
||||
service = stick
|
||||
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_stick
|
||||
sea_object = tt
|
||||
json_file = ma7.config.json
|
||||
rel_paths = ts
|
||||
|
10
cfg/stick/nostick.cfg
Normal file
10
cfg/stick/nostick.cfg
Normal file
@ -0,0 +1,10 @@
|
||||
[NODE]
|
||||
description = cryostat or cryomagnet without stick
|
||||
id = none.stick.sea.psi.ch
|
||||
|
||||
[seaconn]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to none stick
|
||||
config = none.stick
|
||||
export = False
|
||||
service = stick
|
16
cfg/stick/ori4stick.cfg
Normal file
16
cfg/stick/ori4stick.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
[NODE]
|
||||
description = ORI4 standard sample stick
|
||||
id = ori4.stick.sea.psi.ch
|
||||
|
||||
[sea_stick]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to ori4 stick
|
||||
config = ori4.stick
|
||||
service = stick
|
||||
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = sea_stick
|
||||
sea_object = tt
|
||||
json_file = ori4.config.json
|
||||
rel_paths = ts
|
21
cfg/stick/sch5.cfg
Normal file
21
cfg/stick/sch5.cfg
Normal file
@ -0,0 +1,21 @@
|
||||
[NODE]
|
||||
description = sample changer for 100 mm orange cryo (5 samples, HRPT)
|
||||
id = sch5.stick.sea.psi.ch
|
||||
|
||||
[seaconn]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = SEA connection to sch5
|
||||
config = sch5.stick
|
||||
service = stick
|
||||
|
||||
[warmup]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
sea_object = warmup
|
||||
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
sea_object = tt
|
||||
rel_paths = ts
|
||||
|
26
cfg/trinamic.cfg
Normal file
26
cfg/trinamic.cfg
Normal file
@ -0,0 +1,26 @@
|
||||
[NODE]
|
||||
id = trinamic_test.psi.ch
|
||||
description = trinamic motor test
|
||||
|
||||
[INTERFACE]
|
||||
uri = tcp://5000
|
||||
|
||||
[drv_iodev]
|
||||
description =
|
||||
class = secop.bytesio.BytesIO
|
||||
uri = serial:///dev/ttyUSB0?baudrate=57600
|
||||
# uri = serial:///dev/ttyUSB0?baudrate=9600
|
||||
|
||||
[drv]
|
||||
description = trinamic motor test
|
||||
class = secop_psi.trinamic.Motor
|
||||
iodev = drv_iodev
|
||||
standby_current=0.1
|
||||
maxcurrent=1.4
|
||||
acceleration=150.
|
||||
movelimit=360
|
||||
speed=40
|
||||
encoder_tolerance=3.6
|
||||
free_wheeling=0.1
|
||||
power_down_delay=0.1
|
||||
# pull_up=1
|
32
cfg/uniax.cfg
Normal file
32
cfg/uniax.cfg
Normal file
@ -0,0 +1,32 @@
|
||||
[NODE]
|
||||
id = uniax.psi.ch
|
||||
description = uniax pressure stick with motor and transducer
|
||||
|
||||
[INTERFACE]
|
||||
uri = tcp://5000
|
||||
|
||||
[drv_iodev]
|
||||
description =
|
||||
class = secop.bytesio.BytesIO
|
||||
uri = serial:///dev/ttyUSB0?baudrate=57600
|
||||
# uri = serial:///dev/ttyUSB0?baudrate=9600
|
||||
|
||||
[drv]
|
||||
description = trinamic motor test
|
||||
class = secop_psi.trinamic.Motor
|
||||
iodev = drv_iodev
|
||||
standby_current=0.1
|
||||
maxcurrent=1.4
|
||||
acceleration=50
|
||||
maxspeed=200
|
||||
zero=-36
|
||||
enc_tolerance=3.6
|
||||
free_wheeling=0.001
|
||||
pull_up=1
|
||||
|
||||
[force]
|
||||
description = DPM driver to read out the transducer value, write and read the offset and scale factor
|
||||
class = secop_psi.dpm.DPM3
|
||||
uri = serial:///dev/ttyUSB1?baudrate=9600
|
||||
digits = 2
|
||||
scale_factor = 0.0156
|
@ -23,7 +23,7 @@ CCU4 luckily has a very simple and logical protocol:
|
||||
|
||||
# the most common Frappy classes can be imported from secop.core
|
||||
from secop.core import Readable, Parameter, FloatRange, BoolType, StringIO, HasIodev
|
||||
|
||||
|
||||
|
||||
class CCU4IO(StringIO):
|
||||
"""communication with CCU4"""
|
||||
@ -39,7 +39,7 @@ CCU4 luckily has a very simple and logical protocol:
|
||||
# Readable as a base class defines the value and status parameters
|
||||
class HeLevel(HasIodev, Readable):
|
||||
"""He Level channel of CCU4"""
|
||||
|
||||
|
||||
# define the communication class to create the IO module
|
||||
iodevClass = CCU4IO
|
||||
|
||||
@ -99,11 +99,11 @@ the status codes from the hardware to the standard SECoP status codes.
|
||||
full_length = Parameter('warm length when full', FloatRange(0, 2000, unit='mm'),
|
||||
readonly=False)
|
||||
sample_rate = Parameter('sample rate', EnumType(slow=0, fast=1), readonly=False)
|
||||
|
||||
|
||||
...
|
||||
|
||||
|
||||
Status = Readable.Status
|
||||
|
||||
|
||||
# conversion of the code from the CCU4 parameter 'hsf'
|
||||
STATUS_MAP = {
|
||||
0: (Status.IDLE, 'sensor ok'),
|
||||
@ -113,17 +113,17 @@ the status codes from the hardware to the standard SECoP status codes.
|
||||
4: (Status.ERROR, 'not yet read'),
|
||||
5: (Status.DISABLED, 'disabled'),
|
||||
}
|
||||
|
||||
|
||||
def read_status(self):
|
||||
name, txtvalue = self._iodev.communicate('hsf').split('=')
|
||||
assert name == 'hsf'
|
||||
return self.STATUS_MAP(int(txtvalue))
|
||||
|
||||
|
||||
def read_empty_length(self):
|
||||
name, txtvalue = self._iodev.communicate('hem').split('=')
|
||||
assert name == 'hem'
|
||||
return txtvalue
|
||||
|
||||
|
||||
def write_empty_length(self, value):
|
||||
name, txtvalue = self._iodev.communicate('hem=%g' % value).split('=')
|
||||
assert name == 'hem'
|
||||
@ -135,7 +135,7 @@ the status codes from the hardware to the standard SECoP status codes.
|
||||
Here we start to realize, that we will repeat similar code for other parameters,
|
||||
which means it might be worth to create a *query* method, and then the
|
||||
*read_<param>* and *write_<param>* methods will become shorter:
|
||||
|
||||
|
||||
.. code:: python
|
||||
|
||||
...
|
||||
|
90
secop/bytesio.py
Normal file
90
secop/bytesio.py
Normal file
@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# *****************************************************************************
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Module authors:
|
||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
||||
# *****************************************************************************
|
||||
"""byte oriented stream communication"""
|
||||
|
||||
import time
|
||||
import re
|
||||
|
||||
from secop.lib.asynconn import AsynConn, ConnectionClosed
|
||||
from secop.modules import Property, Command
|
||||
from secop.stringio import BaseIO
|
||||
from secop.datatypes import BLOBType, IntRange, ArrayOf, TupleOf, StringType
|
||||
from secop.errors import CommunicationFailedError, CommunicationSilentError
|
||||
|
||||
|
||||
HEX_CODE = re.compile(r'[0-9a-fA-F][0-9a-fA-F]$')
|
||||
|
||||
|
||||
class BytesIO(BaseIO):
|
||||
identification = Property(
|
||||
"""identification
|
||||
|
||||
a list of tuples with commands and expected responses, to be sent on connect.
|
||||
commands and responses are whitespace separated items
|
||||
an item is either:
|
||||
- a two digit hexadecimal number (byte value)
|
||||
- a character
|
||||
- ?? indicating ignored bytes in responses
|
||||
""", datatype=ArrayOf(TupleOf(StringType(), StringType())), default=[], export=False)
|
||||
|
||||
def connectStart(self):
|
||||
if not self.is_connected:
|
||||
uri = self.uri
|
||||
self._conn = AsynConn(uri, b'')
|
||||
self.is_connected = True
|
||||
for command, match in self.identification:
|
||||
cmdbytes = bytes([int(c, 16) if HEX_CODE.match(c) else ord(c) for c in command.split()])
|
||||
replypat = [int(c, 16) if HEX_CODE.match(c.replace('??', '-1')) else ord(c) for c in command.split()]
|
||||
reply = self.communicate(cmdbytes, len(replypat))
|
||||
if any(b != c and c != -1 for b, c in zip(reply, replypat)):
|
||||
self.closeConnection()
|
||||
raise CommunicationFailedError('bad response: %r does not match %r' % (command, match))
|
||||
|
||||
@Command((BLOBType(), IntRange(0)), result=BLOBType())
|
||||
def communicate(self, command, nbytes):
|
||||
"""send a command and receive nbytes as reply"""
|
||||
if not self.is_connected:
|
||||
self.read_is_connected() # try to reconnect
|
||||
if not self._conn:
|
||||
raise CommunicationSilentError('can not connect to %r' % self.uri)
|
||||
try:
|
||||
with self._lock:
|
||||
# read garbage and wait before send
|
||||
try:
|
||||
if self.wait_before:
|
||||
time.sleep(self.wait_before)
|
||||
garbage = self._conn.flush_recv()
|
||||
if garbage:
|
||||
self.log.debug('garbage: %r', garbage)
|
||||
self._conn.send(command)
|
||||
self.log.debug('send: %r', command)
|
||||
reply = self._conn.readbytes(nbytes, self.timeout)
|
||||
except ConnectionClosed:
|
||||
self.closeConnection()
|
||||
raise CommunicationFailedError('disconnected')
|
||||
self.log.debug('recv: %r', reply)
|
||||
return reply
|
||||
except Exception as e:
|
||||
if str(e) == self._last_error:
|
||||
raise CommunicationSilentError(str(e))
|
||||
self._last_error = str(e)
|
||||
self.log.error(self._last_error)
|
||||
raise
|
@ -493,14 +493,12 @@ class SecopClient(ProxyClient):
|
||||
self.log.warning('unhandled message: %s %s %r' % (action, ident, data))
|
||||
|
||||
def _set_state(self, online, state=None):
|
||||
# treat reconnecting as online!
|
||||
state = state or self.state
|
||||
self.callback(None, 'nodeStateChange', online, state)
|
||||
for mname in self.modules:
|
||||
self.callback(mname, 'nodeStateChange', online, state)
|
||||
# set online attribute after callbacks -> callback may check for old state
|
||||
# remark: reconnecting is treated as online
|
||||
self.online = online
|
||||
self.state = state
|
||||
self.state = state or self.state
|
||||
self.callback(None, 'nodeStateChange', self.online, self.state)
|
||||
for mname in self.modules:
|
||||
self.callback(mname, 'nodeStateChange', self.online, self.state)
|
||||
|
||||
def queue_request(self, action, ident=None, data=None):
|
||||
"""make a request"""
|
||||
@ -519,8 +517,8 @@ class SecopClient(ProxyClient):
|
||||
raise ConnectionError('connection closed before reply')
|
||||
action, _, data = entry[2] # pylint: disable=unpacking-non-sequence
|
||||
if action.startswith(ERRORPREFIX):
|
||||
errcls = self.error_map(data[0])
|
||||
raise errcls('on SEC-Node: ' + data[1])
|
||||
errcls = self.error_map(data[0] + "Error")
|
||||
raise errcls(data[1])
|
||||
return entry[2] # reply
|
||||
|
||||
def request(self, action, ident=None, data=None):
|
||||
|
@ -37,3 +37,4 @@ from secop.poller import AUTO, DYNAMIC, REGULAR, SLOW
|
||||
from secop.properties import Property
|
||||
from secop.proxy import Proxy, SecNode, proxy_class
|
||||
from secop.stringio import HasIodev, StringIO
|
||||
from secop.persistent import PersistentMixin, PersistentParam
|
||||
|
@ -267,12 +267,12 @@ class IntRange(DataType):
|
||||
try:
|
||||
fvalue = float(value)
|
||||
value = int(value)
|
||||
if not self.min <= value <= self.max or round(fvalue) != fvalue:
|
||||
raise BadValueError('%r should be an int between %d and %d' %
|
||||
(value, self.min, self.max))
|
||||
return value
|
||||
except Exception:
|
||||
raise BadValueError('Can not convert %r to int' % value)
|
||||
if not self.min <= value <= self.max or round(fvalue) != fvalue:
|
||||
raise BadValueError('%r should be an int between %d and %d' %
|
||||
(value, self.min, self.max))
|
||||
return value
|
||||
|
||||
def __repr__(self):
|
||||
args = (self.min, self.max)
|
||||
|
@ -98,14 +98,17 @@ def clamp(_min, value, _max):
|
||||
|
||||
|
||||
def get_class(spec):
|
||||
"""loads a class given by string in dotted notaion (as python would do)"""
|
||||
"""loads a class given by string in dotted notation (as python would do)"""
|
||||
modname, classname = spec.rsplit('.', 1)
|
||||
if modname.startswith('secop'):
|
||||
module = importlib.import_module(modname)
|
||||
else:
|
||||
# rarely needed by now....
|
||||
module = importlib.import_module('secop.' + modname)
|
||||
return getattr(module, classname)
|
||||
try:
|
||||
return getattr(module, classname)
|
||||
except AttributeError:
|
||||
raise AttributeError('no such class') from None
|
||||
|
||||
|
||||
def mkthread(func, *args, **kwds):
|
||||
|
@ -79,8 +79,8 @@ class AsynConn:
|
||||
self.disconnect()
|
||||
|
||||
@classmethod
|
||||
def register_scheme(cls, scheme):
|
||||
cls.SCHEME_MAP[scheme] = cls
|
||||
def __init_subclass__(cls):
|
||||
cls.SCHEME_MAP[cls.scheme] = cls
|
||||
|
||||
def disconnect(self):
|
||||
raise NotImplementedError
|
||||
@ -154,6 +154,8 @@ class AsynConn:
|
||||
|
||||
|
||||
class AsynTcp(AsynConn):
|
||||
scheme = 'tcp'
|
||||
|
||||
def __init__(self, uri, *args, **kwargs):
|
||||
super().__init__(uri, *args, **kwargs)
|
||||
self.uri = uri
|
||||
@ -202,9 +204,6 @@ class AsynTcp(AsynConn):
|
||||
raise ConnectionClosed() # marks end of connection
|
||||
|
||||
|
||||
AsynTcp.register_scheme('tcp')
|
||||
|
||||
|
||||
class AsynSerial(AsynConn):
|
||||
"""a serial connection using pyserial
|
||||
|
||||
@ -221,6 +220,7 @@ class AsynSerial(AsynConn):
|
||||
|
||||
and others (see documentation of serial.Serial)
|
||||
"""
|
||||
scheme = 'serial'
|
||||
PARITY_NAMES = {name[0]: name for name in ['NONE', 'ODD', 'EVEN', 'MASK', 'SPACE']}
|
||||
|
||||
def __init__(self, uri, *args, **kwargs):
|
||||
@ -282,6 +282,3 @@ class AsynSerial(AsynConn):
|
||||
return self.connection.read(n)
|
||||
data = self.connection.read(1)
|
||||
return data + self.connection.read(self.connection.in_waiting)
|
||||
|
||||
|
||||
AsynSerial.register_scheme('serial')
|
||||
|
153
secop/modules.py
153
secop/modules.py
@ -30,9 +30,9 @@ from secop.datatypes import ArrayOf, BoolType, EnumType, FloatRange, \
|
||||
IntRange, StatusType, StringType, TextType, TupleOf, get_datatype
|
||||
from secop.errors import BadValueError, ConfigError, InternalError, \
|
||||
ProgrammingError, SECoPError, SilentError, secop_error
|
||||
from secop.lib import formatException, formatExtendedStack, mkthread
|
||||
from secop.lib import formatException, getGeneralConfig, mkthread
|
||||
from secop.lib.enum import Enum
|
||||
from secop.params import PREDEFINED_ACCESSIBLES, Accessible, Command, Parameter
|
||||
from secop.params import Accessible, Command, Parameter
|
||||
from secop.poller import BasicPoller, Poller
|
||||
from secop.properties import HasProperties, Property
|
||||
|
||||
@ -89,16 +89,21 @@ class HasAccessibles(HasProperties):
|
||||
if isinstance(pobj, Command):
|
||||
# nothing to do for now
|
||||
continue
|
||||
rfunc = cls.__dict__.get('read_' + pname, None)
|
||||
rfunc = getattr(cls, 'read_' + pname, None)
|
||||
rfunc_handler = pobj.handler.get_read_func(cls, pname) if pobj.handler else None
|
||||
wrapped = hasattr(rfunc, '__wrapped__')
|
||||
if rfunc_handler:
|
||||
if rfunc:
|
||||
raise ProgrammingError("parameter '%s' can not have a handler "
|
||||
"and read_%s" % (pname, pname))
|
||||
rfunc = rfunc_handler
|
||||
if 'read_' + pname in cls.__dict__:
|
||||
if pname in cls.__dict__:
|
||||
raise ProgrammingError("parameter '%s' can not have a handler "
|
||||
"and read_%s" % (pname, pname))
|
||||
# read_<pname> overwrites inherited handler
|
||||
else:
|
||||
rfunc = rfunc_handler
|
||||
wrapped = False
|
||||
|
||||
# create wrapper except when read function is already wrapped
|
||||
if rfunc is None or getattr(rfunc, '__wrapped__', False) is False:
|
||||
if not wrapped:
|
||||
|
||||
def wrapped_rfunc(self, pname=pname, rfunc=rfunc):
|
||||
if rfunc:
|
||||
@ -126,11 +131,14 @@ class HasAccessibles(HasProperties):
|
||||
|
||||
if not pobj.readonly:
|
||||
wfunc = getattr(cls, 'write_' + pname, None)
|
||||
if wfunc is None: # ignore the handler, if a write function is present
|
||||
wfunc = pobj.handler.get_write_func(pname) if pobj.handler else None
|
||||
wrapped = hasattr(wfunc, '__wrapped__')
|
||||
if (wfunc is None or wrapped) and pobj.handler:
|
||||
# ignore the handler, if a write function is present
|
||||
wfunc = pobj.handler.get_write_func(pname)
|
||||
wrapped = False
|
||||
|
||||
# create wrapper except when write function is already wrapped
|
||||
if wfunc is None or getattr(wfunc, '__wrapped__', False) is False:
|
||||
if not wrapped:
|
||||
|
||||
def wrapped_wfunc(self, value, pname=pname, wfunc=wfunc):
|
||||
self.log.debug("check validity of %s = %r" % (pname, value))
|
||||
@ -232,29 +240,27 @@ class Module(HasAccessibles):
|
||||
self.name = name
|
||||
self.valueCallbacks = {}
|
||||
self.errorCallbacks = {}
|
||||
errors = []
|
||||
|
||||
# handle module properties
|
||||
# 1) make local copies of properties
|
||||
super().__init__()
|
||||
|
||||
# 2) check and apply properties specified in cfgdict
|
||||
# specified as '.<propertyname> = <propertyvalue>'
|
||||
# (this is for legacy config files only)
|
||||
for k, v in list(cfgdict.items()): # keep list() as dict may change during iter
|
||||
if k[0] == '.':
|
||||
if k[1:] in self.propertyDict:
|
||||
self.setProperty(k[1:], cfgdict.pop(k))
|
||||
else:
|
||||
raise ConfigError('Module %r has no property %r' %
|
||||
(self.name, k[1:]))
|
||||
# 2) check and apply properties specified in cfgdict as
|
||||
# '<propertyname> = <propertyvalue>'
|
||||
for key in self.propertyDict:
|
||||
value = cfgdict.pop(key, None)
|
||||
if value is None:
|
||||
# legacy cfg: specified as '.<propertyname> = <propertyvalue>'
|
||||
value = cfgdict.pop('.' + key, None)
|
||||
if value is not None:
|
||||
try:
|
||||
self.setProperty(key, value)
|
||||
except BadValueError:
|
||||
errors.append('%s: value %r does not match %r!' %
|
||||
(key, value, self.propertyDict[key].datatype))
|
||||
|
||||
# 3) check and apply properties specified in cfgdict as
|
||||
# '<propertyname> = <propertyvalue>' (without '.' prefix)
|
||||
for k in self.propertyDict:
|
||||
if k in cfgdict:
|
||||
self.setProperty(k, cfgdict.pop(k))
|
||||
|
||||
# 4) set automatic properties
|
||||
# 3) set automatic properties
|
||||
mycls = self.__class__
|
||||
myclassname = '%s.%s' % (mycls.__module__, mycls.__name__)
|
||||
self.implementation = myclassname
|
||||
@ -288,16 +294,6 @@ class Module(HasAccessibles):
|
||||
if not self.export: # do not export parameters of a module not exported
|
||||
aobj.export = False
|
||||
if aobj.export:
|
||||
if aobj.export is True:
|
||||
predefined_obj = PREDEFINED_ACCESSIBLES.get(aname, None)
|
||||
if predefined_obj:
|
||||
if isinstance(aobj, predefined_obj):
|
||||
aobj.export = aname
|
||||
else:
|
||||
raise ProgrammingError("can not use '%s' as name of a %s" %
|
||||
(aname, aobj.__class__.__name__))
|
||||
else: # create custom parameter
|
||||
aobj.export = '_' + aname
|
||||
accessiblename2attr[aobj.export] = aname
|
||||
accessibles[aname] = aobj
|
||||
# do not re-use self.accessibles as this is the same for all instances
|
||||
@ -312,29 +308,31 @@ class Module(HasAccessibles):
|
||||
for k, v in list(cfgdict.items()): # keep list() as dict may change during iter
|
||||
if '.' in k[1:]:
|
||||
paramname, propname = k.split('.', 1)
|
||||
propvalue = cfgdict.pop(k)
|
||||
paramobj = self.accessibles.get(paramname, None)
|
||||
# paramobj might also be a command (not sure if this is needed)
|
||||
if paramobj:
|
||||
if propname == 'datatype':
|
||||
paramobj.setProperty('datatype', get_datatype(cfgdict.pop(k), k))
|
||||
elif propname in paramobj.getProperties():
|
||||
paramobj.setProperty(propname, cfgdict.pop(k))
|
||||
else:
|
||||
raise ConfigError('Module %s: Parameter %r has no property %r!' %
|
||||
(self.name, paramname, propname))
|
||||
propvalue = get_datatype(propvalue, k)
|
||||
try:
|
||||
paramobj.setProperty(propname, propvalue)
|
||||
except KeyError:
|
||||
errors.append("'%s.%s' does not exist" %
|
||||
(paramname, propname))
|
||||
except BadValueError as e:
|
||||
errors.append('%s.%s: %s' %
|
||||
(paramname, propname, str(e)))
|
||||
else:
|
||||
raise ConfigError('Module %s has no Parameter %r!' %
|
||||
(self.name, paramname))
|
||||
errors.append('%r not found' % paramname)
|
||||
|
||||
# 3) check config for problems:
|
||||
# only accept remaining config items specified in parameters
|
||||
for k, v in cfgdict.items():
|
||||
if k not in self.parameters:
|
||||
raise ConfigError(
|
||||
'Module %s:config Parameter %r '
|
||||
'not understood! (use one of %s)' %
|
||||
(self.name, k, ', '.join(list(self.parameters) +
|
||||
list(self.propertyDict))))
|
||||
bad = [k for k in cfgdict if k not in self.parameters]
|
||||
if bad:
|
||||
errors.append(
|
||||
'%s does not exist (use one of %s)' %
|
||||
(', '.join(bad), ', '.join(list(self.parameters) +
|
||||
list(self.propertyDict))))
|
||||
|
||||
# 4) complain if a Parameter entry has no default value and
|
||||
# is not specified in cfgdict and deal with parameters to be written.
|
||||
@ -349,15 +347,14 @@ class Module(HasAccessibles):
|
||||
# TODO: not sure about readonly (why not a parameter which can only be written from config?)
|
||||
try:
|
||||
pobj.value = pobj.datatype(cfgdict[pname])
|
||||
self.writeDict[pname] = pobj.value
|
||||
except BadValueError as e:
|
||||
raise ConfigError('%s.%s: %s' % (name, pname, e))
|
||||
self.writeDict[pname] = pobj.value
|
||||
errors.append('%s: %s' % (pname, e))
|
||||
else:
|
||||
if pobj.default is None:
|
||||
if pobj.needscfg:
|
||||
raise ConfigError('Parameter %s.%s has no default '
|
||||
'value and was not given in config!' %
|
||||
(self.name, pname))
|
||||
errors.append('%r has no default '
|
||||
'value and was not given in config!' % pname)
|
||||
# we do not want to call the setter for this parameter for now,
|
||||
# this should happen on the first read
|
||||
pobj.readerror = ConfigError('not initialized')
|
||||
@ -368,8 +365,8 @@ class Module(HasAccessibles):
|
||||
try:
|
||||
value = pobj.datatype(pobj.default)
|
||||
except BadValueError as e:
|
||||
raise ProgrammingError('bad default for %s.%s: %s'
|
||||
% (name, pname, e))
|
||||
# this should not happen, as the default is already checked in Parameter
|
||||
raise ProgrammingError('bad default for %s:%s: %s' % (name, pname, e)) from None
|
||||
if pobj.initwrite and not pobj.readonly:
|
||||
# we will need to call write_<pname>
|
||||
# if this is not desired, the default must not be given
|
||||
@ -385,13 +382,12 @@ class Module(HasAccessibles):
|
||||
try:
|
||||
# this checks also for the proper datatype
|
||||
# note: this will NOT call write_* methods!
|
||||
setattr(self, k, v)
|
||||
except (ValueError, TypeError):
|
||||
self.log.exception(formatExtendedStack())
|
||||
raise
|
||||
# raise ConfigError('Module %s: config parameter %r:\n%r' %
|
||||
# (self.name, k, e))
|
||||
cfgdict.pop(k)
|
||||
if k in self.parameters or k in self.propertyDict:
|
||||
setattr(self, k, v)
|
||||
cfgdict.pop(k)
|
||||
except (ValueError, TypeError) as e:
|
||||
# self.log.exception(formatExtendedStack())
|
||||
errors.append('module %s, parameter %s: %s' % (self.name, k, e))
|
||||
|
||||
# Modify units AFTER applying the cfgdict
|
||||
for k, v in self.parameters.items():
|
||||
@ -400,9 +396,18 @@ class Module(HasAccessibles):
|
||||
dt.setProperty('unit', dt.unit.replace('$', self.parameters['value'].datatype.unit))
|
||||
|
||||
# 6) check complete configuration of * properties
|
||||
self.checkProperties()
|
||||
for p in self.parameters.values():
|
||||
p.checkProperties()
|
||||
if not errors:
|
||||
try:
|
||||
self.checkProperties()
|
||||
except ConfigError as e:
|
||||
errors.append(str(e))
|
||||
for pname, p in self.parameters.items():
|
||||
try:
|
||||
p.checkProperties()
|
||||
except ConfigError:
|
||||
errors.append('%s: %s' % (pname, e))
|
||||
if errors:
|
||||
raise ConfigError(errors)
|
||||
|
||||
# helper cfg-editor
|
||||
def __iter__(self):
|
||||
@ -501,7 +506,7 @@ class Module(HasAccessibles):
|
||||
def pollOneParam(self, pname):
|
||||
"""poll parameter <pname> with proper error handling"""
|
||||
try:
|
||||
return getattr(self, 'read_' + pname)()
|
||||
getattr(self, 'read_' + pname)()
|
||||
except SilentError:
|
||||
pass
|
||||
except SECoPError as e:
|
||||
@ -516,10 +521,12 @@ class Module(HasAccessibles):
|
||||
with proper error handling
|
||||
"""
|
||||
for pname in list(self.writeDict):
|
||||
if pname in self.writeDict: # this might not be true with handlers
|
||||
value = self.writeDict.pop(pname, Done)
|
||||
# in the mean time, a poller or handler might already have done it
|
||||
if value is not Done:
|
||||
try:
|
||||
self.log.debug('initialize parameter %s', pname)
|
||||
getattr(self, 'write_' + pname)(self.writeDict.pop(pname))
|
||||
getattr(self, 'write_' + pname)(value)
|
||||
except SilentError:
|
||||
pass
|
||||
except SECoPError as e:
|
||||
|
@ -39,10 +39,6 @@ class Accessible(HasProperties):
|
||||
|
||||
kwds = None # is a dict if it might be used as Override
|
||||
|
||||
def __init__(self, **kwds):
|
||||
super().__init__()
|
||||
self.init(kwds)
|
||||
|
||||
def init(self, kwds):
|
||||
# do not use self.propertyValues.update here, as no invalid values should be
|
||||
# assigned to properties, even not before checkProperties
|
||||
@ -101,10 +97,10 @@ class Parameter(Accessible):
|
||||
|
||||
description = Property(
|
||||
'mandatory description of the parameter', TextType(),
|
||||
extname='description', mandatory=True)
|
||||
extname='description', mandatory=True, export='always')
|
||||
datatype = Property(
|
||||
'datatype of the Parameter (SECoP datainfo)', DataTypeType(),
|
||||
extname='datainfo', mandatory=True)
|
||||
extname='datainfo', mandatory=True, export='always')
|
||||
readonly = Property(
|
||||
'not changeable via SECoP (default True)', BoolType(),
|
||||
extname='readonly', default=True, export='always')
|
||||
@ -153,6 +149,9 @@ class Parameter(Accessible):
|
||||
handler = Property(
|
||||
'[internal] overload the standard read and write functions', ValueType(),
|
||||
export=False, default=None, settable=False)
|
||||
persistent = Property(
|
||||
'[internal] persistent setting', BoolType(),
|
||||
export=False, default=False)
|
||||
initwrite = Property(
|
||||
'''[internal] write this parameter on initialization
|
||||
|
||||
@ -165,7 +164,7 @@ class Parameter(Accessible):
|
||||
readerror = None
|
||||
|
||||
def __init__(self, description=None, datatype=None, inherit=True, *, unit=None, constant=None, **kwds):
|
||||
super().__init__(**kwds)
|
||||
super().__init__()
|
||||
if datatype is not None:
|
||||
if not isinstance(datatype, DataType):
|
||||
if isinstance(datatype, type) and issubclass(datatype, DataType):
|
||||
@ -178,6 +177,8 @@ class Parameter(Accessible):
|
||||
if 'default' in kwds:
|
||||
self.default = datatype(kwds['default'])
|
||||
|
||||
self.init(kwds) # datatype must be defined before we can treat dataset properties like fmtstr or unit
|
||||
|
||||
if description is not None:
|
||||
self.description = inspect.cleandoc(description)
|
||||
|
||||
@ -225,10 +226,13 @@ class Parameter(Accessible):
|
||||
self.propertyValues.pop('default')
|
||||
|
||||
if self.export is True:
|
||||
if isinstance(self, PREDEFINED_ACCESSIBLES.get(name, type(None))):
|
||||
predefined_cls = PREDEFINED_ACCESSIBLES.get(name, None)
|
||||
if predefined_cls is Parameter:
|
||||
self.export = name
|
||||
else:
|
||||
elif predefined_cls is None:
|
||||
self.export = '_' + name
|
||||
else:
|
||||
raise ProgrammingError('can not use %r as name of a Parameter' % name)
|
||||
|
||||
def copy(self):
|
||||
# deep copy, as datatype might be altered from config
|
||||
@ -280,7 +284,7 @@ class Command(Accessible):
|
||||
|
||||
description = Property(
|
||||
'description of the Command', TextType(),
|
||||
extname='description', export=True, mandatory=True)
|
||||
extname='description', export='always', mandatory=True)
|
||||
group = Property(
|
||||
'optional command group of the command.', StringType(),
|
||||
extname='group', export=True, default='')
|
||||
@ -310,7 +314,8 @@ class Command(Accessible):
|
||||
func = None
|
||||
|
||||
def __init__(self, argument=False, *, result=None, inherit=True, **kwds):
|
||||
super().__init__(**kwds)
|
||||
super().__init__()
|
||||
self.init(kwds)
|
||||
if result or kwds or isinstance(argument, DataType) or not callable(argument):
|
||||
# normal case
|
||||
if argument is False and result:
|
||||
@ -339,10 +344,13 @@ class Command(Accessible):
|
||||
|
||||
self.datatype = CommandType(self.argument, self.result)
|
||||
if self.export is True:
|
||||
if isinstance(self, PREDEFINED_ACCESSIBLES.get(name, type(None))):
|
||||
predefined_cls = PREDEFINED_ACCESSIBLES.get(name, None)
|
||||
if predefined_cls is Command:
|
||||
self.export = name
|
||||
else:
|
||||
elif predefined_cls is None:
|
||||
self.export = '_' + name
|
||||
else:
|
||||
raise ProgrammingError('can not use %r as name of a Command' % name)
|
||||
|
||||
def __get__(self, obj, owner=None):
|
||||
if obj is None:
|
||||
|
147
secop/persistent.py
Normal file
147
secop/persistent.py
Normal file
@ -0,0 +1,147 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# *****************************************************************************
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Module authors:
|
||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""Mixin for keeping parameters persistent
|
||||
|
||||
For hardware not keeping parameters persistent, we might want to store them in Frappy.
|
||||
|
||||
The following example will make 'param1' and 'param2' persistent, i.e. whenever
|
||||
one of the parameters is changed, either by a change command or by access from
|
||||
an other interface to the hardware, it is saved to a file, and reloaded after
|
||||
a power down / power up cycle. In order to make this work properly, there is a
|
||||
mechanism needed to detect power down (i.e. a reading a hardware parameter
|
||||
taking a special value on power up).
|
||||
|
||||
An additional use might be the example of a motor with cyclic reading of an
|
||||
encoder value, which looses the counts of how many turns already happened on
|
||||
power down.
|
||||
This can be solved by comparing the loaded encoder value self.encoder with a
|
||||
fresh value from the hardware and then adjusting the zero point accordingly.
|
||||
|
||||
|
||||
class MyClass(PersistentMixin, ...):
|
||||
param1 = PersistentParam(...)
|
||||
param2 = PersistentParam(...)
|
||||
encoder = PersistentParam(...)
|
||||
|
||||
...
|
||||
|
||||
def read_encoder(self):
|
||||
encoder = <get encoder from hardware>
|
||||
if <power down/power up cycle detected>:
|
||||
self.loadParameters()
|
||||
<fix encoder turns by comparing loaded self.encoder with encoder from hw>
|
||||
else:
|
||||
self.saveParameters()
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
from secop.errors import BadValueError, ConfigError, InternalError, \
|
||||
ProgrammingError, SECoPError, SilentError, secop_error
|
||||
from secop.lib import getGeneralConfig
|
||||
from secop.params import Parameter, Property, BoolType, Command
|
||||
from secop.modules import HasAccessibles
|
||||
|
||||
|
||||
class PersistentParam(Parameter):
|
||||
persistent = Property('persistence flag', BoolType(), default=True)
|
||||
|
||||
|
||||
class PersistentMixin(HasAccessibles):
|
||||
def __init__(self, *args, **kwds):
|
||||
super().__init__(*args, **kwds)
|
||||
# write=False: write will happen later
|
||||
self.initData = {}
|
||||
for pname in self.parameters:
|
||||
pobj = self.parameters[pname]
|
||||
if not pobj.readonly and getattr(pobj, 'persistent', False):
|
||||
self.initData[pname] = pobj.value
|
||||
self.writeDict.update(self.loadParameters(write=False))
|
||||
print('initData', self.initData)
|
||||
|
||||
def loadParameters(self, write=True):
|
||||
"""load persistent parameters
|
||||
|
||||
:return: persistent parameters which have to be written
|
||||
|
||||
is called upon startup and may be called from a module
|
||||
when a hardware powerdown is detected
|
||||
"""
|
||||
persistentdir = os.path.join(getGeneralConfig()['logdir'], 'persistent')
|
||||
self.persistentFile = os.path.join(persistentdir, '%s.%s.json' % (self.DISPATCHER.equipment_id, self.name))
|
||||
try:
|
||||
with open(self.persistentFile, 'r') as f:
|
||||
self.persistentData = json.load(f)
|
||||
except FileNotFoundError:
|
||||
self.persistentData = {}
|
||||
writeDict = {}
|
||||
for pname in self.parameters:
|
||||
pobj = self.parameters[pname]
|
||||
if getattr(pobj, 'persistent', False) and pname in self.persistentData:
|
||||
try:
|
||||
value = pobj.datatype.import_value(self.persistentData[pname])
|
||||
pobj.value = value
|
||||
if not pobj.readonly:
|
||||
writeDict[pname] = value
|
||||
except Exception as e:
|
||||
self.log.warning('can not restore %r to %r (%r)' % (pname, value, e))
|
||||
if write:
|
||||
self.writeDict.update(writeDict)
|
||||
self.writeInitParams()
|
||||
return writeDict
|
||||
|
||||
def saveParameters(self):
|
||||
"""save persistent parameters
|
||||
|
||||
- to be called regularely explicitly by the module
|
||||
- the caller has to make sure that this is not called after
|
||||
a power down of the connected hardware before loadParameters
|
||||
"""
|
||||
if self.writeDict:
|
||||
# do not save before all values are written to the hw, as potentially
|
||||
# factory default values were read in the mean time
|
||||
return
|
||||
data = {k: v.export_value() for k, v in self.parameters.items()
|
||||
if getattr(v, 'persistent', False)}
|
||||
if data != self.persistentData:
|
||||
self.persistentData = data
|
||||
persistentdir = os.path.basename(self.persistentFile)
|
||||
tmpfile = self.persistentFile + '.tmp'
|
||||
if not os.path.isdir(persistentdir):
|
||||
os.makedirs(persistentdir, exist_ok=True)
|
||||
try:
|
||||
with open(tmpfile, 'w') as f:
|
||||
json.dump(self.persistentData, f, indent=2)
|
||||
f.write('\n')
|
||||
os.rename(tmpfile, self.persistentFile)
|
||||
finally:
|
||||
try:
|
||||
os.remove(tmpfile)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
|
||||
@Command()
|
||||
def factory_reset(self):
|
||||
self.writeDict.update(self.initData)
|
||||
self.writeInitParams()
|
@ -202,7 +202,7 @@ class Poller(PollerBase):
|
||||
module.pollOneParam(pname)
|
||||
done = True
|
||||
lastdue = due
|
||||
due = max(lastdue + mininterval, now + min(self.maxwait, mininterval * 0.5))
|
||||
due = max(lastdue + mininterval, now + min(self.maxwait, mininterval * 0.5))
|
||||
# replace due, lastdue with new values and sort in
|
||||
heapreplace(queue, (due, lastdue, pollitem))
|
||||
return 0
|
||||
@ -227,9 +227,10 @@ class Poller(PollerBase):
|
||||
(where n is the number of regular parameters).
|
||||
"""
|
||||
if not self:
|
||||
# nothing to do (else we might call time.sleep(float('inf')) below
|
||||
# nothing to do (else time.sleep(float('inf')) might be called below
|
||||
started_callback()
|
||||
return
|
||||
# if writeInitParams is not yet done, we do it here
|
||||
for module in self.modules:
|
||||
module.writeInitParams()
|
||||
# do all polls once and, at the same time, insert due info
|
||||
|
@ -158,7 +158,7 @@ class HasProperties(HasDescriptors):
|
||||
cls.propertyDict = properties
|
||||
# treat overriding properties with bare values
|
||||
for pn, po in properties.items():
|
||||
value = cls.__dict__.get(pn, po)
|
||||
value = getattr(cls, pn, po)
|
||||
if not isinstance(value, Property): # attribute is a bare value
|
||||
po = Property(**po.__dict__)
|
||||
try:
|
||||
@ -177,11 +177,11 @@ class HasProperties(HasDescriptors):
|
||||
"""validates properties and checks for min... <= max..."""
|
||||
for pn, po in self.propertyDict.items():
|
||||
if po.mandatory:
|
||||
if pn not in self.propertyDict:
|
||||
try:
|
||||
self.propertyValues[pn] = po.datatype(self.propertyValues[pn])
|
||||
except (KeyError, BadValueError):
|
||||
name = getattr(self, 'name', self.__class__.__name__)
|
||||
raise ConfigError('Property %r of %s needs a value of type %r!' % (pn, name, po.datatype))
|
||||
# apply validator (which may complain further)
|
||||
self.propertyValues[pn] = po.datatype(self.propertyValues[pn])
|
||||
raise ConfigError('%s.%s needs a value of type %r!' % (name, pn, po.datatype))
|
||||
for pn, po in self.propertyDict.items():
|
||||
if pn.startswith('min'):
|
||||
maxname = 'max' + pn[3:]
|
||||
|
@ -82,6 +82,7 @@ class Dispatcher:
|
||||
self._subscriptions = {}
|
||||
self._lock = threading.RLock()
|
||||
self.restart = srv.restart
|
||||
self.shutdown = srv.shutdown
|
||||
|
||||
def broadcast_event(self, msg, reallyall=False):
|
||||
"""broadcasts a msg to all active connections
|
||||
|
@ -25,6 +25,7 @@ import socket
|
||||
import socketserver
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
|
||||
from secop.datatypes import BoolType, StringType
|
||||
from secop.errors import SECoPError
|
||||
@ -184,8 +185,19 @@ class TCPServer(socketserver.ThreadingTCPServer):
|
||||
port = int(options.pop('uri').split('://', 1)[-1])
|
||||
self.detailed_errors = options.pop('detailed_errors', False)
|
||||
|
||||
self.allow_reuse_address = True
|
||||
self.log.info("TCPServer %s binding to port %d" % (name, port))
|
||||
socketserver.ThreadingTCPServer.__init__(
|
||||
self, ('0.0.0.0', port), TCPRequestHandler, bind_and_activate=True)
|
||||
for ntry in range(5):
|
||||
try:
|
||||
socketserver.ThreadingTCPServer.__init__(
|
||||
self, ('0.0.0.0', port), TCPRequestHandler, bind_and_activate=True)
|
||||
break
|
||||
except OSError as e:
|
||||
if e.args[0] == 98: # address already in use
|
||||
# this may happen despite of allow_reuse_address
|
||||
time.sleep(0.3 * (1 << ntry))
|
||||
else:
|
||||
self.log.error('could not initialize TCP Server: %r' % e)
|
||||
raise
|
||||
if ntry:
|
||||
self.log.warning('tried again %d times after "Address already in use"' % ntry)
|
||||
self.log.info("TCPServer initiated")
|
||||
|
@ -122,6 +122,8 @@ class ProxyModule(HasIodev, Module):
|
||||
self.announceUpdate(pname, None, readerror)
|
||||
self.announceUpdate('status', newstatus)
|
||||
|
||||
def checkProperties(self):
|
||||
pass # skip
|
||||
|
||||
class ProxyReadable(ProxyModule, Readable):
|
||||
pass
|
||||
|
@ -26,11 +26,13 @@
|
||||
import ast
|
||||
import configparser
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
from collections import OrderedDict
|
||||
|
||||
from secop.errors import ConfigError
|
||||
from secop.errors import ConfigError, SECoPError
|
||||
from secop.lib import formatException, get_class, getGeneralConfig
|
||||
from secop.modules import Attached
|
||||
from secop.params import PREDEFINED_ACCESSIBLES
|
||||
@ -179,8 +181,8 @@ class Server:
|
||||
self.run()
|
||||
|
||||
def unknown_options(self, cls, options):
|
||||
raise ConfigError("%s class don't know how to handle option(s): %s" %
|
||||
(cls.__name__, ', '.join(options)))
|
||||
return ("%s class don't know how to handle option(s): %s" %
|
||||
(cls.__name__, ', '.join(options)))
|
||||
|
||||
def run(self):
|
||||
while self._restart:
|
||||
@ -201,7 +203,7 @@ class Server:
|
||||
cls = get_class(self.INTERFACES[scheme])
|
||||
with cls(scheme, self.log.getChild(scheme), opts, self) as self.interface:
|
||||
if opts:
|
||||
self.unknown_options(cls, opts)
|
||||
raise ConfigError(self.unknown_options(cls, opts))
|
||||
self.log.info('startup done, handling transport messages')
|
||||
if systemd:
|
||||
systemd.daemon.notify("READY=1\nSTATUS=accepting requests")
|
||||
@ -218,21 +220,51 @@ class Server:
|
||||
self._restart = True
|
||||
self.interface.shutdown()
|
||||
|
||||
def shutdown(self):
|
||||
self._restart = False
|
||||
self.interface.shutdown()
|
||||
|
||||
def _processCfg(self):
|
||||
errors = []
|
||||
opts = dict(self.node_cfg)
|
||||
cls = get_class(opts.pop('class', 'protocol.dispatcher.Dispatcher'))
|
||||
self.dispatcher = cls(opts.pop('name', self._cfgfiles), self.log.getChild('dispatcher'), opts, self)
|
||||
if opts:
|
||||
self.unknown_options(cls, opts)
|
||||
errors.append(self.unknown_options(cls, opts))
|
||||
self.modules = OrderedDict()
|
||||
failure_traceback = None # traceback for the last error
|
||||
failed = set() # python modules failed to load
|
||||
self.lastError = None
|
||||
for modname, options in self.module_cfg.items():
|
||||
opts = dict(options)
|
||||
cls = get_class(opts.pop('class'))
|
||||
modobj = cls(modname, self.log.getChild(modname), opts, self)
|
||||
# all used args should be popped from opts!
|
||||
if opts:
|
||||
self.unknown_options(cls, opts)
|
||||
self.modules[modname] = modobj
|
||||
pymodule = None
|
||||
try:
|
||||
classname = opts.pop('class')
|
||||
pymodule = classname.rpartition('.')[0]
|
||||
if pymodule in failed:
|
||||
continue
|
||||
cls = get_class(classname)
|
||||
except Exception as e:
|
||||
if str(e) == 'no such class':
|
||||
errors.append('%s not found' % classname)
|
||||
else:
|
||||
failed.add(pymodule)
|
||||
failure_traceback = traceback.format_exc()
|
||||
errors.append('error importing %s' % classname)
|
||||
else:
|
||||
try:
|
||||
modobj = cls(modname, self.log.getChild(modname), opts, self)
|
||||
# all used args should be popped from opts!
|
||||
if opts:
|
||||
errors.append(self.unknown_options(cls, opts))
|
||||
self.modules[modname] = modobj
|
||||
except ConfigError as e:
|
||||
errors.append('error creating module %s:' % modname)
|
||||
for errtxt in e.args[0] if isinstance(e.args[0], list) else [e.args[0]]:
|
||||
errors.append(' ' + errtxt)
|
||||
except Exception:
|
||||
failure_traceback = traceback.format_exc()
|
||||
errors.append('error creating %s' % modname)
|
||||
|
||||
poll_table = dict()
|
||||
# all objs created, now start them up and interconnect
|
||||
@ -249,11 +281,30 @@ class Server:
|
||||
for modname, modobj in self.modules.items():
|
||||
for propname, propobj in modobj.propertyDict.items():
|
||||
if isinstance(propobj, Attached):
|
||||
setattr(modobj, propobj.attrname or '_' + propname,
|
||||
self.dispatcher.get_module(getattr(modobj, propname)))
|
||||
try:
|
||||
setattr(modobj, propobj.attrname or '_' + propname,
|
||||
self.dispatcher.get_module(getattr(modobj, propname)))
|
||||
except SECoPError as e:
|
||||
errors.append('module %s, attached %s: %s' % (modname, propname, str(e)))
|
||||
|
||||
# call init on each module after registering all
|
||||
for modname, modobj in self.modules.items():
|
||||
modobj.initModule()
|
||||
try:
|
||||
modobj.initModule()
|
||||
except Exception as e:
|
||||
failure_traceback = traceback.format_exc()
|
||||
errors.append('error initializing %s: %r' % (modname, e))
|
||||
|
||||
if errors:
|
||||
for errtxt in errors:
|
||||
for line in errtxt.split('\n'):
|
||||
self.log.error(line)
|
||||
# print a list of config errors to stderr
|
||||
sys.stderr.write('\n'.join(errors))
|
||||
sys.stderr.write('\n')
|
||||
if failure_traceback:
|
||||
sys.stderr.write(failure_traceback)
|
||||
sys.exit(1)
|
||||
|
||||
if self._testonly:
|
||||
return
|
||||
|
@ -20,7 +20,8 @@
|
||||
# *****************************************************************************
|
||||
"""Line oriented stream communication
|
||||
|
||||
implements TCP/IP and is be used as a base for SerialIO
|
||||
StringIO: string oriented IO. May be used for TCP/IP as well for serial IO or
|
||||
other future extensions of AsynConn
|
||||
"""
|
||||
|
||||
import re
|
||||
@ -37,66 +38,23 @@ from secop.modules import Attached, Command, \
|
||||
from secop.poller import REGULAR
|
||||
|
||||
|
||||
class StringIO(Communicator):
|
||||
"""line oriented communicator
|
||||
|
||||
self healing is assured by polling the parameter 'is_connected'
|
||||
"""
|
||||
class BaseIO(Communicator):
|
||||
"""base of StringIO and BytesIO"""
|
||||
uri = Property('hostname:portnumber', datatype=StringType())
|
||||
end_of_line = Property('end_of_line character', datatype=ValueType(),
|
||||
default='\n', settable=True)
|
||||
encoding = Property('used encoding', datatype=StringType(),
|
||||
default='ascii', settable=True)
|
||||
identification = Property('''
|
||||
identification
|
||||
|
||||
a list of tuples with commands and expected responses as regexp,
|
||||
to be sent on connect''',
|
||||
datatype=ArrayOf(TupleOf(StringType(), StringType())), default=[], export=False)
|
||||
|
||||
timeout = Parameter('timeout', datatype=FloatRange(0), default=2)
|
||||
wait_before = Parameter('wait time before sending', datatype=FloatRange(), default=0)
|
||||
is_connected = Parameter('connection state', datatype=BoolType(), readonly=False, poll=REGULAR)
|
||||
pollinterval = Parameter('reconnect interval', datatype=FloatRange(0), readonly=False, default=10)
|
||||
|
||||
_reconnectCallbacks = None
|
||||
_conn = None
|
||||
_last_error = None
|
||||
|
||||
def earlyInit(self):
|
||||
self._conn = None
|
||||
self._lock = threading.RLock()
|
||||
eol = self.end_of_line
|
||||
if isinstance(eol, (tuple, list)):
|
||||
if len(eol) not in (1, 2):
|
||||
raise ValueError('invalid end_of_line: %s' % eol)
|
||||
else:
|
||||
eol = [eol]
|
||||
# eol for read and write might be distinct
|
||||
self._eol_read = self._convert_eol(eol[0])
|
||||
if not self._eol_read:
|
||||
raise ValueError('end_of_line for read must not be empty')
|
||||
self._eol_write = self._convert_eol(eol[-1])
|
||||
self._last_error = None
|
||||
|
||||
def _convert_eol(self, value):
|
||||
if isinstance(value, str):
|
||||
return value.encode(self.encoding)
|
||||
if isinstance(value, int):
|
||||
return bytes([value])
|
||||
if isinstance(value, bytes):
|
||||
return value
|
||||
raise ValueError('invalid end_of_line: %s' % repr(value))
|
||||
|
||||
def connectStart(self):
|
||||
if not self.is_connected:
|
||||
uri = self.uri
|
||||
self._conn = AsynConn(uri, self._eol_read)
|
||||
self.is_connected = True
|
||||
for command, regexp in self.identification:
|
||||
reply = self.communicate(command)
|
||||
if not re.match(regexp, reply):
|
||||
self.closeConnection()
|
||||
raise CommunicationFailedError('bad response: %s does not match %s' %
|
||||
(reply, regexp))
|
||||
raise NotImplementedError
|
||||
|
||||
def closeConnection(self):
|
||||
"""close connection
|
||||
@ -158,6 +116,62 @@ class StringIO(Communicator):
|
||||
if removeme:
|
||||
self._reconnectCallbacks.pop(key)
|
||||
|
||||
def communicate(self, command):
|
||||
return NotImplementedError
|
||||
|
||||
|
||||
class StringIO(BaseIO):
|
||||
"""line oriented communicator
|
||||
|
||||
self healing is assured by polling the parameter 'is_connected'
|
||||
"""
|
||||
end_of_line = Property('end_of_line character', datatype=ValueType(),
|
||||
default='\n', settable=True)
|
||||
encoding = Property('used encoding', datatype=StringType(),
|
||||
default='ascii', settable=True)
|
||||
identification = Property('''
|
||||
identification
|
||||
|
||||
a list of tuples with commands and expected responses as regexp,
|
||||
to be sent on connect''',
|
||||
datatype=ArrayOf(TupleOf(StringType(), StringType())), default=[], export=False)
|
||||
|
||||
def _convert_eol(self, value):
|
||||
if isinstance(value, str):
|
||||
return value.encode(self.encoding)
|
||||
if isinstance(value, int):
|
||||
return bytes([value])
|
||||
if isinstance(value, bytes):
|
||||
return value
|
||||
raise ValueError('invalid end_of_line: %s' % repr(value))
|
||||
|
||||
def earlyInit(self):
|
||||
super().earlyInit()
|
||||
eol = self.end_of_line
|
||||
if isinstance(eol, (tuple, list)):
|
||||
if len(eol) not in (1, 2):
|
||||
raise ValueError('invalid end_of_line: %s' % eol)
|
||||
else:
|
||||
eol = [eol]
|
||||
# eol for read and write might be distinct
|
||||
self._eol_read = self._convert_eol(eol[0])
|
||||
if not self._eol_read:
|
||||
raise ValueError('end_of_line for read must not be empty')
|
||||
self._eol_write = self._convert_eol(eol[-1])
|
||||
|
||||
def connectStart(self):
|
||||
if not self.is_connected:
|
||||
uri = self.uri
|
||||
self._conn = AsynConn(uri, self._eol_read)
|
||||
self.is_connected = True
|
||||
for command, regexp in self.identification:
|
||||
reply = self.communicate(command)
|
||||
if not re.match(regexp, reply):
|
||||
self.closeConnection()
|
||||
raise CommunicationFailedError('bad response: %s does not match %s' %
|
||||
(reply, regexp))
|
||||
|
||||
@Command(StringType(), result=StringType())
|
||||
def communicate(self, command):
|
||||
"""send a command and receive a reply
|
||||
|
||||
@ -165,6 +179,7 @@ class StringIO(Communicator):
|
||||
for commands without reply, the command must be joined with a query command,
|
||||
wait_before is respected for end_of_lines within a command.
|
||||
"""
|
||||
command = command.encode(self.encoding)
|
||||
if not self.is_connected:
|
||||
self.read_is_connected() # try to reconnect
|
||||
if not self._conn:
|
||||
@ -173,9 +188,9 @@ class StringIO(Communicator):
|
||||
with self._lock:
|
||||
# read garbage and wait before send
|
||||
if self.wait_before and self._eol_write:
|
||||
cmds = command.encode(self.encoding).split(self._eol_write)
|
||||
cmds = command.split(self._eol_write)
|
||||
else:
|
||||
cmds = [command.encode(self.encoding)]
|
||||
cmds = [command]
|
||||
garbage = None
|
||||
try:
|
||||
for cmd in cmds:
|
||||
@ -186,6 +201,7 @@ class StringIO(Communicator):
|
||||
if garbage:
|
||||
self.log.debug('garbage: %r', garbage)
|
||||
self._conn.send(cmd + self._eol_write)
|
||||
self.log.debug('send: %s', cmd + self._eol_write)
|
||||
reply = self._conn.readline(self.timeout)
|
||||
except ConnectionClosed:
|
||||
self.closeConnection()
|
||||
|
144
secop_psi/dpm.py
Normal file
144
secop_psi/dpm.py
Normal file
@ -0,0 +1,144 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# *****************************************************************************
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Module authors:
|
||||
# ...
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from secop.core import Readable, Parameter, FloatRange, BoolType, StringIO, HasIodev, IntRange, Done
|
||||
|
||||
|
||||
class DPM3IO(StringIO):
|
||||
end_of_line = '\r'
|
||||
timeout = 3
|
||||
identification = [('*1R135', '01')]
|
||||
|
||||
|
||||
def hex2float(hexvalue, digits):
|
||||
value = int(hexvalue, 16)
|
||||
if value >= 0x800000:
|
||||
value -= 0x1000000
|
||||
return value / (10 ** digits)
|
||||
|
||||
|
||||
def float2hex(value, digits):
|
||||
intvalue = int(round(value * 10 ** digits,0))
|
||||
if intvalue < 0:
|
||||
intvalue += 0x1000000
|
||||
return '%06X' % intvalue
|
||||
|
||||
|
||||
class DPM3(HasIodev, Readable):
|
||||
OFFSET = 0x8f
|
||||
SCALE = 0x8c
|
||||
|
||||
MAGNITUDE = {'1': 1, '2': 10, '3': 100, '4': 1e3, '5': 1e4, '6': 1e5,
|
||||
'9':-1, 'A':-10, 'B':-100, 'C':-1e3, 'D':-1e4, 'E':-1e5}
|
||||
|
||||
iodevClass = DPM3IO
|
||||
|
||||
digits = Parameter('number of digits for value', IntRange(0, 5), initwrite=True, readonly=False)
|
||||
value = Parameter(unit='N')
|
||||
|
||||
offset = Parameter('', FloatRange(-1e5, 1e5), readonly=False, poll=True)
|
||||
|
||||
#Note: we have tro treat the units properly.
|
||||
""" We got an output of 150 for 10N. The maximal force we want to deal with is 100N,
|
||||
thus a maximl output of 1500. 10=150/f
|
||||
"""
|
||||
scale_factor = Parameter('', FloatRange(-1e5, 1e5, unit='input_units/N'), readonly=False, poll=True)
|
||||
|
||||
def query(self, adr, value=None):
|
||||
if value is not None:
|
||||
if adr == self.SCALE:
|
||||
absval = abs(value)
|
||||
for nibble, mag in self.MAGNITUDE.items():
|
||||
if 10000 <= round(value * mag, 0) <= 99999:
|
||||
break
|
||||
else:
|
||||
# not suitable range found
|
||||
if absval >= 99999.5: # overrange
|
||||
raise ValueError('%s is out of range' % value)
|
||||
# underrange: take lowest
|
||||
nibble = '9' if value < 0 else '1'
|
||||
mag = self.MAGNITUDE[nibble]
|
||||
hex_val = nibble + '%05X' % int(round(value * mag, 0))
|
||||
if hex_val[1:] == '00000':
|
||||
raise ValueError('scale factor can not be 0', value)
|
||||
else:
|
||||
hex_val = float2hex(value, self.digits)
|
||||
cmd = '*1F3%02X%s\r' % (adr, hex_val)
|
||||
else:
|
||||
cmd = ""
|
||||
cmd = cmd + '*1G3%02X' % adr
|
||||
hexvalue = self._iodev.communicate(cmd)
|
||||
if adr == self.SCALE:
|
||||
mag = self.MAGNITUDE[hexvalue[0:1]]
|
||||
value = int(hexvalue[1:], 16)
|
||||
return value/mag
|
||||
else:
|
||||
return hex2float(hexvalue, self.digits)
|
||||
|
||||
def write_digits(self, value):
|
||||
# value defines the number of digits
|
||||
back_value=self._iodev.communicate('*1F135%02X\r*1G135' % (value + 1))
|
||||
self.digits = int(back_value,16) - 1
|
||||
# realculate proper scale and offset
|
||||
self.write_scale_factor(self.scale_factor)
|
||||
self.write_offset(self.offset)
|
||||
return Done
|
||||
|
||||
def read_digits(self):
|
||||
back_value = self._iodev.communicate('*1G135')
|
||||
return int(back_value,16) - 1
|
||||
|
||||
def read_value(self):
|
||||
value = self._iodev.communicate('*1B1')
|
||||
return float(value)
|
||||
|
||||
def read_offset(self):
|
||||
reply = self.query(self.OFFSET)
|
||||
return reply
|
||||
|
||||
def write_offset(self, value):
|
||||
return self.query(self.OFFSET, value)
|
||||
|
||||
def read_scale_factor(self):
|
||||
reply = self.query(self.SCALE)
|
||||
return float(reply) / 10 ** self.digits
|
||||
|
||||
def write_scale_factor(self, value):
|
||||
reply = self.query(self.SCALE, value * 10 ** self.digits)
|
||||
return float(reply) / 10 ** self.digits
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -45,7 +45,12 @@ def make_cvt_list(dt, tail=''):
|
||||
result = []
|
||||
for subkey, elmtype in items:
|
||||
for fun, tail_, opts in make_cvt_list(elmtype, '%s.%s' % (tail, subkey)):
|
||||
result.append((lambda v, k=subkey, f=fun: f(v[k]), tail_, opts))
|
||||
def conv(value, key=subkey, func=fun):
|
||||
try:
|
||||
return value[key]
|
||||
except KeyError: # can not use value.get() because value might be a list
|
||||
return None
|
||||
result.append((conv, tail_, opts))
|
||||
return result
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
not tested yet"""
|
||||
|
||||
from secop.core import Attached, BoolType, EnumType, FloatRange, \
|
||||
HasIodev, Module, Parameter, StringIO, Writable
|
||||
HasIodev, Module, Parameter, StringIO, Writable, Done
|
||||
|
||||
|
||||
class K2601bIO(StringIO):
|
||||
@ -31,13 +31,16 @@ class K2601bIO(StringIO):
|
||||
|
||||
|
||||
SOURCECMDS = {
|
||||
0: 'reset()'
|
||||
' smua.source.func = smua.OUTPUT_DCAMPS'
|
||||
' display.smua.measure.func = display.MEASURE_VOLTS'
|
||||
' smua.source.autorangei = 1'
|
||||
' smua.source.output = %d print("ok"")',
|
||||
1: 'reset()'
|
||||
'smua.source.func = smua.OUTPUT_DCVOLTS '
|
||||
'display.smua.measure.func = display.MEASURE_DCAMP '
|
||||
'smua.source.autorangev = 1',
|
||||
2: 'reset()'
|
||||
'smua.source.func = smua.OUTPUT_DCAMPS '
|
||||
'smua.source.autorangei = 1',
|
||||
' smua.source.func = smua.OUTPUT_DCVOLTS'
|
||||
' display.smua.measure.func = display.MEASURE_DCAMPS'
|
||||
' smua.source.autorangev = 1'
|
||||
' smua.source.output = %d print("ok"")',
|
||||
}
|
||||
|
||||
|
||||
@ -45,9 +48,8 @@ class SourceMeter(HasIodev, Module):
|
||||
|
||||
resistivity = Parameter('readback resistivity', FloatRange(unit='Ohm'), poll=True)
|
||||
power = Parameter('readback power', FloatRange(unit='W'), poll=True)
|
||||
mode = Parameter('measurement mode', EnumType(off=0, current=1, voltage=2),
|
||||
readonly=False, default=0)
|
||||
active = Parameter('output enable', BoolType(), readonly=False, poll=True)
|
||||
mode = Parameter('measurement mode', EnumType(current_off=0, voltage_off=1, current_on=2, voltage_on=3),
|
||||
readonly=False, poll=True)
|
||||
|
||||
iodevClass = K2601bIO
|
||||
|
||||
@ -57,20 +59,12 @@ class SourceMeter(HasIodev, Module):
|
||||
def read_power(self):
|
||||
return self.sendRecv('print(smua.measure.p())')
|
||||
|
||||
def read_active(self):
|
||||
return self.sendRecv('print(smua.source.output)')
|
||||
|
||||
def write_active(self, value):
|
||||
return self.sendRecv('smua.source.output = %d print(smua.source.output)' % value)
|
||||
|
||||
# for now, mode will not be read from hardware
|
||||
def read_mode(self):
|
||||
return float(self.sendRecv('print(smua.source.func+2*smua.source.output)'))
|
||||
|
||||
def write_mode(self, value):
|
||||
if value == 0:
|
||||
self.write_active(0)
|
||||
else:
|
||||
self.sendRecv(SOURCECMDS[value] + ' print(0)')
|
||||
return value
|
||||
assert 'ok' == self.sendRecv(SOURCECMDS[value % 2] % (value >= 2))
|
||||
return self.read_mode()
|
||||
|
||||
|
||||
class Current(HasIodev, Writable):
|
||||
@ -78,9 +72,12 @@ class Current(HasIodev, Writable):
|
||||
|
||||
value = Parameter('measured current', FloatRange(unit='A'), poll=True)
|
||||
target = Parameter('set current', FloatRange(unit='A'), poll=True)
|
||||
active = Parameter('current is controlled', BoolType(), default=False) # polled from Current/Voltage
|
||||
active = Parameter('current is controlled', BoolType(), default=False) # polled by SourceMeter
|
||||
limit = Parameter('current limit', FloatRange(0, 2.0, unit='A'), default=2, poll=True)
|
||||
|
||||
def initModule(self):
|
||||
self._sourcemeter.registerCallbacks(self)
|
||||
|
||||
def read_value(self):
|
||||
return self.sendRecv('print(smua.measure.i())')
|
||||
|
||||
@ -104,16 +101,16 @@ class Current(HasIodev, Writable):
|
||||
return value
|
||||
return self.sendRecv('smua.source.limiti = %g print(smua.source.limiti)' % value)
|
||||
|
||||
def read_active(self):
|
||||
return self._sourcemeter.mode == 1 and self._sourcemeter.read_active()
|
||||
|
||||
def write_active(self, value):
|
||||
if self._sourcemeter.mode != 1:
|
||||
if value:
|
||||
self._sourcemeter.write_mode(1) # switch to current
|
||||
else:
|
||||
return 0
|
||||
return self._sourcemeter.write_active(value)
|
||||
if value:
|
||||
self._sourcemeter.write_mode('current_on')
|
||||
elif self._sourcemeter.mode == 'current_on':
|
||||
self._sourcemeter.write_mode('current_off')
|
||||
return self.active
|
||||
|
||||
def update_mode(self, mode):
|
||||
# will be called whenever the attached sourcemeters mode changes
|
||||
self.active = mode == 'current_on'
|
||||
|
||||
|
||||
class Voltage(HasIodev, Writable):
|
||||
@ -121,9 +118,12 @@ class Voltage(HasIodev, Writable):
|
||||
|
||||
value = Parameter('measured voltage', FloatRange(unit='V'), poll=True)
|
||||
target = Parameter('set voltage', FloatRange(unit='V'), poll=True)
|
||||
active = Parameter('voltage is controlled', BoolType(), poll=True)
|
||||
active = Parameter('voltage is controlled', BoolType(), default=False) # polled by SourceMeter
|
||||
limit = Parameter('current limit', FloatRange(0, 2.0, unit='V'), default=2, poll=True)
|
||||
|
||||
def initModule(self):
|
||||
self._sourcemeter.registerCallbacks(self)
|
||||
|
||||
def read_value(self):
|
||||
return self.sendRecv('print(smua.measure.v())')
|
||||
|
||||
@ -147,13 +147,13 @@ class Voltage(HasIodev, Writable):
|
||||
return value
|
||||
return self.sendRecv('smua.source.limitv = %g print(smua.source.limitv)' % value)
|
||||
|
||||
def read_active(self):
|
||||
return self._sourcemeter.mode == 2 and self._sourcemeter.read_active()
|
||||
|
||||
def write_active(self, value):
|
||||
if self._sourcemeter.mode != 2:
|
||||
if value:
|
||||
self._sourcemeter.write_mode(2) # switch to voltage
|
||||
else:
|
||||
return 0
|
||||
return self._sourcemeter.write_active(value)
|
||||
if value:
|
||||
self._sourcemeter.write_mode('voltage_on')
|
||||
elif self._sourcemeter.mode == 'voltage_on':
|
||||
self._sourcemeter.write_mode('voltage_off')
|
||||
return self.active
|
||||
|
||||
def update_mode(self, mode):
|
||||
# will be called whenever the attached sourcemeters mode changes
|
||||
self.active = mode == 'voltage_on'
|
||||
|
@ -228,7 +228,7 @@ class ResChannel(HasIodev, Readable):
|
||||
if autorange:
|
||||
result['autorange'] = 'hard'
|
||||
# else: do not change autorange
|
||||
self.log.info('%s range %r %r %r' % (self.name, rng, autorange, self.autorange))
|
||||
# self.log.info('%s range %r %r %r' % (self.name, rng, autorange, self.autorange))
|
||||
if excoff:
|
||||
result.update(iexc=0, vexc=0)
|
||||
elif iscur:
|
||||
|
@ -128,8 +128,9 @@ class Main(Communicator):
|
||||
return data # return data as string
|
||||
|
||||
|
||||
class PpmsBase(HasIodev, Readable):
|
||||
class PpmsMixin:
|
||||
"""common base for all ppms modules"""
|
||||
|
||||
iodev = Attached()
|
||||
|
||||
pollerClass = Poller
|
||||
@ -139,7 +140,7 @@ class PpmsBase(HasIodev, Readable):
|
||||
|
||||
# as this pollinterval affects only the polling of settings
|
||||
# it would be confusing to export it.
|
||||
pollinterval = Parameter(export=False)
|
||||
pollinterval = Parameter('', FloatRange(), needscfg=False, export=False)
|
||||
|
||||
def initModule(self):
|
||||
self._iodev.register(self)
|
||||
@ -172,7 +173,7 @@ class PpmsBase(HasIodev, Readable):
|
||||
self.status = (self.Status.IDLE, '')
|
||||
|
||||
|
||||
class Channel(PpmsBase):
|
||||
class Channel(PpmsMixin, HasIodev, Readable):
|
||||
"""channel base class"""
|
||||
|
||||
value = Parameter('main value of channels', poll=True)
|
||||
@ -270,7 +271,7 @@ class BridgeChannel(Channel):
|
||||
return self.no, 0, 0, change.dcflag, change.readingmode, 0
|
||||
|
||||
|
||||
class Level(PpmsBase):
|
||||
class Level(PpmsMixin, HasIodev, Readable):
|
||||
"""helium level"""
|
||||
|
||||
level = IOHandler('level', 'LEVEL?', '%g,%d')
|
||||
@ -293,7 +294,7 @@ class Level(PpmsBase):
|
||||
return dict(value=level, status=(self.Status.IDLE, ''))
|
||||
|
||||
|
||||
class Chamber(PpmsBase, Drivable):
|
||||
class Chamber(PpmsMixin, HasIodev, Drivable):
|
||||
"""sample chamber handling
|
||||
|
||||
value is an Enum, which is redundant with the status text
|
||||
@ -368,7 +369,7 @@ class Chamber(PpmsBase, Drivable):
|
||||
return (change.target,)
|
||||
|
||||
|
||||
class Temp(PpmsBase, Drivable):
|
||||
class Temp(PpmsMixin, HasIodev, Drivable):
|
||||
"""temperature"""
|
||||
|
||||
temp = IOHandler('temp', 'TEMP?', '%g,%g,%d')
|
||||
@ -553,7 +554,7 @@ class Temp(PpmsBase, Drivable):
|
||||
self._stopped = True
|
||||
|
||||
|
||||
class Field(PpmsBase, Drivable):
|
||||
class Field(PpmsMixin, HasIodev, Drivable):
|
||||
"""magnetic field"""
|
||||
|
||||
field = IOHandler('field', 'FIELD?', '%g,%g,%d,%d')
|
||||
@ -562,6 +563,7 @@ class Field(PpmsBase, Drivable):
|
||||
PREPARED=150,
|
||||
PREPARING=340,
|
||||
RAMPING=370,
|
||||
STABILIZING=380,
|
||||
FINALIZING=390,
|
||||
)
|
||||
# pylint: disable=invalid-name
|
||||
@ -584,7 +586,7 @@ class Field(PpmsBase, Drivable):
|
||||
2: (Status.PREPARING, 'switch warming'),
|
||||
3: (Status.FINALIZING, 'switch cooling'),
|
||||
4: (Status.IDLE, 'driven stable'),
|
||||
5: (Status.FINALIZING, 'driven final'),
|
||||
5: (Status.STABILIZING, 'driven final'),
|
||||
6: (Status.RAMPING, 'charging'),
|
||||
7: (Status.RAMPING, 'discharging'),
|
||||
8: (Status.ERROR, 'current error'),
|
||||
@ -690,7 +692,7 @@ class Field(PpmsBase, Drivable):
|
||||
self._stopped = True
|
||||
|
||||
|
||||
class Position(PpmsBase, Drivable):
|
||||
class Position(PpmsMixin, HasIodev, Drivable):
|
||||
"""rotator position"""
|
||||
|
||||
move = IOHandler('move', 'MOVE?', '%g,%g,%g')
|
||||
|
332
secop_psi/sea.py
332
secop_psi/sea.py
@ -35,38 +35,51 @@ rx:bla rx bla /some/rx_a/bla rx bla /some/rx_a
|
||||
import json
|
||||
import threading
|
||||
import time
|
||||
from os.path import expanduser, join
|
||||
import os
|
||||
from os.path import expanduser, join, exists
|
||||
|
||||
from secop.client import ProxyClient
|
||||
from secop.datatypes import ArrayOf, BoolType, \
|
||||
EnumType, FloatRange, IntRange, StringType
|
||||
from secop.errors import ConfigError, HardwareError, secop_error
|
||||
from secop.errors import ConfigError, HardwareError, secop_error, NoSuchModuleError
|
||||
from secop.lib import getGeneralConfig, mkthread
|
||||
from secop.lib.asynconn import AsynConn, ConnectionClosed
|
||||
from secop.modules import Attached, Command, Done, Drivable, \
|
||||
Module, Parameter, Property, Readable, Writable
|
||||
from secop.protocol.dispatcher import make_update
|
||||
|
||||
CFG_HEADER = """[NODE]
|
||||
id = %(samenv)s.psi.ch
|
||||
description = %(samenv)s over SEA
|
||||
|
||||
[seaconn]
|
||||
CFG_HEADER = """[NODE]
|
||||
description = %(nodedescr)s
|
||||
id = %(config)s.sea.psi.ch
|
||||
|
||||
[%(seaconn)s]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = a SEA connection
|
||||
description = %(service)s sea connection for %(config)s
|
||||
config = %(config)s
|
||||
service = %(service)s
|
||||
"""
|
||||
|
||||
CFG_MODULE = """
|
||||
[%(module)s]
|
||||
class = secop_psi.sea.%(modcls)s
|
||||
iodev = seaconn
|
||||
json_descr = %(descr)s
|
||||
remote_paths = .
|
||||
iodev = %(seaconn)s
|
||||
sea_object = %(module)s
|
||||
"""
|
||||
|
||||
SERVICE_NAMES = {
|
||||
'config': 'main',
|
||||
'stick': 'stick',
|
||||
'addon': 'addons',
|
||||
}
|
||||
|
||||
SEA_DIR = expanduser('~/sea')
|
||||
confdir = getGeneralConfig()['confdir'].split(':', 1)[0]
|
||||
for confdir in getGeneralConfig()['confdir'].split(os.pathsep):
|
||||
seaconfdir = join(confdir, 'sea')
|
||||
if exists(seaconfdir):
|
||||
break
|
||||
else:
|
||||
seaconfdir = None
|
||||
|
||||
|
||||
def get_sea_port(instance):
|
||||
@ -87,10 +100,15 @@ def get_sea_port(instance):
|
||||
class SeaClient(ProxyClient, Module):
|
||||
"""connection to SEA"""
|
||||
|
||||
json_path = Property('path to SEA json descriptors', StringType())
|
||||
|
||||
uri = Parameter('hostname:portnumber', datatype=StringType(), default='localhost:5000')
|
||||
timeout = Parameter('timeout', datatype=FloatRange(0), default=10)
|
||||
config = Property("""needed SEA configuration, space separated
|
||||
|
||||
Example: "ori4.config ori4.stick"
|
||||
""", StringType(), default='')
|
||||
service = Property("main/stick/addons", StringType(), default='')
|
||||
visibility = 'expert'
|
||||
default_json_file = {}
|
||||
|
||||
def __init__(self, name, log, opts, srv):
|
||||
instance = srv.node_cfg['name'].rsplit('_', 1)[0]
|
||||
@ -103,6 +121,9 @@ class SeaClient(ProxyClient, Module):
|
||||
self.shutdown = False
|
||||
self.path2param = {}
|
||||
self._write_lock = threading.Lock()
|
||||
config = opts.get('config')
|
||||
if config:
|
||||
self.default_json_file[name] = config.split()[0] + '.json'
|
||||
self.io = None
|
||||
ProxyClient.__init__(self)
|
||||
Module.__init__(self, name, log, opts, srv)
|
||||
@ -122,8 +143,10 @@ class SeaClient(ProxyClient, Module):
|
||||
assert self.asyncio.readline() == b'OK'
|
||||
self.asyncio.writeline(b'Spy 007')
|
||||
assert self.asyncio.readline() == b'Login OK'
|
||||
# the json protocol is better for updates
|
||||
self.asyncio.writeline(b'protocol set json')
|
||||
self.request('frappy_config %s %s' % (self.service, self.config))
|
||||
|
||||
# frappy_async_client switches to the json protocol (better for updates)
|
||||
self.asyncio.writeline(b'frappy_async_client')
|
||||
self.asyncio.writeline(('get_all_param ' + ' '.join(self.objects)).encode())
|
||||
mkthread(self._rxthread, started_callback)
|
||||
|
||||
@ -137,7 +160,9 @@ class SeaClient(ProxyClient, Module):
|
||||
assert self.io.readline() == b'OK'
|
||||
self.io.writeline(b'seauser seaser')
|
||||
assert self.io.readline() == b'Login OK'
|
||||
print('connected to %s' % self.uri)
|
||||
self.io.flush_recv()
|
||||
# print('> %s' % command)
|
||||
self.io.writeline(('fulltransact %s' % command).encode())
|
||||
result = None
|
||||
deadline = time.time() + 10
|
||||
@ -149,6 +174,7 @@ class SeaClient(ProxyClient, Module):
|
||||
except ConnectionClosed:
|
||||
break
|
||||
reply = reply.decode()
|
||||
# print('< %s' % reply)
|
||||
if reply.startswith('TRANSACTIONSTART'):
|
||||
result = []
|
||||
continue
|
||||
@ -203,10 +229,13 @@ class SeaClient(ProxyClient, Module):
|
||||
started_callback = None
|
||||
continue
|
||||
if flag != 'hdbevent':
|
||||
if obj != 'protocol':
|
||||
if obj not in ('frappy_async_client', 'get_all_param'):
|
||||
print('SKIP', msg)
|
||||
continue
|
||||
if data is None:
|
||||
if not data:
|
||||
continue
|
||||
if not isinstance(data, dict):
|
||||
print('what means %r' % msg)
|
||||
continue
|
||||
now = time.time()
|
||||
for path, value in data.items():
|
||||
@ -219,6 +248,15 @@ class SeaClient(ProxyClient, Module):
|
||||
try:
|
||||
module, param = self.path2param[path]
|
||||
except KeyError:
|
||||
if path.startswith('/device'):
|
||||
if path == '/device/changetime':
|
||||
result = self.request('check_config %s %s' % (self.service, self.config))
|
||||
if result == '1':
|
||||
self.asyncio.writeline(('get_all_param ' + ' '.join(self.objects)).encode())
|
||||
else:
|
||||
self.DISPATCHER.shutdown()
|
||||
elif path.startswith('/device/frappy_%s' % self.service) and value == '':
|
||||
self.DISPATCHER.shutdown()
|
||||
# print('UNUSED', msg)
|
||||
continue # unused parameter
|
||||
oldv, oldt, oldr = self.cache.get((module, param), [None, None, None])
|
||||
@ -228,7 +266,7 @@ class SeaClient(ProxyClient, Module):
|
||||
# do not update unchanged values within 0.1 sec
|
||||
self.updateValue(module, param, value, now, readerror)
|
||||
|
||||
@Command
|
||||
@Command(StringType(), result=StringType())
|
||||
def communicate(self, command):
|
||||
"""send a command to SEA"""
|
||||
reply = self.request(command)
|
||||
@ -239,28 +277,57 @@ class SeaClient(ProxyClient, Module):
|
||||
"""save objects (and sub-objects) description"""
|
||||
reply = self.request('describe_all')
|
||||
reply = ''.join('' if line.startswith('WARNING') else line for line in reply.split('\n'))
|
||||
samenv, reply = json.loads(reply)
|
||||
samenv = samenv.replace('/', '_')
|
||||
description, reply = json.loads(reply)
|
||||
modules = {}
|
||||
modcls = {}
|
||||
for filename, obj, descr in reply:
|
||||
if filename not in modules:
|
||||
modules[filename] = {}
|
||||
if descr['params'][0].get('cmd', '').startswith('run '):
|
||||
modcls[obj] = 'SeaDrivable'
|
||||
elif not descr['params'][0].get('readonly', True):
|
||||
modcls[obj] = 'SeaWritable'
|
||||
else:
|
||||
modcls[obj] = 'SeaReadable'
|
||||
modules.setdefault(filename, {})[obj] = descr
|
||||
|
||||
result = []
|
||||
with open(join(confdir, 'sea', samenv + '.cfg'), 'w') as cfp:
|
||||
cfp.write(CFG_HEADER % dict(samenv=samenv))
|
||||
for filename, obj, descr in reply:
|
||||
content = json.dumps([obj, descr]).replace('}, {', '},\n{')
|
||||
with open(join(confdir, 'sea', filename + '.json'), 'w') as fp:
|
||||
fp.write(content + '\n')
|
||||
if descr[0].get('cmd', '').startswith('run '):
|
||||
modcls = 'SeaDrivable'
|
||||
else:
|
||||
modcls = 'SeaReadable'
|
||||
cfp.write(CFG_MODULE % dict(modcls=modcls, module=obj, descr=filename))
|
||||
result.append(filename)
|
||||
return '\n'.join(result)
|
||||
for filename, descr in modules.items():
|
||||
stripped, _, ext = filename.rpartition('.')
|
||||
service = SERVICE_NAMES[ext]
|
||||
seaconn = 'sea_' + service
|
||||
with open(join(seaconfdir, stripped + '.cfg'), 'w') as fp:
|
||||
fp.write(CFG_HEADER % dict(config=filename, seaconn=seaconn, service=service,
|
||||
nodedescr=description.get(filename, filename)))
|
||||
for obj in descr:
|
||||
fp.write(CFG_MODULE % dict(modcls=modcls[obj], module=obj, seaconn=seaconn))
|
||||
content = json.dumps(descr).replace('}, {', '},\n{')
|
||||
with open(join(seaconfdir, filename + '.json'), 'w') as fp:
|
||||
fp.write(content + '\n')
|
||||
result.append('%s: %s' % (filename, ','.join(n for n in descr)))
|
||||
return '; '.join(result)
|
||||
|
||||
@Command(StringType(), result=StringType())
|
||||
def query(self, cmd):
|
||||
"""a request checking for errors and accepting 0 or 1 line as result"""
|
||||
errors = []
|
||||
reply = None
|
||||
for line in self.request(cmd).split('\n'):
|
||||
if line.strip().startswith('ERROR:'):
|
||||
errors.append(line[6:].strip())
|
||||
elif reply is None:
|
||||
reply = line.strip()
|
||||
else:
|
||||
self.log.info('SEA: superfluous reply %r to %r', reply, cmd)
|
||||
if errors:
|
||||
raise HardwareError('; '.join(errors))
|
||||
return reply
|
||||
|
||||
|
||||
SEA_TO_SECOPTYPE = {
|
||||
'float': FloatRange(),
|
||||
'text': StringType(),
|
||||
'int': IntRange(),
|
||||
'int': IntRange(-1 << 63, 1 << 63 - 1),
|
||||
'bool': BoolType(),
|
||||
'none': None,
|
||||
'floatvarar': ArrayOf(FloatRange(), 0, 400), # 400 is the current limit for proper notify events in SEA
|
||||
@ -284,42 +351,87 @@ class SeaModule(Module):
|
||||
# pollerClass=None
|
||||
path2param = None
|
||||
sea_object = None
|
||||
hdbpath = None # hdbpath for main writable
|
||||
|
||||
def __new__(cls, name, logger, cfgdict, dispatcher):
|
||||
def __new__(cls, name, logger, cfgdict, srv):
|
||||
if hasattr(srv, 'extra_sea_modules'):
|
||||
extra_modules = srv.extra_sea_modules
|
||||
else:
|
||||
extra_modules = {}
|
||||
srv.extra_sea_modules = extra_modules
|
||||
json_file = cfgdict.pop('json_file', None) or SeaClient.default_json_file[cfgdict['iodev']]
|
||||
visibility_level = cfgdict.pop('visibility_level', 2)
|
||||
json_descr = cfgdict.pop('json_descr')
|
||||
remote_paths = cfgdict.pop('remote_paths', '')
|
||||
if 'description' not in cfgdict:
|
||||
cfgdict['description'] = '%s (remote_paths=%s)' % (json_descr, remote_paths)
|
||||
with open(join(confdir, 'sea', json_descr + '.json')) as fp:
|
||||
sea_object, descr = json.load(fp)
|
||||
remote_paths = remote_paths.split()
|
||||
if remote_paths:
|
||||
result = []
|
||||
for rpath in remote_paths:
|
||||
include = True
|
||||
for paramdesc in descr:
|
||||
path = paramdesc['path']
|
||||
if paramdesc.get('visibility', 1) > visibility_level:
|
||||
if not path.endswith('is_running'):
|
||||
|
||||
single_module = cfgdict.pop('single_module', None)
|
||||
if single_module:
|
||||
sea_object, base, paramdesc = extra_modules[single_module]
|
||||
params = [paramdesc]
|
||||
paramdesc['key'] = 'value'
|
||||
if issubclass(cls, SeaWritable):
|
||||
if paramdesc.get('readonly', True):
|
||||
raise ConfigError('%s is not writable' % sea_object)
|
||||
targetdesc = dict(paramdesc, key='target')
|
||||
params.append(targetdesc)
|
||||
paramdesc['readonly'] = True
|
||||
# print('SINGLE %s/%s %s %r' % (base, paramdesc['path'], cls.__name__, params))
|
||||
extra_module_set = ()
|
||||
if 'description' not in cfgdict:
|
||||
cfgdict['description'] = '%s@%s' % (single_module, json_file)
|
||||
else:
|
||||
sea_object = cfgdict.pop('sea_object')
|
||||
rel_paths = cfgdict.pop('rel_paths', '.')
|
||||
if 'description' not in cfgdict:
|
||||
cfgdict['description'] = '%s@%s%s' % (
|
||||
name, json_file, '' if rel_paths == '.' else ' (rel_paths=%s)' % rel_paths)
|
||||
|
||||
# with open(join(seaconfdir, json_file + '.json')) as fp:
|
||||
# sea_object, descr = json.load(fp)
|
||||
with open(join(seaconfdir, json_file)) as fp:
|
||||
descr = json.load(fp)[sea_object]
|
||||
if rel_paths == '*' or not rel_paths:
|
||||
# take all
|
||||
main = descr['params'][0]
|
||||
# assert main['path'] == '' # TODO: check cases where this fails
|
||||
main['key'] = 'value'
|
||||
else:
|
||||
# filter by relative paths
|
||||
rel_paths = rel_paths.split()
|
||||
result = []
|
||||
for rpath in rel_paths:
|
||||
include = True
|
||||
for paramdesc in descr['params']:
|
||||
path = paramdesc['path']
|
||||
if paramdesc.get('visibility', 1) > visibility_level and not path.endswith('is_running'):
|
||||
continue
|
||||
sub = path.split('/', 1)
|
||||
if rpath == '.': # take all except subpaths with readonly node at top
|
||||
if len(sub) == 1:
|
||||
include = paramdesc.get('kids', 0) == 0 or not paramdesc.get('readonly', True)
|
||||
if include or path == '':
|
||||
sub = path.split('/', 1)
|
||||
if rpath == '.': # take all except subpaths with readonly node at top
|
||||
if len(sub) == 1:
|
||||
include = paramdesc.get('kids', 0) == 0 or not paramdesc.get('readonly', True)
|
||||
if include or path == '':
|
||||
result.append(paramdesc)
|
||||
elif sub[0] == rpath:
|
||||
result.append(paramdesc)
|
||||
elif sub[0] == rpath:
|
||||
result.append(paramdesc)
|
||||
descr = result
|
||||
main = remote_paths[0]
|
||||
if main == '.':
|
||||
main = ''
|
||||
else: # take all
|
||||
main = ''
|
||||
descr['params'] = result
|
||||
rel0 = '' if rel_paths[0] == '.' else rel_paths[0]
|
||||
if result[0]['path'] == rel0:
|
||||
result[0]['key'] = 'value'
|
||||
else:
|
||||
logger.error('%s: no value found', name)
|
||||
# logger.info('PARAMS %s %r', name, result)
|
||||
base = descr['base']
|
||||
params = descr['params']
|
||||
extra_module_set = cfgdict.pop('extra_modules', ())
|
||||
if extra_module_set:
|
||||
extra_module_set = set(extra_module_set.replace(',', ' ').split())
|
||||
path2param = {}
|
||||
attributes = dict(sea_object=sea_object, path2param=path2param)
|
||||
for paramdesc in descr:
|
||||
|
||||
# some guesses about visibility (may be overriden in *.cfg):
|
||||
if sea_object in ('table', 'cc'):
|
||||
attributes['visibility'] = 2
|
||||
elif base.count('/') > 1:
|
||||
attributes['visibility'] = 2
|
||||
for paramdesc in params:
|
||||
path = paramdesc['path']
|
||||
readonly = paramdesc.get('readonly', True)
|
||||
dt = get_datatype(paramdesc)
|
||||
@ -330,9 +442,8 @@ class SeaModule(Module):
|
||||
if kwds['datatype'] is None:
|
||||
kwds.update(visibility=3, default='', datatype=StringType())
|
||||
pathlist = path.split('/') if path else []
|
||||
if path == main:
|
||||
key = 'value'
|
||||
else:
|
||||
key = paramdesc.get('key') # will be None, 'value' or 'target'
|
||||
if key is None:
|
||||
if len(pathlist) > 0:
|
||||
if len(pathlist) == 1:
|
||||
kwds['group'] = 'more'
|
||||
@ -346,7 +457,6 @@ class SeaModule(Module):
|
||||
break
|
||||
if key == 'is_running':
|
||||
kwds['export'] = False
|
||||
path2param['/'.join(['', sea_object] + pathlist)] = (name, key)
|
||||
if key in cls.accessibles:
|
||||
if key == 'target':
|
||||
kwds['readonly'] = False
|
||||
@ -355,32 +465,41 @@ class SeaModule(Module):
|
||||
else:
|
||||
pobj = Parameter(**kwds)
|
||||
datatype = pobj.datatype
|
||||
hdbpath = '/'.join([base] + pathlist)
|
||||
if key in extra_module_set:
|
||||
extra_modules[name + '.' + key] = sea_object, base, paramdesc
|
||||
continue # skip this parameter
|
||||
path2param[hdbpath] = (name, key)
|
||||
# logger.info('PARAM %s %s %s', hdbpath, name, key)
|
||||
attributes[key] = pobj
|
||||
if not hasattr(cls, 'read_' + key):
|
||||
def rfunc(self, cmd='hval /sics/%s/%s' % (sea_object, path)):
|
||||
print('READ', cmd)
|
||||
reply = self._iodev.request(cmd)
|
||||
print('REPLY', reply)
|
||||
if reply.startswith('ERROR: '):
|
||||
raise HardwareError(reply.split(' ', 1)[1])
|
||||
try:
|
||||
reply = float(reply)
|
||||
except ValueError:
|
||||
pass
|
||||
# an updateEvent will be handled before above returns
|
||||
return reply
|
||||
# if hasattr(cls, 'read_' + key):
|
||||
# print('override %s.read_%s' % (cls.__name__, key))
|
||||
|
||||
attributes['read_' + key] = rfunc
|
||||
def rfunc(self, cmd='hval %s/%s' % (base, path)):
|
||||
print('READ', cmd)
|
||||
reply = self._iodev.query(cmd)
|
||||
print('REPLY', reply)
|
||||
try:
|
||||
reply = float(reply)
|
||||
except ValueError:
|
||||
pass
|
||||
# an updateEvent will be handled before above returns
|
||||
return reply
|
||||
|
||||
attributes['read_' + key] = rfunc
|
||||
|
||||
if not readonly:
|
||||
if hasattr(cls, 'write_' + key):
|
||||
print('override %s.write_%s' % (cls.__name__, key))
|
||||
|
||||
if not (readonly or hasattr(cls, 'write_' + key)):
|
||||
# pylint wrongly complains 'Cell variable pobj defined in loop'
|
||||
# pylint: disable=cell-var-from-loop
|
||||
def wfunc(self, value, datatype=datatype, command=paramdesc['cmd']):
|
||||
# TODO: convert to valid tcl data
|
||||
cmd = "%s %s" % (command, datatype.export_value(value))
|
||||
print('WRITE', cmd)
|
||||
self._iodev.request(cmd)
|
||||
# an updateEvent will be handled before above returns
|
||||
value = datatype.export_value(value)
|
||||
if isinstance(value, bool):
|
||||
value = int(value)
|
||||
# TODO: check if more has to be done for valid tcl data (strings?)
|
||||
cmd = "%s %s" % (command, value)
|
||||
self._iodev.query(cmd)
|
||||
print('WRITE %s' % cmd)
|
||||
return Done
|
||||
|
||||
attributes['write_' + key] = wfunc
|
||||
@ -393,18 +512,20 @@ class SeaModule(Module):
|
||||
attributes[pname] = pobj.override(poll=False, needscfg=False)
|
||||
|
||||
classname = '%s_%s' % (cls.__name__, sea_object)
|
||||
# print(name, attributes)
|
||||
newcls = type(classname, (cls,), attributes)
|
||||
return Module.__new__(newcls)
|
||||
|
||||
# def __init__(self, name, logger, cfgdict, dispatcher):
|
||||
# Module.__init__(self, name, logger, cfgdict, dispatcher)
|
||||
|
||||
def updateEvent(self, module, parameter, value, timestamp, readerror):
|
||||
upd = getattr(self, 'update_' + parameter, None)
|
||||
if upd:
|
||||
upd(value, timestamp, readerror)
|
||||
return
|
||||
pobj = self.parameters[parameter]
|
||||
try:
|
||||
pobj = self.parameters[parameter]
|
||||
except KeyError:
|
||||
print(self.name, parameter)
|
||||
raise
|
||||
pobj.timestamp = timestamp
|
||||
#if not pobj.readonly and pobj.value != value:
|
||||
# print('UPDATE', module, parameter, value)
|
||||
@ -418,9 +539,6 @@ class SeaModule(Module):
|
||||
pobj.readerror = readerror
|
||||
self.DISPATCHER.broadcast_event(make_update(self.name, pobj))
|
||||
|
||||
#def earlyInit(self):
|
||||
# self.path2param = {k % subst: v for k, v in self.path2param.items()}
|
||||
|
||||
def initModule(self):
|
||||
self._iodev.register_obj(self, self.sea_object)
|
||||
super().initModule()
|
||||
@ -441,25 +559,26 @@ class SeaReadable(SeaModule, Readable):
|
||||
|
||||
|
||||
class SeaWritable(SeaModule, Writable):
|
||||
pass
|
||||
def read_value(self):
|
||||
return self.target
|
||||
|
||||
def update_target(self, value, timestamp, readerror):
|
||||
if not readerror:
|
||||
self.value = value
|
||||
|
||||
|
||||
class SeaDrivable(SeaModule, Drivable):
|
||||
_sea_status = ''
|
||||
_is_running = 0
|
||||
|
||||
#def buildParams(self, cfgdict, name):
|
||||
# # insert here special treatment for status and target
|
||||
# super().buildParams(cfgdict)
|
||||
|
||||
def read_status(self):
|
||||
return self.status
|
||||
|
||||
def read_target(self):
|
||||
return self.target
|
||||
# def read_target(self):
|
||||
# return self.target
|
||||
|
||||
def write_target(self, value):
|
||||
self._iodev.request('run %s %s' % (self.sea_object, value))
|
||||
self._iodev.query('run %s %s' % (self.sea_object, value))
|
||||
#self.status = [self.Status.BUSY, 'driving']
|
||||
return value
|
||||
|
||||
@ -484,3 +603,6 @@ class SeaDrivable(SeaModule, Drivable):
|
||||
def updateTarget(self, module, parameter, value, timestamp, readerror):
|
||||
if value is not None:
|
||||
self.target = value
|
||||
|
||||
def stop(self):
|
||||
self._iodev.query('%s is_running 0' % self.sea_object)
|
||||
|
@ -74,13 +74,18 @@ class Parser340(StdParser):
|
||||
def parse(self, line):
|
||||
"""scan header for data format"""
|
||||
if self.header:
|
||||
if line.startswith("Data Format"):
|
||||
dataformat = line.split(":")[1].strip()[0]
|
||||
if dataformat == '4':
|
||||
self.logx, self.logy = True, False # logOhm
|
||||
elif dataformat == '5':
|
||||
self.logx, self.logy = True, True # logOhm, logK
|
||||
elif line.startswith("No."):
|
||||
key, _, value = line.partition(':')
|
||||
if value: # this is a header line, as it contains ':'
|
||||
value = value.split()[0]
|
||||
key = ''.join(key.split()).lower()
|
||||
if key == 'dataformat':
|
||||
if value == '4':
|
||||
self.logx, self.logy = True, False # logOhm
|
||||
elif value == '5':
|
||||
self.logx, self.logy = True, True # logOhm, logK
|
||||
elif value not in ('1', '2', '3'):
|
||||
raise ValueError('invalid Data Format')
|
||||
elif 'No.' in line:
|
||||
self.header = False
|
||||
return
|
||||
super().parse(line)
|
||||
@ -134,13 +139,26 @@ class CalCurve:
|
||||
cls, args = KINDS.get(kind, (StdParser, {}))
|
||||
args.update(optargs)
|
||||
|
||||
parser = cls(**args)
|
||||
with open(filename) as f:
|
||||
for line in f:
|
||||
parser.parse(line)
|
||||
try:
|
||||
parser = cls(**args)
|
||||
with open(filename) as f:
|
||||
for line in f:
|
||||
parser.parse(line)
|
||||
except Exception as e:
|
||||
raise ValueError('calib curve %s: %s' % (calibspec, e))
|
||||
self.convert_x = nplog if parser.logx else linear
|
||||
self.convert_y = npexp if parser.logy else linear
|
||||
self.spline = splrep(np.asarray(parser.xdata), np.asarray(parser.ydata), s=0)
|
||||
x = np.asarray(parser.xdata)
|
||||
y = np.asarray(parser.ydata)
|
||||
if np.all(x[:-1] > x[1:]): # all decreasing
|
||||
x = np.flip(x)
|
||||
y = np.flip(y)
|
||||
elif np.any(x[:-1] >= x[1:]): # some not increasing
|
||||
raise ValueError('calib curve %s is not monotonic' % calibspec)
|
||||
try:
|
||||
self.spline = splrep(x, y, s=0, k=min(3, len(x) - 1))
|
||||
except (ValueError, TypeError):
|
||||
raise ValueError('invalid calib curve %s' % calibspec)
|
||||
|
||||
def __call__(self, value):
|
||||
"""convert value
|
||||
@ -161,12 +179,18 @@ class Sensor(Readable):
|
||||
status = Parameter(default=(Readable.Status.ERROR, 'unintialized'))
|
||||
|
||||
pollerClass = None
|
||||
description = 'a calibrated sensor value'
|
||||
_value_error = None
|
||||
|
||||
def checkProperties(self):
|
||||
if 'description' not in self.propertyValues:
|
||||
self.description = '_' # avoid complaining about missing description
|
||||
super().checkProperties()
|
||||
|
||||
def initModule(self):
|
||||
self._rawsensor.registerCallbacks(self, ['status']) # auto update status
|
||||
self._calib = CalCurve(self.calib)
|
||||
if self.description == '_':
|
||||
self.description = '%r calibrated with curve %r' % (self.rawsensor, self.calib)
|
||||
|
||||
def write_calib(self, value):
|
||||
self._calib = CalCurve(value)
|
||||
|
@ -38,12 +38,14 @@ class TestCmd(Module):
|
||||
result=StringType())
|
||||
def arg(self, *arg):
|
||||
"""5 args"""
|
||||
self.tuple = arg
|
||||
return repr(arg)
|
||||
|
||||
@Command(argument=StructOf(a=StringType(), b=FloatRange(), c=BoolType(), optional=['b']),
|
||||
result=StringType())
|
||||
def keyed(self, **arg):
|
||||
"""keyworded arg"""
|
||||
self.struct = arg
|
||||
return repr(arg)
|
||||
|
||||
@Command(argument=FloatRange(), result=StringType())
|
||||
|
420
secop_psi/trinamic.py
Normal file
420
secop_psi/trinamic.py
Normal file
@ -0,0 +1,420 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# *****************************************************************************
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Module authors:
|
||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
"""drivers for trinamic PD-1161 motors"""
|
||||
|
||||
import time
|
||||
import struct
|
||||
from math import log10
|
||||
|
||||
from secop.core import BoolType, Command, EnumType, FloatRange, IntRange, \
|
||||
HasIodev, Parameter, Property, Drivable, TupleOf, Done, PersistentMixin, PersistentParam
|
||||
from secop.bytesio import BytesIO
|
||||
from secop.errors import CommunicationFailedError, HardwareError, BadValueError, IsBusyError
|
||||
|
||||
|
||||
MOTOR_STOP = 3
|
||||
MOVE = 4
|
||||
SET_AXIS_PAR = 5
|
||||
GET_AXIS_PAR = 6
|
||||
SET_GLOB_PAR = 9
|
||||
GET_GLOB_PAR = 10
|
||||
# STORE_GLOB_PAR = 11
|
||||
|
||||
BAUDRATES = [9600, 0, 19200, 0, 38400, 57600, 0, 115200]
|
||||
|
||||
FULL_STEP = 1.8
|
||||
ANGLE_SCALE = FULL_STEP/256
|
||||
# assume factory settings for pulse and ramp divisors:
|
||||
SPEED_SCALE = 1E6 / 2 ** 15 * ANGLE_SCALE
|
||||
MAX_SPEED = 2047 * SPEED_SCALE
|
||||
ACCEL_SCALE = 1E12 / 2 ** 31 * ANGLE_SCALE
|
||||
MAX_ACCEL = 2047 * ACCEL_SCALE
|
||||
CURRENT_SCALE = 2.8/250
|
||||
ENCODER_RESOLUTION = 0.4 # 365 / 1024, rounded up
|
||||
|
||||
|
||||
class HwParam(PersistentParam):
|
||||
adr = Property('parameter address', IntRange(0, 255), export=False)
|
||||
scale = Property('scale factor (physical value / unit)', FloatRange(), export=False)
|
||||
|
||||
def __init__(self, description, datatype, adr, scale=1, poll=True,
|
||||
readonly=True, persistent=None, **kwds):
|
||||
"""hardware parameter"""
|
||||
if persistent is None:
|
||||
persistent = not readonly
|
||||
if isinstance(datatype, FloatRange) and datatype.fmtstr == '%g':
|
||||
datatype.fmtstr = '%%.%df' % max(0, 1 - int(log10(scale) + 0.01))
|
||||
super().__init__(description, datatype, poll=poll, adr=adr, scale=scale,
|
||||
persistent=persistent, readonly=readonly, **kwds)
|
||||
|
||||
def copy(self):
|
||||
res = HwParam(self.description, self.datatype.copy(), self.adr)
|
||||
res.name = self.name
|
||||
res.init(self.propertyValues)
|
||||
return res
|
||||
|
||||
|
||||
class Motor(PersistentMixin, HasIodev, Drivable):
|
||||
address = Property('module address', IntRange(0, 255), default=1)
|
||||
|
||||
# limit_pin_mask = Property('input pin mask for lower/upper limit switch',
|
||||
# TupleOf(IntRange(0, 15), IntRange(0, 15)),
|
||||
# default=(8, 0))
|
||||
|
||||
value = Parameter('motor position', FloatRange(unit='deg', fmtstr='%.3f'))
|
||||
zero = PersistentParam('zero point', FloatRange(unit='$'), readonly=False, default=0)
|
||||
encoder = HwParam('encoder reading', FloatRange(unit='$', fmtstr='%.1f'),
|
||||
209, ANGLE_SCALE, readonly=True, initwrite=False, persistent=True)
|
||||
steppos = HwParam('position from motor steps', FloatRange(unit='$'),
|
||||
1, ANGLE_SCALE, readonly=True, initwrite=False)
|
||||
target = Parameter('_', FloatRange(unit='$'), default=0)
|
||||
|
||||
movelimit = Parameter('max. angle to drive in one go', FloatRange(unit='$'),
|
||||
readonly=False, default=360, group='more')
|
||||
tolerance = Parameter('positioning tolerance', FloatRange(unit='$'),
|
||||
readonly=False, default=0.9)
|
||||
encoder_tolerance = HwParam('the allowed deviation between steppos and encoder\n\nmust be > tolerance',
|
||||
FloatRange(0, 360., unit='$'),
|
||||
212, ANGLE_SCALE, readonly=False, group='more')
|
||||
speed = HwParam('max. speed', FloatRange(0, MAX_SPEED, unit='$/sec'),
|
||||
4, SPEED_SCALE, readonly=False, group='more')
|
||||
minspeed = HwParam('min. speed', FloatRange(0, MAX_SPEED, unit='$/sec'),
|
||||
130, SPEED_SCALE, readonly=False, default=SPEED_SCALE, group='motorparam')
|
||||
currentspeed = HwParam('current speed', FloatRange(-MAX_SPEED, MAX_SPEED, unit='$/sec'),
|
||||
3, SPEED_SCALE, readonly=True, group='motorparam')
|
||||
maxcurrent = HwParam('_', FloatRange(0, 2.8, unit='A'),
|
||||
6, CURRENT_SCALE, readonly=False, group='motorparam')
|
||||
standby_current = HwParam('_', FloatRange(0, 2.8, unit='A'),
|
||||
7, CURRENT_SCALE, readonly=False, group='motorparam')
|
||||
acceleration = HwParam('_', FloatRange(4.6 * ACCEL_SCALE, MAX_ACCEL, unit='deg/s^2'),
|
||||
5, ACCEL_SCALE, readonly=False, group='motorparam')
|
||||
target_reached = HwParam('_', BoolType(), 8, group='hwstatus')
|
||||
move_status = HwParam('_', IntRange(0, 3),
|
||||
207, readonly=True, group='hwstatus')
|
||||
error_bits = HwParam('_', IntRange(0, 255),
|
||||
208, readonly=True, group='hwstatus')
|
||||
# the doc says msec, but I believe the scale is 10 msec
|
||||
free_wheeling = HwParam('_', FloatRange(0, 60., unit='sec'),
|
||||
204, 0.01, default=0.1, readonly=False, group='motorparam')
|
||||
power_down_delay = HwParam('_', FloatRange(0, 60., unit='sec'),
|
||||
214, 0.01, default=0.1, readonly=False, group='motorparam')
|
||||
baudrate = Parameter('_', EnumType({'%d' % v: i for i, v in enumerate(BAUDRATES)}),
|
||||
readonly=False, default=0, poll=True, visibility=3, group='more')
|
||||
pollinterval = Parameter(group='more')
|
||||
|
||||
|
||||
iodevClass = BytesIO
|
||||
fast_pollfactor = 0.001 # poll as fast as possible when busy
|
||||
_started = 0
|
||||
_calcTimeout = True
|
||||
_need_reset = None
|
||||
|
||||
def comm(self, cmd, adr, value=0, bank=0):
|
||||
"""set or get a parameter
|
||||
|
||||
:param adr: parameter number
|
||||
:param cmd: SET command (in the GET case, 1 is added to this)
|
||||
:param bank: the bank
|
||||
:param value: if given, the parameter is written, else it is returned
|
||||
:return: the returned value
|
||||
"""
|
||||
if self._calcTimeout:
|
||||
self._calcTimeout = False
|
||||
baudrate = getattr(self._iodev._conn.connection, 'baudrate', None)
|
||||
if baudrate:
|
||||
if baudrate not in BAUDRATES:
|
||||
raise CommunicationFailedError('unsupported baud rate: %d' % baudrate)
|
||||
self._iodev.timeout = 0.03 + 200 / baudrate
|
||||
|
||||
exc = None
|
||||
for itry in range(3,0,-1):
|
||||
byt = struct.pack('>BBBBi', self.address, cmd, adr, bank, round(value))
|
||||
try:
|
||||
reply = self._iodev.communicate(byt + bytes([sum(byt) & 0xff]), 9)
|
||||
if sum(reply[:-1]) & 0xff != reply[-1]:
|
||||
raise CommunicationFailedError('checksum error')
|
||||
except Exception as e:
|
||||
if itry == 1:
|
||||
raise
|
||||
exc = e
|
||||
continue
|
||||
break
|
||||
if exc:
|
||||
self.log.warning('tried %d times after %s', itry, exc)
|
||||
radr, modadr, status, rcmd, result = struct.unpack('>BBBBix', reply)
|
||||
if status != 100:
|
||||
self.log.warning('bad status from cmd %r %s: %d', cmd, adr, status)
|
||||
if radr != 2 or modadr != self.address or cmd != rcmd:
|
||||
raise CommunicationFailedError('bad reply %r to command %s %d' % (reply, cmd, adr))
|
||||
return result
|
||||
|
||||
def get(self, pname, **kwds):
|
||||
"""get parameter"""
|
||||
pobj = self.parameters[pname]
|
||||
value = self.comm(GET_AXIS_PAR, pobj.adr, **kwds)
|
||||
# do not apply scale when 1 (datatype might not be float)
|
||||
return value if pobj.scale == 1 else value * pobj.scale
|
||||
|
||||
def set(self, pname, value, check=True, **kwds):
|
||||
"""set parameter and check result"""
|
||||
pobj = self.parameters[pname]
|
||||
scale = pobj.scale
|
||||
rawvalue = round(value / scale)
|
||||
self.comm(SET_AXIS_PAR, pobj.adr, rawvalue, **kwds)
|
||||
if check:
|
||||
result = self.comm(GET_AXIS_PAR, pobj.adr, **kwds)
|
||||
if result != rawvalue:
|
||||
raise HardwareError('result does not match %d != %d' % (result, rawvalue))
|
||||
value = result * scale
|
||||
return value
|
||||
|
||||
def startModule(self, started_callback):
|
||||
# get encoder value from motor. at this stage self.encoder contains the persistent value
|
||||
encoder = self.get('encoder')
|
||||
encoder += self.zero
|
||||
self.fix_encoder(encoder)
|
||||
super().startModule(started_callback)
|
||||
|
||||
def fix_encoder(self, encoder_from_hw):
|
||||
"""fix encoder value
|
||||
|
||||
:param encoder_from_hw: the encoder value read from the HW
|
||||
|
||||
self.encoder is assumed to contain the last known (persistent) value
|
||||
if encoder has not changed modulo 360, adjust by an integer multiple of 360
|
||||
set status to error when encoder has changed be more than encoder_tolerance
|
||||
"""
|
||||
# calculate nearest, most probable value
|
||||
adjusted_encoder = encoder_from_hw + round((self.encoder - encoder_from_hw) / 360.) * 360
|
||||
if abs(self.encoder - adjusted_encoder) >= self.encoder_tolerance:
|
||||
# encoder module0 360 has changed
|
||||
self.log.error('saved encoder value (%.2f) does not match reading (%.2f %.2f)', self.encoder, encoder_from_hw, adjusted_encoder)
|
||||
if adjusted_encoder != encoder_from_hw:
|
||||
self.log.info('take next closest encoder value (%.2f)' % adjusted_encoder)
|
||||
self._need_reset = True
|
||||
self.status = self.Status.ERROR, 'saved encoder value does not match reading'
|
||||
self.set('encoder', adjusted_encoder - self.zero, check=False)
|
||||
|
||||
def read_value(self):
|
||||
encoder = self.read_encoder()
|
||||
steppos = self.read_steppos()
|
||||
initialized = self.comm(GET_GLOB_PAR, 255, bank=2)
|
||||
if initialized: # no power loss
|
||||
self.saveParameters()
|
||||
print('SAVED', self.persistentData)
|
||||
else: # just powered up
|
||||
# get persistent values
|
||||
writeDict = self.loadParameters()
|
||||
self.log.info('set to previous saved values %r', writeDict)
|
||||
# self.encoder now contains the last known (persistent) value
|
||||
if self._need_reset is None:
|
||||
if self.status[0] == self.Status.IDLE:
|
||||
# server started, power cycled and encoder value matches last one
|
||||
self.reset()
|
||||
else:
|
||||
self.fix_encoder(encoder)
|
||||
self._need_reset = True
|
||||
self.status = self.Status.ERROR, 'power loss'
|
||||
# or should we just fix instead of error status?
|
||||
# self.set('steppos', self.steppos - self.zero, check=False)
|
||||
self.comm(SET_GLOB_PAR, 255, 1, bank=2) # set initialized flag
|
||||
self._started = 0
|
||||
|
||||
return encoder if abs(encoder - steppos) > self.tolerance else steppos
|
||||
|
||||
def read_status(self):
|
||||
oldpos = self.steppos
|
||||
self.read_value() # make sure encoder and steppos are fresh
|
||||
if not self._started:
|
||||
if abs(self.encoder - self.steppos) > self.encoder_tolerance:
|
||||
self._need_reset = True
|
||||
if self.status[0] != self.Status.ERROR:
|
||||
self.log.error('encoder (%.2f) does not match internal pos (%.2f)', self.encoder, self.steppos)
|
||||
return self.Status.ERROR, 'encoder does not match internal pos'
|
||||
return self.status
|
||||
now = time.time()
|
||||
if oldpos != self.steppos or not (self.read_target_reached() or self.read_move_status()
|
||||
or self.read_error_bits()):
|
||||
return self.Status.BUSY, 'moving'
|
||||
diff = self.target - self.encoder
|
||||
if abs(diff) <= self.tolerance:
|
||||
self._started = 0
|
||||
return self.Status.IDLE, ''
|
||||
#if (abs(self.target - self.steppos) < self.tolerance and
|
||||
# abs(self.encoder - self.steppos) < self.encoder_tolerance):
|
||||
# self._try_count += 1
|
||||
# if self._try_count < 3:
|
||||
# # occasionaly, two attempts are needed, as steppos and encoder might have been
|
||||
# # off by 1-2 full steps before moving
|
||||
# self.fix_steppos(self.tolerance, self.target)
|
||||
# self.log.warning('try move again')
|
||||
# return self.Status.BUSY, 'try again'
|
||||
self.log.error('out of tolerance by %.3g', diff)
|
||||
self._started = 0
|
||||
return self.Status.ERROR, 'out of tolerance'
|
||||
|
||||
def write_target(self, target):
|
||||
self.read_value() # make sure encoder and steppos are fresh
|
||||
if abs(target - self.encoder) > self.movelimit:
|
||||
raise BadValueError('can not move more than %s deg' % self.movelimit)
|
||||
diff = self.encoder - self.steppos
|
||||
if self._need_reset:
|
||||
raise HardwareError('need reset (%s)' % self.status[1])
|
||||
if abs(diff) > self.tolerance:
|
||||
if abs(diff) > self.encoder_tolerance:
|
||||
self._need_reset = True
|
||||
self.status = self.Status.ERROR, 'encoder does not match internal pos'
|
||||
raise HardwareError('need reset (encoder does not match internal pos)')
|
||||
self.set('steppos', self.encoder - self.zero)
|
||||
# self.fix_steppos(self.encoder_tolerance)
|
||||
self._started = time.time()
|
||||
# self._try_count = 0
|
||||
self.log.info('move to %.1f', target)
|
||||
self.comm(MOVE, 0, (target - self.zero) / ANGLE_SCALE)
|
||||
self.status = self.Status.BUSY, 'changed target'
|
||||
return target
|
||||
|
||||
def write_zero(self, value):
|
||||
diff = value - self.zero
|
||||
self.encoder += diff
|
||||
self.steppos += diff
|
||||
self.value += diff
|
||||
return value
|
||||
|
||||
def read_encoder(self):
|
||||
return self.get('encoder') + self.zero
|
||||
|
||||
def read_steppos(self):
|
||||
return self.get('steppos') + self.zero
|
||||
|
||||
def read_encoder_tolerance(self):
|
||||
return self.get('encoder_tolerance')
|
||||
|
||||
def write_encoder_tolerance(self, value):
|
||||
return self.set('encoder_tolerance', value)
|
||||
|
||||
def read_target_reached(self):
|
||||
return self.get('target_reached')
|
||||
|
||||
def read_speed(self):
|
||||
return self.get('speed')
|
||||
|
||||
def write_speed(self, value):
|
||||
return self.set('speed', value)
|
||||
|
||||
def read_minspeed(self):
|
||||
return self.get('minspeed')
|
||||
|
||||
def write_minspeed(self, value):
|
||||
return self.set('minspeed', value)
|
||||
|
||||
def read_currentspeed(self):
|
||||
return self.get('currentspeed')
|
||||
|
||||
def read_acceleration(self):
|
||||
return self.get('acceleration')
|
||||
|
||||
def write_acceleration(self, value):
|
||||
return self.set('acceleration', value)
|
||||
|
||||
def read_maxcurrent(self):
|
||||
return self.get('maxcurrent')
|
||||
|
||||
def write_maxcurrent(self, value):
|
||||
return self.set('maxcurrent', value)
|
||||
|
||||
def read_standby_current(self):
|
||||
return self.get('standby_current')
|
||||
|
||||
def write_standby_current(self, value):
|
||||
return self.set('standby_current', value)
|
||||
|
||||
def read_free_wheeling(self):
|
||||
return self.get('free_wheeling')
|
||||
|
||||
def write_free_wheeling(self, value):
|
||||
return self.set('free_wheeling', value)
|
||||
|
||||
def read_power_down_delay(self):
|
||||
return self.get('power_down_delay')
|
||||
|
||||
def write_power_down_delay(self, value):
|
||||
return self.set('power_down_delay', value)
|
||||
|
||||
def read_move_status(self):
|
||||
return self.get('move_status')
|
||||
|
||||
def read_error_bits(self):
|
||||
return self.get('error_bits')
|
||||
|
||||
@Command(FloatRange())
|
||||
def set_zero(self, value):
|
||||
self.write_zero(value - self.read_value())
|
||||
|
||||
def read_baudrate(self):
|
||||
return self.comm(GET_GLOB_PAR, 65)
|
||||
|
||||
def write_baudrate(self, value):
|
||||
self.comm(SET_GLOB_PAR, 65, int(value))
|
||||
|
||||
@Command()
|
||||
def reset(self):
|
||||
"""set steppos to encoder value, if not within tolerance"""
|
||||
if self._started:
|
||||
raise IsBusyError('can not reset while moving')
|
||||
tol = ENCODER_RESOLUTION
|
||||
for itry in range(10):
|
||||
diff = self.read_encoder() - self.read_steppos()
|
||||
if abs(diff) <= tol:
|
||||
self._need_reset = False
|
||||
self.status = self.Status.IDLE, 'ok'
|
||||
return
|
||||
self.set('steppos', self.encoder - self.zero, check=False)
|
||||
self.comm(MOVE, 0, (self.encoder - self.zero) / ANGLE_SCALE)
|
||||
time.sleep(0.1)
|
||||
if itry > 5:
|
||||
tol = self.tolerance
|
||||
self.status = self.Status.ERROR, 'reset failed'
|
||||
return
|
||||
|
||||
@Command()
|
||||
def stop(self):
|
||||
self.comm(MOTOR_STOP, 0)
|
||||
self.status = self.Status.IDLE, 'stopped'
|
||||
self._started = 0
|
||||
|
||||
@Command()
|
||||
def step(self):
|
||||
self.comm(MOVE, 1, FULL_STEP / ANGLE_SCALE)
|
||||
|
||||
@Command()
|
||||
def back(self):
|
||||
self.comm(MOVE, 1, - FULL_STEP / ANGLE_SCALE)
|
||||
|
||||
@Command(IntRange(), result=IntRange())
|
||||
def get_axis_par(self, adr):
|
||||
return self.comm(GET_AXIS_PAR, adr)
|
||||
|
||||
@Command((IntRange(), FloatRange()), result=IntRange())
|
||||
def set_axis_par(self, adr, value):
|
||||
return self.comm(SET_AXIS_PAR, adr, value)
|
Reference in New Issue
Block a user