JetPMBase.cs 14 KB

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