Browse Source

update dummy wafersize

chenkui 2 weeks ago
parent
commit
1af6a448da

+ 3 - 0
CyberX8_RT/CyberX8_RT.csproj

@@ -432,8 +432,10 @@
     <Compile Include="Schedulers\EfemRobot\RobotMoveHelper.cs" />
     <Compile Include="Schedulers\EfemRobot\SchedulerEfemRobot.cs" />
     <Compile Include="Schedulers\EfemRobot\SchedulerRobot.cs" />
+    <Compile Include="Schedulers\Loader\LoaderParameter.cs" />
     <Compile Include="Schedulers\Puf\PufSchedulerParameter.cs" />
     <Compile Include="Schedulers\SchedulerPostMsg.cs" />
+    <Compile Include="Schedulers\SchedulerSequenceNewManager.cs" />
     <Compile Include="Schedulers\Srd\SchedulerSrd.cs" />
     <Compile Include="Schedulers\Loader\SchedulerLoader.cs" />
     <Compile Include="Schedulers\Prewet\SchedulerPrewet.cs" />
@@ -454,6 +456,7 @@
     <Compile Include="Schedulers\Transporter\SchedulerLoaderTransporter.cs" />
     <Compile Include="Schedulers\SchedulerSequenceManager.cs" />
     <Compile Include="Schedulers\SchedulerSyncModuleMessage.cs" />
+    <Compile Include="Schedulers\Transporter\TransporterAction.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Instances\RtInstance.cs" />

+ 1 - 1
CyberX8_RT/Devices/EFEM/SunWayRobot.cs

@@ -444,7 +444,7 @@ namespace CyberX8_RT.Devices.EFEM
             }
             if (ModuleHelper.IsAligner(station))
             {
-                cmd = $"PLACE {stationNumber} HOME\r";
+                cmd = $"PLACE {stationNumber} PHOME\r";
             }
             SetRobotMovingInfo(RobotAction.Placing, hand, station);
             return WriteCommand(cmd);

+ 18 - 0
CyberX8_RT/Dispatch/JobProcesser.cs

@@ -21,6 +21,7 @@ using System.Collections.Concurrent;
 using MECF.Framework.Common.WaferHolder;
 using CyberX8_RT.Modules.Loader;
 using SecsGem.Core.ItemModel;
+using CyberX8_RT.Devices.EFEM;
 
 namespace CyberX8_RT.Dispatch
 {
@@ -293,6 +294,23 @@ namespace CyberX8_RT.Dispatch
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
                     return false;
                 }
+                int dummyCount = 0;
+                DummyDevice dummy1Device = Singleton<RouteManager>.Instance.EFEM.GetDummyDevice(0);
+                if(dummy1Device!=null&&dummy1Device.HasCassette&&dummy1Device.WaferSize==waferSize)
+                {
+                    dummyCount++;
+                }
+                DummyDevice dummy2Device = Singleton<RouteManager>.Instance.EFEM.GetDummyDevice(1);
+                if (dummy2Device != null && dummy2Device.HasCassette && dummy2Device.WaferSize == waferSize)
+                {
+                    dummyCount++;
+                }
+                if (dummyCount == 0)
+                {
+                    reason = $"dummy is not matched wafer wafersize {waferSize}";
+                    LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                    return false;
+                }
                 string crsType = pj.SequenceRecipe.CrsType;
                 List<string> chemistries = SchedulerSequenceRecipeManager.Instance.GetSequenceChemistry(pj.SequenceRecipe);
                 if (ControlJobInfos.Count == 0)

+ 79 - 7
CyberX8_RT/Dispatch/WaferTaskManager.cs

@@ -16,6 +16,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Markup;
+using Aitex.Core.RT.SCCore;
 
 namespace CyberX8_RT.Dispatch
 {
@@ -126,6 +127,10 @@ namespace CyberX8_RT.Dispatch
             int count = 0;
             string mateWaferTask = "";
             List<WaferInfo> wafers = new List<WaferInfo>();
+            if (processJobInfos.Count == 0)
+            {
+                return 0;
+            }
             for(int i=0; i<processJobInfos.Count;i++)
             {
                 ProcessJobInfo processJobInfo = processJobInfos[i];
@@ -154,22 +159,41 @@ namespace CyberX8_RT.Dispatch
                     }
                 }
             }
+            SequenceRecipe sequenceRecipe = processJobInfos[0].SequenceRecipe;
             if (wafers.Count == 1)
             {
                 WaferInfo waferInfo = wafers[0];
                 ModuleName pufModuleName = ModuleName.PUF1;
                 string waferSide = "";
                 string dummySide = "";
-                bool lastSingleWaferToSideB = processJobInfos[0].SequenceRecipe.LastSingleWaferToSideB;
+                bool lastSingleWaferToSideB = sequenceRecipe.LastSingleWaferToSideB;
                 if (lastSingleWaferToSideB)
                 {
-                    waferSide = SIDE_B;
-                    dummySide = SIDE_A;
+                    if (CheckLoaderHasSameWaferSize())
+                    {
+                        waferSide = SIDE_B;
+                        dummySide = SIDE_A;
+                    }
+                    else
+                    {
+                        string side = AnalyseLoadSide(sequenceRecipe);
+                        waferSide = side;
+                        dummySide = side;
+                    }
                 }
                 else
                 {
-                    waferSide = SIDE_A;
-                    dummySide = SIDE_B;
+                    if (CheckLoaderHasSameWaferSize())
+                    {
+                        waferSide = SIDE_A;
+                        dummySide = SIDE_B;
+                    }
+                    else
+                    {
+                        string side = AnalyseLoadSide(sequenceRecipe);
+                        waferSide = side;
+                        dummySide = side;
+                    }
                 }
                 if (CheckWaferHolderHasSameTypeWafers(waferHolderInfo))
                 {
@@ -234,11 +258,27 @@ namespace CyberX8_RT.Dispatch
                     if (i == 0)
                     {
                         mateWaferTask = wafers[0].WaferID;
-                        CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, "",SIDE_A);
+                        if (CheckLoaderHasSameWaferSize())
+                        {
+                            CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, "", SIDE_A);
+                        }
+                        else
+                        {
+                            string side = AnalyseLoadSide(sequenceRecipe);
+                            CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, "", side);
+                        }
                     }
                     else
                     {
-                        CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, mateWaferTask,SIDE_B);
+                        if (CheckLoaderHasSameWaferSize())
+                        {
+                            CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, mateWaferTask, SIDE_B);
+                        }
+                        else
+                        {
+                            string side = AnalyseLoadSide(sequenceRecipe); 
+                            CreateWaferTaskSchedulerSequence(waferInfo, pufModuleName, waferHolderInfo, waferInfo.ProcessJob.SequenceRecipe, mateWaferTask, side);
+                        }
                     }
                 }
                 _waferTaskMatchDic[wafers[0].WaferID] = wafers[1].WaferID;
@@ -250,6 +290,38 @@ namespace CyberX8_RT.Dispatch
             return 0;
         }
         /// <summary>
+        /// 检验Loader两边是不是尺寸一致
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckLoaderHasSameWaferSize()
+        {
+            int sideAWaferSize = SC.GetValue<int>($"Loader1.SideAWaferSize");
+            int sideBWaferSize = SC.GetValue<int>($"Loader1.SideBWaferSize");
+            return sideAWaferSize == sideBWaferSize;
+        }
+        /// <summary>
+        /// Loader两边尺寸不一致,解析Loader使用side
+        /// </summary>
+        /// <param name="recipe"></param>
+        /// <returns></returns>
+        private string AnalyseLoadSide(SequenceRecipe recipe)
+        {
+            int sideAWaferSize = SC.GetValue<int>($"Loader1.SideAWaferSize");
+            int sideBWaferSize = SC.GetValue<int>($"Loader1.SideBWaferSize");
+            if (sideAWaferSize != sideBWaferSize)
+            {
+                if(recipe.SubstrateSize==sideAWaferSize)
+                {
+                    return SIDE_A;
+                }
+                else
+                {
+                    return SIDE_B;
+                }
+            }
+            return "";
+        }
+        /// <summary>
         /// 检验WaferHolder是否存在两片生产片
         /// </summary>
         /// <param name="waferHolderInfo"></param>

+ 5 - 3
CyberX8_RT/Modules/Loader/LoaderEntity.cs

@@ -510,9 +510,11 @@ namespace CyberX8_RT.Modules.Loader
         /// Prepare For Place
         /// </summary>
         /// <returns></returns>
-        private bool PrePareForPlace(object param)
+        private bool PrePareForPlace(object[] param)
         {
-            return _rotationAxis.PositionStation("TRNPA");
+            //默认"TRNPA"
+            string str = (param==null||param.Length==0)? "TRNPA":param[0].ToString();
+            return _rotationAxis.PositionStation(str);
         }
         /// <summary>
         /// Prepare For Place监控
@@ -932,7 +934,7 @@ namespace CyberX8_RT.Modules.Loader
                     CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.Abort);
                     return (int)FSM_MSG.NONE;
                 case "PrepareForPlace":
-                    if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.PrepareForPlace))
+                    if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.WARN_LOADER, Module.ToString(), (int)LoaderMSG.PrepareForPlace,args))
                     {
                         return (int)LoaderMSG.PrepareForPlace;
                     }

+ 4 - 0
CyberX8_RT/Modules/Transporter/TransporterPickUpValidateRoutine.cs

@@ -101,6 +101,10 @@ namespace CyberX8_RT.Modules.Transporter
         /// <returns></returns>
         private bool ReadBarcode()
         {
+            //临时注销reader barcode 2025-03-15
+            _validate = true;
+            return true;
+
             TransporterEntity transporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(Module.ToString());
             if (transporterEntity == null)
             {

+ 0 - 1
CyberX8_RT/Schedulers/EfemRobot/SchedulerRobot.cs

@@ -76,7 +76,6 @@ namespace CyberX8_RT.Schedulers.EfemRobot
             MoveItem moveItem = (MoveItem)parameter;
             if (moveItem.SourceModule != ModuleName.Unknown&&moveItem.DestinationModule!=ModuleName.Unknown)
             {                
-                SynchorinzeModuleMessages(syncMessages);
                 _state = RState.Running;
                 if (RobotMoveHelper.Instance.IsIdle)
                 {

+ 15 - 0
CyberX8_RT/Schedulers/Loader/LoaderParameter.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CyberX8_RT.Schedulers.Loader
+{
+    public class LoaderParameter
+    {
+        public int WaferCount { get; set; }
+
+        public string LoadCompleteToTransporterSide { get; set; }
+    }
+}

+ 1 - 1
CyberX8_RT/Schedulers/Puf/SchedulerPuf.cs

@@ -330,7 +330,7 @@ namespace CyberX8_RT.Schedulers.Puf
                     {
                         if (_efemEntity.IsIdle)
                         {
-                            var result = SchedulerSequenceManager.Instance.GetAvaibleDummySlots();
+                            var result = SchedulerSequenceManager.Instance.GetAvaibleDummySlots(waferInfo.Size);
                             if (result.moduleName != ModuleName.Unknown)
                             {
                                 MoveItem moveItem = new MoveItem(_pufEntity.Module, 0, result.moduleName, result.slot, Aitex.Sorter.Common.Hand.Blade1);

+ 1 - 1
CyberX8_RT/Schedulers/SchedulerModule.cs

@@ -188,7 +188,7 @@ namespace CyberX8_RT.Schedulers
             foreach (SchedulerSyncModuleMessage moduleEntity in moduleMessages)
             {
                 IModuleEntity entity = moduleEntity.ModuleEntity;
-                entity.Invoke(moduleEntity.ModuleMsg);
+                entity.Invoke(moduleEntity.ModuleMsg,moduleEntity.parameters);
             }
         }
         /// <summary>

+ 18 - 8
CyberX8_RT/Schedulers/SchedulerSequenceManager.cs

@@ -33,6 +33,8 @@ using CyberX8_RT.Modules.Prewet;
 using CyberX8_RT.Modules.SRD;
 using CyberX8_RT.Modules.Reservoir;
 using CyberX8_RT.Schedulers.Puf;
+using CyberX8_RT.Devices.EFEM;
+using Aitex.Core.RT.Device;
 
 namespace CyberX8_RT.Schedulers
 {
@@ -492,27 +494,35 @@ namespace CyberX8_RT.Schedulers
         /// </summary>
         /// <param name="moduleType"></param>
         /// <returns></returns>
-        public (ModuleName moduleName,int slot) GetAvaibleDummySlots()
+        public (ModuleName moduleName,int slot) GetAvaibleDummySlots(WaferSize waferSize)
         {
             if(ModuleHelper.IsInstalled(ModuleName.Dummy1))
             {
-                DummyEntity dummyEntity = Singleton<RouteManager>.Instance.GetModule<DummyEntity>(ModuleName.Dummy1.ToString());
-                for(int i=0;i<dummyEntity.MaxSlotNumber;i++)
+                DummyEntity dummyEntity = Singleton<RouteManager>.Instance.GetModule<DummyEntity>(ModuleName.Dummy1.ToString()); 
+                DummyDevice dummyDevice = Singleton<RouteManager>.Instance.EFEM.GetDummyDevice(0);
+                if (dummyDevice != null && dummyDevice.HasCassette&&dummyDevice.WaferSize==waferSize)
                 {
-                    if(WaferManager.Instance.CheckNoWafer(ModuleName.Dummy1,i))
+                    for (int i = 0; i < dummyEntity.MaxSlotNumber; i++)
                     {
-                        return (ModuleName.Dummy1, i);
+                        if (WaferManager.Instance.CheckNoWafer(ModuleName.Dummy1, i))
+                        {
+                            return (ModuleName.Dummy1, i);
+                        }
                     }
                 }
             }
             if(ModuleHelper.IsInstalled(ModuleName.Dummy2))
             {
                 DummyEntity dummyEntity = Singleton<RouteManager>.Instance.GetModule<DummyEntity>(ModuleName.Dummy2.ToString());
-                for (int i = 0; i < dummyEntity.MaxSlotNumber; i++)
+                DummyDevice dummyDevice = Singleton<RouteManager>.Instance.EFEM.GetDummyDevice(1);
+                if (dummyDevice != null && dummyDevice.HasCassette&& dummyDevice.WaferSize == waferSize)
                 {
-                    if (WaferManager.Instance.CheckNoWafer(ModuleName.Dummy2, i))
+                    for (int i = 0; i < dummyEntity.MaxSlotNumber; i++)
                     {
-                        return (ModuleName.Dummy2, i);
+                        if (WaferManager.Instance.CheckNoWafer(ModuleName.Dummy2, i))
+                        {
+                            return (ModuleName.Dummy2, i);
+                        }
                     }
                 }
             }

File diff suppressed because it is too large
+ 1274 - 0
CyberX8_RT/Schedulers/SchedulerSequenceNewManager.cs


+ 2 - 0
CyberX8_RT/Schedulers/SchedulerSyncModuleMessage.cs

@@ -13,5 +13,7 @@ namespace CyberX8_RT.Schedulers
         public IModuleEntity ModuleEntity { get; set; }
 
         public string ModuleMsg { get; set; }
+
+        public object[] parameters { get; set; }
     }
 }

+ 3 - 2
CyberX8_RT/Schedulers/Transporter/SchedulerLoaderTransporter.cs

@@ -76,10 +76,11 @@ namespace CyberX8_RT.Schedulers.Transporter
         /// <returns></returns>
         public override bool RunProcess(object recipe, object parameter,List<SchedulerSyncModuleMessage> syncMessages)
         {
-            if(parameter==null||!(parameter is WaferHolderMoveItem))
+            if (parameter==null||!(parameter is WaferHolderMoveItem))
             {
                 return false;
             }
+            SynchorinzeModuleMessages(syncMessages);
             WaferHolderMoveItem waferHolderMoveItem=(WaferHolderMoveItem)parameter;
             if(waferHolderMoveItem.SourceModule!=ModuleName.Unknown&&waferHolderMoveItem.DestModule!=ModuleName.Unknown)
             {
@@ -173,7 +174,7 @@ namespace CyberX8_RT.Schedulers.Transporter
                 }
                 return false;
             }
-            else if(_loaderEntity.State == (int)LOADERSTATE.WaitForUnload&&_transBufferToLoaderStep<TransBufferToLoaderStep.PickUpValidate)
+            else if (_loaderEntity.State == (int)LOADERSTATE.WaitForUnload&&_transBufferToLoaderStep<TransBufferToLoaderStep.PickUpValidate)
             {
                 _transBufferToLoaderStep = TransBufferToLoaderStep.PickUpValidate;
                 return false;

+ 16 - 0
CyberX8_RT/Schedulers/Transporter/TransporterAction.cs

@@ -0,0 +1,16 @@
+using CyberX8_RT.Modules.Transporter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CyberX8_RT.Schedulers.Transporter
+{
+    public class TransporterAction
+    {
+        public TransporterMSG ActionMsg { get; set; }
+
+        public object Parameter { get; set; }
+    }
+}