Browse Source

Enhance the cooling algorithm to avoid processed wafer stay loadlock too long.

sangwq 7 months ago
parent
commit
a850db5a2d

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

@@ -159,6 +159,7 @@
 		<config default="0" name="QueryAWCOption"   nameView="Query AWC Option"   description="0, None; 1, Only TMPick Open; 2, Only TMPlace Open; 3, Both Open" max="3" min="0" paramter="" tag="" unit="N/A" type="Integer" />
 		<config default="2000" name="EnterLLAWCAlarmLimit"   nameView="Enter LL AWC Alarm Range"       description="" max="2000" min="0" paramter="" tag="" unit="um" type="Integer" />
 		<config default="4000" name="EnterPMAWCAlarmLimit"   nameView="Enter PM AWC Alarm Range"       description="" max="4000" min="0" paramter="" tag="" unit="um" type="Integer" />
+		<config default="90" name="MaxWaitTimePairingOutWafer" nameView="Max wait time for pairing out wafer in loadlock" description="" max="300" min="30" paramter="" tag="" unit="s" type="Integer" />
 
 
 		<config default="0" name="LLAutoVentInWaferOpt" nameView="Loadlock Aut Vent Option For Raw Wafer" description="Auto Venting Loadlock while raw wafer number less or equal than this number" max="10" min="0" paramter="" tag="" unit="N/A" type="Integer" />

+ 2 - 0
Venus/Venus_RT/Config/System_Kepler2300.sccfg

@@ -170,6 +170,8 @@
 		
 		<config default="0" name="LLAutoVentInWaferOpt" nameView="Loadlock Aut Vent Option For Raw Wafer" description="Auto Venting Loadlock while raw wafer number less or equal than this number" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 		<config default="4" name="LLAutoVentOutWaferOpt" nameView="Loadlock Auto Vent Option For Processed Wafer" description="Auto Venting Loadlock while processed wafer number big or equal than this number" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+		<config default="90" name="MaxWaitTimePairingOutWafer" nameView="Max wait time for pairing out wafer in loadlock" description="" max="300" min="30" paramter="" tag="" unit="s" type="Integer" />
+		
 		<configs name="TM_MFC1" nameView="MFC1" >
 			<config default="true" name="Enable" nameView="Enable" description="Enable gas 1 or not" tag="" unit="" type="Bool" />
 			<config default="O2" name="GasName" nameView="Gas Name" description="Name of NO.1 gas stick" tag="" unit="" type="String" />

+ 19 - 4
Venus/Venus_RT/Modules/SystemDispatcher.cs

@@ -4494,6 +4494,21 @@ namespace Venus_RT.Modules
             return (lstWafers, lstEmptySlots);
         }
 
+        private bool NeedPairingForNexWafer()
+        {
+            if (_lstWaferTasks.Exists(wt => ModuleHelper.IsLoadPort(wt.destMod) && (ModuleHelper.IsPm(wt.currentMod) || ModuleHelper.IsTMRobot(wt.currentMod))))
+                return true; 
+
+            var processingPMs = _dictModuleTask.Where(mod => ModuleHelper.IsPm(mod.Key) && mod.Value.HasWafer && mod.Value.Scheduler.IsOnline).OrderBy(wt => wt.Value.TimeToReady);
+            if(processingPMs.Count() > 0)
+            {
+                int maxWaitingTime = SC.GetValue<int>("TM.MaxWaitTimePairingOutWafer");
+                return processingPMs.First().Value.TimeToReady < maxWaitingTime;
+            }
+
+            return false;
+        }
+
         private void PrepareLLPressure()
         {
             if (RouteManager.IsATMMode)
@@ -4547,7 +4562,7 @@ namespace Venus_RT.Modules
                         schdPumpingLLs.Add(ModuleName.LLB);
                 }
                 else if ((llbWaferStatus.outSlot.Count == _LLBSlotNumber) || 
-                         (llbWaferStatus.outSlot.Count > 0 && llbWaferStatus.outSlot.Count < _LLBSlotNumber && _lstWaferTasks.Count(wt => ModuleHelper.IsPm(wt.currentMod) || ModuleHelper.IsTMRobot(wt.currentMod)) == 0))
+                         (llbWaferStatus.outSlot.Count > 0 && llbWaferStatus.outSlot.Count < _LLBSlotNumber && !NeedPairingForNexWafer()))
                 {
                     schdCoolingLLs.Add(ModuleName.LLB);
                 }
@@ -4572,7 +4587,7 @@ namespace Venus_RT.Modules
                         schdPumpingLLs.Add(ModuleName.LLA);
                 }
                 else if ((llaWaferStatus.outSlot.Count == _LLASlotNumber) ||
-                         (llaWaferStatus.outSlot.Count > 0 && llaWaferStatus.outSlot.Count < _LLASlotNumber && _lstWaferTasks.Count(wt => ModuleHelper.IsPm(wt.currentMod)) == 0))
+                         (llaWaferStatus.outSlot.Count > 0 && llaWaferStatus.outSlot.Count < _LLASlotNumber && !NeedPairingForNexWafer()))
                 {
                     schdCoolingLLs.Add(ModuleName.LLA);
                 }
@@ -4586,7 +4601,7 @@ namespace Venus_RT.Modules
                         schdPumpingLLs.Add(ModuleName.LLA);
                 }
                 else if ((llaWaferStatus.outSlot.Count == _LLASlotNumber) ||
-                         (llaWaferStatus.outSlot.Count > 0 && llaWaferStatus.outSlot.Count < _LLASlotNumber && _lstWaferTasks.Count(wt => ModuleHelper.IsPm(wt.currentMod)) == 0))
+                         (llaWaferStatus.outSlot.Count > 0 && llaWaferStatus.outSlot.Count < _LLASlotNumber && !NeedPairingForNexWafer()))
                 {
                     if (!schdVentingLLs.Contains(ModuleName.LLA))
                         schdCoolingLLs.Add(ModuleName.LLA);
@@ -4599,7 +4614,7 @@ namespace Venus_RT.Modules
                         schdPumpingLLs.Add(ModuleName.LLB);
                 }
                 else if ((llbWaferStatus.outSlot.Count == _LLBSlotNumber) ||
-                         (llbWaferStatus.outSlot.Count > 0 && llbWaferStatus.outSlot.Count < _LLBSlotNumber && _lstWaferTasks.Count(wt => ModuleHelper.IsPm(wt.currentMod)) == 0))
+                         (llbWaferStatus.outSlot.Count > 0 && llbWaferStatus.outSlot.Count < _LLBSlotNumber && !NeedPairingForNexWafer()))
                 {
                     if (!schdVentingLLs.Contains(ModuleName.LLB))
                         schdCoolingLLs.Add(ModuleName.LLB);