chenkui 1 день назад
Родитель
Сommit
e66519b753

+ 27 - 0
PunkHPX8_RT/Modules/EFEM/EfemPickRoutine.cs

@@ -96,6 +96,28 @@ namespace PunkHPX8_RT.Modules.EFEM
                     return false;
                 }
             }
+            if (ModuleHelper.IsDummy(_targetModule)||ModuleHelper.IsAligner(_targetModule)|| ModuleHelper.IsLoadPort(_targetModule))
+            {
+                if (_hand == Hand.Blade2)
+                {
+                    NotifyError(eEvent.ERR_EFEM_ROBOT, $"cannot use upper arm to pick from {_targetModule}", -1);
+                    return false;
+                }
+            }
+            if (ModuleHelper.IsPlatingCell(_targetModule))
+            {
+                if (_hand == Hand.Blade2)
+                {
+                    NotifyError(eEvent.ERR_EFEM_ROBOT, $"cannot use lower arm to pick from {_targetModule}", -1);
+                    return false;
+                }
+            }
+
+            if (_hand == Hand.Blade1 && _flip == Flip.Flip)
+            {
+                NotifyError(eEvent.ERR_EFEM_ROBOT, $"lower arm cannot flip", -1);
+                return false;
+            }
             if (ModuleHelper.IsSRD(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
             {
                 _srdModule = Singleton<RouteManager>.Instance.GetModule<SRDEntity>(_targetModule.ToString());
@@ -123,6 +145,11 @@ namespace PunkHPX8_RT.Modules.EFEM
                     NotifyError(eEvent.ERR_EFEM_ROBOT,  $"{_targetModule} Vacuum on, can not pick",-1);
                     return false;
                 }
+                if (_hand == Hand.Blade2)
+                {
+                    NotifyError(eEvent.ERR_EFEM_ROBOT, $"cannot use upper hand to pick from loadport", -1);
+                    return false;
+                }
             }
             if (WaferManager.Instance.CheckHasWafer(ModuleName.EfemRobot, (int)_hand))
             {

+ 21 - 0
PunkHPX8_RT/Modules/EFEM/EfemPlaceRoutine.cs

@@ -80,6 +80,27 @@ namespace PunkHPX8_RT.Modules.EFEM
         }
         private bool CheckPreCondition()
         {
+            if (ModuleHelper.IsDummy(_targetModule) || ModuleHelper.IsAligner(_targetModule) || ModuleHelper.IsLoadPort(_targetModule))
+            {
+                if (_hand == Hand.Blade1)
+                {
+                    NotifyError(eEvent.ERR_EFEM_ROBOT, $"cannot use upper arm to place to {_targetModule}", -1);
+                    return false;
+                }
+            }
+            if (ModuleHelper.IsPlatingCell(_targetModule))
+            {
+                if (_hand == Hand.Blade1)
+                {
+                    NotifyError(eEvent.ERR_EFEM_ROBOT, $"cannot use lower arm to place to {_targetModule}", -1);
+                    return false;
+                }
+            }
+            if (_hand == Hand.Blade1 && _flip == Flip.Flip)
+            {
+                NotifyError(eEvent.ERR_EFEM_ROBOT, $"lower arm cannot flip", -1);
+                return false;
+            }
             //LoadPort状态判断
             if (ModuleHelper.IsLoadPort(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
             {