| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 | using Aitex.Core.RT.Device;using Aitex.Core.RT.Log;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.Efems;using MECF.Framework.RT.EquipmentLibrary.LogicUnits;using MECF.Framework.RT.ModuleLibrary.Commons;using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;using System.Threading.Tasks;using Venus_Core;namespace Venus_RT.Devices.VCE{    public abstract class VCEModuleBase : ModuleFsmDevice, ITransferTarget, IModuleDevice    {        private int _slot = 25;        private ModuleName _moduleName;        public virtual bool IsDashWaferError { get; }        //private bool isJobDone;        public virtual RState Status { get; }        public virtual ILoadport this[ModuleName mod]        {            get { throw new ApplicationException(); }        }        public VCEModuleBase(int slot, ModuleName moduleName)        {            _slot = slot;            _moduleName = moduleName;        }        public override bool Initialize()        {            WaferManager.Instance.SubscribeLocation(Module, _slot);            CarrierManager.Instance.SubscribeLocation(Module);            return base.Initialize();        }        public virtual void NoteJobStart()        {            //isJobDone = false;        }        public virtual void NoteJobComplete()        {            //isJobDone = true;        }        public virtual bool OutDoorIsOpen { get; set; }        //IModuleDevice        public abstract bool IsConnected { get; }        public abstract int CurrentSlot { get; }        public abstract bool IsReady { get; }        public abstract bool IsError { get; }        public abstract bool IsInit { get; }        //Home        public abstract bool Home(string axis);        public abstract bool HomeALL();        //此处的Door 都是Outer Door        public abstract bool OpenDoor();        public abstract bool CloseDoor();        public abstract bool CheckStatus();        //Load        public abstract bool Load();        public abstract bool UnLoad();        //Goto        public abstract bool Goto(int Targetslot);        //Map        public abstract bool Map();        //Read        public abstract bool ReadMap();        public abstract bool GotoLP();        public abstract bool ClearError();        public abstract bool ServerUp();        //public abstract void RHandExtend();        //public abstract void RHandRetract();        //Halt        //public abstract bool Halt();        protected bool CheckVceStatus()        {            if (Status == RState.Init)            {                LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE is not homed, please home first.");                return false;            }            else if (Status == RState.Running)            {                LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE is busy, please wait a minute");                return false;            }            else if (Status == RState.Failed || Status == RState.Timeout)            {                LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE has a error, please check and fix the hardware issue and home it");                return false;            }            return true;        }        //transfer        public bool PrepareTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)        {            reason = "";            return false;        }        public bool TransferHandoff(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)        {            reason = "";            return false;        }        public bool PostTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)        {            reason = "";            return false;        }        public bool CheckReadyForTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)        {            reason = "";            return false;        }        public void NoteTransferStart(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)        {            return;        }        public void NoteTransferStop(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)        {            return;        }        public bool Home(out string reason)        {            reason = "";            return false;        }    }}
 |