Monitor power supply data for fault conditions
This commit is contained in:
@@ -51,15 +51,15 @@ namespace Raytheon.Instruments.PowerSupplies
|
||||
string coupledModules = config.ReadValue(PowerSupplyConfigIni.GENERAL.ToString(), PowerSupplyConfigIni.COUPLED_MODULES.ToString(), Raytheon.Common.GeneralConstants.DefaultConfigValue);
|
||||
string groupedModules = config.ReadValue(PowerSupplyConfigIni.GENERAL.ToString(), PowerSupplyConfigIni.GROUPED_MODULES.ToString(), Raytheon.Common.GeneralConstants.DefaultConfigValue);
|
||||
|
||||
List<string> powerModules = moduleDef.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
PowerModules = moduleDef.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
_coupledModules = coupledModules.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
_groupedModules = groupedModules.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
if (_groupedModules.Count() > 1)
|
||||
{
|
||||
powerModules.Clear();
|
||||
PowerModules.Clear();
|
||||
// since modules are grouped, we pick the first module as the representative module
|
||||
powerModules.Add(_groupedModules[0]);
|
||||
PowerModules.Add(_groupedModules[0]);
|
||||
}
|
||||
|
||||
// build the power module map
|
||||
@@ -74,9 +74,9 @@ namespace Raytheon.Instruments.PowerSupplies
|
||||
double minCurrent = 0.0;
|
||||
double maxCurrent = 0.0;
|
||||
|
||||
for (int i = 0; i < powerModules.Count(); i++)
|
||||
for (int i = 0; i < PowerModules.Count(); i++)
|
||||
{
|
||||
string moduleName = powerModules[i];
|
||||
string moduleName = PowerModules[i];
|
||||
|
||||
moduleIndex = config.ReadValue(moduleName, PowerSupplyConfigIni.INDEX.ToString(), Raytheon.Common.GeneralConstants.DefaultConfigValue);
|
||||
Double.TryParse(config.ReadValue(moduleName, PowerSupplyConfigIni.OCP.ToString(), Raytheon.Common.GeneralConstants.DefaultConfigValue), out ocp);
|
||||
@@ -109,8 +109,7 @@ namespace Raytheon.Instruments.PowerSupplies
|
||||
/// <returns></returns>
|
||||
public override bool FrontPanelEnabled
|
||||
{
|
||||
get { SemObj?.Release(); throw new NotImplementedException(); }
|
||||
set { _frontPanelEnabled = value; SemObj?.Release(); }
|
||||
set {_frontPanelEnabled = value; SemObj?.Release(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -216,7 +215,7 @@ namespace Raytheon.Instruments.PowerSupplies
|
||||
lock (SyncObj)
|
||||
{
|
||||
if (PowerModuleInfoDict[ActivePowerModule].isOn_)
|
||||
val = (PowerModuleInfoDict[ActivePowerModule].lowerCurrentLimit_ + PowerModuleInfoDict[ActivePowerModule].upperCurrentLimit_) / 2.0;
|
||||
val = (PowerModuleInfoDict[ActivePowerModule].currentLowerLimit_ + PowerModuleInfoDict[ActivePowerModule].currentUpperLimit_) / 2.0;
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
Reference in New Issue
Block a user