From 0c9df914b93582012ef571e50ee29bfad8cc522d Mon Sep 17 00:00:00 2001 From: Fernando Date: Tue, 26 Nov 2024 13:23:55 -0300 Subject: [PATCH 1/2] SOFB.BUG: Fix value of delta delay raw to 0 in correctors triggers. --- siriuspy/siriuspy/sofb/correctors.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/sofb/correctors.py b/siriuspy/siriuspy/sofb/correctors.py index 808f2fc58..1a67a00e4 100644 --- a/siriuspy/siriuspy/sofb/correctors.py +++ b/siriuspy/siriuspy/sofb/correctors.py @@ -359,7 +359,8 @@ def __init__(self, acc): self.EVT = src_val src_val = self._csorb.CorrExtEvtSrc._fields.index( - self._csorb.evt_rmpbo) + self._csorb.evt_rmpbo + ) src_val = self._csorb.CorrExtEvtSrc[src_val] self.RMPBO = src_val @@ -384,6 +385,7 @@ def __init__(self, acc): "Mode": _PV(pref_name + "Mode-Sts", **opt), "Src": _PV(pref_trig + "Src-Sts", **opt), "DelayRaw": _PV(pref_trig + "DelayRaw-RB", **opt), + "DeltaDelayRaw": _PV(pref_trig + "DeltaDelayRaw-RB", **opt), "NrPulses": _PV(pref_trig + "NrPulses-RB", **opt), "Duration": _PV(pref_trig + "Duration-RB", **opt), "State": _PV(pref_trig + "State-Sts", **opt), @@ -393,6 +395,7 @@ def __init__(self, acc): "Mode": _PV(pref_name + "Mode-Sel", **opt), "Src": _PV(pref_trig + "Src-Sel", **opt), "DelayRaw": _PV(pref_trig + "DelayRaw-SP", **opt), + "DeltaDelayRaw": _PV(pref_trig + "DeltaDelayRaw-SP", **opt), "NrPulses": _PV(pref_trig + "NrPulses-SP", **opt), "Duration": _PV(pref_trig + "Duration-SP", **opt), "State": _PV(pref_trig + "State-Sel", **opt), @@ -450,6 +453,11 @@ def delayraw(self): @delayraw.setter def delayraw(self, value): """.""" + # Make sure Delta Delay is zero: + pvobj = self._config_pvs_sp["DeltaDelayRaw"] + if self.put_enable and pvobj.connected: + pvobj.value *= 0 + pvobj = self._config_pvs_sp["DelayRaw"] if self.put_enable and pvobj.connected: pvobj.value = int(value) From 0580d6f163a7fcc8485c67bca546af26f47eaa74 Mon Sep 17 00:00:00 2001 From: Fernando Date: Tue, 26 Nov 2024 13:38:09 -0300 Subject: [PATCH 2/2] SOFB.MNT: Change default of RFEnbl to true. --- siriuspy/siriuspy/sofb/csdev.py | 4 ++-- siriuspy/siriuspy/sofb/matrix.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/siriuspy/siriuspy/sofb/csdev.py b/siriuspy/siriuspy/sofb/csdev.py index e3fe704d1..bada1d0e4 100644 --- a/siriuspy/siriuspy/sofb/csdev.py +++ b/siriuspy/siriuspy/sofb/csdev.py @@ -845,13 +845,13 @@ def get_respmat_database(self, prefix=""): "RFEnbl-Sel": { "type": "enum", "enums": self.EnblRF._fields, - "value": 0, + "value": 1, "unit": "Off_On", }, "RFEnbl-Sts": { "type": "enum", "enums": self.EnblRF._fields, - "value": 0, + "value": 1, "unit": "Off_On", }, "DeltaKickRF-Mon": { diff --git a/siriuspy/siriuspy/sofb/matrix.py b/siriuspy/siriuspy/sofb/matrix.py index 085cd3547..e2ae78647 100644 --- a/siriuspy/siriuspy/sofb/matrix.py +++ b/siriuspy/siriuspy/sofb/matrix.py @@ -33,7 +33,7 @@ def __init__(self, acc, prefix="", callback=None): "bpmy": "BPMYEnblList-RB", } if self.isring: - self.select_items["rf"] = _np.zeros(1, dtype=bool) + self.select_items["rf"] = _np.ones(1, dtype=bool) self.selection_pv_names["rf"] = "RFEnbl-Sts" self._respmat_mode = self._csorb.RespMatMode.Full self.min_sing_val = self._csorb.MIN_SING_VAL