diff --git a/pyqt-apps/siriushla/as_rf_control/advanced_details/adv_interlock.py b/pyqt-apps/siriushla/as_rf_control/advanced_details/adv_interlock.py
index af193a93c..ae820191a 100644
--- a/pyqt-apps/siriushla/as_rf_control/advanced_details/adv_interlock.py
+++ b/pyqt-apps/siriushla/as_rf_control/advanced_details/adv_interlock.py
@@ -48,6 +48,11 @@ def _setupUi(self):
self._diagnosticsLayout(self.syst_dict['Diagnostics']))
dtls.addTab(wid_diag, 'Diagnostics')
+ wid_dyn = QWidget(self)
+ wid_dyn.setLayout(
+ self._dynamicInterlockLayout(self.syst_dict['Dynamic']))
+ dtls.addTab(wid_dyn, 'Dynamic Interlock')
+
wid_bypass = QWidget(self)
wid_bypass.setLayout(self._bypassLayout(self.syst_dict['Bypass']))
dtls.addTab(wid_bypass, 'Interlock Bypass')
@@ -193,6 +198,81 @@ def _setupByteMonitor(self, lay, labels, channel):
lay.addWidget(SiriusLedState(
self, channel, bit), bit+1, 1, alignment=Qt.AlignCenter)
+ def _dynamicInterlockLayout(self, chs_dict):
+ lay = QGridLayout()
+ lay.setAlignment(Qt.AlignTop)
+ lay.setSpacing(9)
+
+ # Current
+ lb_curr = SiriusLabel(self, self.prefix+chs_dict['Curr'])
+ lb_curr.showUnits = True
+ lb_delta = SiriusLabel(self, self.prefix+chs_dict['Curr Delta']+'-RB')
+ lb_delta.showUnits = True
+ lb_delta.setStyleSheet('background-color: white')
+
+ lay.addWidget(QLabel(
+ '
Readback
', alignment=Qt.AlignCenter), 0, 1)
+ lay.addWidget(QLabel(
+ 'Delta
', alignment=Qt.AlignCenter), 0, 2, 1, 2)
+ lay.addWidget(QLabel(
+ 'Current
',
+ alignment=Qt.AlignRight | Qt.AlignVCenter), 1, 0)
+ lay.addWidget(lb_curr, 1, 1, alignment=Qt.AlignCenter)
+ lay.addWidget(SiriusSpinbox(
+ self, self.prefix+chs_dict['Curr Delta']+'-SP'),
+ 1, 2, alignment=Qt.AlignCenter)
+ lay.addWidget(lb_delta, 1, 3, alignment=Qt.AlignCenter)
+ lay.addItem(QSpacerItem(0, 20, QSzPlcy.Ignored, QSzPlcy.Fixed), 2, 0)
+
+ # Rev Cav, Fwd Cav and Quench Cond 1 Ratio
+ # # Header
+ lay.addWidget(QLabel(
+ 'Readback
', alignment=Qt.AlignCenter), 3, 1)
+ lay.addWidget(QLabel(
+ 'Enable
', alignment=Qt.AlignCenter), 3, 2)
+ lay.addWidget(QLabel(
+ 'Coeff
', alignment=Qt.AlignCenter), 3, 3, 1, 2)
+ lay.addWidget(QLabel(
+ 'Offset
', alignment=Qt.AlignCenter), 3, 5, 1, 2)
+
+ # # Body
+ keys = ['Rev Cav', 'Fwd Cav', 'Quench']
+ row = 4
+ for key in keys:
+ chs = chs_dict[key]
+
+ lb_value = SiriusLabel(self, self.prefix+chs['Value'])
+ lb_value.showUnits = True
+ lb_coeff = SiriusLabel(self, self.prefix+chs['Coeff']+'-RB')
+ lb_coeff.showUnits = True
+ lb_ofs = SiriusLabel(self, self.prefix+chs['Offset']+'-RB')
+ lb_ofs.showUnits = True
+
+ lay_enable = QHBoxLayout()
+ lay_enable.addWidget(PyDMStateButton(
+ self, self.prefix+chs['Enable']+'-SP'),
+ alignment=Qt.AlignCenter)
+ lay_enable.addWidget(SiriusLedState(
+ self, self.prefix+chs['Enable']+'-RB'),
+ alignment=Qt.AlignCenter)
+
+ lay.addWidget(QLabel(f'{chs["Label"]}
',
+ alignment=Qt.AlignRight | Qt.AlignVCenter), row, 0)
+ lay.addWidget(lb_value, row, 1)
+ lay.addLayout(lay_enable, row, 2)
+ lay.addWidget(SiriusSpinbox(
+ self, self.prefix+chs['Coeff']+'-SP'),
+ row, 3, alignment=Qt.AlignCenter)
+ lay.addWidget(lb_coeff, row, 4, alignment=Qt.AlignCenter)
+ lay.addWidget(SiriusSpinbox(
+ self, self.prefix+chs['Offset']+'-SP'),
+ row, 5, alignment=Qt.AlignCenter)
+ lay.addWidget(lb_ofs, row, 6, alignment=Qt.AlignCenter)
+
+ row += 1
+
+ return lay
+
def _bypassLayout(self, chs_dict):
lay = QGridLayout()
lay.setAlignment(Qt.AlignTop)
diff --git a/pyqt-apps/siriushla/as_rf_control/util.py b/pyqt-apps/siriushla/as_rf_control/util.py
index d1d6def39..5edef97e1 100644
--- a/pyqt-apps/siriushla/as_rf_control/util.py
+++ b/pyqt-apps/siriushla/as_rf_control/util.py
@@ -4153,6 +4153,31 @@
'Out': 'RA-RaSIA01:RF-LLRF:GPIOOut-Mon'
}
},
+ 'Dynamic': {
+ 'Curr': 'RA-RaSIA01:RF-LLRF:Current-Mon',
+ 'Curr Delta': 'RA-RaSIA01:RF-LLRF:CurrentDelta',
+ 'Rev Cav': {
+ 'Label': 'Rev Cav',
+ 'Value': 'RA-RaSIA01:RF-LLRF:LimRevCav-RB',
+ 'Enable': 'RA-RaSIA01:RF-LLRF:LimRevCavEn',
+ 'Coeff': 'RA-RaSIA01:RF-LLRF:LimRevCavCoeff',
+ 'Offset': 'RA-RaSIA01:RF-LLRF:LimRevCavOffset'
+ },
+ 'Fwd Cav': {
+ 'Label': 'Fwd Cav',
+ 'Value': 'RA-RaSIA01:RF-LLRF:LimFwdCav-RB',
+ 'Enable': 'RA-RaSIA01:RF-LLRF:LimFwdCavEn',
+ 'Coeff': 'RA-RaSIA01:RF-LLRF:LimFwdCavCoeff',
+ 'Offset': 'RA-RaSIA01:RF-LLRF:LimFwdCavOffset'
+ },
+ 'Quench': {
+ 'Label': 'Quench Cond 1 Ratio',
+ 'Value': 'RA-RaSIA01:RF-LLRF:QuenchCond1RvRatio-RB',
+ 'Enable': 'RA-RaSIA01:RF-LLRF:QuenchCond1RvRatioEn',
+ 'Coeff': 'RA-RaSIA01:RF-LLRF:QuenchCond1RvRatioCoeff',
+ 'Offset': 'RA-RaSIA01:RF-LLRF:QuenchCond1RvRatioOffset'
+ },
+ },
'Bypass': {
'806': ['Rev SSA 1', 'RA-RaSIA01:RF-LLRF:FIMRevSSA1'],
'807': ['Rev SSA 2', 'RA-RaSIA01:RF-LLRF:FIMRevSSA2'],
@@ -4221,6 +4246,31 @@
'Out': 'RA-RaSIB01:RF-LLRF:GPIOOut-Mon'
}
},
+ 'Dynamic': {
+ 'Curr': 'RA-RaSIB01:RF-LLRF:Current-Mon',
+ 'Curr Delta': 'RA-RaSIB01:RF-LLRF:CurrentDelta',
+ 'Rev Cav': {
+ 'Label': 'Rev Cav',
+ 'Value': 'RA-RaSIB01:RF-LLRF:LimRevCav-RB',
+ 'Enable': 'RA-RaSIB01:RF-LLRF:LimRevCavEn',
+ 'Coeff': 'RA-RaSIB01:RF-LLRF:LimRevCavCoeff',
+ 'Offset': 'RA-RaSIB01:RF-LLRF:LimRevCavOffset'
+ },
+ 'Fwd Cav': {
+ 'Label': 'Fwd Cav',
+ 'Value': 'RA-RaSIB01:RF-LLRF:LimFwdCav-RB',
+ 'Enable': 'RA-RaSIB01:RF-LLRF:LimFwdCavEn',
+ 'Coeff': 'RA-RaSIB01:RF-LLRF:LimFwdCavCoeff',
+ 'Offset': 'RA-RaSIB01:RF-LLRF:LimFwdCavOffset'
+ },
+ 'Quench': {
+ 'Label': 'Quench Cond 1 Ratio',
+ 'Value': 'RA-RaSIB01:RF-LLRF:QuenchCond1RvRatio-RB',
+ 'Enable': 'RA-RaSIB01:RF-LLRF:QuenchCond1RvRatioEn',
+ 'Coeff': 'RA-RaSIB01:RF-LLRF:QuenchCond1RvRatioCoeff',
+ 'Offset': 'RA-RaSIB01:RF-LLRF:QuenchCond1RvRatioOffset'
+ },
+ },
'Bypass': {
'806': ['Rev SSA 1', 'RA-RaSIB01:RF-LLRF:FIMRevSSA1'],
'807': ['Rev SSA 2', 'RA-RaSIB01:RF-LLRF:FIMRevSSA2'],