123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Aitex.Core.Common;
- using Aitex.Core.RT.DataCenter;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Log;
- using Aitex.Sorter.Common;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.SubstrateTrackings;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts;
- namespace Aitex.Sorter.RT.Module.Recipe
- {
- /// <summary>
- /// Align,哪里来,哪里去;可选是否Read Wafer ID
- /// </summary>
- class RecipeParserAlign: IRecipeParser
- {
- public SorterRecipeXml XmlRecipe { get; set; }
- public bool Init(SorterRecipeXml xmlRecipe, out string reason)
- {
- reason = string.Empty;
- if (xmlRecipe.RecipeType != SorterRecipeType.Align)
- {
- LOG.Write("xml recipe type not valid, "+xmlRecipe.RecipeType);
- reason = "Recipe xml file not valid";
- return false;
- }
- XmlRecipe = xmlRecipe;
- return true;
- }
- public List<TransferInfo> Parse(out string reason)
- {
- List<TransferInfo> result = new List<TransferInfo>();
- reason = string.Empty;
- bool isLoad = false;
- for (int i = 0; i < XmlRecipe.Source.Count; i++)
- {
- LoadPort lp = DEVICE.GetDevice<LoadPort>(XmlRecipe.Source[i].ToString());
- if (lp.IsEnableTransferWafer(out reason))
- {
- isLoad = true;
- }
- }
- if (!isLoad)
- {
- reason = "Source is not valid for transfer.";
- return result;
- }
- for (int j = 0; j < XmlRecipe.Source.Count; j++)
- {
- string paramName = string.Empty;
- switch (XmlRecipe.Source[j])
- {
- case ModuleName.LP1:
- paramName = ParamName.WaferInfoFoupA;
- break;
- case ModuleName.LP2:
- paramName = ParamName.WaferInfoFoupB;
- break;
- case ModuleName.LP3:
- paramName = ParamName.WaferInfoFoupC;
- break;
- case ModuleName.LP4:
- paramName = ParamName.WaferInfoFoupD;
- break;
- case ModuleName.LP5:
- paramName = ParamName.WaferInfoFoupE;
- break;
- case ModuleName.LP6:
- paramName = ParamName.WaferInfoFoupF;
- break;
- case ModuleName.LP7:
- paramName = ParamName.WaferInfoFoupG;
- break;
- case ModuleName.LP8:
- paramName = ParamName.WaferInfoFoupH;
- break;
- case ModuleName.LP9:
- paramName = ParamName.WaferInfoFoupI;
- break;
- case ModuleName.LP10:
- paramName = ParamName.WaferInfoFoupJ;
- break;
- default:
- reason = string.Format("recipe source {0} not valid", XmlRecipe.Source);
- return result;
- }
- WaferInfo[] foupInfos = WaferManager.Instance.GetWafers(XmlRecipe.Source[j]);
- //Array.Reverse(foupInfos);
-
- for (int i = 0; i < foupInfos.Length; i++)
- {
- if (foupInfos[i].IsEmpty)
- continue;
- result.Add(new TransferInfo()
- {
- Angle = XmlRecipe.AlignAngle,
- Option = MoveOption.Align | (XmlRecipe.IsTurnOver ? MoveOption.Turnover : MoveOption.None),
- Source = XmlRecipe.Source[j],
- SourceSlot = i,
- Slot = i,
- Station = XmlRecipe.Source[j],
- WaferID = foupInfos[i].WaferID,
- });
- }
- }
- //if (result.Count == 0)
- // reason = "Recipe has no vaild transfer task.";
- return result;
- }
-
-
- }
- }
|