From 5a42a33f707317e01c12d3ea0ad1941194e5df16 Mon Sep 17 00:00:00 2001 From: ximenes Date: Fri, 31 Jan 2020 16:24:16 -0300 Subject: [PATCH 1/3] Add ps ioc PVs to psmodel FAP_4P --- siriuspy/siriuspy/VERSION | 2 +- siriuspy/siriuspy/pwrsupply/psmodel.py | 31 ++++++++++++++++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/siriuspy/siriuspy/VERSION b/siriuspy/siriuspy/VERSION index 81c871de4..1cac385c6 100644 --- a/siriuspy/siriuspy/VERSION +++ b/siriuspy/siriuspy/VERSION @@ -1 +1 @@ -1.10.0 +1.11.0 diff --git a/siriuspy/siriuspy/pwrsupply/psmodel.py b/siriuspy/siriuspy/pwrsupply/psmodel.py index be59edfd9..69c55429a 100644 --- a/siriuspy/siriuspy/pwrsupply/psmodel.py +++ b/siriuspy/siriuspy/pwrsupply/psmodel.py @@ -336,9 +336,9 @@ class PSModelFAC_DCDC(PSModelFBP): """FAC power supply model.""" _variables = { + 'WfmSyncPulseCount-Mon': _psbsmp.ConstFAC_DCDC.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAC_DCDC.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAC_DCDC.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'Current-RB': _psbsmp.ConstFAC_DCDC.V_PS_SETPOINT, 'CurrentRef-Mon': _psbsmp.ConstFAC_DCDC.V_PS_REFERENCE, 'Current-Mon': _psbsmp.ConstFAC_DCDC.V_I_LOAD_MEAN, @@ -372,9 +372,9 @@ class PSModelFAC_2S_DCDC(PSModelFBP): _variables = { 'Current-RB': _psbsmp.ConstFAC_2S_DCDC.V_PS_SETPOINT, 'CurrentRef-Mon': _psbsmp.ConstFAC_2S_DCDC.V_PS_REFERENCE, + 'WfmSyncPulseCount-Mon': _psbsmp.ConstFAC_2S_DCDC.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAC_2S_DCDC.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAC_2S_DCDC.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'Current-Mon': _psbsmp.ConstFAC_2S_DCDC.V_I_LOAD_MEAN, 'Current1-Mon': _psbsmp.ConstFAC_2S_DCDC.V_I_LOAD1, 'Current2-Mon': _psbsmp.ConstFAC_2S_DCDC.V_I_LOAD2, @@ -422,9 +422,10 @@ class PSModelFAC_2P4S_DCDC(PSModelFAC_DCDC): _variables = { 'Current-RB': _psbsmp.ConstFAC_2P4S_DCDC.V_PS_SETPOINT, 'CurrentRef-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_PS_REFERENCE, + 'WfmSyncPulseCount-Mon': + _psbsmp.ConstFAC_2P4S_DCDC.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'Current-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_I_LOAD_MEAN, 'Current1-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_I_LOAD1, 'Current2-Mon': _psbsmp.ConstFAC_2P4S_DCDC.V_I_LOAD2, @@ -525,18 +526,18 @@ class PSModelFAP(PSModelFBP): """FAP power supply model.""" _variables = { + 'WfmSyncPulseCount-Mon': _psbsmp.ConstFAP.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAP.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAP.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'IntlkIIB-Mon': _psbsmp.ConstFAP.V_IIB_INTERLOCKS, 'Current-RB': _psbsmp.ConstFAP.V_PS_SETPOINT, 'CurrentRef-Mon': _psbsmp.ConstFAP.V_PS_REFERENCE, 'Current-Mon': _psbsmp.ConstFAP.V_I_LOAD_MEAN, 'Current1-Mon': _psbsmp.ConstFAP.V_I_LOAD1, 'Current2-Mon': _psbsmp.ConstFAP.V_I_LOAD2, - 'IIBLeakCurrent-Mon': _psbsmp.ConstFAP.V_I_LEAKAGE_IIB, 'IIBInductorTemperature-Mon': _psbsmp.ConstFAP.V_TEMP_INDUCTOR_IIB, 'IIBHeatSinkTemperature-Mon': _psbsmp.ConstFAP.V_TEMP_HEATSINK_IIB, + 'IIBLeakCurrent-Mon': _psbsmp.ConstFAP.V_I_LEAKAGE_IIB, } @property @@ -559,9 +560,9 @@ class PSModelFAP_4P(PSModelFBP): """FAP_4P power supply model.""" _variables = { + 'WfmSyncPulseCount-Mon': _psbsmp.ConstFAP_4P.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAP_4P.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAP_4P.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'Intlk1IIB-Mon': _psbsmp.ConstFAP_4P.V_IIB_INTERLOCKS_1, 'Intlk2IIB-Mon': _psbsmp.ConstFAP_4P.V_IIB_INTERLOCKS_2, 'Intlk3IIB-Mon': _psbsmp.ConstFAP_4P.V_IIB_INTERLOCKS_3, @@ -579,6 +580,22 @@ class PSModelFAP_4P(PSModelFBP): 'Mod2Current-Mon': _psbsmp.ConstFAP_4P.V_I_MOD_2, 'Mod3Current-Mon': _psbsmp.ConstFAP_4P.V_I_MOD_3, 'Mod4Current-Mon': _psbsmp.ConstFAP_4P.V_I_MOD_4, + 'IIB1InductorTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_INDUCTOR_IIB_1, + 'IIB1HeatSinkTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_HEATSINK_IIB_1, + 'IIB2InductorTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_INDUCTOR_IIB_2, + 'IIB2HeatSinkTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_HEATSINK_IIB_2, + 'IIB3InductorTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_INDUCTOR_IIB_3, + 'IIB3HeatSinkTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_HEATSINK_IIB_3, + 'IIB4InductorTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_INDUCTOR_IIB_4, + 'IIB4HeatSinkTemperature-Mon': + _psbsmp.ConstFAP_4P.V_TEMP_HEATSINK_IIB_4, } @property @@ -601,9 +618,9 @@ class PSModelFAP_2P2S(PSModelFBP): """FAP_2P2S power supply model.""" _variables = { + 'WfmSyncPulseCount-Mon': _psbsmp.ConstFAP_2P2S.V_COUNTER_SYNC_PULSE, 'IntlkSoft-Mon': _psbsmp.ConstFAP_2P2S.V_PS_SOFT_INTERLOCKS, 'IntlkHard-Mon': _psbsmp.ConstFAP_2P2S.V_PS_HARD_INTERLOCKS, - 'WfmSyncPulseCount-Mon': _psbsmp.ConstFBP.V_COUNTER_SYNC_PULSE, 'Current-RB': _psbsmp.ConstFAP_2P2S.V_PS_SETPOINT, 'CurrentRef-Mon': _psbsmp.ConstFAP_2P2S.V_PS_REFERENCE, 'Current-Mon': _psbsmp.ConstFAP_2P2S.V_I_LOAD_MEAN, From ea956972935cba633be56308852accabc6bc2bb8 Mon Sep 17 00:00:00 2001 From: ximenes Date: Fri, 31 Jan 2020 16:47:46 -0300 Subject: [PATCH 2/3] Add new FAC_4P psmodel ioc pvs to csdevice --- siriuspy/siriuspy/csdevice/pwrsupply.py | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/csdevice/pwrsupply.py b/siriuspy/siriuspy/csdevice/pwrsupply.py index e485b60e4..188335670 100644 --- a/siriuspy/siriuspy/csdevice/pwrsupply.py +++ b/siriuspy/siriuspy/csdevice/pwrsupply.py @@ -1286,7 +1286,7 @@ def _get_ps_FAP_propty_database(): 'IntlkIIB-Cte': {'type': 'string', 'count': len(_et.IIB_INTLCK_FAP), 'value': _et.IIB_INTLCK_FAP}, - 'IIBLeakCurrent-Mon': {'type': 'float', 'value': 0.0, + 'IIBLeakCurrent-Mon': {'type': 'float', 'value': 0.0, 'prec': DEFAULT_PS_CURRENT_PRECISION, 'unit': 'A'}, 'IIBInductorTemperature-Mon': {'type': 'float', 'value': 0.0, @@ -1357,6 +1357,31 @@ def _get_ps_FAP_4P_propty_database(): 'count': len(_et.IIB_INTLCK_FAP_4P), 'value': _et.IIB_INTLCK_FAP_4P}, + 'IIB1InductorTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB1HeatSinkTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB2InductorTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB2HeatSinkTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB3InductorTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB3HeatSinkTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB4InductorTemperature-Mon': {'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + 'IIB4HeatSinkTemperature-Mon':{'type': 'float', 'value': 0.0, + 'prec': 2, + 'unit': 'C'}, + } propty_db.update(db_ps) return propty_db From 90ca181adee8793b10855d110d7e97b01e5b4b5f Mon Sep 17 00:00:00 2001 From: ximenes Date: Fri, 31 Jan 2020 18:15:09 -0300 Subject: [PATCH 3/3] Code cleanup --- siriuspy/siriuspy/csdevice/pwrsupply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/csdevice/pwrsupply.py b/siriuspy/siriuspy/csdevice/pwrsupply.py index 188335670..46cd540d5 100644 --- a/siriuspy/siriuspy/csdevice/pwrsupply.py +++ b/siriuspy/siriuspy/csdevice/pwrsupply.py @@ -1378,7 +1378,7 @@ def _get_ps_FAP_4P_propty_database(): 'IIB4InductorTemperature-Mon': {'type': 'float', 'value': 0.0, 'prec': 2, 'unit': 'C'}, - 'IIB4HeatSinkTemperature-Mon':{'type': 'float', 'value': 0.0, + 'IIB4HeatSinkTemperature-Mon': {'type': 'float', 'value': 0.0, 'prec': 2, 'unit': 'C'},