From b81fc7b122e9f1d7580943d34cb8c974b91205c9 Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 15 Aug 2022 16:22:02 +0200 Subject: [PATCH] remove tm from ill5.cfg only one SeaDrivable per sea drivable allowed! --- cfg/main/ill5.cfg | 6 ---- cfg/sea/ill5.config.json | 67 +++++++++++++++++++++++----------------- secop_psi/sea.py | 3 +- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/cfg/main/ill5.cfg b/cfg/main/ill5.cfg index f2c5e94..288b2a5 100644 --- a/cfg/main/ill5.cfg +++ b/cfg/main/ill5.cfg @@ -13,12 +13,6 @@ class = secop_psi.sea.SeaDrivable io = sea_main sea_object = tt -[tm] -class = secop_psi.sea.SeaDrivable -io = sea_main -sea_object = tt -rel_paths = tm - [cc] class = secop_psi.sea.SeaReadable io = sea_main diff --git a/cfg/sea/ill5.config.json b/cfg/sea/ill5.config.json index c960299..1e1c09c 100644 --- a/cfg/sea/ill5.config.json +++ b/cfg/sea/ill5.config.json @@ -1,5 +1,5 @@ {"tt": {"base": "/tt", "params": [ -{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 19}, +{"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}, @@ -62,8 +62,6 @@ {"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": [ @@ -116,23 +114,23 @@ {"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": "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"}, @@ -225,28 +223,29 @@ {"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": 6}, +{"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": "helow", "type": "float", "readonly": false, "cmd": "cc hl"}, +{"path": "smooth", "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": 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": "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", "visibility": 3, "kids": 30}, +{"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}, @@ -296,4 +295,14 @@ {"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": "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 ..."}]}, + +"prep0v": {"base": "/prep0v", "params": [ +{"path": "", "type": "text", "readonly": false, "cmd": "prep0v", "kids": 2}, +{"path": "send", "type": "text", "readonly": false, "cmd": "prep0v send", "visibility": 3}, +{"path": "status", "type": "text", "visibility": 3}]}, + +"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}]}} diff --git a/secop_psi/sea.py b/secop_psi/sea.py index f4b0eb6..749207c 100644 --- a/secop_psi/sea.py +++ b/secop_psi/sea.py @@ -401,7 +401,6 @@ class SeaModule(Module): hdbpath = None # hdbpath for main writable def __new__(cls, name, logger, cfgdict, srv): - print('N', cls, name) if hasattr(srv, 'extra_sea_modules'): extra_modules = srv.extra_sea_modules else: @@ -667,7 +666,7 @@ class SeaDrivable(SeaModule, Drivable): def write_target(self, value): self.io.query('run %s %s' % (self.sea_object, value)) - #self.status = [self.Status.BUSY, 'driving'] + # self.status = [self.Status.BUSY, 'driving'] return value def update_status(self, value, timestamp, readerror):