Skip to content

Commit

Permalink
SOFB.ENH: Add FOFB and TbT synchronization for BPMs aquisitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandohds564 committed Oct 28, 2021
1 parent e0d223f commit 03f2fea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions siriuspy/siriuspy/sofb/bpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def __init__(self, name, callback=None):
'ACQTriggerDataPol': _csbpm.Polarity.Positive,
'ACQTriggerDataHyst': 0,
'TbtTagEn': _csbpm.EnbldDsbld.disabled, # Enable TbT sync Timing
'SwTagEn': _csbpm.EnbldDsbld.disabled, # Enable FOFB sync Timing
'Monit1TagEn': _csbpm.EnbldDsbld.disabled,
'MonitTagEn': _csbpm.EnbldDsbld.disabled,
'TbtDataMaskEn': _csbpm.EnbldDsbld.disabled, # Enable use of mask
Expand Down Expand Up @@ -100,6 +101,7 @@ def __init__(self, name, callback=None):
'ACQTriggerDataPol': 'ACQTriggerDataPol-Sel',
'ACQTriggerDataHyst': 'ACQTriggerDataHyst-SP',
'TbtTagEn': 'TbtTagEn-Sel', # Enable TbT sync with timing
'SwTagEn': 'SwTagEn-Sel', # Enable FOFB sync with timing
'Monit1TagEn': 'Monit1TagEn-Sel', # Enable Monit1 sync with timing
'MonitTagEn': 'MonitTagEn-Sel', # Enable Monit sync with timing
'TbtDataMaskEn': 'TbtDataMaskEn-Sel', # Enable use of mask
Expand Down Expand Up @@ -145,6 +147,7 @@ def __init__(self, name, callback=None):
'ACQTriggerDataPol': 'ACQTriggerDataPol-Sts',
'ACQTriggerDataHyst': 'ACQTriggerDataHyst-RB',
'TbtTagEn': 'TbtTagEn-Sts',
'SwTagEn': 'SwTagEn-Sts',
'Monit1TagEn': 'Monit1TagEn-Sts',
'MonitTagEn': 'MonitTagEn-Sts',
'TbtDataMaskEn': 'TbtDataMaskEn-Sts',
Expand Down Expand Up @@ -593,6 +596,20 @@ def tbt_sync_enbl(self, val):
if pvobj.connected:
pvobj.put(val, wait=False)

@property
def fofb_sync_enbl(self):
"""."""
pvobj = self._config_pvs_rb['SwTagEn']
return pvobj.value if pvobj.connected else None

@fofb_sync_enbl.setter
def fofb_sync_enbl(self, val):
"""."""
pvobj = self._config_pvs_sp['SwTagEn']
self._config_ok_vals['SwTagEn'] = val
if pvobj.connected:
pvobj.put(val, wait=False)

@property
def monit1_sync_enbl(self):
"""."""
Expand Down
4 changes: 4 additions & 0 deletions siriuspy/siriuspy/sofb/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,14 @@ def acq_config_bpms(self, *args):

def _synchronize_bpms(self):
for bpm in self.bpms:
bpm.tbt_sync_enbl = _csbpm.EnbldDsbld.enabled
bpm.fofb_sync_enbl = _csbpm.EnbldDsbld.enabled
bpm.monit1_sync_enbl = _csbpm.EnbldDsbld.enabled
bpm.monit_sync_enbl = _csbpm.EnbldDsbld.enabled
_time.sleep(0.5)
for bpm in self.bpms:
bpm.tbt_sync_enbl = _csbpm.EnbldDsbld.disabled
bpm.fofb_sync_enbl = _csbpm.EnbldDsbld.disabled
bpm.monit_sync_enbl = _csbpm.EnbldDsbld.disabled
bpm.monit1_sync_enbl = _csbpm.EnbldDsbld.disabled

Expand Down

0 comments on commit 03f2fea

Please sign in to comment.