diff --git a/beams/bin/gen_test_ioc_main.py b/beams/bin/gen_test_ioc_main.py index ed396b0..6bf76a2 100644 --- a/beams/bin/gen_test_ioc_main.py +++ b/beams/bin/gen_test_ioc_main.py @@ -1,8 +1,65 @@ +from __future__ import annotations + import json +import time +from dataclasses import dataclass +from functools import partial from pathlib import Path -from typing import Iterator +from typing import Any, Iterable, Iterator import jinja2 +from caproto import ReadNotifyResponse +from caproto.threading.client import Batch, Context + + +@dataclass(frozen=True, eq=True, order=True) +class PVInfoForJ2: + python_name: str + pvname: str + value: Any + dtype: str + enum_strings: list[str] + + @classmethod + def from_result(cls: type[PVInfoForJ2], pvname: str, response: ReadNotifyResponse): + try: + enum_strings = response.metadata.enum_strings + except AttributeError: + enum_strings = [] + return cls( + python_name=pvname.lower().replace(":", "_").replace(".", "_"), + pvname=pvname, + value=response.data if response.data_count > 1 else response.data[0], + dtype=response.data_type.name.removeprefix("CTRL_"), + enum_strings=[bt.decode("utf8") for bt in enum_strings], + ) + + +def collect_pv_info(pvnames: Iterable[str]) -> list[PVInfoForJ2]: + ctx = Context() + pvs = ctx.get_pvs(*pvnames) + results = [] + + for pv in pvs: + pv.wait_for_connection() + + def stash_results(pvname: str, response: ReadNotifyResponse): + try: + results.append(PVInfoForJ2.from_result(pvname=pvname, response=response)) + except Exception as exc: + print(exc) + + with Batch() as batch: + for pv in pvs: + batch.read(pv, callback=partial(stash_results, pv.name), data_type="control") + + start_time = time.monotonic() + while time.monotonic() - start_time < 3: + time.sleep(0.01) + if len(results) >= len(pvs): + break + + return results def main( @@ -10,18 +67,20 @@ def main( ): with open(filepath, "r") as fd: deser = json.load(fd) - all_pvnames = sorted(list(set(pv for pv in walk_dict_pvs(deser)))) + all_pvnames = set(pv for pv in walk_dict_pvs(deser)) if not all_pvnames: raise RuntimeError(f"Found zero PVs in {filepath}") + all_pvinfo = sorted(collect_pv_info(all_pvnames)) + jinja_env = jinja2.Environment( loader=jinja2.FileSystemLoader(Path(__file__).parent), trim_blocks=True, lstrip_blocks=True, ) template = jinja_env.get_template("test_ioc.py.j2") - rendered = template.render(all_pvnames=all_pvnames) + rendered = template.render(all_pvinfo=all_pvinfo) print(rendered) diff --git a/beams/bin/test_ioc.py.j2 b/beams/bin/test_ioc.py.j2 index f66e19d..55e0bb1 100644 --- a/beams/bin/test_ioc.py.j2 +++ b/beams/bin/test_ioc.py.j2 @@ -1,5 +1,7 @@ +import os from textwrap import dedent +from caproto import ChannelType from caproto.server import PVGroup, ioc_arg_parser, pvproperty, run @@ -7,11 +9,15 @@ class BTSimIOC(PVGroup): """ An IOC to replicate the PVs used by your behavior tree. """ -{% for pvname in all_pvnames %} - {{ pvname.lower().replace(":","_").replace(".","_") }} = pvproperty( - value=0, - name="{{ pvname }}", - doc="Fake {{ pvname }}", +{% for pv_info in all_pvinfo %} + {{ pv_info.python_name }} = pvproperty( + name="{{ pv_info.pvname }}", + doc="Fake {{ pv_info.pvname }}", + value={{ pv_info.value }}, + dtype=ChannelType.{{ pv_info.dtype }}, + {% if pv_info.enum_strings %} + enum_strings={{ pv_info.enum_strings }}, + {% endif %} ) {% endfor %} diff --git a/examples/mfx_dg1/mfx_sim.py b/examples/mfx_dg1/mfx_sim.py index a266f7d..5f2b7c2 100644 --- a/examples/mfx_dg1/mfx_sim.py +++ b/examples/mfx_dg1/mfx_sim.py @@ -10,316 +10,403 @@ class BTSimIOC(PVGroup): An IOC to replicate the PVs used by your behavior tree. """ hfx_dg2_stp_01_close = pvproperty( - value=0, name="HFX:DG2:STP:01:CLOSE", doc="Fake HFX:DG2:STP:01:CLOSE", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['Inactive', 'Active'], ) hfx_dg2_stp_01_cmd = pvproperty( - value=0, name="HFX:DG2:STP:01:CMD", doc="Fake HFX:DG2:STP:01:CMD", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['CLOSE', 'OPEN'], ) hfx_dg2_stp_01_open = pvproperty( - value=1, name="HFX:DG2:STP:01:OPEN", doc="Fake HFX:DG2:STP:01:OPEN", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Inactive', 'Active'], ) mfx_att_com_calcp = pvproperty( - value=0, name="MFX:ATT:COM:CALCP", doc="Fake MFX:ATT:COM:CALCP", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['No', 'Yes'], ) mfx_att_com_go = pvproperty( - value=0, name="MFX:ATT:COM:GO", doc="Fake MFX:ATT:COM:GO", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['All OUT', 'All IN', 'Ceiling', 'Floor'], ) mfx_att_com_r_cur = pvproperty( - value=1.0, name="MFX:ATT:COM:R_CUR", doc="Fake MFX:ATT:COM:R_CUR", + value=5.899902216596077e-178, + dtype=ChannelType.DOUBLE, ) mfx_att_com_r_des = pvproperty( - value=1.0, name="MFX:ATT:COM:R_DES", doc="Fake MFX:ATT:COM:R_DES", + value=1e-05, + dtype=ChannelType.DOUBLE, ) mfx_dg1_jaws_actual_xwidth = pvproperty( - value=5.0, - name="MFX:DG1:JAWS:Actual_XWIDTH", - doc="Fake MFX:DG1:JAWS:Actual_XWIDTH", + name="MFX:DG1:JAWS:ACTUAL_XWIDTH", + doc="Fake MFX:DG1:JAWS:ACTUAL_XWIDTH", + value=0.9995, + dtype=ChannelType.DOUBLE, ) mfx_dg1_jaws_actual_ywidth = pvproperty( - value=5.0, - name="MFX:DG1:JAWS:Actual_YWIDTH", - doc="Fake MFX:DG1:JAWS:Actual_YWIDTH", + name="MFX:DG1:JAWS:ACTUAL_YWIDTH", + doc="Fake MFX:DG1:JAWS:ACTUAL_YWIDTH", + value=0.9995999999999998, + dtype=ChannelType.DOUBLE, ) mfx_dg1_jaws_xwid_req = pvproperty( - value=5.0, name="MFX:DG1:JAWS:XWID_REQ", doc="Fake MFX:DG1:JAWS:XWID_REQ", + value=1.0, + dtype=ChannelType.DOUBLE, ) mfx_dg1_jaws_ywid_req = pvproperty( - value=5.0, name="MFX:DG1:JAWS:YWID_REQ", doc="Fake MFX:DG1:JAWS:YWID_REQ", + value=1.0, + dtype=ChannelType.DOUBLE, ) mfx_dg1_p6740_acquire = pvproperty( - value=1, name="MFX:DG1:P6740:Acquire", doc="Fake MFX:DG1:P6740:Acquire", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['Done', 'Acquire'], ) mfx_dg1_p6740_acquire_rbv = pvproperty( - value=1, name="MFX:DG1:P6740:Acquire_RBV", doc="Fake MFX:DG1:P6740:Acquire_RBV", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['Done', 'Acquiring'], ) mfx_dg1_p6740_arrayrate_rbv = pvproperty( - value=0.0, name="MFX:DG1:P6740:ArrayRate_RBV", doc="Fake MFX:DG1:P6740:ArrayRate_RBV", + value=10.0, + dtype=ChannelType.DOUBLE, ) mfx_dg1_pim = pvproperty( - value="OUT", - enum_strings=["Unknown", "YAG", "OUT"], - dtype=ChannelType.ENUM, name="MFX:DG1:PIM", doc="Fake MFX:DG1:PIM", + value=2, + dtype=ChannelType.ENUM, + enum_strings=['Unknown', 'YAG', 'OUT'], ) mfx_dg1_pim_go = pvproperty( - value="OUT", - enum_strings=["Unknown", "YAG", "OUT"], - dtype=ChannelType.ENUM, name="MFX:DG1:PIM:GO", doc="Fake MFX:DG1:PIM:GO", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Unknown', 'YAG', 'OUT'], ) mfx_dg2_jaws_ds_actual_xwidth = pvproperty( - value=1.0, - name="MFX:DG2:JAWS:DS:Actual_XWIDTH", - doc="Fake MFX:DG2:JAWS:DS:Actual_XWIDTH", + name="MFX:DG2:JAWS:DS:ACTUAL_XWIDTH", + doc="Fake MFX:DG2:JAWS:DS:ACTUAL_XWIDTH", + value=4.9996, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ds_actual_ywidth = pvproperty( - value=1.0, - name="MFX:DG2:JAWS:DS:Actual_YWIDTH", - doc="Fake MFX:DG2:JAWS:DS:Actual_YWIDTH", + name="MFX:DG2:JAWS:DS:ACTUAL_YWIDTH", + doc="Fake MFX:DG2:JAWS:DS:ACTUAL_YWIDTH", + value=4.999815806, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ds_xwid_req = pvproperty( - value=1.0, name="MFX:DG2:JAWS:DS:XWID_REQ", doc="Fake MFX:DG2:JAWS:DS:XWID_REQ", + value=5.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ds_ywid_req = pvproperty( - value=1.0, name="MFX:DG2:JAWS:DS:YWID_REQ", doc="Fake MFX:DG2:JAWS:DS:YWID_REQ", + value=5.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ms_actual_xwidth = pvproperty( - value=0.5, - name="MFX:DG2:JAWS:MS:Actual_XWIDTH", - doc="Fake MFX:DG2:JAWS:MS:Actual_XWIDTH", + name="MFX:DG2:JAWS:MS:ACTUAL_XWIDTH", + doc="Fake MFX:DG2:JAWS:MS:ACTUAL_XWIDTH", + value=5.0006, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ms_actual_ywidth = pvproperty( - value=0.5, - name="MFX:DG2:JAWS:MS:Actual_YWIDTH", - doc="Fake MFX:DG2:JAWS:MS:Actual_YWIDTH", + name="MFX:DG2:JAWS:MS:ACTUAL_YWIDTH", + doc="Fake MFX:DG2:JAWS:MS:ACTUAL_YWIDTH", + value=4.9993, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ms_xwid_req = pvproperty( - value=0.5, name="MFX:DG2:JAWS:MS:XWID_REQ", doc="Fake MFX:DG2:JAWS:MS:XWID_REQ", + value=5.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_ms_ywid_req = pvproperty( - value=0.5, name="MFX:DG2:JAWS:MS:YWID_REQ", doc="Fake MFX:DG2:JAWS:MS:YWID_REQ", + value=5.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_us_actual_xwidth = pvproperty( - value=0.5, - name="MFX:DG2:JAWS:US:Actual_XWIDTH", - doc="Fake MFX:DG2:JAWS:US:Actual_XWIDTH", + name="MFX:DG2:JAWS:US:ACTUAL_XWIDTH", + doc="Fake MFX:DG2:JAWS:US:ACTUAL_XWIDTH", + value=0.9990999999999985, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_us_actual_ywidth = pvproperty( - value=0.5, - name="MFX:DG2:JAWS:US:Actual_YWIDTH", - doc="Fake MFX:DG2:JAWS:US:Actual_YWIDTH", + name="MFX:DG2:JAWS:US:ACTUAL_YWIDTH", + doc="Fake MFX:DG2:JAWS:US:ACTUAL_YWIDTH", + value=0.9998, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_us_xwid_req = pvproperty( - value=0.5, name="MFX:DG2:JAWS:US:XWID_REQ", doc="Fake MFX:DG2:JAWS:US:XWID_REQ", + value=1.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_jaws_us_ywid_req = pvproperty( - value=0.5, name="MFX:DG2:JAWS:US:YWID_REQ", doc="Fake MFX:DG2:JAWS:US:YWID_REQ", + value=1.0, + dtype=ChannelType.DOUBLE, ) mfx_dg2_pim = pvproperty( - value="OUT", - enum_strings=["Unknown", "YAG", "OUT"], - dtype=ChannelType.ENUM, name="MFX:DG2:PIM", doc="Fake MFX:DG2:PIM", + value=2, + dtype=ChannelType.ENUM, + enum_strings=['Unknown', 'YAG', 'OUT'], ) mfx_dg2_pim_go = pvproperty( - value="OUT", - enum_strings=["Unknown", "YAG", "OUT"], - dtype=ChannelType.ENUM, name="MFX:DG2:PIM:GO", doc="Fake MFX:DG2:PIM:GO", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Unknown', 'YAG', 'OUT'], ) mfx_lens_dia_01_remove = pvproperty( - value=0, name="MFX:LENS:DIA:01:REMOVE", doc="Fake MFX:LENS:DIA:01:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_dia_01_state = pvproperty( - value=1, name="MFX:LENS:DIA:01:STATE", doc="Fake MFX:LENS:DIA:01:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_dia_02_remove = pvproperty( - value=0, name="MFX:LENS:DIA:02:REMOVE", doc="Fake MFX:LENS:DIA:02:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_dia_02_state = pvproperty( - value=0, name="MFX:LENS:DIA:02:STATE", doc="Fake MFX:LENS:DIA:02:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_dia_03_remove = pvproperty( - value=0, name="MFX:LENS:DIA:03:REMOVE", doc="Fake MFX:LENS:DIA:03:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_dia_03_state = pvproperty( - value=0, name="MFX:LENS:DIA:03:STATE", doc="Fake MFX:LENS:DIA:03:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_01_remove = pvproperty( - value=0, name="MFX:LENS:TFS:01:REMOVE", doc="Fake MFX:LENS:TFS:01:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_01_state = pvproperty( - value=1, name="MFX:LENS:TFS:01:STATE", doc="Fake MFX:LENS:TFS:01:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_02_remove = pvproperty( - value=0, name="MFX:LENS:TFS:02:REMOVE", doc="Fake MFX:LENS:TFS:02:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_02_state = pvproperty( - value=0, name="MFX:LENS:TFS:02:STATE", doc="Fake MFX:LENS:TFS:02:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_03_remove = pvproperty( - value=0, name="MFX:LENS:TFS:03:REMOVE", doc="Fake MFX:LENS:TFS:03:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_03_state = pvproperty( - value=1, name="MFX:LENS:TFS:03:STATE", doc="Fake MFX:LENS:TFS:03:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_04_remove = pvproperty( - value=0, name="MFX:LENS:TFS:04:REMOVE", doc="Fake MFX:LENS:TFS:04:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_04_state = pvproperty( - value=0, name="MFX:LENS:TFS:04:STATE", doc="Fake MFX:LENS:TFS:04:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_05_remove = pvproperty( - value=0, name="MFX:LENS:TFS:05:REMOVE", doc="Fake MFX:LENS:TFS:05:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_05_state = pvproperty( - value=1, name="MFX:LENS:TFS:05:STATE", doc="Fake MFX:LENS:TFS:05:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_06_remove = pvproperty( - value=0, name="MFX:LENS:TFS:06:REMOVE", doc="Fake MFX:LENS:TFS:06:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_06_state = pvproperty( - value=0, name="MFX:LENS:TFS:06:STATE", doc="Fake MFX:LENS:TFS:06:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_07_remove = pvproperty( - value=1, name="MFX:LENS:TFS:07:REMOVE", doc="Fake MFX:LENS:TFS:07:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_07_state = pvproperty( - value=0, name="MFX:LENS:TFS:07:STATE", doc="Fake MFX:LENS:TFS:07:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_08_remove = pvproperty( - value=0, name="MFX:LENS:TFS:08:REMOVE", doc="Fake MFX:LENS:TFS:08:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_08_state = pvproperty( - value=0, name="MFX:LENS:TFS:08:STATE", doc="Fake MFX:LENS:TFS:08:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_09_remove = pvproperty( - value=1, name="MFX:LENS:TFS:09:REMOVE", doc="Fake MFX:LENS:TFS:09:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_09_state = pvproperty( - value=0, name="MFX:LENS:TFS:09:STATE", doc="Fake MFX:LENS:TFS:09:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mfx_lens_tfs_10_remove = pvproperty( - value=0, name="MFX:LENS:TFS:10:REMOVE", doc="Fake MFX:LENS:TFS:10:REMOVE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['NO', 'OUT'], ) mfx_lens_tfs_10_state = pvproperty( - value=1, name="MFX:LENS:TFS:10:STATE", doc="Fake MFX:LENS:TFS:10:STATE", + value=0, + dtype=ChannelType.ENUM, + enum_strings=['Not in', 'In'], ) mr1l4_homs_mms_pitch_rbv = pvproperty( - value=833.4, name="MR1L4:HOMS:MMS:PITCH.RBV", doc="Fake MR1L4:HOMS:MMS:PITCH.RBV", + value=840.547343, + dtype=ChannelType.DOUBLE, ) mr1l4_homs_mms_pitch_val = pvproperty( - value=833.4, name="MR1L4:HOMS:MMS:PITCH.VAL", doc="Fake MR1L4:HOMS:MMS:PITCH.VAL", + value=840.5500000000001, + dtype=ChannelType.DOUBLE, ) mr1l4_homs_mms_xup_state_get_rbv = pvproperty( - value="OUT", - enum_strings=["UNKNOWN", "OUT", "IN"], - dtype=ChannelType.ENUM, name="MR1L4:HOMS:MMS:XUP:STATE:GET_RBV", doc="Fake MR1L4:HOMS:MMS:XUP:STATE:GET_RBV", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['UNKNOWN', 'OUT', 'IN'], ) mr1l4_homs_mms_xup_state_set = pvproperty( - value="OUT", - enum_strings=["UNKNOWN", "OUT", "IN"], - dtype=ChannelType.ENUM, name="MR1L4:HOMS:MMS:XUP:STATE:SET", doc="Fake MR1L4:HOMS:MMS:XUP:STATE:SET", + value=1, + dtype=ChannelType.ENUM, + enum_strings=['UNKNOWN', 'OUT', 'IN'], ) diff --git a/examples/mfx_dg1/mfx_tree.json b/examples/mfx_dg1/mfx_tree.json index 39b0b91..306594b 100644 --- a/examples/mfx_dg1/mfx_tree.json +++ b/examples/mfx_dg1/mfx_tree.json @@ -798,7 +798,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG1:JAWS:Actual_XWIDTH", + "pv_name": "MFX:DG1:JAWS:ACTUAL_XWIDTH", "as_string": false } } @@ -839,7 +839,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG1:JAWS:Actual_YWIDTH", + "pv_name": "MFX:DG1:JAWS:ACTUAL_YWIDTH", "as_string": false } } @@ -880,7 +880,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:US:Actual_XWIDTH", + "pv_name": "MFX:DG2:JAWS:US:ACTUAL_XWIDTH", "as_string": false } } @@ -921,7 +921,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:US:Actual_YWIDTH", + "pv_name": "MFX:DG2:JAWS:US:ACTUAL_YWIDTH", "as_string": false } } @@ -962,7 +962,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:MS:Actual_XWIDTH", + "pv_name": "MFX:DG2:JAWS:MS:ACTUAL_XWIDTH", "as_string": false } } @@ -1003,7 +1003,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:MS:Actual_YWIDTH", + "pv_name": "MFX:DG2:JAWS:MS:ACTUAL_YWIDTH", "as_string": false } } @@ -1044,7 +1044,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:DS:Actual_XWIDTH", + "pv_name": "MFX:DG2:JAWS:DS:ACTUAL_XWIDTH", "as_string": false } } @@ -1085,7 +1085,7 @@ }, "value": { "EPICSValue": { - "pv_name": "MFX:DG2:JAWS:DS:Actual_YWIDTH", + "pv_name": "MFX:DG2:JAWS:DS:ACTUAL_YWIDTH", "as_string": false } } diff --git a/examples/mfx_dg1/mfx_tree.py b/examples/mfx_dg1/mfx_tree.py index 5da9ed6..c375891 100644 --- a/examples/mfx_dg1/mfx_tree.py +++ b/examples/mfx_dg1/mfx_tree.py @@ -218,7 +218,7 @@ name=f"{axis_name}_check", description="Check if slit width is close to 2mm", lower_bound=FixedValue(1.9), - value=EPICSValue(f"{base_pv}Actual_{axis}WIDTH"), + value=EPICSValue(f"{base_pv}ACTUAL_{axis}WIDTH"), upper_bound=FixedValue(2.1), ) slit_move = SetPVActionItem(