|
@@ -272,6 +272,10 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// 累计补水超时
|
|
|
/// </summary>
|
|
|
private bool _diReplenMaxTimeOut;
|
|
|
+ /// <summary>
|
|
|
+ /// 是否有其他DIReplen的警告
|
|
|
+ /// </summary>
|
|
|
+ private bool _isOtherDIReplenWarnOn = false;
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
@@ -829,33 +833,33 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// <returns></returns>
|
|
|
private bool ANDiReplenOnOperation(string cmd, object[] args)
|
|
|
{
|
|
|
- return ANDiReplenOn(true);
|
|
|
+ return ANDiReplenOn();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 阳极DI Replen On
|
|
|
/// </summary>
|
|
|
/// <param name="showError"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool ANDiReplenOn(bool showError)
|
|
|
+ public bool ANDiReplenOn()
|
|
|
{
|
|
|
if (IsANHighLevel)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"ANHighLevel is activate,Can't do AN_DIReple");
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"ANHighLevel is activate, can't do AN_DIReplen");
|
|
|
return false;
|
|
|
}
|
|
|
if (IsANLowLevel)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"ANLowLevel is activate,Can't do AN_DIReple");
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"ANLowLevel is activate, can't do AN_DIReplen");
|
|
|
return false;
|
|
|
}
|
|
|
- bool preCondition = CheckPreDiReplenCondition(showError);
|
|
|
+ bool preCondition = CheckPreDiReplenCondition();
|
|
|
if (!preCondition)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
if (ReservoirData.CADiReplen)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "CADiReplen is on");
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "CA_DIReplen is on");
|
|
|
return false;
|
|
|
}
|
|
|
string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{AN_DI_REPLEN}");
|
|
@@ -887,20 +891,20 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// 检验DiReplen前置条件
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public bool CheckPreDiReplenCondition(bool showError)
|
|
|
+ public bool CheckPreDiReplenCondition()
|
|
|
{
|
|
|
- if (!CheckFacilitiesDiReplenStatus() && showError)
|
|
|
- {
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "Facilities DiReplen is Off");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ //if (!CheckFacilitiesDiReplenStatus())
|
|
|
+ //{
|
|
|
+ // LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "Facilities DiReplen is Off");
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
SafetyDevice safetyDevice = DEVICE.GetDevice<SafetyDevice>("Safety");
|
|
|
if (safetyDevice != null && safetyDevice.SafetyData.ReservoirHighLevel)
|
|
|
{
|
|
|
LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"Safety high is Activate");
|
|
|
return false;
|
|
|
}
|
|
|
- if (CheckOtherReservoirDiReplenStatus(showError))
|
|
|
+ if (CheckOtherReservoirDiReplenStatus())
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -923,7 +927,7 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// 检验是否其他Reservoir Direplen已经
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- private bool CheckOtherReservoirDiReplenStatus(bool showError)
|
|
|
+ private bool CheckOtherReservoirDiReplenStatus()
|
|
|
{
|
|
|
List<string> reservoirs = ReservoirItemManager.Instance.InstalledModules;
|
|
|
foreach (string item in reservoirs)
|
|
@@ -934,28 +938,41 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
if (reservoirItem.SubType == STRATUS)
|
|
|
{
|
|
|
StandardHotReservoirDevice tmpDevice = DEVICE.GetDevice<StandardHotReservoirDevice>(item);
|
|
|
- if (tmpDevice.ReservoirData.DiReplen && showError)
|
|
|
+ if (tmpDevice.ReservoirData.DiReplen)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} direplen valve is on");
|
|
|
+ if (!_isOtherDIReplenWarnOn)
|
|
|
+ {
|
|
|
+ _isOtherDIReplenWarnOn = true;
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} DIReplen is on");
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
CompactMembranReservoirDevice tmpDevice = DEVICE.GetDevice<CompactMembranReservoirDevice>(item);
|
|
|
- if (tmpDevice.ReservoirData.ANDiReplen && showError)
|
|
|
+ if (tmpDevice.ReservoirData.ANDiReplen)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} ANDireplen valve is on");
|
|
|
+ if (!_isOtherDIReplenWarnOn)
|
|
|
+ {
|
|
|
+ _isOtherDIReplenWarnOn = true;
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} AN_DIReplen is on");
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
- if (tmpDevice.ReservoirData.CADiReplen && showError)
|
|
|
+ if (tmpDevice.ReservoirData.CADiReplen)
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} CADireplen valve is on");
|
|
|
+ if (!_isOtherDIReplenWarnOn)
|
|
|
+ {
|
|
|
+ _isOtherDIReplenWarnOn = true;
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"{item} CA_DIReplen is on");
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ _isOtherDIReplenWarnOn = false;
|
|
|
return false;
|
|
|
}
|
|
|
#endregion
|
|
@@ -1221,16 +1238,16 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// <returns></returns>
|
|
|
private bool CADiReplenOnOperation(string cmd, object[] args)
|
|
|
{
|
|
|
- return CADiReplenOn(true);
|
|
|
+ return CADiReplenOn();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 阴极DI Replen On
|
|
|
/// </summary>
|
|
|
/// <param name="showError"></param>
|
|
|
/// <returns></returns>
|
|
|
- private bool CADiReplenOn(bool showError)
|
|
|
+ private bool CADiReplenOn()
|
|
|
{
|
|
|
- bool preCondition = CheckPreDiReplenCondition(showError);
|
|
|
+ bool preCondition = CheckPreDiReplenCondition();
|
|
|
if (!preCondition)
|
|
|
{
|
|
|
return false;
|
|
@@ -1599,7 +1616,7 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// 自动注水
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- private bool AutoDireplen(Func<bool, bool> direplenOn, ReservoirOperation reservoirOperation)
|
|
|
+ private bool AutoDireplen(Func<bool> direplenOn, ReservoirOperation reservoirOperation)
|
|
|
{
|
|
|
if (_currentOperation != ReservoirOperation.None)
|
|
|
{
|
|
@@ -1611,7 +1628,7 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"recipe is null");
|
|
|
return false;
|
|
|
}
|
|
|
- bool result = direplenOn(false);
|
|
|
+ bool result = direplenOn();
|
|
|
if (result)
|
|
|
{
|
|
|
_currentOperation = reservoirOperation;
|