VCEBase.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net.Configuration;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Xml;
  8. using Aitex.Core.Common.DeviceData;
  9. using Aitex.Core.RT.DataCenter;
  10. using Aitex.Core.RT.Device;
  11. using Aitex.Core.RT.Event;
  12. using Aitex.Core.RT.IOCore;
  13. using Aitex.Core.RT.OperationCenter;
  14. using Aitex.Core.RT.SCCore;
  15. using Aitex.Core.Util;
  16. namespace MECF.Framework.Common.Device.Bases
  17. {
  18. public abstract class VCEBase : BaseDevice, IDevice
  19. {
  20. public virtual bool IsIdle { get; set; }
  21. public virtual bool IsHomed { get; set; }
  22. public virtual bool IsDoorOpened { get; set; }
  23. public virtual bool IsDoorClosed { get; set; }
  24. public virtual bool IsPlatformIn { get; set; }
  25. public virtual bool IsPlatformOut { get; set; }
  26. public virtual bool IsAlarm { get; set; }
  27. public virtual bool IsConnected { get; set; }
  28. public virtual bool IsMapped { get; set; }
  29. public virtual bool IsZAxisAtLoadPostion { get; set; }
  30. public virtual bool IsZAxisAtHomePostion { get; set; }
  31. public virtual int ZAxisAtSlot { get; set; }
  32. public virtual bool IsWaferSlideOut { get; set; }
  33. public virtual bool IsCassettePresent { get; set; }
  34. public virtual string SlotMap { get; set; }//from 25->1
  35. protected VCEBase() : base()
  36. {
  37. }
  38. protected VCEBase(string module, string name) : base(module, name, name, name)
  39. {
  40. }
  41. public virtual bool Initialize()
  42. {
  43. OP.Subscribe($"{Module}.{Name}.Home", (string cmd, object[] args) =>
  44. {
  45. Home(out _);
  46. return true;
  47. });
  48. OP.Subscribe($"{Module}.{Name}.Abort", (string cmd, object[] args) =>
  49. {
  50. Abort();
  51. return true;
  52. });
  53. OP.Subscribe($"{Module}.{Name}.Reset", (string cmd, object[] args) =>
  54. {
  55. Reset();
  56. return true;
  57. });
  58. OP.Subscribe($"{Module}.{Name}.Unload", (string cmd, object[] args) =>
  59. {
  60. Unload(out _);
  61. return true;
  62. });
  63. OP.Subscribe($"{Module}.{Name}.Load", (string cmd, object[] args) =>
  64. {
  65. Load(out _);
  66. return true;
  67. });
  68. OP.Subscribe($"{Module}.{Name}.MoveToSlot", (string cmd, object[] args) =>
  69. {
  70. MoveToSlot(Convert.ToInt32(args[0]), out _);
  71. return true;
  72. });
  73. OP.Subscribe($"{Module}.{Name}.MoveToLoadPositon", (string cmd, object[] args) =>
  74. {
  75. MoveToLoadPositon(out _);
  76. return true;
  77. });
  78. OP.Subscribe($"{Module}.{Name}.PlatformIn", (string cmd, object[] args) =>
  79. {
  80. PlatformIn(out _);
  81. return true;
  82. });
  83. OP.Subscribe($"{Module}.{Name}.PlatformOut", (string cmd, object[] args) =>
  84. {
  85. PlatformOut(out _);
  86. return true;
  87. });
  88. return true;
  89. }
  90. public virtual void Terminate()
  91. {
  92. }
  93. public virtual void Monitor()
  94. {
  95. }
  96. public virtual void Reset()
  97. {
  98. }
  99. public virtual bool Home(out string reason)
  100. {
  101. reason = string.Empty;
  102. return true;
  103. }
  104. public virtual bool MoveToSlot(int slot, out string reason)
  105. {
  106. reason = string.Empty;
  107. return true;
  108. }
  109. public virtual bool MoveToLoadPositon(out string reason)
  110. {
  111. reason = string.Empty;
  112. return true;
  113. }
  114. public virtual bool PlatformIn(out string reason)
  115. {
  116. reason = string.Empty;
  117. return true;
  118. }
  119. public virtual bool PlatformOut(out string reason)
  120. {
  121. reason = string.Empty;
  122. return true;
  123. }
  124. public virtual bool Load(out string reason)
  125. {
  126. reason = string.Empty;
  127. return true;
  128. }
  129. public virtual bool Unload(out string reason)
  130. {
  131. reason = string.Empty;
  132. return true;
  133. }
  134. public virtual bool OpenDoor(out string reason)
  135. {
  136. reason = string.Empty;
  137. return true;
  138. }
  139. public virtual bool CloseDoor(out string reason)
  140. {
  141. reason = string.Empty;
  142. return true;
  143. }
  144. public virtual bool MapCassette(out string reason)
  145. {
  146. reason = string.Empty;
  147. return true;
  148. }
  149. public virtual bool QuerySlotMap(out string reason)
  150. {
  151. reason = string.Empty;
  152. return true;
  153. }
  154. public virtual bool CheckCassettePresent(bool isCheckPresent, out string reason)
  155. {
  156. reason = string.Empty;
  157. return true;
  158. }
  159. public virtual bool CheckOutsideDoorStatus() { throw new NotImplementedException(); }
  160. public virtual bool CheckWaferSlideOutStatus(out string reason) { throw new NotImplementedException(); }
  161. public virtual void Abort()
  162. {
  163. return;
  164. }
  165. public virtual bool SetSpeed(out string reason)
  166. {
  167. reason = string.Empty;
  168. return true;
  169. }
  170. }
  171. }