Browse Source

update htr2 ilk更新

jiangjy 3 days ago
parent
commit
8e72f2d1d5

+ 1 - 0
FrameworkLocal/Common/Common.csproj

@@ -540,6 +540,7 @@
     <Compile Include="SubstrateTrackings\CarrierInfo.cs" />
     <Compile Include="SubstrateTrackings\CarrierManager.cs" />
     <Compile Include="SubstrateTrackings\WaferManager.cs" />
+    <Compile Include="Tolerance\FilterChecker.cs" />
     <Compile Include="Tolerance\ToleranceChecker.cs" />
     <Compile Include="StylableWindow\ControlDoubleClickBehavior.cs" />
     <Compile Include="StylableWindow\ShowSystemMenuBehavior.cs" />

+ 74 - 0
FrameworkLocal/Common/Tolerance/FilterChecker.cs

@@ -0,0 +1,74 @@
+using Aitex.Core.Util;
+using DocumentFormat.OpenXml.Packaging;
+using MECF.Framework.Common.Event;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MECF.Framework.Common.Tolerance
+{
+    /// <summary>
+    /// 搭配FR_TRIG 实现滤波功能
+    /// </summary>
+    public class FilterChecker
+    {
+        private FR_TRIG frTrig;
+        private Stopwatch stopwatch;
+        public double CheckInterval;
+        private bool stableOutput;
+
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public FilterChecker()
+        {
+            frTrig = new FR_TRIG();
+            stopwatch = new Stopwatch();
+            stopwatch.Start();
+            stableOutput = false;
+        }
+        /// <summary>
+        /// 检测信号输入并管理计时器
+        /// </summary>
+        public void Monitor(bool signal)
+        {
+            frTrig.CLK = signal;
+
+            if (frTrig.Q)
+            {
+                stopwatch.Restart(); // 重启计时器在信号变化时
+            }
+
+            if (stopwatch.IsRunning && stopwatch.ElapsedMilliseconds >= CheckInterval * 1000 && frTrig.M)
+            {
+                stableOutput = true;
+                if (stopwatch.IsRunning)
+                    stopwatch.Stop();
+            }
+            else
+            {
+                stableOutput = false;
+            }
+        }
+
+        /// <summary>
+        /// 重置信号和计时器
+        /// </summary>
+        public void Restart()
+        {
+            frTrig.RST = true;
+            stopwatch.Reset();
+            stableOutput = false;
+        }
+
+        /// <summary>
+        /// 稳定的检测结果输出
+        /// </summary>
+        [System.Xml.Serialization.XmlIgnore]
+        public bool Trig { get => stableOutput; private set => stableOutput = value; }
+    }
+}

+ 65 - 0
FrameworkLocal/Common/Utilities/Trigger.cs

@@ -204,5 +204,70 @@ namespace Aitex.Core.Util
         [XmlIgnore]
         public bool M { get; private set; }
     }
+    /// <summary>
+    /// 实现滤波功能
+    /// </summary>
+    public class FR_TRIG
+    {
+        private bool lastValue;
+        private bool currentValue;
+        private bool output;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public FR_TRIG()
+        {
+            lastValue = false;
+            currentValue = false;
+            output = false;
+        }
+
+        /// <summary>
+        /// 检测信号输入
+        /// </summary>
+        public bool CLK
+        {
+            set
+            {
+                currentValue = value;
+                if (currentValue != lastValue)
+                {
+                    output = true; // 信号变化时立即输出 true
+                }
+                else
+                {
+                    output = false; // 信号不变时输出 false
+                }
+                lastValue = currentValue;
+            }
+            get
+            {
+                return currentValue;
+            }
+        }
+
+        public bool RST
+        {
+            set
+            {
+                currentValue = false;
+                lastValue = false;
+                output = false;
+            }
+        }
+
+        /// <summary>
+        /// 检测结果输出
+        /// </summary>
+        [System.Xml.Serialization.XmlIgnore]
+        public bool Q { get => output; private set => output = value; }
+
+        /// <summary>
+        /// 记录上一次输入信号值
+        /// </summary>
+        [System.Xml.Serialization.XmlIgnore]
+        public bool M { get => currentValue; private set => currentValue = value; }
+    }
 
 }

+ 2 - 0
Furnace/FurnaceRT/Config/IO/ELK/DeviceModelPM.xml

@@ -1045,6 +1045,8 @@
 
     <IoSensor id="SensorHREFILK" display="" di="DI_HREFILK"/>
     <IoSensor id="SensorCREFILK" display="" di="DI_CREFILK"/>
+	  
+    <IoSensor id="SensorHTR2ILK" display="" di="DI_HTR2ILK"/>
 
   </IoSensors>
 

+ 1 - 0
Furnace/FurnaceRT/Config/IO/ELK/_ioDefinePM.xml

@@ -1016,6 +1016,7 @@
 
 		<DI_ITEM Index="6092" Name="DI_HCDREFACT" BufferOffset="6092" Addr="D380.12" Description="HCD_REF_ACT" />
 		<DI_ITEM Index="6093" Name="DI_CSourCeREFACT" BufferOffset="6093" Addr="D380.13" Description="C_SourCe_REF_ACT" />
+		<DI_ITEM Index="6094" Name="DI_HTR2ILK" BufferOffset="6094" Addr="D380.14" Description="HTR2_ILK" />
 
 		<DI_ITEM Index="6400" Name="DI_SiSourceTANKHeater1INHIBITHIALARM" BufferOffset="6400" Addr="D400.0" Description="Si-Source TANK heater1 INHIBIT HI ALARM" />
 		<DI_ITEM Index="6401" Name="DI_SiSourceTANKHeater1INHIBITLOWALARM" BufferOffset="6401" Addr="D400.1" Description="Si-Source TANK heater1 INHIBIT LOW ALARM" />

+ 14 - 0
Furnace/FurnaceRT/Equipments/PMs/PMAux.cs

@@ -11,8 +11,10 @@ using Aitex.Core.Utilities;
 using FurnaceRT.Devices;
 using FurnaceRT.Extraction;
 using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Event;
 using MECF.Framework.Common.OperationCenter;
+using MECF.Framework.Common.Tolerance;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -37,6 +39,7 @@ namespace FurnaceRT.Equipments.PMs
         private Dictionary<string, float> _auxScaleDic;
         private Stopwatch _initTimer = new Stopwatch();
         private List<string> _auxNames = new List<string>();
+        private FilterChecker _filterCheckerHTR2ILK = new FilterChecker();
         public bool IsHTR1Enable
         {
             get
@@ -150,6 +153,8 @@ namespace FurnaceRT.Equipments.PMs
 
         private void InitAUX()
         {
+            _filterCheckerHTR2ILK.CheckInterval = 10;
+
             if (SC.ContainsItem("Minics.EnableMinics") && SC.GetValue<bool>("Minics.EnableMinics"))
             {
                 if (SC.ContainsItem("Minics.PreConfigName"))
@@ -462,6 +467,15 @@ namespace FurnaceRT.Equipments.PMs
             }
             return datas;
         }
+        private void MonitorHTR2ILK()
+        {
+            _filterCheckerHTR2ILK.Monitor(SensorHTR2ILK != null && !SensorHTR2ILK.Value && TrigHTR2SWON.Value);
+            if (_filterCheckerHTR2ILK.Trig)
+            {
+                EV.PostWarningLog(ModuleName.System.ToString(), "Because AV82 and AV83 is off,so HTR2 SW auto off!");
+                SetHTR2Enable(new object[1] { false });
+            }
+        }
         private void MonitorFfu()
         {
             _isCEXHOn = _fFUs != null && !_fFUs.Any(x => !x.IsEnable);

+ 8 - 2
Furnace/FurnaceRT/Equipments/PMs/PMModuleDevice.cs

@@ -707,7 +707,7 @@ namespace FurnaceRT.Equipments.PMs
         public IoAlarmSignal AlarmCSourceAVMFCHeaterINHIBITHIAlarm { get; set; }
 
         [Tag("AlarmCSourceAVMFCHeaterINHIBITLOWAlarm")]
-        public IoAlarmSignal AlarmCSourceAVMFCHeaterINHIBITLOWAlarm { get; set; }   
+        public IoAlarmSignal AlarmCSourceAVMFCHeaterINHIBITLOWAlarm { get; set; }
         [Tag("AlarmSignalVG13AutoZeroAlarm")]
         public IoAlarmSignal AlarmSignalVG13AutoZeroAlarm { get; set; }
         [Tag("AlarmSignalVG11AutoZeroAlarm")]
@@ -1346,6 +1346,8 @@ namespace FurnaceRT.Equipments.PMs
         public IoTrigger TrigAV71ExternalHeater { get; set; }
         [Tag("TrigAV71RingHeater")]
         public IoTrigger TrigAV71RingHeater { get; set; }
+        [Tag("SensorHTR2ILK")]
+        public IoSensor SensorHTR2ILK { get; set; }
         [Tag("TrigHeaterAllEnable")]
         public IoTrigger TrigHeaterAllEnable { get; set; }
         [Tag("TrigGasLineHeaterMemoryChange")]
@@ -2575,8 +2577,12 @@ namespace FurnaceRT.Equipments.PMs
             if (param != null && param.Length > 0)
             {
                 bool.TryParse(param[0].ToString(), out bool isEnable);
+                if (isEnable && SensorHTR2ILK != null && !SensorHTR2ILK.Value && !TrigHTR2SWON.Value)
+                {
+                    EV.PostWarningLog(ModuleName.System.ToString(), "Because AV82 and AV83 is off,so HTR2 SW can not on!");
+                    return true;
+                }
 
-             
                 SC.SetItemValue($"PM1.IsHTR2Enable", isEnable);
             }
             return true;

+ 1 - 1
Furnace/FurnaceRT/Equipments/PMs/PMModuleInterlock.cs

@@ -126,7 +126,7 @@ namespace FurnaceRT.Equipments.PMs
             try
             {
                 MonitorN2Purge();
-
+                MonitorHTR2ILK();
                 MonitorAux();
                 MonitorFfu();
                 lock (_alarmConditionLocker)

+ 2 - 0
Furnace/FurnaceRT/Equipments/PMs/PMModuleRecipeExecutor.cs

@@ -10,6 +10,7 @@ using FurnaceRT.Equipments.PMs.RecipeExecutions;
 using FurnaceRT.Equipments.Systems;
 using MECF.Framework.Common.CommonData.EnumData;
 using MECF.Framework.Common.Equipment;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
@@ -275,6 +276,7 @@ namespace FurnaceRT.Equipments.PMs
                         default:
                             if (_valves.Any(x => x.Name == valveName))
                             {
+                               
                                 var valve = _valves.Find(x => x.Name == valveName);
                                 if (valve != null)
                                     valve.TurnValve(set, out _);

File diff suppressed because it is too large
+ 2091 - 3896
Furnace/FurnaceSimulator/Config/ELK/_ioDefinePM.xml


File diff suppressed because it is too large
+ 2091 - 3896
Furnace/FurnaceSimulator/Config/_ioDefinePM.xml