Browse Source

remove holdofftime releated

chenzk 4 days ago
parent
commit
92b5bad4d9

+ 2 - 2
CyberX8_RT/Devices/Reservoir/StandardHotReservoirDevice.cs

@@ -228,7 +228,7 @@ namespace CyberX8_RT.Devices.Reservoir
         /// <summary>
         /// holdofftimeMonitor字典;key:Moudle_item,value :HoldoffTimeSignalMonitor对象
         /// </summary>
-        private Dictionary<string, HoldoffTimeSignalMonitor> _holdoffTimeSignalDic = new Dictionary<string, HoldoffTimeSignalMonitor>();
+        //private Dictionary<string, HoldoffTimeSignalMonitor> _holdoffTimeSignalDic = new Dictionary<string, HoldoffTimeSignalMonitor>();
         /// <summary>
         /// 是否有其他DIReplen的警告
         /// </summary>
@@ -802,7 +802,7 @@ namespace CyberX8_RT.Devices.Reservoir
                             _errorDic[$"{metalDevice.Module}_{CA_FLOW_START_LOW_LIMIT_ERROR}"] = false;
                             _errorDic[$"{metalDevice.Module}_{CA_FLOW_RECIPE_ERROR}"] = false;
                             _errorDic[$"{metalDevice.Module}_{CA_FLOW_RECIPE_WARN}"] = false;
-                            _holdoffTimeSignalDic.Add($"{item.ModuleName}_CellFlow", new HoldoffTimeSignalMonitor(item.ModuleName, "CellFlow"));
+                            //_holdoffTimeSignalDic.Add($"{item.ModuleName}_CellFlow", new HoldoffTimeSignalMonitor(item.ModuleName, "CellFlow"));
                         }
                     }
                 }

+ 72 - 72
CyberX8_RT/Modules/Metal/ReservoirRunRecipeRoutine.cs

@@ -164,13 +164,13 @@ namespace CyberX8_RT.Modules.Metal
         private bool _isZeroCurrent = false;
         private int _totalMicrosecond = 0;
 
-        private double _currentHoldoffTime;
-        private double _voltageHoldoffTime;
-        private double _cellFlowHoldoffTime;
+        //private double _currentHoldoffTime;
+        //private double _voltageHoldoffTime;
+        //private double _cellFlowHoldoffTime;
 
-        private HoldoffTimeSignalMonitor _currentHoldoffTimeSignalMonitor;
-        private HoldoffTimeSignalMonitor _voltageHoldoffTimeSignalMonitor;
-        private HoldoffTimeSignalMonitor _cellFlowHoldoffTimeSignalMonitor;
+        //private HoldoffTimeSignalMonitor _currentHoldoffTimeSignalMonitor;
+        //private HoldoffTimeSignalMonitor _voltageHoldoffTimeSignalMonitor;
+        //private HoldoffTimeSignalMonitor _cellFlowHoldoffTimeSignalMonitor;
         #endregion
         #region 属性
         /// <summary>
@@ -195,13 +195,13 @@ namespace CyberX8_RT.Modules.Metal
         /// </summary>
         public ReservoirRunRecipeRoutine(string moduleName) : base(moduleName)
         {
-            _currentHoldoffTime = SC.GetValue<double>($"Metal.CurrentAlarmHoldoffTime");
-            _voltageHoldoffTime = SC.GetValue<double>($"Metal.VoltageAlarmHoldoffTime");
-            _cellFlowHoldoffTime = SC.GetValue<double>($"Metal.CellFlowAlarmHoldoffTime");
+            //_currentHoldoffTime = SC.GetValue<double>($"Metal.CurrentAlarmHoldoffTime");
+            //_voltageHoldoffTime = SC.GetValue<double>($"Metal.VoltageAlarmHoldoffTime");
+            //_cellFlowHoldoffTime = SC.GetValue<double>($"Metal.CellFlowAlarmHoldoffTime");
 
-            _currentHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "Current");
-            _voltageHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "Voltage");
-            _cellFlowHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "CellFlow");
+            //_currentHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "Current");
+            //_voltageHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "Voltage");
+            //_cellFlowHoldoffTimeSignalMonitor = new HoldoffTimeSignalMonitor(Module, "CellFlow");
         }
 
         /// <summary>
@@ -682,17 +682,17 @@ namespace CyberX8_RT.Modules.Metal
                 if (_metalType == STRATUS)
                 {
                     StandardHotMetalDevice _standardHotMetalDevice = DEVICE.GetDevice<StandardHotMetalDevice>(Module.ToString());
-                    //if (_standardHotMetalDevice.MetalDeviceData.CellFlow <= 0)
-                    //{
-                    //    LOG.WriteLog(eEvent.ERR_METAL, Module.ToString(), $"{Module} metal cell flow is 0");
-                    //    return false;
-                    //}
-                    bool cellFlowSignalresulte = _cellFlowHoldoffTimeSignalMonitor.IsSignalAbnormal(_cellFlowHoldoffTime, _standardHotMetalDevice.MetalDeviceData.CellFlow, null, 0);
-                    if (cellFlowSignalresulte)
+                    if (_standardHotMetalDevice.MetalDeviceData.CellFlow <= 0)
                     {
-                        NotifyError(eEvent.ERR_METAL, $"{Module} metal cell flow is 0", 0);
+                        LOG.WriteLog(eEvent.ERR_METAL, Module.ToString(), $"{Module} metal cell flow is 0");
                         return false;
                     }
+                    //bool cellFlowSignalresulte = _cellFlowHoldoffTimeSignalMonitor.IsSignalAbnormal(_cellFlowHoldoffTime, _standardHotMetalDevice.MetalDeviceData.CellFlow, null, 0);
+                    //if (cellFlowSignalresulte)
+                    //{
+                    //    NotifyError(eEvent.ERR_METAL, $"{Module} metal cell flow is 0", 0);
+                    //    return false;
+                    //}
                 }
             }
             return true;
@@ -784,73 +784,73 @@ namespace CyberX8_RT.Modules.Metal
             double maxVoltage = _recipe.VolatageLimitMax;
             double warnVoltage = _recipe.VoltageWarningLevel;
             double minVoltage = _recipe.VolatageLimitMin;
-            //if (voltage > maxVoltage)
-            //{
-            //    LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} voltage {voltage} is large than recipe max voltage {maxVoltage}");
-            //    return true;
-            //}
-            //if (voltage < minVoltage)
-            //{
-            //    LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} voltage {voltage} is less than recipe min voltage {minVoltage}");
-            //    return true;
-            //}
-            bool voltageSignalresulte = _voltageHoldoffTimeSignalMonitor.IsSignalAbnormal(_voltageHoldoffTime, voltage, maxVoltage, minVoltage);
-            if (voltageSignalresulte)
+            if (voltage > maxVoltage)
             {
-                if (voltage > maxVoltage)
-                {
-                    NotifyError(eEvent.ERR_METAL, $"{side} voltage {voltage} is large than recipe max voltage {maxVoltage}", 0);
-                }
-                if (voltage < minVoltage)
-                {
-                    NotifyError(eEvent.ERR_METAL, $"{side} voltage {voltage} is less than recipe min voltage {minVoltage}", 0);
-                }
+                LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} voltage {voltage} is large than recipe max voltage {maxVoltage}");
                 return true;
             }
-            if (voltage > warnVoltage)
+            if (voltage < minVoltage)
             {
-                string str = $"{side} voltage is {voltage} in warning";
-                if (AlarmListManager.Instance.AddWarn(Module, $"{side} voltage", str))
-                {
-                    LOG.WriteLog(eEvent.WARN_METAL, Module, str);
-                }
+                LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} voltage {voltage} is less than recipe min voltage {minVoltage}");
+                return true;
             }
-
-            double maxErrorCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 + _recipe.FaultPercent * 0.01);
-            double minErrorCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 - _recipe.FaultPercent * 0.01);
-            double maxWarnCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 + _recipe.CurrentWarningLevel * 0.01);
-            double minWarnCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 - _recipe.CurrentWarningLevel * 0.01);
-            //if (current > maxErrorCurrent)
+            //bool voltageSignalresulte = _voltageHoldoffTimeSignalMonitor.IsSignalAbnormal(_voltageHoldoffTime, voltage, maxVoltage, minVoltage);
+            //if (voltageSignalresulte)
             //{
-            //    LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} current {current} is large than recipe max current {maxErrorCurrent}");
+            //    if (voltage > maxVoltage)
+            //    {
+            //        NotifyError(eEvent.ERR_METAL, $"{side} voltage {voltage} is large than recipe max voltage {maxVoltage}", 0);
+            //    }
+            //    if (voltage < minVoltage)
+            //    {
+            //        NotifyError(eEvent.ERR_METAL, $"{side} voltage {voltage} is less than recipe min voltage {minVoltage}", 0);
+            //    }
             //    return true;
             //}
-            //if (current < minErrorCurrent)
+            //if (voltage > warnVoltage)
             //{
-            //    LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} current {current} is less than recipe min current {minErrorCurrent}");
-            //    return true;
+            //    string str = $"{side} voltage is {voltage} in warning";
+            //    if (AlarmListManager.Instance.AddWarn(Module, $"{side} voltage", str))
+            //    {
+            //        LOG.WriteLog(eEvent.WARN_METAL, Module, str);
+            //    }
             //}
-            bool currentSignalresulte = _currentHoldoffTimeSignalMonitor.IsSignalAbnormal(_currentHoldoffTime, current, maxErrorCurrent, minErrorCurrent);
-            if (currentSignalresulte)
+
+            double maxErrorCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 + _recipe.FaultPercent * 0.01);
+            double minErrorCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 - _recipe.FaultPercent * 0.01);
+            double maxWarnCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 + _recipe.CurrentWarningLevel * 0.01);
+            double minWarnCurrent = _powerSupplierStepPeriodDatas[_stepIndex].Current * (double)(1 - _recipe.CurrentWarningLevel * 0.01);
+            if (current > maxErrorCurrent)
             {
-                if (current > maxErrorCurrent)
-                {
-                    NotifyError(eEvent.ERR_METAL, $"{side} current {current} is large than recipe max current {maxErrorCurrent}", 0);
-                }
-                if (current < minErrorCurrent)
-                {
-                    NotifyError(eEvent.ERR_METAL, $"{side} current {current} is less than recipe min current {minErrorCurrent}", 0);
-                }
+                LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} current {current} is large than recipe max current {maxErrorCurrent}");
                 return true;
             }
-            if ((current <= maxErrorCurrent && current >= maxWarnCurrent) || (current >= minErrorCurrent && current <= minWarnCurrent))
+            if (current < minErrorCurrent)
             {
-                string str = $"{side} current {current} is in warning";
-                if (AlarmListManager.Instance.AddWarn(Module, $"{side} current", str))
-                {
-                    LOG.WriteLog(eEvent.WARN_PREWET, Module, str);
-                }
+                LOG.WriteLog(eEvent.ERR_METAL, Module, $"{side} current {current} is less than recipe min current {minErrorCurrent}");
+                return true;
             }
+            //bool currentSignalresulte = _currentHoldoffTimeSignalMonitor.IsSignalAbnormal(_currentHoldoffTime, current, maxErrorCurrent, minErrorCurrent);
+            //if (currentSignalresulte)
+            //{
+            //    if (current > maxErrorCurrent)
+            //    {
+            //        NotifyError(eEvent.ERR_METAL, $"{side} current {current} is large than recipe max current {maxErrorCurrent}", 0);
+            //    }
+            //    if (current < minErrorCurrent)
+            //    {
+            //        NotifyError(eEvent.ERR_METAL, $"{side} current {current} is less than recipe min current {minErrorCurrent}", 0);
+            //    }
+            //    return true;
+            //}
+            //if ((current <= maxErrorCurrent && current >= maxWarnCurrent) || (current >= minErrorCurrent && current <= minWarnCurrent))
+            //{
+            //    string str = $"{side} current {current} is in warning";
+            //    if (AlarmListManager.Instance.AddWarn(Module, $"{side} current", str))
+            //    {
+            //        LOG.WriteLog(eEvent.WARN_PREWET, Module, str);
+            //    }
+            //}
             return false;
         }
         /// <summary>