Skip to content

Commit

Permalink
orbintlk.FIX: update LLRFStatus-Mon to monitor both LLRF A and B
Browse files Browse the repository at this point in the history
  • Loading branch information
anacso17 committed Oct 29, 2024
1 parent 6b4c5b2 commit 8e7ffa3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions siriuspy/siriuspy/orbintlk/csdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ class ETypes(_csdev.ETypes):
'DCCT13C4PsMtmTrigConfig', 'DCCT14C4PsMtmTrigConn',
'DCCT14C4PsMtmTrigStatusOK', 'DCCT14C4PsMtmTrigConfig',
)
STS_LBLS_LLRF = ('Connected', 'Configured')
STS_LBLS_LLRF = (
'A Connected',
'A Configured',
'B Connected',
'B Configured',
)


_et = ETypes # syntactic sugar
Expand Down Expand Up @@ -265,7 +270,7 @@ def get_database(self):
'value': self.DsblEnbl.Dsbl},
'BPMStatus-Mon': {'type': 'int', 'value': 0b111111111},
'TimingStatus-Mon': {'type': 'int', 'value': (1 << 19) - 1},
'LLRFStatus-Mon': {'type': 'int', 'value': 0b11},
'LLRFStatus-Mon': {'type': 'int', 'value': 0b1111},
'BPMStatusLabels-Cte': {
'type': 'string', 'count': len(_et.STS_LBLS_BPM),
'value': _et.STS_LBLS_BPM},
Expand Down
10 changes: 5 additions & 5 deletions siriuspy/siriuspy/orbintlk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,16 +1233,16 @@ def _check_configs(self):
self.run_callbacks('TimingStatus-Mon', self._timing_status)

# LLRF Status
value = (1 << 2) - 1
for dev in self._llrfs:
value = (1 << 4) - 1
for i, dev in enumerate(self._llrfs):
if dev.connected:
value = _updt_bit(value, 0, 0)
value = _updt_bit(value, 2*i, 0)
fim_orbit = dev.fast_interlock_monitor_orbit
fim_manual = dev.fast_interlock_monitor_manual
okc = fim_orbit == self._llrf_intlk_state
okc &= fim_manual == self._llrf_intlk_state
value = _updt_bit(value, 1, not okc)
self.run_callbacks('LLRFStatus-Mon', value)
value = _updt_bit(value, 2*i+1, not okc)
self.run_callbacks('LLRFStatus-Mon', value)

# check time elapsed
ttook = _time.time() - _t0
Expand Down

0 comments on commit 8e7ffa3

Please sign in to comment.