JetPMBase.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.OperationCenter;
  4. using MECF.Framework.Common.Equipment;
  5. using System.Collections.Generic;
  6. using Venus_Core;
  7. namespace Venus_RT.Devices
  8. {
  9. abstract class JetPMBase : BaseDevice, IDevice
  10. {
  11. public abstract List<string> EPDCfgList { get; }
  12. public abstract bool EPDCaptured { get; }
  13. public abstract bool EPDConnected { get;}
  14. // 盖子的状态
  15. public abstract bool IsLidClosed { get; }
  16. public abstract bool IsLidLoadlockClosed { get; }
  17. public abstract bool IsSlitDoorClosed { get; }
  18. public abstract bool IsPumpRunning { get; }
  19. public abstract bool IsTurboPumpRunning { get; }
  20. public abstract bool IsTurboPumpAtSpeed { get; }
  21. public abstract float TurboPumpSpeed { get; }
  22. public abstract bool HasPumpError { get; }
  23. public abstract bool HasTurboPumpError { get; }
  24. public abstract bool IsCDA_OK { get; }
  25. public abstract bool IsFastPumpOpened { get; }
  26. public abstract bool IsSoftPumpOpened { get; }
  27. public abstract bool IsMfc1ValveOpened { get; }
  28. public abstract bool IsMfc2ValveOpened { get; }
  29. public abstract bool IsMfc3ValveOpened { get; }
  30. public abstract bool IsMfc4ValveOpened { get; }
  31. public abstract bool IsMfc5ValveOpened { get; }
  32. public abstract bool IsMfc6ValveOpened { get; }
  33. public abstract bool IsMfc7ValveOpened { get; }
  34. public abstract bool IsMfc8ValveOpened { get; }
  35. public abstract bool IsGuageValveOpened { get; }
  36. public abstract bool IsATM { get; }
  37. public abstract bool PVN22ValveIsOpen { get; }
  38. public abstract bool LiftPinIsDown { get; }
  39. public abstract bool LiftPinIsUp { get; }
  40. public abstract bool IsATMLoadlock { get; }
  41. public abstract bool IsVACLoadLock { get; }
  42. public abstract bool IsVAC { get; }
  43. public abstract bool IsWaterFlowOk { get; }
  44. public abstract bool IsWLK { get; }
  45. public abstract bool IsRFGInterlockOn { get; }
  46. public abstract bool PMLidClosed { get; }
  47. public abstract bool TurboPumpInterlock { get; }
  48. public abstract bool SourceRFFanInterlock { get; }
  49. public abstract bool SlitDoorClosed { get; }
  50. public abstract double ProcessLowPressure { get; }
  51. public abstract double ProcessHighPressure { get; }
  52. public abstract double ProcessPressure { get; }
  53. public abstract double ChamberPressure { get; }
  54. public abstract double ForelinePressure { get; }
  55. public abstract double TargetPressure { get; }
  56. public abstract double ESCHePressure { get; }
  57. public abstract int ESCOutputVoltage { get; }
  58. public abstract bool IsHVOn { get; }
  59. public abstract float CoolantInletTempFB { get; }
  60. public abstract float CoolantOutletTempFB { get; }
  61. public abstract bool ChillerIsRunning { get; }
  62. //Loadlock_Arm
  63. public abstract bool IsLoadlockArmRetract { get; }
  64. public abstract bool IsLoadlockArmExtend { get; }
  65. //Loadlock_Arm DO
  66. public abstract bool LoadlockArmRetract { get; }
  67. public abstract bool LoadlockArmExtend { get; }
  68. public abstract float ReflectPower { get; }
  69. public abstract float BiasReflectPower { get; }
  70. public abstract bool BackSideHeOutOfRange { get; }
  71. public new ModuleName Module;
  72. public abstract MovementPosition LiftPinPosition { get; }
  73. public abstract bool CheckAtm();
  74. public abstract bool CheckSlitDoorOpen();
  75. public abstract bool CheckSlitDoorClose();
  76. public abstract bool CheckLiftUp();
  77. public abstract bool CheckLiftDown();
  78. public abstract double TotalGasSetpoint { get; }
  79. public abstract bool HasGasOutOfRange { get; }
  80. public abstract bool PendulumValveIsOpen();
  81. public abstract double LoadlockPressure { get; }
  82. public JetPMBase(ModuleName module) : base(module.ToString(), module.ToString(), module.ToString(), module.ToString())
  83. {
  84. Module = module;
  85. DATA.Subscribe($"{Name}.ForelinePressure", () => ForelinePressure);
  86. DATA.Subscribe($"{Name}.ProcessHighPressure", () => ProcessHighPressure);
  87. DATA.Subscribe($"{Name}.ProcessLowPressure", () => ProcessLowPressure);
  88. DATA.Subscribe($"{Name}.ESCHePressure", () => ESCHePressure);
  89. DATA.Subscribe($"{Name}.LoadlockPressure", () => LoadlockPressure);
  90. DATA.Subscribe($"{Name}.IsATM", () => IsATM);
  91. DATA.Subscribe($"{Name}.IsVAC", () => IsVAC);
  92. DATA.Subscribe($"{Name}.LiftPinIsUp", () => LiftPinIsUp);
  93. DATA.Subscribe($"{Name}.LiftPinIsDown", () => LiftPinIsDown);
  94. DATA.Subscribe($"{Name}.PumpIsRunning", () => IsPumpRunning);
  95. DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => IsTurboPumpRunning);
  96. DATA.Subscribe($"{Name}.IsSlitDoorClosed", () => IsSlitDoorClosed);
  97. DATA.Subscribe($"{Name}.IsLidClosed", () => IsLidClosed);
  98. DATA.Subscribe($"{Name}.TurboPumpRotationalSpeed", () => TurboPumpSpeed);
  99. DATA.Subscribe($"{Name}.IsWaterFlowOk", () => IsWaterFlowOk);
  100. DATA.Subscribe($"{Name}.IsWLK", () => IsWLK);
  101. DATA.Subscribe($"{Name}.IsCDA_OK", () => IsCDA_OK);
  102. DATA.Subscribe($"{Name}.SourceRFFanInterlock", () => SourceRFFanInterlock);
  103. DATA.Subscribe($"{Name}.IsTurboPumpInterlock", () => TurboPumpInterlock);
  104. DATA.Subscribe($"{Name}.IsATMLoadlock", () => IsATMLoadlock);
  105. DATA.Subscribe($"{Name}.IsVACLoadlock", () => IsVACLoadLock);
  106. DATA.Subscribe($"{Name}.GetPVPosition", () => GetPVPosition());
  107. DATA.Subscribe($"{Name}.ESCHV.OutputVoltage", () => ESCOutputVoltage);
  108. DATA.Subscribe($"{Name}.ESCHV.IsOn", () => IsHVOn);
  109. DATA.Subscribe($"{Name}.Chiller.Temp", () => CoolantOutletTempFB);
  110. DATA.Subscribe($"{Name}.Chiller.IsOn", () => ChillerIsRunning);
  111. DATA.Subscribe($"{Name}.IsTurboPumpAtSpeed", () => IsTurboPumpAtSpeed);
  112. OP.Subscribe($"{Module}.SetLiftPin", (cmd, args) => {
  113. if ((bool)args[0] == true)
  114. {
  115. return SetLiftPin(MovementPosition.Up, out _);
  116. }
  117. else
  118. {
  119. return SetLiftPin(MovementPosition.Down, out _);
  120. }
  121. });
  122. OP.Subscribe($"{Module}.SetSRf", (cmd, args) =>
  123. {
  124. var ison = (bool)args[1];
  125. if (ison == true)
  126. {
  127. GeneratorPowerOn(true);
  128. GeneratorSetpower((float)args[0]);
  129. }
  130. else
  131. {
  132. GeneratorPowerOn(false);
  133. }
  134. return true;
  135. });
  136. OP.Subscribe($"{Module}.SetBRf", (cmd, args) => {
  137. var ison = (bool)args[1];
  138. if (ison == true)
  139. {
  140. GeneratorBiasPowerOn(true);
  141. GeneratorBiasSetpower((float)args[0]);
  142. }
  143. else
  144. {
  145. GeneratorBiasPowerOn(false);
  146. }
  147. return true;
  148. });
  149. OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) => {
  150. SetSlitDoor((bool)args[0], out _);
  151. return true;
  152. });
  153. OP.Subscribe($"{Module}.SetESCHVIsOn", (cmd, args) => {
  154. OnOffSetESCHV((bool)args[0]);
  155. return true;
  156. });
  157. OP.Subscribe($"{Module}.SetESCHV", (cmd, args) => {
  158. SetESCClampVoltage((int)args[0]);
  159. return true;
  160. });
  161. OP.Subscribe($"{Module}.SetPVPostion", (cmd, args) => {
  162. SetPVPostion((int)args[0]);
  163. return true;
  164. });
  165. OP.Subscribe($"{Module}.SetPVPressure", (cmd, args) => {
  166. SetPVPressure((int)args[0]);
  167. return true;
  168. });
  169. OP.Subscribe($"{Module}.ClosePump", (cmd, args) => {
  170. TurnDryPump(false);
  171. return true;
  172. });
  173. OP.Subscribe($"{Module}.CloseTurboPump", (cmd, args) => {
  174. TurnTurboPump(false);
  175. return true;
  176. });
  177. OP.Subscribe($"{Module}.ControlValve", (cmd, args) => {
  178. OpenValve((ValveType)((int)args[0]), (bool)args[1]);
  179. return true;
  180. });
  181. OP.Subscribe($"{Module}.TurnPendulumValve", (cmd, args) => {
  182. TurnPendulumValve((bool)args[0]);
  183. return true;
  184. });
  185. OP.Subscribe($"{Module}.HeatChiller", (cmd, args) => {
  186. HeatChiller((float)args[0], (float)args[1]);
  187. return true;
  188. });
  189. OP.Subscribe($"{Module}.OnOffChiller", (cmd, args) => {
  190. OnOffChiller((bool)args[0]);
  191. return true;
  192. });
  193. OP.Subscribe($"{Module}.WallChiller", (cmd, args) => {
  194. float value;
  195. float.TryParse(args[0].ToString(), out value);
  196. SetWallTCTemperature(value);
  197. return true;
  198. });
  199. OP.Subscribe($"{Module}.SetBacksideHeFlow", (cmd, args) => {
  200. double value;
  201. double.TryParse(args[0].ToString(), out value);
  202. SetBacksideHeFlow(value);
  203. return true;
  204. });
  205. OP.Subscribe($"{Module}.SetBacksideHePressure", (cmd, args) =>
  206. {
  207. float value;
  208. float.TryParse(args[0].ToString(), out value);
  209. SetBacksideHePressure(value);
  210. return true;
  211. });
  212. }
  213. public abstract void CloseValves();
  214. public abstract void TurnDryPump(bool on);
  215. public abstract void TurnTurboPump(bool on);
  216. public abstract void OpenValve(ValveType vlvType, bool on);
  217. public virtual void Monitor()
  218. {
  219. }
  220. public virtual bool Initialize()
  221. {
  222. return true;
  223. }
  224. public virtual void Terminate()
  225. {
  226. }
  227. public virtual void Reset()
  228. {
  229. }
  230. public abstract bool OnOffSetESCHV(bool on);
  231. public abstract bool SetWallTCTemperature(float value);
  232. protected abstract void CheckPermanentInterlock();
  233. public abstract void CheckIdleInterlock();
  234. public abstract void BuzzerBlinking(double time);
  235. public abstract void SwitchOnBuzzerAndRed();
  236. public abstract void Home();
  237. public abstract bool SetLiftPin(MovementPosition dirt, out string reason);
  238. public abstract bool SetSlitDoor(bool open, out string reason);
  239. public abstract bool RetractWafer();
  240. public abstract bool ExtendWafer();
  241. public abstract bool FlowGas(int gasNum, double val);
  242. public abstract bool StopGas(int gasNum);
  243. public abstract bool FlowN2(double val);
  244. public abstract bool StopN2();
  245. public abstract void StopAllGases();
  246. public abstract bool TurnPendulumValve(bool on);
  247. public abstract bool SetPVPressure(int pressure);
  248. public abstract bool SetPVPostion(int position);
  249. public abstract int GetPVPosition();
  250. public abstract void HeatChiller(double value, double offset);
  251. public abstract void OnOffChiller(bool onoff);
  252. public abstract bool CheckChillerStatus();
  253. public abstract void SetGeneratorCommunicationMode(int mode);
  254. public abstract bool GeneratorPowerOn(bool on);
  255. public abstract bool GeneratorSetpower(float val);
  256. public abstract bool GeneratorBiasPowerOn(bool on);
  257. public abstract bool GeneratorBiasSetpower(float val);
  258. public abstract bool GeneratorBiasSetMatchMode(bool val);
  259. public abstract bool SetMatchPosition(float c1, float c2);
  260. public abstract bool SetBiasMatchPosition(float c1, float c2);
  261. public abstract bool SetBiasPulseMode(bool on);
  262. public abstract bool SetBiasPulseRateFreq(int nFreq);
  263. public abstract bool SetDiasPulseDutyCycle(int percentage);
  264. public abstract bool SetESCClampVoltage(int nVoltage);
  265. public abstract bool CheckGeneratorAndHVInterlock(VenusDevice device);
  266. #region EndPoint
  267. public abstract void EPDRecipeStart();
  268. public abstract void EPDRecipeStop();
  269. public abstract void EPDStepStart(string cfgName);
  270. public abstract void EPDStepStop();
  271. #endregion
  272. public abstract void SetBacksideHeFlow(double flow);
  273. public abstract bool SetBacksideHePressure(float mTorr);
  274. public abstract bool SetBacksideHeThreshold(int nMin, int nMax);
  275. }
  276. }