123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- 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.ModuleLibrary.AlignerModules;
- using MECF.Framework.RT.ModuleLibrary.LPModules;
- using MECF.Framework.RT.ModuleLibrary.SystemModules;
- namespace EfemDualSchedulerLib.Schedulers
- {
- public class SchedulerAligner : SchedulerModule
- {
- public override bool IsAvailable
- {
- get { return _aligner.IsReady && _aligner.IsOnline && CheckTaskDone(); }
- }
- public override bool IsOnline
- {
- get { return _aligner.IsOnline; }
- }
- public override bool IsError
- {
- get { return _aligner.IsError; }
- }
-
- private AlignerModuleBase _aligner = null;
- public SchedulerAligner(ModuleName module) : base(module.ToString())
- {
- _module = module.ToString();
- _aligner = EquipmentManager.Modules[module] as AlignerModuleBase;
- System.Diagnostics.Trace.Assert(_aligner!=null);
- }
-
- public void NoteJobStart()
- {
- }
- public void NoteJobComplete()
- {
- }
- public bool Monitor()
- {
-
- return true;
- }
- public override bool IsReadyForPick(ModuleName robot, Hand blade, int slot)
- {
- return _aligner.CheckReadyForTransfer(robot, blade, slot, EnumTransferType.Pick, out _)
- && WaferManager.Instance.CheckHasWafer(ModuleHelper.Converter(_module), slot);
- }
- public override bool IsReadyForPlace(ModuleName robot, Hand blade, int slot)
- {
- return _aligner.CheckReadyForTransfer(robot, blade, slot, EnumTransferType.Place, out _)
- && WaferManager.Instance.CheckNoWafer(ModuleHelper.Converter(_module), slot);
- }
- public bool CheckTaskDone()
- {
- bool ret = false;
- switch (_task)
- {
- case TaskType.None:
- ret = true;
- break;
- //case TaskType.PrepareTransfer:
- // ret = _aligner.CheckReadyForTransfer(ModuleName.EfemRobot, Hand.Blade1, 0, EnumTransferType.Pick, out _);
- // break;
- }
- if (ret && _task != TaskType.None)
- {
- LogTaskDone(_task, "");
- _task = TaskType.None;
- }
- return ret;
- }
- internal bool CheckReadyRunJob()
- {
- return true;
- }
- internal bool CheckReadyTransfer()
- {
- return _aligner.CheckReadyForTransfer(ModuleName.EfemRobot, Hand.Blade1, 0, EnumTransferType.Pick, out _);
- }
- internal bool Align(double angle)
- {
- return _aligner.Align(angle);
- }
- }
- }
|