Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in OrbIntlk IOC #1080

Merged
merged 4 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion siriuspy/siriuspy/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.87.0
2.87.1
1 change: 1 addition & 0 deletions siriuspy/siriuspy/orbintlk/csdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def __init__(self):
if NR_BPM != len(self.bpm_names):
raise ValueError('Inconsistent NR_BPM parameter!')
self.bpm_nicknames = _BPMSearch.get_nicknames(self.bpm_names)
self.bpm_idcs = {b: idx for idx, b in enumerate(self.bpm_names)}

# bpm position along the ring
self.bpm_pos = _BPMSearch.get_positions(self.bpm_names)
Expand Down
12 changes: 11 additions & 1 deletion siriuspy/siriuspy/orbintlk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,13 +1358,23 @@ def _callback_bpm_intlk(self, pvname, value, **kws):
if not value:
return
# launch thread to log interlock details
bpmname = _PVName(pvname).device_name
_CAThread(
target=self._log_bpm_intlk,
args=(_PVName(pvname).device_name, ),
args=(bpmname, ),
daemon=True).start()
# launch thread to send interlock to RF as a backup
if self._thread_cbbpm and self._thread_cbbpm.is_alive():
return

# NOTE: the next lines help to avoid killing beam in case one BPM that
# is not enabled raises a false positive interlock signal.
idx = self._const.bpm_idcs[bpmname]
enbl = self._enable_lists['pos'][idx] or self._enable_lists['ang'][idx]
if not enbl:
self._update_log(f'WARN:{bpmname} false positive')
return

self._thread_cbbpm = _CAThread(
target=self._do_callback_bpm_intlk, daemon=True)
self._thread_cbbpm.start()
Expand Down
Loading