Merge branch 'wip' of gitlab.psi.ch-samenv:samenv/frappy into wip

This commit is contained in:
zolliker 2023-08-17 14:10:29 +02:00
commit c4a39306e4
32 changed files with 704 additions and 152 deletions

View File

@ -1,18 +1,16 @@
Node('cfg/sea/camea-be-filter.cfg',
'Camea Be-Filter',
interface='5000',
name='camea-be-filter',
)
Mod('sea_addons',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'addons sea connection for camea-be-filter.addon',
config='camea-be-filter.addon',
service='addons',
)
Mod('t_be_filter',
'secop_psi.sea.SeaReadable',
'frappy_psi.sea.SeaReadable',
io='sea_addons',
sea_object='t_be_filter',
)

View File

@ -9,8 +9,9 @@ Mod('sea_main',
)
Mod('tt',
'frappy_psi.sea.SeaDrivable', '',
io = 'sea_main',
sea_object = 'tt',
io='sea_main',
sea_object='tt',
rel_paths=['.', 'tm'],
)
Mod('ts',
'frappy_psi.sea.SeaReadable', '',

View File

@ -1,39 +1,37 @@
Node('cfg/main/ccrpe_lowT.cfg',
'4 K closed cycle cryostat (PE cell)',
interface='5000',
name='ccrpe_lowT',
)
Mod('sea_main',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'main sea connection for ccrpe_lowT.config',
config='ccrpe_lowT.config',
service='main',
)
Mod('tt',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='tt',
rel_paths=['.', 'tm'],
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tt',
rel_paths=['ts'],
)
Mod('te',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tt',
rel_paths=['te'],
)
Mod('warmup',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='warmup',
)

View File

@ -1,6 +1,5 @@
Node('cyrosim.psi.ch',
'cryo simulation (similar ppms simulation)',
interface='tcp://5000',
)
Mod('tt',

View File

@ -12,7 +12,7 @@ Mod('th',
meaning = ('temperature', 10),
io = 'sea_main',
sea_object = 'th',
extra_modules='t2',
extra_modules=['t2'],
)
Mod('ts',
'frappy_psi.sea.SeaReadable', '',

View File

@ -1,24 +1,22 @@
Node('cfg/main/ill3.cfg',
'orange cryofurnace with 70 mm sample space (low T)',
interface='5000',
name='ill3',
)
Mod('sea_main',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'main sea connection for ill3.config',
config='ill3.config',
service='main',
)
Mod('tt',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='tt',
)
Mod('cc',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='cc',
extra_modules=['h'],
@ -26,49 +24,49 @@ Mod('cc',
)
Mod('lev',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
single_module='cc.h',
)
Mod('nv',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='nv',
)
Mod('ln2fill',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='ln2fill',
)
Mod('hefill',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='hefill',
)
Mod('hepump',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='hepump',
)
Mod('hemot',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='hemot',
)
Mod('nvflow',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='nvflow',
)
Mod('table',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='table',
)

View File

@ -1,104 +1,102 @@
Node('cfg/main/ma7two.cfg',
'6.8 Tesla horizontal cryomagnet with two heater loops',
interface='5000',
name='ma7two',
)
Mod('sea_main',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'main sea connection for ma7two.config',
config='ma7two.config',
service='main',
)
Mod('tt',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='tt',
)
Mod('cc',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='cc',
)
Mod('nv',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='nv',
)
Mod('hefill',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='hefill',
)
Mod('hepump',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='hepump',
)
Mod('hemot',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_main',
sea_object='hemot',
)
Mod('nvflow',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='nvflow',
)
Mod('ln2fill',
'secop_psi.sea.SeaWritable', '',
'frappy_psi.sea.SeaWritable', '',
io='sea_main',
sea_object='ln2fill',
)
Mod('mf',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='mf',
)
Mod('lev',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='lev',
)
Mod('tcoil1',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tcoil',
rel_paths=['ta'],
)
Mod('tcoil2',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tcoil',
rel_paths=['tb'],
)
Mod('table',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='table',
)
Mod('om_io',
'secop_psi.phytron.PhytronIO',
'frappy_psi.phytron.PhytronIO',
'dom motor IO',
uri='ma7-ts.psi.ch:3007',
)
Mod('om',
'secop_psi.phytron.Motor',
'frappy_psi.phytron.Motor',
'stick rotation',
io='om_io',
encoder_mode='CHECK',

View File

@ -1,6 +1,5 @@
Node('magsim.psi.ch',
'cryo magnet simulation (similar to ppms simulation)',
interface='tcp://5000',
)
Mod('tt',

View File

@ -1,6 +1,5 @@
Node('mb11.psi.ch',
'MB11 11 Tesla - 100 mm cryomagnet',
interface='tcp://5000',
)
Mod('itc1',

View File

@ -1,6 +1,5 @@
Node('mb11.psi.ch',
'MB11 11 Tesla - 100 mm cryomagnet',
interface='tcp://5000',
)
Mod('itc1',

68
cfg/main/ori7_cfg.py Normal file
View File

@ -0,0 +1,68 @@
Node('ori7.config.sea.psi.ch',
'''orange cryostat with 50 mm sample space for ULT''',
)
Mod('sea_main',
'frappy_psi.sea.SeaClient',
'main sea connection for ori7.config',
config = 'ori7.config',
service = 'main',
)
Mod('tt',
'frappy_psi.sea.SeaDrivable', '',
io = 'sea_main',
sea_object = 'tt',
)
Mod('cc',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'cc',
extra_modules=['h'],
visibility=2,
)
Mod('lev',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
single_module='cc.h',
)
Mod('nv',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'nv',
)
Mod('ln2fill',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'ln2fill',
)
Mod('hefill',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'hefill',
)
Mod('hepump',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'hepump',
)
Mod('hemot',
'frappy_psi.sea.SeaDrivable', '',
io = 'sea_main',
sea_object = 'hemot',
)
Mod('nvflow',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'nvflow',
)
Mod('table',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'table',
)

View File

@ -1,18 +1,16 @@
Node('cfg/main/rt.cfg',
'room temperature HRPT (pt1000)',
interface='5000',
name='rt',
)
Mod('sea_main',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'main sea connection for rt.config',
config='rt.config',
service='main',
)
Mod('tt',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
sea_object='tt',
io='sea_main',
)

View File

@ -0,0 +1,12 @@
{"hcp": {"base": "/hcp", "params": [
{"path": "", "type": "float", "kids": 10},
{"path": "send", "type": "text", "readonly": false, "cmd": "hcp send", "visibility": 3},
{"path": "status", "type": "text", "visibility": 3},
{"path": "set", "type": "float", "readonly": false, "cmd": "hcp set"},
{"path": "on", "type": "bool", "readonly": false, "cmd": "hcp on"},
{"path": "setcurrent", "type": "float", "readonly": false, "cmd": "hcp setcurrent"},
{"path": "ramp", "type": "float", "readonly": false, "cmd": "hcp ramp"},
{"path": "rampmode", "type": "enum", "enum": {"no ramp": 0, "always ramp": 1, "ramp up only": 2}, "readonly": false, "cmd": "hcp rampmode"},
{"path": "workset", "type": "float"},
{"path": "current", "type": "float"},
{"path": "currentlimit", "type": "float", "readonly": false, "cmd": "hcp currentlimit"}]}}

View File

@ -1,7 +1,9 @@
{"tt": {"base": "/tt", "params": [{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
{"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": "mainloop", "type": "text", "readonly": false, "cmd": "tt mainloop", "visibility": 3},
{"path": "target", "type": "float"},
{"path": "running", "type": "int"},
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
@ -59,10 +61,30 @@
{"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": "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": "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"},
@ -110,7 +132,7 @@
{"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": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 6}, "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."},
@ -158,7 +180,10 @@
{"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": "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}},
@ -208,7 +233,10 @@
{"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": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "hefill", "kids": 16},
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]},
"hefill": {"base": "/hefill", "params": [
{"path": "", "type": "enum", "enum": {"watching": 0, "filling": 1, "inactive": 2, "manualfill": 3}, "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"},
@ -224,15 +252,22 @@
{"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": "vext", "type": "float"}]},
"hepump": {"base": "/hepump", "params": [
{"path": "", "type": "enum", "enum": {"neodry": 8, "xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 10},
{"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": "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},
{"path": "health", "type": "float"}]},
"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},
@ -258,13 +293,24 @@
{"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": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]},
"nvflow": {"base": "/nvflow", "params": [
{"path": "", "type": "float", "kids": 7},
{"path": "send", "type": "text", "readonly": false, "cmd": "nvflow send", "visibility": 3},
{"path": "status", "type": "text", "visibility": 3},
{"path": "stddev", "type": "float"},
{"path": "nsamples", "type": "int", "readonly": false, "cmd": "nvflow nsamples"},
{"path": "offset", "type": "float", "readonly": false, "cmd": "nvflow offset"},
{"path": "scale", "type": "float", "readonly": false, "cmd": "nvflow scale"},
{"path": "save", "type": "bool", "readonly": false, "cmd": "nvflow save", "description": "unchecked: current calib is not saved. set checked: save calib"}]},
"ln2fill": {"base": "/ln2fill", "params": [
{"path": "", "type": "enum", "enum": {"watching": 0, "filling": 1, "inactive": 2, "manualfill": 3}, "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"},
@ -278,7 +324,10 @@
{"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": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "ln2fill tubecoolingminutes"}]},
"mf": {"base": "/mf", "params": [
{"path": "", "type": "float", "readonly": false, "cmd": "run mf", "kids": 26},
{"path": "persmode", "type": "int", "readonly": false, "cmd": "mf persmode"},
{"path": "perswitch", "type": "int"},
{"path": "nowait", "type": "int", "readonly": false, "cmd": "mf nowait"},
@ -299,16 +348,22 @@
{"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": "is_running", "type": "int", "readonly": false, "cmd": "mf is_running", "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": "status", "type": "text", "readonly": false, "cmd": "mf status", "visibility": 3}]},
"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": "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},
@ -349,7 +404,10 @@
{"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": "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"},
@ -366,6 +424,4 @@
{"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}]}}
{"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 ..."}]}}

310
cfg/sea/ori7.config.json Normal file
View File

@ -0,0 +1,310 @@
{"tt": {"base": "/tt", "params": [
{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 19},
{"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": "mainloop", "type": "text", "readonly": false, "cmd": "tt mainloop", "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", "visibility": 3, "kids": 4},
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "visibility": 3, "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", "visibility": 3},
{"path": "ts/stddev", "type": "float", "visibility": 3},
{"path": "ts/raw", "type": "float", "visibility": 3},
{"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": 6}, "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"}]},
"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": {"watching": 0, "fill": 1, "inactive": 2, "manualfill": 3}, "readonly": false, "cmd": "hefill", "kids": 7},
{"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"},
{"path": "smooth", "type": "float"}]},
"hepump": {"base": "/hepump", "params": [
{"path": "", "type": "enum", "enum": {"neodry": 8, "xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 10},
{"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},
{"path": "health", "type": "float"}]},
"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": "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": "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"}]},
"nvflow": {"base": "/nvflow", "params": [
{"path": "", "type": "float", "kids": 7},
{"path": "send", "type": "text", "readonly": false, "cmd": "nvflow send", "visibility": 3},
{"path": "status", "type": "text", "visibility": 3},
{"path": "stddev", "type": "float"},
{"path": "nsamples", "type": "int", "readonly": false, "cmd": "nvflow nsamples"},
{"path": "offset", "type": "float", "readonly": false, "cmd": "nvflow offset"},
{"path": "scale", "type": "float", "readonly": false, "cmd": "nvflow scale"},
{"path": "save", "type": "bool", "readonly": false, "cmd": "nvflow save", "description": "unchecked: current calib is not saved. set checked: save calib"}]},
"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 ..."}]}}

54
cfg/sea/ori7_cfg.py Normal file
View File

@ -0,0 +1,54 @@
Node('ori7.config.sea.psi.ch',
'''orange cryostat with 50 mm sample space for ULT''',
)
Mod('sea_main',
'frappy_psi.sea.SeaClient',
'main sea connection for ori7.config',
config = 'ori7.config',
service = 'main',
)
Mod('tt',
'frappy_psi.sea.SeaDrivable', '',
io = 'sea_main',
sea_object = 'tt',
)
Mod('cc',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'cc',
)
Mod('nv',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'nv',
)
Mod('ln2fill',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'ln2fill',
)
Mod('hefill',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'hefill',
)
Mod('hepump',
'frappy_psi.sea.SeaWritable', '',
io = 'sea_main',
sea_object = 'hepump',
)
Mod('hemot',
'frappy_psi.sea.SeaDrivable', '',
io = 'sea_main',
sea_object = 'hemot',
)
Mod('nvflow',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'nvflow',
)
Mod('table',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'table',
)

View File

@ -1,6 +1,5 @@
Node('triton.psi.ch',
'triton test',
interface='tcp://5000',
)
Mod('triton',

View File

@ -1,6 +1,5 @@
Node('triton.psi.ch',
'triton test',
interface='tcp://5000',
)
Mod('T_mix',

View File

@ -1,18 +1,16 @@
Node('cfg/stick/hvolt_long.cfg',
'high voltage stick (extended can)',
interface='5000',
name='hvolt_long',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'stick sea connection for hvolt_long.stick',
config='hvolt_long.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='ma6.config.json',
@ -20,7 +18,7 @@ Mod('ts',
)
Mod('hcp',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='hcp',
)

View File

@ -0,0 +1,24 @@
Node('cfg/stick/hvolt_short.cfg',
'high voltage stick',
)
Mod('sea_stick',
'frappy_psi.sea.SeaClient',
'stick sea connection for hvolt_short.stick',
config='hvolt_short.stick',
service='stick',
)
Mod('ts',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='ma10.config.json',
rel_paths=['ts'],
)
Mod('hcp',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='hcp',
)

View File

@ -1,18 +1,16 @@
Node('cfg/stick/ill3stick.cfg',
'ILL3 standard sample stick',
interface='5000',
name='ill3stick',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'SEA stick connection',
config='ill3.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='ill3.config.json',

View File

@ -1,4 +1,3 @@
Node('mb11.stick.sea.psi.ch',
'MB11 standard sample stick (do not use)',
interface='tcp://5000',
)

View File

@ -1,18 +1,16 @@
Node('cfg/stick/ori1stick.cfg',
'ORI1 standard sample stick',
interface='5000',
name='ori1stick',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'SEA stick connection',
config='ori1.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='ill1.config.json',

View File

@ -1,18 +1,16 @@
Node('cfg/stick/ovenstick.cfg',
'oven stick for sans',
interface='5000',
name='ovenstick',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'SEA stick connection',
config='oven.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='ma7.config.json',

View File

@ -1,18 +1,16 @@
Node('cfg/stick/oventwo.cfg',
'oven stick for SANS',
interface='5000',
name='oventwo',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'stick sea connection for oventwo.stick',
config='oventwo.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaDrivable', '',
'frappy_psi.sea.SeaDrivable', '',
io='sea_stick',
sea_object='ts',
)

View File

@ -1,25 +1,23 @@
# error creating warmup
Node('cfg/stick/sch.cfg',
'old sample changer for 100 mm orange cryo (4 samples, HRPT)',
interface='5000',
name='sch',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'SEA connection to sch4',
config='sch.stick',
service='stick',
)
Mod('warmup',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
sea_object='warmup',
io='sea_stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
sea_object='tt',
json_file='ori4.config.json',
rel_paths=['ts'],

View File

@ -1,18 +1,16 @@
Node('cfg/stick/varioxstick.cfg',
'Variox standard sample stick',
interface='5000',
name='varioxstick',
)
Mod('sea_stick',
'secop_psi.sea.SeaClient',
'frappy_psi.sea.SeaClient',
'SEA stick connection',
config='variox.stick',
service='stick',
)
Mod('ts',
'secop_psi.sea.SeaReadable', '',
'frappy_psi.sea.SeaReadable', '',
io='sea_stick',
sea_object='tt',
json_file='variox.config.json',

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# *****************************************************************************
#
# This program is free software; you can redistribute it and/or modify it under
@ -17,6 +16,8 @@
#
# Module authors:
# Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
# Markus Zolliker <markus.zolliker@psi.ch>
# Alexander Zaft <a.zaft@fz-juelich.de>
#
# *****************************************************************************
"""Define helpers"""
@ -32,6 +33,9 @@ from configparser import ConfigParser
from os import environ, path
SECoP_DEFAULT_PORT = 10767
class GeneralConfig:
"""generalConfig holds server configuration items
@ -297,6 +301,7 @@ def formatException(cut=0, exc_info=None, verbose=False):
HOSTNAMEPART = re.compile(r'^(?!-)[a-z0-9-]{1,63}(?<!-)$', re.IGNORECASE)
def validate_hostname(host):
"""checks if the rules for valid hostnames are adhered to"""
if len(host) > 255:
@ -325,7 +330,7 @@ def validate_ipv6(addr):
return True
def parse_ipv6_host_and_port(addr, defaultport=10767):
def parse_ipv6_host_and_port(addr, defaultport=SECoP_DEFAULT_PORT):
""" Parses IPv6 addresses with optional port. See parse_host_port for valid formats"""
if ']' in addr:
host, port = addr.rsplit(':', 1)
@ -333,9 +338,10 @@ def parse_ipv6_host_and_port(addr, defaultport=10767):
if '.' in addr:
host, port = addr.rsplit('.', 1)
return host, int(port)
return (host, defaultport)
return addr, defaultport
def parse_host_port(host, defaultport=10767):
def parse_host_port(host, defaultport=SECoP_DEFAULT_PORT):
"""Parses hostnames and IP (4/6) addressses.
The accepted formats are:
@ -346,16 +352,16 @@ def parse_host_port(host, defaultport=10767):
- IPv6 addresses in the forms '[IPv6]:port' or 'IPv6.port'
"""
colons = host.count(':')
if colons == 0: # hostname/ipv4 wihtout port
if colons == 0: # hostname/ipv4 without port
port = defaultport
elif colons == 1: # hostname or ipv4 with port
elif colons == 1: # hostname or ipv4 with port
host, port = host.split(':')
port = int(port)
else: # ipv6
else: # ipv6
host, port = parse_ipv6_host_and_port(host, defaultport)
if (validate_ipv4(host) or validate_hostname(host) or validate_ipv6(host)) \
and 0 < port < 65536:
return (host, port)
and 0 < port < 65536:
return host, port
raise ValueError(f'invalid host {host!r} or port {port}')

View File

@ -35,7 +35,7 @@ import time
import re
from frappy.errors import CommunicationFailedError, ConfigError
from frappy.lib import closeSocket, parse_host_port
from frappy.lib import closeSocket, parse_host_port, SECoP_DEFAULT_PORT
try:
from serial import Serial
@ -176,11 +176,11 @@ class AsynTcp(AsynConn):
uri = uri[6:]
try:
host, port = parse_host_port(uri, self.default_settings.get('port'))
host, port = parse_host_port(uri, self.default_settings.get('port', SECoP_DEFAULT_PORT))
self.connection = socket.create_connection((host, port), timeout=self.timeout)
except (ConnectionRefusedError, socket.gaierror, socket.timeout) as e:
# indicate that retrying might make sense
raise CommunicationFailedError(str(e)) from None
raise CommunicationFailedError(f'can not connect to {host}:{port}, {e}') from None
def shutdown(self):
if self.connection:

View File

@ -1,4 +1,3 @@
# -*- 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
@ -32,13 +31,12 @@ import time
from frappy.datatypes import BoolType, StringType
from frappy.errors import SECoPError
from frappy.lib import formatException, formatExtendedStack, \
formatExtendedTraceback
formatExtendedTraceback, SECoP_DEFAULT_PORT
from frappy.properties import Property
from frappy.protocol.interface import decode_msg, encode_msg_frame, get_msg
from frappy.protocol.messages import ERRORPREFIX, HELPREPLY, HELPREQUEST, \
HelpMessage
DEF_PORT = 10767
MESSAGE_READ_SIZE = 1024
HELP = HELPREQUEST.encode()
@ -201,7 +199,7 @@ class TCPServer(DualStackTCPServer):
# for cfg-editor
configurables = {
'uri': Property('hostname or ip address for binding', StringType(),
default=f'tcp://{DEF_PORT}', export=False),
default=f'tcp://{SECoP_DEFAULT_PORT}', export=False),
'detailed_errors': Property('Flag to enable detailed Errorreporting.', BoolType(),
default=False, export=False),
}

View File

@ -89,7 +89,10 @@ class HasStates:
elif newstate:
# restart case
if status is not None:
status = sm.status[0], f'restarting ({status[1]})'
if sm.status[1] == status[1]:
status = sm.status
else:
status = sm.status[0], f'restarting ({status[1]})'
else:
# start case
status = self.get_status(sm.next_task.newstate, BUSY)

View File

@ -85,6 +85,9 @@ class Motor(HasOffset, HasStates, PersistentMixin, HasIO, Drivable):
_step_size = None # degree / step
_blocking_error = None # None or a string indicating the reason of an error needing clear_errors
_running = False # status indicates motor is running
_prev_diff = 0 # for checking progress
_intermediate_target = 0
_stopped_at = 0
STATUS_MAP = {
'08': (IDLE, ''),
@ -174,27 +177,37 @@ class Motor(HasOffset, HasStates, PersistentMixin, HasIO, Drivable):
self.status = ERROR, 'clear_errors needed after ' + self._blocking_error
raise HardwareError(self.status[1])
self.saveParameters()
if self.backlash:
# drive first to target + backlash
# we do not optimize when already driving from the right side
self.set('A', self.sign * (value + self.backlash))
else:
self.set('A', self.sign * value)
self.start_machine(self.driving)
self._running = True
self.start_machine(self.starting, target=value)
return value
def hw_stop(self):
self._stopped_at = time.time()
self.get('S')
def doPoll(self):
super().doPoll()
if self._running and not self.isBusy():
if time.time() > self._stopped_at + 5:
self.log.warning('stop motor not started by us')
self.hw_stop()
def read_status(self):
sysstatus = self.communicate(f'{self.address:x}SE')
sysstatus = sysstatus[1:4] if self.axis == 'X' else sysstatus[5:8]
self._running = sysstatus[0] != '1'
status = self.STATUS_MAP.get(sysstatus[1:]) or (ERROR, f'unknown error {sysstatus[1:]}')
self._running = sysstatus[0] != '1'
if status[0] == ERROR:
self._blocking_error = status[1]
return status
return super().read_status() # status from state machine
def check_moving(self):
"""checks while motor is moving
- in case motor is moving properly return Retry
- in case motor is moving in the wrong direction, return self.stopping_for_restart
- in case encoder does not follow steps, raise a blocking error
"""
prev_enc = self.encoder
if self.encoder_mode != 'NO':
enc = self.read_encoder()
@ -202,32 +215,70 @@ class Motor(HasOffset, HasStates, PersistentMixin, HasIO, Drivable):
enc = self.value
if not self._running: # at target
return False
diff = abs(self.value - self._intermediate_target)
if diff > self._prev_diff and diff > self.encoder_tolerance:
# when the motor was started while running, without stopping first
# it happend that the motor run (almost) endless beyond the target!
# add this is to catch similar errors
self.hw_stop()
self.log.warning('motor is moving the wrong way')
return self.stopping_for_restart
self._prev_diff = diff
if self.encoder_mode != 'CHECK':
return True
e1, e2 = sorted((prev_enc, enc))
if e1 - self.encoder_tolerance <= self.value <= e2 + self.encoder_tolerance:
return True
self.log.error('encoder lag: %g not within %g..%g',
self.value, e1, e2)
self.get('S') # stop
return Retry
tol = self.encoder_tolerance + abs(enc - prev_enc)
if abs(self.value - enc) <= tol:
return Retry
self.log.error('encoder lag: steps %g deviate by more than %g from encoder %g',
self.value, tol, enc)
self.hw_stop()
self.saveParameters()
self._blocking_error = 'encoder lag error'
raise HardwareError(self._blocking_error)
def start_motor(self, target):
if self.backlash and (target - self.value) * self.backlash > 0:
# drive first to target + backlash
target += self.backlash
self._prev_diff = abs(target - self.value)
self._intermediate_target = target
self.set('A', self.sign * target)
@status_code(BUSY)
def stopping_for_restart(self, sm):
self.read_status()
if self._running:
return Retry
self.start_motor(sm.target)
return self.driving
@status_code(BUSY)
def starting(self, sm):
self.read_status()
if self._running:
self.hw_stop()
return self.stopping_for_restart
self.start_motor(sm.target)
return self.driving
@status_code(BUSY)
def driving(self, sm):
if self.check_moving():
return Retry
if self.backlash:
# drive to real target
self.set('A', self.sign * self.target)
self.read_status()
result = self.check_moving()
if result:
return result # Retry or self.stopping_for_restart
if self._intermediate_target != self.target:
self._intermediate_target = self.target
# drive to real target after intermediate target
self.start_motor(self.target)
return self.driving_to_final_position
return self.finishing
@status_code(BUSY)
def driving_to_final_position(self, sm):
if self.check_moving():
return Retry
result = self.check_moving()
if result:
return result # Retry or self.stopping_for_restart
return self.finishing
@status_code(BUSY)
@ -257,7 +308,7 @@ class Motor(HasOffset, HasStates, PersistentMixin, HasIO, Drivable):
@Command
def stop(self):
self.get('S')
self.hw_stop()
self.start_machine(self.stopping, status=(BUSY, 'stopping'))
@Command