123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- using Aitex.Core.Common;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Event;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.Schedulers;
- using MECF.Framework.Common.SubstrateTrackings;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Aligners;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Efems.Rorzes;
- using MECF.Framework.RT.EquipmentLibrary.LogicUnits;
- namespace FutureEfemLib.Aligners
- {
- public class FutureAligner : AlignerBase, ITransferTarget, IEfemAlignerCallback
- {
- private RorzeEfem _efem;
- private string _efemName;
-
- public FutureAligner(string module, string name, string efemName):base(module, name, module, module)
- {
- base.Module = module;
- base.Name = name;
- base.Display = name;
- base.DeviceID = "";
- _efemName = efemName;
- //IsMapWaferByLoadPort = false;
- }
- public override bool IsBusy
- {
- get
- {
- return _efem.CheckIsBusy(ModuleName.Aligner);
- }
- }
- public override bool Initialize()
- {
- if (_efem == null && !string.IsNullOrEmpty(_efemName))
- {
- _efem = DEVICE.GetDevice<RorzeEfem>(_efemName);
- _efem.SetAlignerCallback(ModuleHelper.Converter(Module), this);
- }
- //base.Initialize();
- return true;
- }
- private void _aligner_AlarmGenerated(string moduleName, EventLevel level, string message)
- {
- if (moduleName == Module)
- IsError = true;
- }
- public override bool Home(out string reason)
- {
- reason = string.Empty;
- if (!_efem.HomeWaferAligner(ModuleHelper.Converter(Module),out reason))
- {
- OnError();
- return false;
- }
- return true;
- }
- public override bool Align(double angle, out string reason)
- {
- reason = string.Empty;
- if (!_efem.AlignWafer(ModuleHelper.Converter(Module), angle, out reason))
- {
- OnError();
- return false;
- }
- return true;
- }
- public override bool QueryWaferPresence(out string reason)
- {
- reason = string.Empty;
- if (!_efem.AlignerMapWaferPresence(out string slotMap, out reason))
- {
- return false;
- }
- //bool hasWafer = slotMap.Substring(0, 1) == "1";
- //if (hasWafer &&
- // WaferManager.Instance.CheckNoWafer(Module, 0))
- //{
- // EV.PostInfoLog(Module, $"found map wafer, created wafer at {Module}");
- // WaferManager.Instance.CreateWafer(ModuleHelper.Converter(Module), 0, WaferStatus.Normal);
- //}
- //if (!hasWafer &&
- // WaferManager.Instance.CheckHasWafer(ModuleHelper.Converter(Module), 0))
- //{
- // EV.PostInfoLog(Module, $"did not find wafer, delete wafer from {Module} ");
- // WaferManager.Instance.DeleteWafer(ModuleHelper.Converter(Module), 0);
- //}
- return true;
- }
- public bool PrepareTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
- {
- throw new System.NotImplementedException();
- }
- public bool TransferHandoff(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
- {
- throw new System.NotImplementedException();
- }
- public bool PostTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
- {
- throw new System.NotImplementedException();
- }
- public bool CheckReadyForTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType,
- out string reason)
- {
- reason=string.Empty;
- if (transferType == EnumTransferType.Pick)
- {
- return WaferManager.Instance.CheckHasWafer(Module,targetSlot);
- }
- if (transferType == EnumTransferType.Place)
- {
- return WaferManager.Instance.CheckNoWafer(Module,targetSlot);
- }
- return false;
- }
- public bool NoteTransferStart(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
- {
- reason = string.Empty;
- return true;
- }
- public bool NoteTransferStop(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
- {
- reason = string.Empty;
- return true;
- }
- public void NoteTransferStart(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)
- {
-
- }
- public void NoteTransferStop(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)
- {
-
- }
- public void NoteComplete()
- {
-
- }
- public void NoteCancel(string error)
- {
-
- }
- }
- }
|