Skip to content

Commit

Permalink
Merge pull request #1076 from lnls-sirius/update-injctrl
Browse files Browse the repository at this point in the history
Update InjCtrl IOC
  • Loading branch information
anacso17 authored Mar 11, 2024
2 parents a6d441d + 0ce2ca5 commit 20dc9a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion siriuspy/siriuspy/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.86.0
2.87.0
17 changes: 14 additions & 3 deletions siriuspy/siriuspy/injctrl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,18 @@ def __init__(self):
curr_pvo.add_callback(self._callback_autostop)
curr_pvo.connection_callbacks.append(self._callback_conn_autostop)

self._pu_names = self._injsys_dev.handlers['as_pu'].punames
self._pu_devs = self._injsys_dev.handlers['as_pu'].pudevices
self._pu_names, self._pu_devs = list(), list()
self._pu_refvolt = list()
for dev in self._pu_devs:
for idx, pun in enumerate(self._injsys_dev.handlers['as_pu'].punames):
# NOTE: The voltage of the TB pulsed magnets are used to define
# enable conditions of the egun trigger. To avoid changing the
# trigger enable status during top-up, we will not include these
# magnets in standby/warm up.
if pun.startswith('TB'):
continue
self._pu_names.append(pun)
dev = self._injsys_dev.handlers['as_pu'].pudevices[idx]
self._pu_devs.append(dev)
pvo = dev.pv_object('Voltage-SP')
self._pu_refvolt.append(pvo.value)
pvo.add_callback(self._callback_update_pu_refvolt)
Expand Down Expand Up @@ -1117,6 +1125,9 @@ def _callback_update_pumode(self, **kws):
def _callback_update_pu_refvolt(self, pvname, value, **kws):
if value is None:
return
# do not update PU reference voltage if standby is enabled
if self._topup_pustandbyenbl == _Const.DsblEnbl.Enbl:
return
if self._aspu_standby_state == _Const.StandbyInject.Standby:
return
devname = _PVName(pvname).device_name
Expand Down

0 comments on commit 20dc9a9

Please sign in to comment.