VceModuleBase.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. using Aitex.Core.RT.Device;
  2. using Aitex.Core.RT.Log;
  3. using Aitex.Sorter.Common;
  4. using MECF.Framework.Common.Equipment;
  5. using MECF.Framework.Common.Schedulers;
  6. using MECF.Framework.Common.SubstrateTrackings;
  7. using MECF.Framework.RT.EquipmentLibrary.LogicUnits;
  8. using MECF.Framework.RT.ModuleLibrary.Commons;
  9. using Venus_Core;
  10. namespace MECF.Framework.RT.ModuleLibrary.VceModules
  11. {
  12. public abstract class VceModuleBase : ModuleFsmDevice, ITransferTarget, IModuleDevice
  13. {
  14. private int _slot = 25;
  15. private ModuleName _moduleName;
  16. public virtual bool IsDashWaferError { get; }
  17. //private bool isJobDone;
  18. public virtual RState Status { get; }
  19. public VceModuleBase(int slot, ModuleName moduleName)
  20. {
  21. _slot = slot;
  22. _moduleName = moduleName;
  23. }
  24. public override bool Initialize()
  25. {
  26. WaferManager.Instance.SubscribeLocation(Module, _slot);
  27. CarrierManager.Instance.SubscribeLocation(Module);
  28. return base.Initialize();
  29. }
  30. public virtual void NoteJobStart()
  31. {
  32. //isJobDone = false;
  33. }
  34. public virtual void NoteJobComplete()
  35. {
  36. //isJobDone = true;
  37. }
  38. public virtual bool OutDoorIsOpen { get; set; }
  39. //IModuleDevice
  40. public abstract bool IsConnected { get; }
  41. public abstract bool IsReady { get; }
  42. public abstract bool IsError { get; }
  43. public abstract bool IsInit { get; }
  44. //Home
  45. public abstract bool Home(string axis);
  46. public abstract bool HomeALL();
  47. //此处的Door 都是Outer Door
  48. public abstract bool OpenDoor();
  49. public abstract bool CloseDoor();
  50. //Load
  51. public abstract bool Load();
  52. public abstract bool UnLoad();
  53. //Goto
  54. public abstract bool Goto(int Targetslot);
  55. //Map
  56. public abstract bool Map();
  57. //Read
  58. public abstract bool ReadMap();
  59. public abstract bool GotoLP();
  60. public abstract bool ClearError();
  61. //public abstract void RHandExtend();
  62. //public abstract void RHandRetract();
  63. //Halt
  64. //public abstract bool Halt();
  65. protected bool CheckVceStatus()
  66. {
  67. if (Status == RState.Init)
  68. {
  69. LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE is not homed, please home first.");
  70. return false;
  71. }
  72. else if (Status == RState.Running)
  73. {
  74. LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE is busy, please wait a minute");
  75. return false;
  76. }
  77. else if (Status == RState.Failed || Status == RState.Timeout)
  78. {
  79. LOG.Write(eEvent.ERR_DEVICE_INFO, _moduleName, "VCE has a error, please check and fix the hardware issue and home it");
  80. return false;
  81. }
  82. return true;
  83. }
  84. //transfer
  85. public bool PrepareTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
  86. {
  87. reason = "";
  88. return false;
  89. }
  90. public bool TransferHandoff(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
  91. {
  92. reason = "";
  93. return false;
  94. }
  95. public bool PostTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
  96. {
  97. reason = "";
  98. return false;
  99. }
  100. public bool CheckReadyForTransfer(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
  101. {
  102. reason = "";
  103. return false;
  104. }
  105. public void NoteTransferStart(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)
  106. {
  107. return;
  108. }
  109. public void NoteTransferStop(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType)
  110. {
  111. return;
  112. }
  113. public bool Home(out string reason)
  114. {
  115. reason = "";
  116. return false;
  117. }
  118. }
  119. }