|
@@ -1097,14 +1097,21 @@ namespace CyberX8_RT.Devices.Reservoir
|
|
|
/// <returns></returns>
|
|
|
public bool DIReplenOn(bool showError)
|
|
|
{
|
|
|
+ ReservoirEntity entity = Singleton<RouteManager>.Instance.GetModule<ReservoirEntity>(Module);
|
|
|
if (ReservoirData.WaterLevel > SC.GetValue<double>($"Reservoir.{Module}.HighLevel"))
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "Highlevel is activate");
|
|
|
+ if(entity!=null && !entity.IsError)
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, "Highlevel is activate");
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
- if (!_reservoirData.LowLevel) //信号是相反的
|
|
|
+ if(!_reservoirData.LowLevel) //信号是相反的
|
|
|
{
|
|
|
- LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"WaterLevel low is Activate");
|
|
|
+ if (entity != null && !entity.IsError)
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"WaterLevel low is Activate");
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
bool preCondition = CheckPreDiReplenCondition(showError);
|