|
@@ -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>
|