Browse Source

1 add vpw auto drip valve on
2 revise vpw home routine when cell flow error
3 add auto close boost Pump
4 add water pressure monitor when boost pump auto and enable

chenzk 1 day ago
parent
commit
0ed2fa049e

+ 2 - 2
PunkHPX8_RT/Config/Devices/Beckhoffcfg - plctask.xml

@@ -9,8 +9,8 @@
 		<!--////////////////////////////////////////////////// ALL INPUTS START //////////////////////////////////////////////////-->
 
 		<!--VPW Main Start-->
-		<Input Name="r_VPW_CHAMBER_CLOSED"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_1" Invert="true" Type="Digital" DataType="bool"/>
-		<Input Name="r_VPW_CHAMBER_OPENED"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_2" Invert="true" Type="Digital" DataType="bool"/>
+		<Input Name="r_VPW_CHAMBER_CLOSED"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_1" Invert="false" Type="Digital" DataType="bool"/>
+		<Input Name="r_VPW_CHAMBER_OPENED"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_2" Invert="false" Type="Digital" DataType="bool"/>
 		<Input Name="r_VPW_LEAK_DETECT"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_3" Invert="true" Type="Digital" DataType="bool"/>
 		<Input Name="r_VPW_VAC_PUMP_PRESSURE"  Address="MAIN.VPW_AI_8CHANNEL_4_20mA_EL3058_N102_6" Scaling="758=0,0=32767" Type="Analog" DataType="int"/>
 		<Input Name="r_VPW_BOOSTER_PUMP_STATUS"  Address="MAIN.VPW_DI_16CHANNEL_EL1819_N100_9" Invert="true" Type="Digital" DataType="bool"/>

+ 12 - 1
PunkHPX8_RT/Config/System.sccfg

@@ -244,6 +244,7 @@
 		<config default="2" name="RangePressure" nameView="RangePressure" description="pressure delta range" max="60" min="0" paramter="" tag="" unit="" type="Double"/>
 		<config default="5" name="DripValveOpenIdlePeriod" nameView="DripValveOpenIdlePeriod" max="60" min="0" description="idle time after total flow over start flow,then open drip valve." paramter="" tag="" unit="minute" type="Integer" />
 		<config default="3" name="ChamberUpDownCheckTime" nameView="ChamberUpDownCheckTime" max="60" min="0" description="check chamber is up/down time" paramter="" tag="" unit="s" type="Integer" />
+		<config default="3" name="FlowFaultHoldOffTime" nameView="FlowFaultHoldOffTime" max="60" min="0" description="TotalFlow Fault HoldOff Time" paramter="" tag="" unit="min" type="Integer" />
 		<configs name="PumpPressure" nameView="PumpPressure">
 			<config default="50.0" name="Error_Max" nameView="Error_Max" max="100.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum flow, in liters per minute, above which this interlock will transition to an Error state."/>
 			<config default="40.0" name="Warning_Max" nameView="Warning_Max" max="100.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum flow, in liters per minute, above which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
@@ -257,7 +258,7 @@
 			<config default="2.0" name="CellFlowStartLowLimit" nameView="TotalFlowStartLowLimit" max="100.0" min="0" description="the low limit of total flow in the start period." paramter="" tag="" unit="" type="Double"/>
 			<config default="2000" name="DegasEnableDelayTime" nameView="DegasEnableDelayTime" max="60000.0" min="0" description="delay time of degas enable." paramter="" tag="" unit="ms" type="Integer" />
 			<config default="400" name="PurgeMotorSpeed" nameView="PurgeMotorSpeed" max="5000.0" min="0" description="rotation default velocity in homing period." paramter="" tag="" unit="rpm" type="Double" />
-			</configs>
+		</configs>
 	</configs>
 	<configs name="VPW1">
 		<config default="2000" name="PutDownAfterDripClose" nameView="PutDownAfterDripClose" description="Delay time for put down chamber after drip valve close" max="60000" min="0" paramter="" tag="" unit="ms" type="Integer"></config>
@@ -269,6 +270,16 @@
 		<config default="5" name="FlowCheckDelay" nameView="FlowCheckDelay" description="After delay second to check flow" max="60" min="0" paramter="" tag="" unit="s" type="Integer"></config>
 		<config default="5" name="DripValveOpenIdlePeriod" nameView="DripValveOpenIdlePeriod" description="DripValve Open Idle Period" max="60" min="0" paramter="" tag="" unit="min" type="Integer"></config>
 	</configs>
+	<configs name="VPW2">
+		<config default="2000" name="PutDownAfterDripClose" nameView="PutDownAfterDripClose" description="Delay time for put down chamber after drip valve close" max="60000" min="0" paramter="" tag="" unit="ms" type="Integer"></config>
+		<config default="300" name="WaitForWaferTime" nameView="WaitForWaferTime" description="Wait for wafer to place into VPW" max="3600" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"></config>
+		<config default="60" name="PumpDownWarningTime" nameView="PumpDownWarningTime" description="waring time of vacuum pump down" max="3600" min="0" paramter="" tag="" unit="s" type="Integer"></config>
+		<config default="80" name="PumpDownTimeout" nameView="PumpDownTimeout" description="time out of vacuum pump down" max="3600" min="0" paramter="" tag="" unit="s" type="Integer"></config>
+		<config default="730" name="LidReleasePressure" nameView="LidReleasePressure" description="lid release pressure" max="10000" min="0" paramter="" tag="" unit="Torr" type="Integer"></config>
+		<config default="10" name="LidReleasePressureTimeout" nameView="LidReleasePressureTimeout" description="time out of lid release pressure" max="3600" min="0" paramter="" tag="" unit="s" type="Integer"></config>
+		<config default="5" name="FlowCheckDelay" nameView="FlowCheckDelay" description="After delay second to check flow" max="60" min="0" paramter="" tag="" unit="s" type="Integer"></config>
+		<config default="5" name="DripValveOpenIdlePeriod" nameView="DripValveOpenIdlePeriod" description="DripValve Open Idle Period" max="60" min="0" paramter="" tag="" unit="min" type="Integer"></config>
+	</configs>
 	<configs name="Linmot" nameView="Linmot">
 		<config default="5000" name="LinmotHoldoffMilliseconds" nameView="LinmotHoldoffMilliseconds" description="Linmot Hold off Milliseconds" max="10000" min="1" paramter="" tag="" unit="ms" type="Integer"></config>
 	</configs>

+ 40 - 2
PunkHPX8_RT/Devices/VpwCell/VpwCellDevice.cs

@@ -2,6 +2,7 @@
 using Aitex.Core.RT.Device;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
+using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 using MECF.Framework.Common.Beckhoff.ModuleIO;
 using MECF.Framework.Common.CommonData.Prewet;
@@ -79,11 +80,19 @@ namespace PunkHPX8_RT.Devices.VpwCell
         /// <summary>
         /// cell flow 初始设定值
         /// </summary>
-        private bool _cellFLowSetValue;
+        private double _cellFLowSetValue;
         /// <summary>
         /// cell流量满足初始设定值自动打开排水阀的时间
         /// </summary>
         private int _dripValveOpenIdlePeriod;
+        /// <summary>
+        /// 检测到cell flow 满足设定条件的时间
+        /// </summary>
+        private DateTime _cellFlowOkDetectTime;
+        /// <summary>
+        /// 检测到cell flow 是否正常
+        /// </summary>
+        private bool _cellFlowOK;
         #endregion
 
         #region 属性
@@ -114,7 +123,7 @@ namespace PunkHPX8_RT.Devices.VpwCell
         /// <param name="moduleName"></param>
         public VpwCellDevice(string moduleName) : base(moduleName, moduleName, moduleName, moduleName)
         {
-
+    
         }
 
         #region 初始化
@@ -635,9 +644,38 @@ namespace PunkHPX8_RT.Devices.VpwCell
             {
                 _rotationAxis.OnTimer();
             }
+            
+            //cell flow满足条件过一段时间自动打开排水阀
+            CellFlowMonitor();
+            
             return true;
         }
 
+        //cell flow满足条件过一段时间自动打开排水阀
+        private void CellFlowMonitor()
+        {
+            _cellFLowSetValue = SC.GetValue<double>("VPWMain.Plumbing.CellFlowStartLowLimit");
+            _dripValveOpenIdlePeriod = SC.GetValue<int>($"{Module}.DripValveOpenIdlePeriod");
+            if (_commonData.DiwFlow > _cellFLowSetValue)
+            {
+                if (!_cellFlowOK)
+                {
+                    _cellFlowOK = true;
+                    _cellFlowOkDetectTime = DateTime.Now;
+                }
+                if ((DateTime.Now - _cellFlowOkDetectTime).TotalSeconds > _dripValveOpenIdlePeriod * 60 && !_commonData.DrainValve)
+                {
+                    LOG.WriteLog(eEvent.WARN_VPW, Module, $"cell flow is lower than start limit more than {_dripValveOpenIdlePeriod} min,Drin valve on!");
+                    DrainValveOn();
+                    _cellFlowOkDetectTime = DateTime.Now;
+                }
+            }
+            else
+            {
+                _cellFlowOK = false;
+            }
+        }
+
         /// <summary>
         /// 监控
         /// </summary>

+ 62 - 0
PunkHPX8_RT/Devices/VpwMain/VpwMainDevice.cs

@@ -162,6 +162,15 @@ namespace PunkHPX8_RT.Devices.VpwMain
         /// 总流量上升沿
         /// </summary>
         private R_TRIG _totalFlowTrig = new R_TRIG();
+
+        /// <summary>
+        /// 检测到total flow 低于设定条件的时间
+        /// </summary>
+        private DateTime _totalFlowAbnormalDetectTime;
+        /// <summary>
+        /// 检测到cell flow 满足设定条件的时间
+        /// </summary>
+        private bool _totalFlowAbnormal;
         #endregion
 
         #region 属性
@@ -867,8 +876,61 @@ namespace PunkHPX8_RT.Devices.VpwMain
                 AdjustPumpSpeed();
             }
             MonitorTotalFlow();
+            BoosterPumpMonitor();
+            WaterPressureMonitor();
+
             return true;
         }
+        //Speed Auto模式同时pump enbled,对flow 上下限进行监控
+        private void WaterPressureMonitor()
+        {
+            if (_commonData.BoosterPumpSpeedAuto && _commonData.BoosterPumpEnable)
+            {
+                if(_commonData.DiwPressure > _commonData.BoosterPumpPressureData.MaxError)
+                {
+                    LOG.WriteLog(eEvent.ERR_VPW, Module, $"total flow is large than Error_max {_commonData.BoosterPumpPressureData.MaxError},Booster Pump Closed!");
+                    BoosterPumpDisable();
+                }
+                else if (_commonData.DiwPressure > _commonData.BoosterPumpPressureData.MaxWarning)
+                {
+                    LOG.WriteLog(eEvent.WARN_VPW, Module, $"total flow is large than Warning_max {_commonData.BoosterPumpPressureData.MaxWarning}");
+                }
+                else if (_commonData.DiwPressure < _commonData.BoosterPumpPressureData.MinError)
+                {
+                    LOG.WriteLog(eEvent.ERR_VPW, Module, $"total flow is lower than Error_min {_commonData.BoosterPumpPressureData.MinError},Booster Pump Closed!");
+                    BoosterPumpDisable();
+                }
+                else if (_commonData.DiwPressure < _commonData.BoosterPumpPressureData.MinWarning)
+                {
+                    LOG.WriteLog(eEvent.WARN_VPW, Module, $"total flow is large than Warning_min {_commonData.BoosterPumpPressureData.MinWarning}");
+                }
+            }
+        }
+        //total flow不满足条件过一段时间自动关闭增压泵
+        private void BoosterPumpMonitor()
+        {
+            double totalFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.TotalFlowStartLowLimit");
+            int flowFaultHoldOffTime = SC.GetValue<int>($"VPWMain.FlowFaultHoldOffTime");
+            if (_commonData.DiwTotalFlow < totalFlowStartLimit)
+            {
+                if (!_totalFlowAbnormal)
+                {
+                    _totalFlowAbnormal = true;
+                    _totalFlowAbnormalDetectTime = DateTime.Now;
+                }
+                if ((DateTime.Now - _totalFlowAbnormalDetectTime).TotalSeconds > flowFaultHoldOffTime * 60 && _commonData.BoosterPumpEnable)
+                {
+                    LOG.WriteLog(eEvent.WARN_VPW, Module, $"total flow is lower than start limit more than {flowFaultHoldOffTime} min,Booster Pump Closed!");
+                    BoosterPumpDisable();
+                    _totalFlowAbnormalDetectTime = DateTime.Now;
+                }
+            }
+            else
+            {
+                _totalFlowAbnormal = false;
+            }
+        }
+
         /// <summary>
         /// 调速
         /// </summary>

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwManualPrepareRoutine.cs

@@ -169,7 +169,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
+            return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
         }
         /// <summary>
         /// Check LoopDO数值

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwRecipeRoutine.cs

@@ -94,7 +94,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            bool result= !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
+            bool result= _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
             if (!result)
             {
                 NotifyError(eEvent.ERR_VPW, $"Chamber Closed is {_mainDevice.CommonData.ChamberClosed} and opened is {_mainDevice.CommonData.ChamberOpened}",0);

+ 2 - 2
PunkHPX8_RT/Modules/VpwCell/VpwVacuumPrewetRoutine.cs

@@ -252,7 +252,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckChamberOpened()
         {
-            return !_mainDevice.CommonData.ChamberOpened && _mainDevice.CommonData.ChamberClosed;
+            return _mainDevice.CommonData.ChamberOpened && !_mainDevice.CommonData.ChamberClosed;
         }
         /// <summary>
         /// Chamber up
@@ -273,7 +273,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            return _mainDevice.CommonData.ChamberOpened && !_mainDevice.CommonData.ChamberClosed;
+            return !_mainDevice.CommonData.ChamberOpened && _mainDevice.CommonData.ChamberClosed;
         }
         /// <summary>
         /// 检验真空

+ 11 - 10
PunkHPX8_RT/Modules/VpwMain/VPWHomeRoutine.cs

@@ -168,7 +168,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
                 .DelayIf(HomeStep.DegasDelay,_checkFlowOk,_degasEnableDelayTime)
                 .RunIf(HomeStep.OpenDegas,_checkFlowOk,OpenDegasPump,_delay_1ms)
                 .RunIf(HomeStep.ChamberDown,_checkFlowOk, () => { return _mainDevice.ChamberDown(); }, 
-                    () => { return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened; })
+                    () => { return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened; })
                 .Run(HomeStep.LastCheckStatus,LastCheckResult,_delay_1ms)
                 .End(HomeStep.End,NullFun, _delay_1ms);
             return Runner.Status;
@@ -207,7 +207,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
+            return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
         }
         /// <summary>
         /// 打开所有cell valve
@@ -486,14 +486,15 @@ namespace PunkHPX8_RT.Modules.VpwMain
                 _checkFlowOk = false;
                 return true;
             }
-            foreach(var item in _cellLst)
-            {
-                if (!_cellFlowOk[item.Module])
-                {
-                    _checkFlowOk = false;
-                    return true;
-                }
-            }
+            // cell flow 有问题继续做
+            //foreach(var item in _cellLst)
+            //{
+            //    if (!_cellFlowOk[item.Module])
+            //    {
+            //        _checkFlowOk = false;
+            //        return true;
+            //    }
+            //}
             _checkFlowOk = true;
             return true;
         }

+ 2 - 2
PunkHPX8_RT/Modules/VpwMain/VpwPurgeRoutine.cs

@@ -154,7 +154,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
                 .WaitWithStopCondition(PurgeStep.CheckLastHomeRotation, CheckAllRotationHomeStatus, CheckAllRotationHomeStopStatus)
                 .Run(PurgeStep.CheckFlowOk, CheckFlowOk, _delay_1ms)
                 .RunIf(PurgeStep.ChamberDown, _checkFlowOk, () => { return _mainDevice.ChamberDown(); },
-                    () => { return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened; })
+                    () => { return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened; })
                 .Run(PurgeStep.LastCheckStatus, LastCheckResult, _delay_1ms)
                 .End(PurgeStep.End, NullFun, _delay_1ms);
             return Runner.Status;
@@ -165,7 +165,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
+            return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
         }
         private bool SetRotationSpeed()
         {

+ 2 - 2
PunkHPX8_RT/Modules/VpwMain/VpwSimpleHomeRoutine.cs

@@ -138,7 +138,7 @@ namespace PunkHPX8_RT.Modules.VpwCelMain
         /// <returns></returns>
         private bool CheckChamberClosed()
         {
-            return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
+            return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
         }
         /// <summary>
         /// 检验Chamber打开
@@ -146,7 +146,7 @@ namespace PunkHPX8_RT.Modules.VpwCelMain
         /// <returns></returns>
         private bool CheckChamberOpened()
         {
-            return _mainDevice.CommonData.ChamberClosed && !_mainDevice.CommonData.ChamberOpened;
+            return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened;
         }
         /// <summary>
         /// 启动

+ 1 - 1
PunkHPX8_Twincate/PunkHPX8/PlcTest/POUs/MAIN.TcPOU

@@ -71,7 +71,7 @@ VAR
 	//r_VPW_DIW_TOTAL_FLOW
 	VPW_AI_8CHANNEL_4_20mA_EL3058_N102_1 AT%I* :DINT;
 	//r_VPW_DIW_PRESSURE
-	VPW_AI_8CHANNEL_4_20mA_EL3058_N102_4 AT%I* :DINT;
+	VPW_AI_8CHANNEL_4_20mA_EL3058_N102_4 AT%I* :DINT :=10000;
 	//r_VPW_DEGAS_PUMP_PRESSURE
 	VPW_AI_8CHANNEL_4_20mA_EL3058_N102_5 AT%I* :DINT;
 	//c_VPW_CHAMBER_CLOSE