123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- 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.ModuleLibrary.LPModules;
- using MECF.Framework.RT.ModuleLibrary.SystemModules;
- namespace EfemDualSchedulerLib.Schedulers
- {
- public class SchedulerLoadPort : SchedulerModule
- {
- public override bool IsAvailable
- {
- get { return _lp.IsReady && IsOnline && CheckTaskDone(); }
- }
- public override bool IsOnline
- {
- get { return true; }
- }
- public override bool IsError
- {
- get { return _lp.IsError; }
- }
-
- private LoadPortModuleBase _lp = null;
- public SchedulerLoadPort(ModuleName module) : base(module.ToString())
- {
- _module = module.ToString();
- _lp = EquipmentManager.Modules[module] as LoadPortModuleBase;
- System.Diagnostics.Trace.Assert(_lp!=null);
- }
-
- public void NoteJobStart()
- {
- _lp.NoteJobStart();
- }
- public void NoteJobComplete()
- {
- _lp.NoteJobComplete();
- }
- public bool Monitor()
- {
-
- return true;
- }
- public bool IsLoaded
- {
- get { return _lp.IsLoaded; }
- }
- public bool IsUnloaded
- {
- get { return _lp.IsUnloaded; }
- }
- public bool Load()
- {
- return _lp.Load();
- }
- public bool Unload()
- {
- return _lp.Unload();
- }
- public override bool IsReadyForPick(ModuleName robot, Hand blade, int slot)
- {
- return _lp.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 _lp.CheckReadyForTransfer(robot, blade, slot, EnumTransferType.Pick, 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 = _lp.CheckReadyForTransfer(ModuleName.EfemRobot, Hand.Blade1, 0, EnumTransferType.Pick, out _);
- break;
- case TaskType.TransferTarget:
- ret = _lp.CheckReadyForTransfer(ModuleName.EfemRobot, Hand.Blade1, 0, EnumTransferType.Place, out _);
- break;
- }
- if (ret && _task != TaskType.None)
- {
- LogTaskDone(_task, "");
- _task = TaskType.None;
- }
- return ret;
- }
- internal bool CheckReadyRunJob()
- {
- return true;
- }
- internal bool CheckReadyTransfer()
- {
- return _lp.CheckReadyForTransfer(ModuleName.EfemRobot, Hand.Blade1, 0, EnumTransferType.Pick, out _);
- }
- }
- }
|