JetPMBase.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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 double ESCPositiveOutputCurrent { get; }//R+
  59. public abstract double ESCNegativeOutputCurrent { get; }//R-
  60. public abstract bool IsHVOn { get; }
  61. public abstract float CoolantInletTempFB { get; }
  62. public abstract float CoolantOutletTempFB { get; }
  63. public abstract bool ChillerIsRunning { get; }
  64. //Loadlock_Arm
  65. public abstract bool IsLoadlockArmRetract { get; }
  66. public abstract bool IsLoadlockArmExtend { get; }
  67. //Loadlock_Arm DO
  68. public abstract bool LoadlockArmRetract { get; }
  69. public abstract bool LoadlockArmExtend { get; }
  70. public abstract float ReflectPower { get; }
  71. public abstract float BiasReflectPower { get; }
  72. public abstract bool BackSideHeOutOfRange { get; }
  73. public new ModuleName Module;
  74. public abstract MovementPosition LiftPinPosition { get; }
  75. public abstract bool CheckAtm();
  76. public abstract bool CheckSlitDoorOpen();
  77. public abstract bool CheckSlitDoorClose();
  78. public abstract bool CheckLiftUp();
  79. public abstract bool CheckLiftDown();
  80. public abstract double TotalGasSetpoint { get; }
  81. public abstract bool HasGasOutOfRange { get; }
  82. public abstract bool PendulumValveIsOpen();
  83. public abstract double LoadlockPressure { get; }
  84. public JetPMBase(ModuleName module) : base(module.ToString(), module.ToString(), module.ToString(), module.ToString())
  85. {
  86. Module = module;
  87. DATA.Subscribe($"{Name}.ForelinePressure", () => ForelinePressure);
  88. DATA.Subscribe($"{Name}.ProcessHighPressure", () => ProcessHighPressure);
  89. DATA.Subscribe($"{Name}.ProcessLowPressure", () => ProcessLowPressure);
  90. DATA.Subscribe($"{Name}.ESCHePressure", () => ESCHePressure);
  91. DATA.Subscribe($"{Name}.LoadlockPressure", () => LoadlockPressure);
  92. DATA.Subscribe($"{Name}.IsATM", () => IsATM);
  93. DATA.Subscribe($"{Name}.IsVAC", () => IsVAC);
  94. DATA.Subscribe($"{Name}.LiftPinIsUp", () => LiftPinIsUp);
  95. DATA.Subscribe($"{Name}.LiftPinIsDown", () => LiftPinIsDown);
  96. DATA.Subscribe($"{Name}.PumpIsRunning", () => IsPumpRunning);
  97. DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => IsTurboPumpRunning);
  98. DATA.Subscribe($"{Name}.IsSlitDoorClosed", () => IsSlitDoorClosed);
  99. DATA.Subscribe($"{Name}.IsLidClosed", () => IsLidClosed);
  100. DATA.Subscribe($"{Name}.TurboPumpRotationalSpeed", () => TurboPumpSpeed);
  101. DATA.Subscribe($"{Name}.IsWaterFlowOk", () => IsWaterFlowOk);
  102. DATA.Subscribe($"{Name}.IsWLK", () => IsWLK);
  103. DATA.Subscribe($"{Name}.IsCDA_OK", () => IsCDA_OK);
  104. DATA.Subscribe($"{Name}.SourceRFFanInterlock", () => SourceRFFanInterlock);
  105. DATA.Subscribe($"{Name}.IsTurboPumpInterlock", () => TurboPumpInterlock);
  106. DATA.Subscribe($"{Name}.IsATMLoadlock", () => IsATMLoadlock);
  107. DATA.Subscribe($"{Name}.IsVACLoadlock", () => IsVACLoadLock);
  108. DATA.Subscribe($"{Name}.GetPVPosition", () => GetPVPosition());
  109. DATA.Subscribe($"{Name}.ESCHV.Temp", () => CoolantOutletTempFB);
  110. DATA.Subscribe($"{Name}.Chiller.Temp", () => CoolantInletTempFB);
  111. DATA.Subscribe($"{Name}.Chiller.IsOn", () => ChillerIsRunning);
  112. DATA.Subscribe($"{Name}.IsTurboPumpAtSpeed", () => IsTurboPumpAtSpeed);
  113. OP.Subscribe($"{Module}.SetLiftPin", (cmd, args) => {
  114. if ((bool)args[0] == true)
  115. {
  116. return SetLiftPin(MovementPosition.Up, out _);
  117. }
  118. else
  119. {
  120. return SetLiftPin(MovementPosition.Down, out _);
  121. }
  122. });
  123. OP.Subscribe($"{Module}.SetSRf", (cmd, args) =>
  124. {
  125. var ison = (bool)args[1];
  126. if (ison == true)
  127. {
  128. GeneratorPowerOn(true);
  129. GeneratorSetpower((float)args[0]);
  130. }
  131. else
  132. {
  133. GeneratorPowerOn(false);
  134. }
  135. return true;
  136. });
  137. OP.Subscribe($"{Module}.SetBRf", (cmd, args) => {
  138. var ison = (bool)args[1];
  139. if (ison == true)
  140. {
  141. GeneratorBiasPowerOn(true);
  142. GeneratorBiasSetpower((float)args[0]);
  143. }
  144. else
  145. {
  146. GeneratorBiasPowerOn(false);
  147. }
  148. return true;
  149. });
  150. OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) => {
  151. SetSlitDoor((bool)args[0], out _);
  152. return true;
  153. });
  154. OP.Subscribe($"{Module}.SetESCHVIsOn", (cmd, args) => {
  155. OnOffSetESCHV((bool)args[0]);
  156. return true;
  157. });
  158. OP.Subscribe($"{Module}.SetESCHV", (cmd, args) => {
  159. SetESCClampVoltage((int)args[0]);
  160. return true;
  161. });
  162. OP.Subscribe($"{Module}.SetPVPostion", (cmd, args) => {
  163. SetPVPostion((int)args[0]);
  164. return true;
  165. });
  166. OP.Subscribe($"{Module}.SetPVPressure", (cmd, args) => {
  167. SetPVPressure((int)args[0]);
  168. return true;
  169. });
  170. OP.Subscribe($"{Module}.ClosePump", (cmd, args) => {
  171. TurnDryPump(false);
  172. return true;
  173. });
  174. OP.Subscribe($"{Module}.CloseTurboPump", (cmd, args) => {
  175. TurnTurboPump(false);
  176. return true;
  177. });
  178. OP.Subscribe($"{Module}.ControlValve", (cmd, args) => {
  179. OpenValve((ValveType)((int)args[0]), (bool)args[1]);
  180. return true;
  181. });
  182. OP.Subscribe($"{Module}.TurnPendulumValve", (cmd, args) => {
  183. TurnPendulumValve((bool)args[0]);
  184. return true;
  185. });
  186. OP.Subscribe($"{Module}.HeatChiller", (cmd, args) => {
  187. HeatChiller((float)args[0], (float)args[1]);
  188. return true;
  189. });
  190. OP.Subscribe($"{Module}.OnOffChiller", (cmd, args) => {
  191. OnOffChiller((bool)args[0]);
  192. return true;
  193. });
  194. OP.Subscribe($"{Module}.WallChiller", (cmd, args) => {
  195. float value;
  196. float.TryParse(args[0].ToString(), out value);
  197. SetWallTCTemperature(value);
  198. return true;
  199. });
  200. OP.Subscribe($"{Module}.SetBacksideHeFlow", (cmd, args) => {
  201. double value;
  202. double.TryParse(args[0].ToString(), out value);
  203. SetBacksideHeFlow(value);
  204. return true;
  205. });
  206. OP.Subscribe($"{Module}.SetBacksideHePressure", (cmd, args) =>
  207. {
  208. float value;
  209. float.TryParse(args[0].ToString(), out value);
  210. SetBacksideHePressure(value);
  211. return true;
  212. });
  213. }
  214. public abstract void CloseValves();
  215. public abstract void TurnDryPump(bool on);
  216. public abstract void TurnTurboPump(bool on);
  217. public abstract void OpenValve(ValveType vlvType, bool on);
  218. public virtual void Monitor()
  219. {
  220. }
  221. public virtual bool Initialize()
  222. {
  223. return true;
  224. }
  225. public virtual void Terminate()
  226. {
  227. }
  228. public virtual void Reset()
  229. {
  230. }
  231. public abstract bool OnOffSetESCHV(bool on);
  232. public abstract bool SetWallTCTemperature(float value);
  233. protected abstract void CheckPermanentInterlock();
  234. public abstract void CheckIdleInterlock();
  235. public abstract void BuzzerBlinking(double time);
  236. public abstract void SwitchOnBuzzerAndRed();
  237. public abstract void Home();
  238. public abstract bool SetLiftPin(MovementPosition dirt, out string reason);
  239. public abstract bool SetSlitDoor(bool open, out string reason);
  240. public abstract bool RetractWafer();
  241. public abstract bool ExtendWafer();
  242. public abstract bool FlowGas(int gasNum, double val);
  243. public abstract bool StopGas(int gasNum);
  244. public abstract bool FlowN2(double val);
  245. public abstract bool StopN2();
  246. public abstract void StopAllGases();
  247. public abstract bool TurnPendulumValve(bool on);
  248. public abstract bool SetPVPressure(int pressure);
  249. public abstract bool SetPVPostion(int position);
  250. public abstract int GetPVPosition();
  251. public abstract void HeatChiller(double value, double offset);
  252. public abstract void OnOffChiller(bool onoff);
  253. public abstract bool CheckChillerStatus();
  254. public abstract void SetGeneratorCommunicationMode(int mode);
  255. public abstract bool GeneratorPowerOn(bool on);
  256. public abstract bool GeneratorSetpower(float val);
  257. public abstract bool GeneratorBiasPowerOn(bool on);
  258. public abstract bool GeneratorBiasSetpower(float val);
  259. public abstract bool GeneratorBiasSetMatchMode(bool val);
  260. public abstract bool SetMatchPosition(float c1, float c2);
  261. public abstract bool SetBiasMatchPosition(float c1, float c2);
  262. public abstract bool SetBiasPulseMode(bool on);
  263. public abstract bool SetBiasPulseRateFreq(int nFreq);
  264. public abstract bool SetDiasPulseDutyCycle(int percentage);
  265. public abstract bool SetESCClampVoltage(int nVoltage);
  266. public abstract bool CheckGeneratorAndHVInterlock(VenusDevice device);
  267. #region EndPoint
  268. public abstract void EPDRecipeStart(string recipe);
  269. public abstract void EPDRecipeStop();
  270. public abstract void EPDStepStart(string cfgName, int step);
  271. public abstract void EPDStepStop();
  272. #endregion
  273. public abstract void SetBacksideHeFlow(double flow);
  274. public abstract bool SetBacksideHePressure(float mTorr);
  275. public abstract bool SetBacksideHeThreshold(int nMin, int nMax);
  276. }
  277. }