Browse Source

fix bug in Venus SE Swap

zhouhr 1 year ago
parent
commit
dc38e4a4a8

+ 15 - 1
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFSwapRoutine.cs

@@ -105,7 +105,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
         public RState Monitor()
         {
             Runner.Wait(SwapStep.WaitModuleReady,               () => _vceModule.IsIdle,            _delay_60s)
-                .LoopStart(SwapStep.VCEGoto,                    loopName(),                         _actionList.Count,      VCEGoto,         () => _vceModule.IsIdle)
+                .LoopStart(SwapStep.VCEGoto,                    loopName(),                         _actionList.Count,      VCEGoto,         VCEGoReady)
                 .LoopEnd(SwapStep.MoveWafer,                    MoveWafer,                          WaitWaferMoved)
                 .End(SwapStep.NotifyDone,                       NullFun,                            _delay_50ms);
 
@@ -136,6 +136,20 @@ namespace Venus_RT.Modules.TM.VenusEntity
             }
         }
 
+        private bool VCEGoReady()
+        {
+            _currentAction = _actionList.Peek();
+            if (ModuleHelper.IsVCE(_currentAction.SourceModule) && ModuleHelper.IsTMRobot(_currentAction.DestinationModule))
+            {
+                return _vceModule.CurrentSlot == _currentAction.SourceSlot;
+            }
+            if (ModuleHelper.IsTMRobot(_currentAction.SourceModule) && ModuleHelper.IsVCE(_currentAction.DestinationModule))
+            {
+                return _vceModule.CurrentSlot == _currentAction.DestinationSlot;
+            }
+            return false;
+        }
+
         private bool VerifyWaferExistence(MoveItem item)
         {
             if (WaferManager.Instance.CheckHasWafer(item.DestinationModule, item.DestinationSlot))

+ 1 - 0
Venus/Venus_RT/Modules/VCE/VceEntity.cs

@@ -70,6 +70,7 @@ namespace Venus_RT.Modules.VCE
         public bool VCEOutDoorClosed => !_vce.OutDoorIsOpen;
         public bool CassetteArrive => _CassetteArrive;
 
+        public int CurrentSlot => currentSlot;
         private int currentSlot;
         private int targetSlot;
         private LoadRoutine _loadRoutine;