Selaa lähdekoodia

fix bug in SE Swap && SE Cycle

zhouhr 1 vuosi sitten
vanhempi
commit
26a6aa8f41

+ 1 - 2
Venus/Venus_RT/Modules/RouteManager.cs

@@ -1059,8 +1059,7 @@ namespace Venus_RT.Modules
 
         private bool FsmStartSEJob(object[] objs)
         {
-            _seTMCycle.StartJob(objs[0].ToString());
-            return true;
+            return _seTMCycle.StartJob(objs[0].ToString()) == RState.Running;
         }
 
         private bool FsmSEJobMonitor(object[] objs)

+ 14 - 3
Venus/Venus_RT/Modules/SETMCycle.cs

@@ -111,8 +111,13 @@ namespace Venus_RT.Modules
         #endregion
         #region Cycle
         //run货模式
-        public void StartJob(string jobName)
+        public RState StartJob(string jobName)
         {
+            if (_TMRobot.IsVCESlitDoorClosed)
+            {
+                LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"VCE SlitDoor is Close cannot run!");
+                return RState.Failed;
+            }
             //sequenceCycle
             CycleIndex = 0;
             _pastWafer = 0;
@@ -124,7 +129,7 @@ namespace Venus_RT.Modules
             if (cj == null)
             {
                 LOG.Write(eEvent.WARN_ROUTER, ModuleName.System, $"start job rejected, not found job with id {jobName}");
-                return;
+                return RState.Failed;
             }
 
             if (cj.State == EnumControlJobState.WaitingForStart)
@@ -171,6 +176,7 @@ namespace Venus_RT.Modules
 
             _starttime = DateTime.Now;
             _cycleState = RState.Running;
+            return _cycleState;
         }
         //processJob(sequence num) ControlJob(1)
         public void CreateJob(Dictionary<string, object> param)
@@ -317,6 +323,11 @@ namespace Venus_RT.Modules
         }
         public RState Start(params object[] objs)
         {
+            if (_TMRobot.IsVCESlitDoorClosed)
+            {
+                LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"VCE SlitDoor is Close cannot run!");
+                return RState.Failed;
+            }
             //普通Cycle
             if (objs.Length == 2)
             {
@@ -333,7 +344,7 @@ namespace Venus_RT.Modules
                     }
                     catch (Exception _)
                     {
-                        LOG.Write(eEvent.ERR_ROUTER, "TMCycle", $"Invalid module string: {mod}");
+                        LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"Invalid module string: {mod}");
                         return RState.Failed;
                     }
                 }

+ 16 - 0
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFSwapRoutine.cs

@@ -57,6 +57,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
                 return RState.Failed;
             }
 
+
             _actionList.Clear();
             foreach (var item in (Queue<MoveItem>)objs[0])
             {
@@ -64,9 +65,24 @@ namespace Venus_RT.Modules.TM.VenusEntity
             }
             var firtItem = _actionList.Peek();
             if (ModuleHelper.IsVCE(firtItem.SourceModule))
+            {
+
+                if (_TM.VCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"VCE is not open, cannot do it.");
+                    return RState.Failed;
+                }
                 _targetModule = firtItem.SourceModule;
+            }
             else if (ModuleHelper.IsVCE(firtItem.DestinationModule))
+            {
+                if (_TM.VCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"VCE is not open, cannot do it.");
+                    return RState.Failed;
+                }
                 _targetModule = firtItem.DestinationModule;
+            }
             else
             {
                 LOG.Write(eEvent.ERR_TM, Module, $"Invalid move parameter: {firtItem.SourceModule},{firtItem.SourceSlot + 1} => {firtItem.DestinationModule},{firtItem.DestinationSlot + 1} ");