Browse Source

improve the efem code.

sangwq 1 year ago
parent
commit
9f239420d8

+ 4 - 1
Venus/Framework/Common/Jobs/SequenceInfo.cs

@@ -79,12 +79,15 @@ namespace MECF.Framework.Common.Jobs
                                 string[] pos = attr.Value.Split(',');
                                 if (pos.Length < 1)
                                 {
-                                    //LOG.Error($"{seqFile} Position {attr.Value} can not be empty");
+                                    LOG.Write(eEvent.WARN_SEQUENCE, ModuleName.System, $"{seqFile} Position {attr.Value} can not be empty");
                                     return null;
                                 }
 
                                 foreach (var po in pos)
                                 {
+                                    if (po.IsEmpty())
+                                        continue;
+
                                     if (po == "Cooling" )
                                     { 
                                         stepInfo.StepModules.AddIfNotContains(ModuleName.Cooling1);

+ 1 - 0
Venus/Venus_RT/Devices/EFEM/JetEfem.cs

@@ -226,6 +226,7 @@ namespace Venus_RT.Devices.EFEM
                 Parameters = new List<string> { "CLEAR" }
             };
 
+            _status = RState.Running;
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool PickExtend(ModuleName chamber, int slot, Hand hand)

+ 8 - 0
Venus/Venus_RT/Modules/EFEM/EfemEntity.cs

@@ -795,6 +795,14 @@ namespace Venus_RT.Modules
             {
                 PostMsg(MSG.HomeAL, ModuleName.Aligner1);
             }
+            else if (flag == 8)
+            {
+                OP.DoOperation("LP1.Load");
+            }
+            else if(flag == 9)
+            {
+                OP.DoOperation("LP1.Unload");
+            }
         }
     }
 

+ 28 - 8
Venus/Venus_RT/Modules/RouteManager.cs

@@ -605,6 +605,7 @@ namespace Venus_RT.Modules
             TM?.Invoke("Home");
             LLA?.Invoke("Home");
             LLB?.Invoke("Home");
+            EFEM?.Invoke("Home");
 
             return true;
         }
@@ -615,7 +616,7 @@ namespace Venus_RT.Modules
             {
                 if (bValid && !bDone)
                 {
-                    if (fsm.ElapsedTime > 20 * 1000)
+                    if (fsm.ElapsedTime > 100 * 1000)
                     {
                         LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"{name} home timeout");
                         PostMsg(MSG.ERROR);
@@ -634,7 +635,8 @@ namespace Venus_RT.Modules
                 CheckHomed("PMD", PMD != null, PMD != null&&PMD.IsIdle) &&
                 CheckHomed("LLA", LLA != null, LLA != null&&LLA.IsIdle) &&
                 CheckHomed("LLB", LLB != null, LLB != null&&LLB.IsIdle) &&
-                CheckHomed("TM", TM != null, TM != null&&TM.IsIdle);
+                CheckHomed("TM", TM != null, TM != null&&TM.IsIdle) &&
+                CheckHomed("EFEM", EFEM != null, EFEM != null && EFEM.IsIdle);
         }
 
         private bool FsmError(object[] objs)
@@ -761,13 +763,15 @@ namespace Venus_RT.Modules
         {
             RState ret = _AutoCycle.Monitor();
 
-            if (_AutoCycle.CheckAllJobDone())
-            {
-                if (!CheckToPostMessage((int)MSG.JobDone))
-                    return false;
-            }
+            //if (_AutoCycle.CheckAllJobDone())
+            //{
+            //    if (!CheckToPostMessage((int)MSG.JobDone))
+            //        return false;
+            //}
 
-            _isWaitUnload = (bool)DATA.Poll("LP1.NotifyJobDone") || (bool)DATA.Poll("LP2.NotifyJobDone");
+            //_isWaitUnload = (bool)DATA.Poll("LP1.NotifyJobDone") || (bool)DATA.Poll("LP2.NotifyJobDone");
+
+            _debugRoutine();
 
             return ret == RState.End;
         }
@@ -794,6 +798,22 @@ namespace Venus_RT.Modules
             {
                 PostMsg(MSG.TMCycle);
             }
+            else if (flag == 3)
+            {
+                PostMsg(MSG.SetAutoMode);
+            }
+            else if (flag == 4)
+            {
+                Dictionary<string, object> param = new Dictionary<string, object>()
+                {
+                    {"JobId",  "CJ_Local_LP1"},
+                    {"Module", "LP1"},
+                    {"SlotSequence", new List<string>(){ "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333","333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333", "333333" }.ToArray() },
+                    {"AutoStart", false},
+                };
+
+                OP.DoOperation("System.CreateJob", param);
+            }
         }
     }
 }

+ 1 - 0
Venus/Venus_Simulator/Devices/EfemSimulator.cs

@@ -150,6 +150,7 @@ namespace Venus_Simulator.Devices
                 OnWriteMessage(strACK.Replace(ACK, "INF"));
                     return;
             case EfemOperation.Map:
+            case EfemOperation.Load:
                 Match m2 = Regex.Match(strACK, SFOUP);
                 if (m2.Success)
                 {