From f49d6dd0c92447bf645ac59fb967e6f79ed5d1ed Mon Sep 17 00:00:00 2001 From: "paolo.cinquegrana@elettra.eu" <paolo.cinquegrana@elettra.eu> Date: Thu, 2 Nov 2023 16:31:46 +0100 Subject: [PATCH] modificata deciAMZIONE slu PER DIPROI --- src/SluSourceMonitor.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/SluSourceMonitor.py b/src/SluSourceMonitor.py index 5801eb6..3caa39b 100644 --- a/src/SluSourceMonitor.py +++ b/src/SluSourceMonitor.py @@ -14,8 +14,11 @@ import matplotlib.pyplot as plt # variabili globali listamonitor_coperchi = ['CVR1_LSU_UH_CLD', 'CVR_MBX1_MBX2_EOS2_CLD', 'CVR2_LSU_UH_CLD', 'CVR_M21_M22_M23_EOS2_CLD', 'CVR_LSU_EH_1_CLD', 'CVR_LSU_EH_2_CLD', 'BRD_CVR_CLD', 'BRD_SCREEN_CLD'] listamonitor_porte = ['DR_LSU_EH_01_CLD', 'DR_LSU_EH_02_CLD', 'DR_LSU_EH_03_CLD', 'DR_LSU_EH_04_CLD', 'DR_LSU_EH_05_CLD', 'DR_LSU_EH_06_CLD', 'DR_LSU_EH_07_CLD', 'DR_LSU_EH_08_CLD'] + +a = PyTango.DeviceProxy('srv-tango-padres-01:20000/pfe_f01/diagnostics/iom_pfe_f01.01') sacco = {} try: + sacco['bnevrsl'] = PyTango.DeviceProxy('srv-tango-srf-01:20000/ec-sl-slpsr-01/rtevr/ff100000') sacco['calendario'] = PyTango.DeviceProxy('srv-tango-srf-01:20000/slu/laser/calendar_slu.01') sacco['archiviatore'] = PyTango.DeviceProxy('srv-tango-srf-01:20000/archiving/hdb++archiver/slu') sacco['costanti'] = PyTango.DeviceProxy('srv-tango-srf-01:20000/slu/misc/ranges') @@ -3026,7 +3029,15 @@ class MainWindow(QDialog): def accendidecimatore(self, chi, metodo): if metodo == 'random': - sacco[chi].command_inout('Start', 0) + if chi != 'decima3': + sacco[chi].command_inout('Start', 0) + else: + tmp = a.command_inout('GetI', [6, 3]) + index_max = max(range(len(tmp[0:3])), key=tmp[0:3].__getitem__) + print(tmp[index_max+3]+30) + print(sacco['bnevrsl'].BunchNumber) + sacco['decima3'].write_attribute('BunchNumberStart', tmp[index_max+3]+30) + sacco[chi].command_inout('Start', 1) elif metodo == 'odd': BunchNumberStart_new = sacco['frequenza'].BunchNumber if BunchNumberStart_new % 2 > 0: -- GitLab