Browse Source

Enhance the duplicated wafer function.

sangwq 11 months ago
parent
commit
2826cd9348

+ 13 - 2
Venus/Venus_RT/Modules/TM/MFPMPickRoutine.cs

@@ -50,6 +50,7 @@ namespace Venus_RT.Modules.TM
         private readonly ITransferRobot _robot;
 
         private int _pickingTimeout = 120 * 1000;
+        private int _liftPinTimeout = 20 * 1000;
         private int _pickDelayTime = 0;
         private ModuleName _targetModule;
         private PMEntity  _pmModule;
@@ -247,7 +248,6 @@ namespace Venus_RT.Modules.TM
             }
             else if (_robot.Status == RState.End)
             {
-                WaferManager.Instance.WaferMoved(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_hand);
                 return true;
             }
             else
@@ -313,7 +313,18 @@ namespace Venus_RT.Modules.TM
 
         private bool WaitPMWaferDropDown()
         {
-            return _pmModule.Status == PMEntity.PMStatus.Exchange_Ready;
+            if (_pmModule.Status == PMEntity.PMStatus.Exchange_Ready)
+            {
+                WaferManager.Instance.WaferMoved(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_hand);
+                return true;
+            }
+            else if (Runner.StepElapsedMS > _liftPinTimeout)
+            {
+                WaferManager.Instance.CreateDuplicatedWafer(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_hand);
+                Runner.Stop($"Wait {_targetModule} Lift Pin down timeout, {Runner.StepElapsedMS}");
+            }
+
+            return false;
         }
 
         private bool WaitRobotRetractDone()

+ 14 - 4
Venus/Venus_RT/Modules/TM/MFPMPlaceRoutine.cs

@@ -50,6 +50,7 @@ namespace Venus_RT.Modules.TM
         private readonly ITransferRobot _robot;
 
         private int _placingTimeout = 120 * 1000;
+        private int _liftPinTimeout = 20 * 1000;
         private int _placeDelayTime = 0;
         private ModuleName _targetModule;
         private PMEntity _pmModule;
@@ -156,8 +157,6 @@ namespace Venus_RT.Modules.TM
                 break;
             }
 
-           
-
             return Runner.Status;
         }
 
@@ -249,6 +248,7 @@ namespace Venus_RT.Modules.TM
             else
                 return _robot.QueryAwc();
         }
+
         private bool WaitRobotExtendDone()
         {
             if (_robot.Status == RState.Running)
@@ -257,7 +257,6 @@ namespace Venus_RT.Modules.TM
             }
             else if (_robot.Status == RState.End)
             {
-                WaferManager.Instance.WaferMoved(ModuleName.TMRobot, (int)_hand, _targetModule, _targetSlot);
                 return true;
             }
             else
@@ -314,7 +313,18 @@ namespace Venus_RT.Modules.TM
 
         private bool WaitPMWaferLiftUp()
         {
-            return _pmModule.Status == PMEntity.PMStatus.Exchange_Ready;
+            if(_pmModule.Status == PMEntity.PMStatus.Exchange_Ready)
+            {
+                WaferManager.Instance.WaferMoved(ModuleName.TMRobot, (int)_hand, _targetModule, _targetSlot);
+                return true;
+            }
+            else if(Runner.StepElapsedMS > _liftPinTimeout)
+            {
+                WaferManager.Instance.CreateDuplicatedWafer(ModuleName.TMRobot, (int)_hand, _targetModule, _targetSlot);
+                Runner.Stop($"Wait {_targetModule} Lift Pin Up timeout, {Runner.StepElapsedMS}");
+            }
+
+            return false;
         }
 
         private bool WaitRobotRetractDone()

+ 11 - 0
Venus/Venus_RT/Modules/TM/MFPMSwapRoutine.cs

@@ -51,6 +51,7 @@ namespace Venus_RT.Modules.TM
         private readonly ITransferRobot _robot;
 
         private int _swapingTimeout = 120 * 1000;
+        private int _liftPinTimeout = 20 * 1000;
         private int _placeDelayTime = 0;
         private int _pickDelayTime = 0;
         private ModuleName _targetModule;
@@ -340,6 +341,11 @@ namespace Venus_RT.Modules.TM
                 WaferManager.Instance.WaferMoved(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_pickHand);
                 return true;
             }
+            else if (Runner.StepElapsedMS > _liftPinTimeout)
+            {
+                WaferManager.Instance.CreateDuplicatedWafer(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_pickHand);
+                Runner.Stop($"Wait {_targetModule} Lift Pin down timeout, {Runner.StepElapsedMS}");
+            }
 
             return false;
         }
@@ -373,6 +379,11 @@ namespace Venus_RT.Modules.TM
                 WaferManager.Instance.WaferMoved(ModuleName.TMRobot, (int)_placeHand, _targetModule, _targetSlot);
                 return true;
             }
+            else if (Runner.StepElapsedMS > _liftPinTimeout)
+            {
+                WaferManager.Instance.CreateDuplicatedWafer(ModuleName.TMRobot, (int)_placeHand, _targetModule, _targetSlot);
+                Runner.Stop($"Wait {_targetModule} Lift Pin Up timeout, {Runner.StepElapsedMS}");
+            }
 
             return false;
         }