From 6de70d07bbf261c20798e843b397d33fba528032 Mon Sep 17 00:00:00 2001 From: x12sa Date: Mon, 26 Jan 2026 13:03:41 +0100 Subject: [PATCH] added water cooling channels --- csaxs_bec/devices/epics/eps.py | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/csaxs_bec/devices/epics/eps.py b/csaxs_bec/devices/epics/eps.py index 1b5e5c3..d0c8629 100644 --- a/csaxs_bec/devices/epics/eps.py +++ b/csaxs_bec/devices/epics/eps.py @@ -121,6 +121,37 @@ CHANNELS = { {"attr": "CCM1_POSITION", "label": "CCM Position", "pv": "X12SA-OP-CCM1:POSITION", "kind": "string"}, ], + + + # ------------------------------------------------- + # COOLING WATER (flows + supply/return valves) + # ------------------------------------------------- + "Cooling Water": [ + # Flows (1=OK, 0=FAIL). Labels mirror the tag style. + {"attr": "OPSL1EFSW2010", "label": "OP-SL1-EFSW-2010", + "pv": "X12SA-OP-SL1-EFSW-2010:FLOW", "kind": "flow"}, + {"attr": "OPSL2EFSW2010", "label": "OP-SL2-EFSW-2010", + "pv": "X12SA-OP-SL2-EFSW-2010:FLOW", "kind": "flow"}, + {"attr": "OPEB1EFSW5010", "label": "OP-EB1-EFSW-5010", + "pv": "X12SA-OP-EB1-EFSW-5010:FLOW", "kind": "flow"}, + {"attr": "OPEB1EFSW5020", "label": "OP-EB1-EFSW-5020", + "pv": "X12SA-OP-EB1-EFSW-5020:FLOW", "kind": "flow"}, + {"attr": "OPSL3EFSW5010", "label": "OP-SL3-EFSW-5010", + "pv": "X12SA-OP-SL3-EFSW-5010:FLOW", "kind": "flow"}, + {"attr": "OPKBEFSW6010", "label": "OP-KB-EFSW-6010", + "pv": "X12SA-OP-KB-EFSW-6010:FLOW", "kind": "flow"}, + {"attr": "OPPSH1EFSW7010", "label": "OP-PSH1-EFSW-7010", + "pv": "X12SA-OP-PSH1-EFSW-7010:FLOW", "kind": "flow"}, + {"attr": "ESEB2EFSW1010", "label": "ES-EB2-EFSW-1010", + "pv": "X12SA-ES-EB2-EFSW-1010:FLOW", "kind": "flow"}, + + # Cooling supply/return valves (OPEN/CLOSED) + {"attr": "OPCSECVW0010", "label": "OP-CS-ECVW-0010", + "pv": "X12SA-OP-CS-ECVW-0010:PLC_OPEN", "kind": "valve"}, + {"attr": "OPCSECVW0020", "label": "OP-CS-ECVW-0020", + "pv": "X12SA-OP-CS-ECVW-0020:PLC_OPEN", "kind": "valve"}, + ], + } @@ -198,6 +229,10 @@ def create_dynamic_eps_class(): if kind in ("valve", "shutter") and is_bool_like(value): return f"{green+'OPEN'+white if value else red+'CLOSED'+white}" + # Flow → OK / FAIL (1=OK, 0=FAIL) + if kind == "flow" and is_bool_like(value): + return f"{green}OK{white}" if bool(value) else f"{red}FAIL{white}" + # ------------------- FALLBACK ----------------------- # Non-boolean numeric: return f"{value}"