Browse Source

ATM Transfer.

sangwq 1 year ago
parent
commit
344d734fff

+ 1 - 0
Venus/Venus_RT/Config/System.sccfg

@@ -15,6 +15,7 @@
 		<config default="true" name="DisplayPopDialogWhenJobComplete" nameView="Pop Dialog When Job Complete" description="是否弹出Job结束对话框" max="" min="" paramter="" tag="" unit="" type="Bool" />
 		<config default="100" name="PMLLMaxPressureDifference" nameView="Max PM/LL Pressure difference for open slit valve" description="" max="500" min="20" paramter="" tag="" unit="mtorr" type="Double" />
 		<config default="100" name="TMLLMaxPressureDifference" nameView="Max TM/LL Pressure difference for open slit valve" description="" max="500" min="20" paramter="" tag="" unit="mtorr" type="Double" />
+		<config default="100" name="PMTMMaxPressureDifference" nameView="Max PM/TM Pressure difference for open slit valve" description="" max="500" min="20" paramter="" tag="" unit="mtorr" type="Double" />
 		<config default="LLA,PMA,EfemRobot" name="InstalledModules" description="安装的模块" max="" min="" paramter="" tag="" unit="" visible="false" type="String" />
 		<config default="2" name="MaxInternalWaferCount" nameView="Max Internal wafer count" description="系统可允许进入的wafer数" max="8" min="1" paramter="" tag="" unit="" visible="true" type="Integer" />		
 		<config default="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000" name="COMLogFlag" description="Flag for print COM data log" max="" min="" paramter="" tag="" unit="" visible="false" type="String" />

+ 0 - 17
Venus/Venus_RT/Config/TM/TMInterlock.xml

@@ -110,9 +110,6 @@
     <Limit di="DI_CDA_Pressure_Switch"			value="true" tip="CDA Pressure Switch"		tip.zh-CN="" tip.en-US="DI-19" />
 		<Limit di="DI_LLA_E_Slit_Door_close_Position"	value="true" tip="LLA EFEM Side Door Closed"		tip.zh-CN="" tip.en-US="DI-23" />
 		<Limit di="DI_LLA_Lid_Door_Closed"				value="true" tip="LLA Lid Closed"					tip.zh-CN="" tip.en-US="DI-26" />
-    <Limit di="DI_LLA_VAC_Switch"				value="true" tip="LLA VAC Switch"					tip.zh-CN="" tip.en-US="DI-34" />
-    <Limit di="DI_LLA_ATM_Switch"				value="false" tip="LLA ATM Switch"					tip.zh-CN="" tip.en-US="DI-35" />
-    <Limit do="DO_TM_VAC_ATM_MODE"				value="false" tip="TM  VAC/ATM  MODE"					tip.zh-CN="" tip.en-US="DO-72" />
 	</Action>
 
   <Action do="DO_LLA_Slit_Door_T_Open"					value="true" tip="Loadlock A TM Side Door Open"		tip.zh-CN="" tip.en-US="DO-13" >
@@ -192,22 +189,8 @@
     <Limit di="DI_CDA_Pressure_Switch"			value="true" tip="CDA Pressure Switch"		tip.zh-CN="" tip.en-US="DI-19" />
 		<Limit di="DI_LLB_E_Slit_Door_close_Position"	value="true" tip="LLB EFEM Side Door Closed"		tip.zh-CN="" tip.en-US="DI-28" />
 		<Limit di="DI_LLB_Lid_Door_Closed"				value="true" tip="LLB Lid Closed"					tip.zh-CN="" tip.en-US="DI-31" />
-		<Limit di="DI_LLB_VAC_Switch"				value="true" tip="LLB VAC Switch"			tip.zh-CN="" tip.en-US="DI-36" />
-    <Limit di="DI_LLB_ATM_Switch"				value="false" tip="LLB ATM Switch"			tip.zh-CN="" tip.en-US="DI-37" />
-    <Limit do="DO_TM_VAC_ATM_MODE"				value="false" tip="TM  VAC/ATM  MODE"					tip.zh-CN="" tip.en-US="DO-72" />
 	</Action>
 
-  <Action do="DO_LLB_Slit_Door_T_Open"					value="true" tip="LLB Slit Door/O Open"		tip.zh-CN="" tip.en-US="DO-23" >
-    <Limit di="DI_TM_RB_Not_Extend_LLB"				value="true" tip="TM Robot Net Extend to LLB"		tip.zh-CN="" tip.en-US="DI-9" />
-    <Limit di="DI_EFEM_RB_Not_Extend_LLB"				value="true" tip="EFEM RB Not Extend LLB"			tip.zh-CN="" tip.en-US="DI-12" />
-    <Limit di="DI_TM_CHB_Door_Closed"	value="true" tip="TM CHB Lid Door Closed"			tip.zh-CN="" tip.en-US="DI-17" />
-    <Limit di="DI_CDA_Pressure_Switch"			value="true" tip="CDA Pressure Switch"		tip.zh-CN="" tip.en-US="DI-19" />
-    <Limit di="DI_LLB_E_Slit_Door_close_Position"	value="true" tip="LLB EFEM Side Door Closed"		tip.zh-CN="" tip.en-US="DI-28" />
-    <Limit di="DI_LLB_Lid_Door_Closed"				value="true" tip="LLB Lid Closed"					tip.zh-CN="" tip.en-US="DI-31" />
-    <Limit di="DI_LLB_VAC_Switch"				value="false" tip="LLB VAC Switch"			tip.zh-CN="" tip.en-US="DI-36" />
-    <Limit di="DI_LLB_ATM_Switch"				value="true" tip="LLB ATM Switch"			tip.zh-CN="" tip.en-US="DI-37" />
-    <Limit do="DO_TM_VAC_ATM_MODE"				value="true" tip="TM  VAC/ATM  MODE"					tip.zh-CN="" tip.en-US="DO-72" />
-  </Action>
 	
 	<Action do="DO_LLB_Slit_Door_T_Close"				value="true" tip="LLB Slit Door/O Close"	tip.zh-CN="" tip.en-US="DO-24" >
 		<Limit di="DI_TM_RB_Not_Extend_LLB"				value="true" tip="TM Robot Net Extend to LLB"		tip.zh-CN="" tip.en-US="DI-9" />

+ 32 - 31
Venus/Venus_RT/Devices/JetKepler2300PM.cs

@@ -637,37 +637,38 @@ namespace Venus_RT.Devices
         {
             reason = string.Empty;
 
-            //if(open)
-            //{
-            //    bool _isATMMode = SC.GetValue<bool>("System.IsATMMode");
-            //    if(_isATMMode)
-            //    {
-            //        if(!IsATM)
-            //        {
-            //            reason = $"{Module} is not ATM, can not open slit door";
-            //            LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
-            //            return false;
-            //        }
-
-            //        if(!IsATMLoadlock)
-            //        {
-            //            reason = $"LoadLock is not ATM, can not open slit door";
-            //            LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
-            //            return false;
-            //        }
-            //    }
-            //    else
-            //    {
-            //        double maxPressureDifference = SC.GetValue<double>("System.PMLLMaxPressureDifference");
-            //        if (Math.Abs(LoadlockPressure - ChamberPressure) > maxPressureDifference)
-            //        {
-            //            reason = $"{Module} and Loadlock pressure difference exceeds the max limit {maxPressureDifference}";
-            //            LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
-            //            return false;
-            //        }
-            //    }
-
-            //}
+            if (open)
+            {
+                bool _isATMMode = SC.GetValue<bool>("System.IsATMMode");
+                if (_isATMMode)
+                {
+                    if (!IsATM)
+                    {
+                        reason = $"{Module} is not ATM, can not open slit door";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
+
+                    if (!IsTMATM)
+                    {
+                        reason = $"LoadLock is not ATM, can not open slit door";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
+                }
+                else
+                {
+                    
+                    double maxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
+                    if (Math.Abs(TMPressure - ChamberPressure) > maxPressureDifference)
+                    {
+                        reason = $"{Module} and TM pressure difference exceeds the max limit {maxPressureDifference}";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
+                }
+
+            }
 
             return _slitDoor.SetCylinder(open, out reason);
         }

+ 9 - 2
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -1,10 +1,14 @@
 using Aitex.Core.RT.DataCenter;
 using Aitex.Core.RT.Device;
 using Aitex.Core.RT.OperationCenter;
+using Aitex.Core.Util;
 using MECF.Framework.Common.Equipment;
 using System.Collections.Generic;
 using Venus_Core;
 
+using Aitex.Core.RT.Device.Unit;
+using Venus_RT.Modules;
+
 
 namespace Venus_RT.Devices
 {
@@ -104,6 +108,11 @@ namespace Venus_RT.Devices
         public abstract bool PendulumValveIsOpen();
 
         public abstract double LoadlockPressure { get; }
+        public double TMPressure { get { return Singleton<RouteManager>.Instance.TM.TMPressure; } }
+
+        public bool IsTMATM { get { return Singleton<RouteManager>.Instance.TM.IsTMATM; } }
+
+        public bool IsTMVAC { get { return Singleton<RouteManager>.Instance.TM.IsTMVac; } }
 
         // EndPoint 
         private readonly JetEPDBase _epdClient;
@@ -113,8 +122,6 @@ namespace Venus_RT.Devices
         public  bool EPDCaptured => _epdClient.Captured;
         public  bool EPDConnected => _epdClient.IsEPDConnected;
 
-
-
         public JetPMBase(ModuleName module) :  base(module.ToString(), module.ToString(), module.ToString(), module.ToString())
         {
             Module = module;

+ 34 - 0
Venus/Venus_RT/Modules/LLs/LLEntity.cs

@@ -93,6 +93,7 @@ namespace Venus_RT.Modules
         private readonly MFVentRoutine _ventingRoutine;
         private readonly MFLeakCheckRoutine _leakCheckRoutine;
         private readonly MFPurgeRoutine _purgeRoutine;
+        private bool _isATMMode;
         public LLEntity(ModuleName module)
         {
             Module = module;
@@ -104,6 +105,8 @@ namespace Venus_RT.Modules
             _leakCheckRoutine   = new MFLeakCheckRoutine(_JetTM, Module);
             _purgeRoutine       = new MFPurgeRoutine(_JetTM, Module);
 
+            _isATMMode = SC.GetValue<bool>("System.IsATMMode");
+
             var soltCount= SC.GetValue<int>($"{module.ToString()}.SlotNumber");
             WaferManager.Instance.SubscribeLocation(Module, soltCount);
 
@@ -370,11 +373,27 @@ namespace Venus_RT.Modules
 
         private bool FnStartPrepareTM(object[] param)
         {
+            if (_isATMMode)
+                return true;
+
             return _pumpingRoutine.Start() == RState.Running;
         }
 
         private bool FnPreparaTMTimeout(object[] param)
         {
+            if(_isATMMode)
+            {
+                if (fsm.ElapsedTime > 10000)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"Cannot transfer wafer as {Module} is not ATM.");
+                    PostMsg(MSG.Error);
+                    return true;
+                }
+                    
+
+                return _JetTM.IsModuleATM(Module);
+            }
+
             RState ret = _pumpingRoutine.Monitor();
             if (ret == RState.Failed || ret == RState.Timeout)
             {
@@ -387,11 +406,26 @@ namespace Venus_RT.Modules
 
         private bool FnStartPrepareEFEM(object[] param)
         {
+            if (_isATMMode)
+                return true;
+
             return _ventingRoutine.Start() == RState.Running;
         }
 
         private bool FnPrepareEFEMTimeout(object[] param)
         {
+            if (_isATMMode)
+            {
+                if (fsm.ElapsedTime > 10000)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"Cannot transfer wafer as {Module} is not ATM.");
+                    PostMsg(MSG.Error);
+                    return true;
+                }
+
+                return _JetTM.IsModuleATM(Module);
+            }
+
             RState ret = _ventingRoutine.Monitor();
             if (ret == RState.Failed || ret == RState.Timeout)
             {

+ 5 - 0
Venus/Venus_RT/Modules/TM/TMEntity.cs

@@ -95,6 +95,11 @@ namespace Venus_RT.Modules
 
         public bool IsOnline { get; internal set; }
 
+        public bool IsTMVac => _tm.IsTMVac;
+        public bool IsTMATM => _tm.IsTMATM;
+
+        public double TMPressure { get { return _tm.TMPressure; } }
+
         private readonly JetTM _tm;
         private readonly ITransferRobot _robot;