JetPMBase.cs 13 KB

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