Browse Source

1、add recipe event notify;

chenkui 1 year ago
parent
commit
563a30f852

+ 8 - 18
Venus/Venus_RT/Config/EquipmentVariables.xml

@@ -2868,6 +2868,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -2877,6 +2878,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -2922,6 +2924,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -2931,6 +2934,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -2967,6 +2971,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -2976,6 +2981,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -3018,6 +3024,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -3027,6 +3034,7 @@
         <ReportVariable id="3105" variableType="DataVariable" logicalName="CarrierID" />
         <ReportVariable id="3102" variableType="DataVariable" logicalName="LotID" />
         <ReportVariable id="3110" variableType="DataVariable" logicalName="SlotID" />
+        <ReportVariable id="3109" variableType="DataVariable" logicalName="RecipeStepNumber" />
         <ReportVariable id="3108" variableType="DataVariable" logicalName="StationName" />
       </Variables>
     </Report>
@@ -3328,24 +3336,6 @@
         <int>32</int>
       </Reports>
     </CollectionEvent>
-    <CollectionEvent id="1000101" logicalName="__SYSTEM__1000101__ALARMSET" description="Alarm Set : System Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
-    <CollectionEvent id="2000101" logicalName="__SYSTEM__2000101__ALARMCLEAR" description="Alarm Clear : System Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
-    <CollectionEvent id="1006201" logicalName="__SYSTEM__1006201__ALARMSET" description="Alarm Set : PMA Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
-    <CollectionEvent id="2006201" logicalName="__SYSTEM__2006201__ALARMCLEAR" description="Alarm Clear : PMA Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
-    <CollectionEvent id="1006301" logicalName="__SYSTEM__1006301__ALARMSET" description="Alarm Set : PMB Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
-    <CollectionEvent id="2006301" logicalName="__SYSTEM__2006301__ALARMCLEAR" description="Alarm Clear : PMB Error" enabled="true">
-      <Reports />
-    </CollectionEvent>
     <CollectionEvent id="10000" logicalName="ControlJobCalceled" description="" enabled="true">
       <Reports>
         <int>10000</int>

+ 11 - 11
Venus/Venus_RT/Modules/Autotransfer_LP_FA.cs

@@ -27,8 +27,8 @@ namespace Venus_RT.Modules
         void JobFinished(ControlJobInfo cj, ProcessJobInfo pj);
         void JobFailed(ControlJobInfo cj, ProcessJobInfo pj);
 
-        void JobWaferStart(ControlJobInfo cj, ProcessJobInfo pj,int slotID);
-        void JobWaferEnd(ControlJobInfo cj, ProcessJobInfo pj, string module, int slotID);
+        void JobWaferStart(ControlJobInfo cj, int slotID);
+        void JobWaferEnd(ControlJobInfo cj, int slotID);
     }
     public class SchedulerFACallback : ISchedulerFACallback
     {
@@ -178,33 +178,33 @@ namespace Venus_RT.Modules
             });
         }
 
-        public void JobWaferStart(ControlJobInfo cj, ProcessJobInfo pj,int slotID)
+        public void JobWaferStart(ControlJobInfo cj, int slotID)
         {
             ModuleName module = ModuleHelper.Converter(cj.Module);
 
             EV.Notify(PortJobWaferStart, new SerializableDictionary<string, string>()
             {
-                {DVIDName.LotID,  pj.LotName},
-                {DVIDName.JobID,  pj.ControlJobName},
+                {DVIDName.LotID,  cj.LotName},
+                {DVIDName.JobID,  cj.Name},
                 {DVIDName.PortID, PortId[module] },
                 {DVIDName.SlotID, (slotID+1).ToString() },
-                {DVIDName.CarrierID, cj.CarrierID.ToString()}
+                {DVIDName.CarrierID, cj.CarrierID?.ToString()}
             });
         }
 
-        public void JobWaferEnd(ControlJobInfo cj, ProcessJobInfo pj, string module1, int slotID)
+        public void JobWaferEnd(ControlJobInfo cj, int slotID)
         {
             ModuleName module = ModuleHelper.Converter(cj.Module);
 
-            WaferInfo wafer = WaferManager.Instance.GetWafer(ModuleHelper.Converter(module1), slotID);
+            WaferInfo wafer = WaferManager.Instance.GetWafer(module, slotID);
 
             EV.Notify(PortJobWaferEnd, new SerializableDictionary<string, string>()
             {
-                {DVIDName.LotID,  pj.LotName},
-                {DVIDName.JobID,  pj.ControlJobName},
+                {DVIDName.LotID,  cj.LotName},
+                {DVIDName.JobID,  cj.Name},
                 {DVIDName.PortID, PortId[module] },
                 {DVIDName.SlotID, (slotID+1).ToString() },
-                {DVIDName.CarrierID, cj.CarrierID.ToString()},
+                {DVIDName.CarrierID, cj.CarrierID?.ToString()},
                 {DVIDName.WaferProcessResult, (wafer.ProcessState == EnumWaferProcessStatus.Failed ? 0:1).ToString()}
             });
         }

+ 4 - 2
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -376,7 +376,7 @@ namespace Venus_RT.Modules.PMs
 
             var state = _currentRecipe.Steps[_currentStep].Start();
             LOG.Write(eEvent.INFO_PROCESS, Module, $"Recipe:{CurrentRunningRecipe} Step{_currentStep+1} Start");
-
+            _faCallback.RecipeStepStart(Module.ToString(), CurrentRunningRecipe, _currentStep);
             if (state != RState.Running)
                 return state;
 
@@ -458,6 +458,7 @@ namespace Venus_RT.Modules.PMs
                 UpdateWaferStatus(false);
                 Runner.Stop($"Recipe:{CurrentRunningRecipe}, Step:{_currentStep + 1} Failed");
                 EV.PostAlarmLog(Module.ToString(), $"Recipe:{CurrentRunningRecipe}, Step:{_currentStep + 1} Failed");
+                _faCallback.RecipeFailed(Module.ToString(), CurrentRunningRecipe);
                 return true;
             }
             else if (result == RState.End || isMaualEndStep == true)
@@ -494,6 +495,7 @@ namespace Venus_RT.Modules.PMs
                     isMaualEndStep = false;
                     _currentStep++;
                     LOG.Write(eEvent.INFO_PROCESS, Module, $"Recipe:{CurrentRunningRecipe} Step{_currentStep} End");
+                    _faCallback.RecipeStepEnd(Module.ToString(), CurrentRunningRecipe, _currentStep);
                     return StartNewStep() != RState.Running;
                 }
                 else
@@ -543,7 +545,7 @@ namespace Venus_RT.Modules.PMs
         private bool ProcessDone()
         {
             _currentRecipe.Steps[_currentStep].End();
-
+            _faCallback.RecipeComplete(Module.ToString(), CurrentRunningRecipe);
             RecipeFileManager.Instance.SaveAsRecipe2(Module.ToString(), _currentRecipe.Header.Type.ToString(), _currentRecipe.Header.Name, RecipeUnity.RecipeToString(_currentRecipe));
             _stepTime.Stop();
             WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Idle);

+ 4 - 4
Venus/Venus_RT/Modules/PMs/PMProcess_FA.cs

@@ -18,7 +18,7 @@ namespace Venus_RT.Modules.PMs
         void RecipeComplete(string module,string recipeName);
         void RecipeFailed(string module, string recipeName);
         void RecipeStepStart(string module, string recipeName, int stepNumber);
-        void RecipeStepEnd(string module, string recipeName, int stepNumber, List<FdcDataItem> fdc);
+        void RecipeStepEnd(string module, string recipeName, int stepNumber);
     }
     public class RecipeFACallback : IRecipeFACallback
     {
@@ -210,7 +210,7 @@ namespace Venus_RT.Modules.PMs
                 });
             }
         }
-        public void RecipeStepEnd(string module, string recipeName, int stepNumber, List<FdcDataItem> fdc)
+        public void RecipeStepEnd(string module, string recipeName, int stepNumber)
         {
             WaferInfo wafer = WaferManager.Instance.GetWafer(ModuleHelper.Converter(module), 0);
 
@@ -228,7 +228,7 @@ namespace Venus_RT.Modules.PMs
                     {DVIDName.RecipeStepNumber, (stepNumber + 1).ToString()},
                     {DVIDName.PortID, PortId[wafer.OriginStation]},
                     {DVIDName.SlotID, (wafer.OriginSlot + 1).ToString()},
-                    {DVIDName.RecipeStepEndDataSummary, fdc},
+                    //{DVIDName.RecipeStepEndDataSummary, fdc},
                     {DVIDName.LotID, wafer.LotId},
                     {DVIDName.CarrierID,wafer.OriginCarrierID.ToString() }
                 });
@@ -241,7 +241,7 @@ namespace Venus_RT.Modules.PMs
                     {DVIDName.StationName, module},
                     {DVIDName.RecipeStepNumber, (stepNumber + 1).ToString()},
                     {DVIDName.SlotID, (wafer.OriginSlot + 1).ToString()},
-                    {DVIDName.RecipeStepEndDataSummary, fdc},
+                    //{DVIDName.RecipeStepEndDataSummary, fdc},
                     {DVIDName.LotID, wafer.LotId},
                     {DVIDName.CarrierID,wafer.OriginCarrierID.ToString() }
 

+ 41 - 3
Venus/Venus_RT/Modules/SystemDispatcher.cs

@@ -769,6 +769,23 @@ namespace Venus_RT.Modules
             }
         }
 
+        /// <summary>
+        /// 获取lp当前的ControlJob
+        /// </summary>
+        /// <param name="lp"></param>
+        /// <returns></returns>
+        public ControlJobInfo GetLoadPortCurrentControlJob(ModuleName lp)
+        {
+            if(ModuleHelper.IsLoadPort(lp))
+            {
+                return _loadportControlJobDic.ContainsKey(lp.ToString()) ? _loadportControlJobDic[lp.ToString()] : null;
+            }
+            else
+            {
+                return null; 
+            }
+        }
+
         public RState Start(params object[] objs)
         {
             _efemRobotSingleArmOption   = SC.GetValue<int>("EFEM.SingleArmOption");
@@ -907,9 +924,12 @@ namespace Venus_RT.Modules
                     _faCallback.JobCreateFailed(module, lotId, jobId, "");
                     return false;
                 }
-
-                cj.LotWafers.Add(WaferManager.Instance.GetWafer(ModuleHelper.Converter(module), i));
-                WaferManager.Instance.GetWafer(ModuleHelper.Converter(module), i).SequenceName = slotSequence[i];
+                //--- 2024-03-21 增加了waferinfo 相应的lotId信息 start---
+                WaferInfo waferInfo = WaferManager.Instance.GetWafer(ModuleHelper.Converter(module), i);
+                cj.LotWafers.Add(waferInfo);
+                waferInfo.SequenceName = slotSequence[i];
+                waferInfo.LotId = lotId;
+                //--- 2024-03-21 增加了waferinfo 相应的lotId信息 end---
 
                 seqSlotWafers[groupName].Add(Tuple.Create(ModuleHelper.Converter(module), i));
 
@@ -2271,6 +2291,24 @@ namespace Venus_RT.Modules
                         {
                             var waferTask = _lstWaferTasks.Find(wafer => (wafer.movingStatus == RState.End || wafer.movingStatus == RState.Init) && wafer.currentMod == action.SourceModule && wafer.currentSlot == action.SourceSlot);
                             waferTask.MoveTo(action.DestinationModule, action.DestinationSlot);
+                            //--2024-03-21 增加了PortJobWaferStart 上报事件 start--
+                            if (ModuleHelper.IsLoadPort(action.SourceModule))
+                            {
+                                ControlJobInfo currentControlJob = GetLoadPortCurrentControlJob(action.SourceModule);
+                                if(currentControlJob!=null)
+                                {
+                                    _faCallback.JobWaferStart(currentControlJob, action.SourceSlot);
+                                }
+                            }
+                            if(ModuleHelper.IsLoadPort(action.DestinationModule))
+                            {
+                                ControlJobInfo currentControlJob = GetLoadPortCurrentControlJob(action.DestinationModule);
+                                if (currentControlJob != null)
+                                {
+                                    _faCallback.JobWaferEnd(currentControlJob, action.SourceSlot);
+                                }
+                            }
+                            //--2024-03-21 增加了PortJobWaferStart 上报事件 end--
                         }
 
                         (_dictModuleTask[ModuleName.EfemRobot].Scheduler as SchedulerEfemRobot).PostMoveItems(_curEfemAction.ToArray());