Skip to content

Commit

Permalink
Merge branch 'master' into improve-comp-configs
Browse files Browse the repository at this point in the history
  • Loading branch information
anacso17 committed Mar 11, 2024
2 parents ed06a0a + 20dc9a9 commit acb5ab8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 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
3 changes: 2 additions & 1 deletion siriuspy/siriuspy/devices/bpm_fam.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ def config_mturn_acquisition(
'adcswp': self._csbpm.AcqChan.ADCSwp,
'adc': self._csbpm.AcqChan.ADC,
}
acq_rate = dic.get(acq_rate.lower(), acq_rate)
if isinstance(acq_rate, str):
acq_rate = dic.get(acq_rate.lower())
if acq_rate not in self._csbpm.AcqChan:
raise ValueError(
str(acq_rate) + ' is not a valid acquisition rate.')
Expand Down
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 acb5ab8

Please sign in to comment.