LLEntity.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. using System;
  2. using Aitex.Core.Util;
  3. using Aitex.Core.RT.Fsm;
  4. using Aitex.Core.RT.Log;
  5. using MECF.Framework.Common.Equipment;
  6. using MECF.Framework.Common.SubstrateTrackings;
  7. using Venus_RT.Modules.TM;
  8. using Venus_RT.Devices;
  9. using Venus_Core;
  10. using Aitex.Core.RT.DataCenter;
  11. using Aitex.Core.RT.OperationCenter;
  12. using Aitex.Core.RT.Device;
  13. using Aitex.Core.RT.SCCore;
  14. using Aitex.Core.RT.Event;
  15. using System.Diagnostics;
  16. namespace Venus_RT.Modules
  17. {
  18. class LLEntity : Entity, IEntity, IModuleEntity
  19. {
  20. public enum LLStatus
  21. {
  22. Not_Ready,
  23. Ready_For_TM,
  24. Ready_For_EFEM,
  25. }
  26. public enum STATE
  27. {
  28. Unknown,
  29. Init,
  30. Initializing,
  31. Idle,
  32. Error,
  33. Pumping,
  34. Venting,
  35. Purging,
  36. LeakCheck,
  37. Prepare_For_TM,
  38. Prepare_For_EFEM,
  39. Ready_For_TM,
  40. Ready_For_EFEM,
  41. }
  42. public enum MSG
  43. {
  44. Home,
  45. Online,
  46. Offline,
  47. Pump,
  48. Vent,
  49. AutoPump,
  50. AutoVent,
  51. Purge,
  52. CyclePurge,
  53. LeakCheck,
  54. Prepare_TM,
  55. Prepare_EFEM,
  56. TM_Exchange_Ready,
  57. EFEM_Exchange_Ready,
  58. Error,
  59. Abort,
  60. }
  61. public ModuleName Module { get; private set; }
  62. public LLStatus Status { get; private set; }
  63. public bool Check(int msg, out string reason, params object[] args)
  64. {
  65. throw new NotImplementedException();
  66. }
  67. public bool IsIdle
  68. {
  69. get { return fsm.State == (int)STATE.Idle; }
  70. }
  71. public bool IsError
  72. {
  73. get { return fsm.State == (int)STATE.Error; }
  74. }
  75. public bool IsInit
  76. {
  77. get { return fsm.State == (int)STATE.Unknown || fsm.State == (int)STATE.Init; }
  78. }
  79. public bool IsBusy
  80. {
  81. get { return !IsInit && !IsError && !IsIdle; }
  82. }
  83. public bool IsOnline { get; internal set; }
  84. public bool IsInclude
  85. {
  86. get;
  87. private set;
  88. } = true;
  89. public bool IsVac { get { return _JetTM.IsModuleVaccum(Module); } }
  90. public bool IsATM { get { return _JetTM.IsModuleATM(Module); } }
  91. public override int TimeToReady
  92. {
  93. get
  94. {
  95. switch ((STATE)fsm.State)
  96. {
  97. case STATE.Pumping:
  98. case STATE.Venting:
  99. return base.TimeToReady;
  100. }
  101. return int.MaxValue;
  102. }
  103. }
  104. private readonly JetTM _JetTM;
  105. private readonly MFPumpRoutine _pumpingRoutine;
  106. private readonly MFVentRoutine _ventingRoutine;
  107. private readonly MFLeakCheckRoutine _leakCheckRoutine;
  108. private readonly MFPurgeRoutine _purgeRoutine;
  109. private readonly int _slotNumber = 4;
  110. private bool startControlPressureFlag = true;
  111. private int _controlPressureCheckPoint = 100;
  112. private int _controlPressureSetPoint = 90;
  113. private int _controlFlowSetPoint = 90;
  114. private bool _isEnableControlPressure;
  115. private Stopwatch _coolingStopWatch=new Stopwatch();
  116. public LLEntity(ModuleName module)
  117. {
  118. Module = module;
  119. _JetTM = DEVICE.GetDevice<JetTM>("TM");
  120. _pumpingRoutine = new MFPumpRoutine(_JetTM, Module);
  121. _ventingRoutine = new MFVentRoutine(_JetTM, Module);
  122. _leakCheckRoutine = new MFLeakCheckRoutine(_JetTM, Module);
  123. _purgeRoutine = new MFPurgeRoutine(_JetTM, Module);
  124. _slotNumber = SC.GetValue<int>($"{module.ToString()}.SlotNumber");
  125. WaferManager.Instance.SubscribeLocation(Module, _slotNumber);
  126. InitFsmMap();
  127. }
  128. protected override bool Init()
  129. {
  130. OP.Subscribe($"{Module}.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
  131. OP.Subscribe($"{Module}.{RtOperation.Pump}", (cmd, args) => CheckToPostMessage((int)MSG.Pump));
  132. OP.Subscribe($"{Module}.{RtOperation.Vent}", (cmd, args) => CheckToPostMessage((int)MSG.Vent));
  133. OP.Subscribe($"{Module}.{RtOperation.Purge}", (cmd, args) => CheckToPostMessage((int)MSG.Purge));
  134. OP.Subscribe($"{Module}.{RtOperation.Abort}", (cmd, args) => CheckToPostMessage((int)MSG.Abort));
  135. OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck));
  136. OP.Subscribe($"{Module}.{RtOperation.Online}", (cmd, args) => CheckToPostMessage((int)MSG.Online));
  137. OP.Subscribe($"{Module}.{RtOperation.Offline}", (cmd, args) => CheckToPostMessage((int)MSG.Offline));
  138. OP.Subscribe($"{Module}.{RtOperation.Include}", (cmd, args) => FnSetInclude());
  139. OP.Subscribe($"{Module}.{RtOperation.Exclude}", (cmd, args) => FnSetExclude());
  140. OP.Subscribe($"{Module}.{RtOperation.ControlPressure}", (cmd, args) => StartControlPressure());
  141. OP.Subscribe($"{Module}.{RtOperation.AbortControlPressure}", (cmd, args) => StopControlPressure());
  142. DATA.Subscribe($"{Module}.FsmState", () => (((STATE)fsm.State).ToString()), SubscriptionAttribute.FLAG.IgnoreSaveDB);
  143. DATA.Subscribe($"{Module}.FsmPrevState", () => (((PMState)fsm.PrevState).ToString()), SubscriptionAttribute.FLAG.IgnoreSaveDB);
  144. DATA.Subscribe($"{Module}.FsmLastMessage", () => (((MSG)fsm.LastMsg).ToString()), SubscriptionAttribute.FLAG.IgnoreSaveDB);
  145. DATA.Subscribe($"{Module}.IsOnline", () => IsOnline, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  146. DATA.Subscribe($"{Module}.IsInclude", () => IsInclude, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  147. DATA.Subscribe($"{Module}.IsBusy", () => IsBusy, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  148. DATA.Subscribe($"{Module}.IsEnableControlPressure", () => _isEnableControlPressure, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  149. return true;
  150. }
  151. private void InitFsmMap()
  152. {
  153. fsm = new StateMachine<LLEntity>(Module.ToString(), (int)STATE.Init, 50);
  154. fsm.EnableRepeatedMsg(true);
  155. EnterExitTransition<STATE, FSM_MSG>(STATE.Ready_For_TM, fnEnterTMReady, FSM_MSG.NONE, fnExitTMReady);
  156. EnterExitTransition<STATE, FSM_MSG>(STATE.Ready_For_EFEM, fnEnterEFEMReady, FSM_MSG.NONE, fnExitEFEMReady);
  157. //AnyStateTransition(FSM_MSG.TIMER, fnMonitor, FSM_STATE.SAME);
  158. AnyStateTransition(MSG.Error, fnError, STATE.Error);
  159. AnyStateTransition(MSG.Online, fnOnline, FSM_STATE.SAME);
  160. AnyStateTransition(MSG.Offline, fnOffline, FSM_STATE.SAME);
  161. AnyStateTransition(MSG.Home, fnHome, STATE.Initializing);
  162. // Home
  163. Transition(STATE.Initializing, FSM_MSG.TIMER, fnHoming, STATE.Idle);
  164. Transition(STATE.Idle, FSM_MSG.TIMER, fnMonitor, STATE.Idle);
  165. Transition(STATE.Init, FSM_MSG.TIMER, fnMonitor, STATE.Init);
  166. //vent sequence
  167. Transition(STATE.Idle, MSG.Vent, FnStartVent, STATE.Venting);
  168. Transition(STATE.Venting, FSM_MSG.TIMER, FnVentTimeout, STATE.Idle);
  169. Transition(STATE.Venting, MSG.Abort, FnAbortVent, STATE.Idle);
  170. //Pump sequence
  171. Transition(STATE.Idle, MSG.Pump, FnStartPump, STATE.Pumping);
  172. Transition(STATE.Pumping, FSM_MSG.TIMER, FnPumpTimeout, STATE.Idle);
  173. Transition(STATE.Pumping, MSG.Abort, FnAbortPump, STATE.Idle);
  174. // Purge sequence
  175. Transition(STATE.Idle, MSG.Purge, FnStartPurge, STATE.Purging);
  176. Transition(STATE.Purging, FSM_MSG.TIMER, FnPurgeTimeout, STATE.Idle);
  177. Transition(STATE.Purging, MSG.Abort, FnAbortPurge, STATE.Idle);
  178. // Leak check sequence
  179. Transition(STATE.Idle, MSG.LeakCheck, FnStartLeakCheck, STATE.LeakCheck);
  180. Transition(STATE.LeakCheck, FSM_MSG.TIMER, FnLeakCheckTimeout, STATE.Idle);
  181. Transition(STATE.LeakCheck, MSG.Abort, FnAbortLeakCheck, STATE.Idle);
  182. // Prepare TM Transfer
  183. Transition(STATE.Idle, MSG.Prepare_TM, FnStartPrepareTM, STATE.Prepare_For_TM);
  184. Transition(STATE.Prepare_For_TM, FSM_MSG.TIMER, FnPreparaTMTimeout, STATE.Ready_For_TM);
  185. Transition(STATE.Prepare_For_TM, MSG.Prepare_TM, null, STATE.Prepare_For_TM);
  186. Transition(STATE.Prepare_For_TM, MSG.Abort, FnAbortPreparaTM, STATE.Idle);
  187. Transition(STATE.Ready_For_TM, MSG.TM_Exchange_Ready, null, STATE.Idle);
  188. Transition(STATE.Ready_For_TM, MSG.Prepare_TM, null, STATE.Ready_For_TM);
  189. Transition(STATE.Ready_For_TM, MSG.Abort, null, STATE.Idle);
  190. Transition(STATE.Ready_For_TM, MSG.AutoVent, FnTryAutoVent, STATE.Venting);
  191. // Prepare EFEM Transfer
  192. Transition(STATE.Idle, MSG.Prepare_EFEM, FnStartPrepareEFEM, STATE.Prepare_For_EFEM);
  193. Transition(STATE.Prepare_For_EFEM, FSM_MSG.TIMER, FnPrepareEFEMTimeout, STATE.Ready_For_EFEM);
  194. Transition(STATE.Prepare_For_EFEM, MSG.Abort, FnAbortPrepareEFEM, STATE.Idle);
  195. Transition(STATE.Ready_For_EFEM, MSG.EFEM_Exchange_Ready, null, STATE.Idle);
  196. Transition(STATE.Ready_For_EFEM, MSG.Prepare_EFEM, null, STATE.Ready_For_EFEM);
  197. Transition(STATE.Ready_For_EFEM, MSG.Abort, null, STATE.Idle);
  198. Transition(STATE.Ready_For_EFEM, MSG.AutoPump, FnTryAutoPump, STATE.Pumping);
  199. //Cooling
  200. AnyStateTransition(FSM_MSG.TIMER, LLCoolingTimer_Elapsed, FSM_STATE.SAME);
  201. Running = true;
  202. }
  203. public int Invoke(string function, params object[] args)
  204. {
  205. switch (function)
  206. {
  207. case "Home":
  208. case "Vent":
  209. case "Pump":
  210. if(Enum.TryParse(function, out MSG message))
  211. {
  212. if (CheckToPostMessage((int)message))
  213. return (int)message;
  214. }
  215. break;
  216. }
  217. return (int)FSM_MSG.NONE;
  218. }
  219. public bool CheckAcked(int msg)
  220. {
  221. return fsm.CheckExecuted(msg);
  222. }
  223. public bool CheckToPostMessage(int msg, params object[] args)
  224. {
  225. if (!fsm.FindTransition(fsm.State, msg))
  226. {
  227. LOG.Write(eEvent.WARN_FSM_WARN, Module, $"{Module} is in {(STATE)fsm.State} state,can not do {(MSG)msg}");
  228. return false;
  229. }
  230. Running = true;
  231. fsm.PostMsg(msg, args);
  232. return true;
  233. }
  234. public (int processed, int unprocessed) GetWaferProcessStatus()
  235. {
  236. int processedCount = 0;
  237. int unprocessCount = 0;
  238. for (int i = 0; i < _slotNumber; i++)
  239. {
  240. var wafer = WaferManager.Instance.GetWafer(Module, i);
  241. if (!wafer.IsEmpty)
  242. {
  243. if (wafer.ProcessState == Aitex.Core.Common.EnumWaferProcessStatus.Completed)
  244. {
  245. processedCount++;
  246. }
  247. else
  248. {
  249. unprocessCount++;
  250. }
  251. }
  252. }
  253. return (processedCount, unprocessCount);
  254. }
  255. private bool fnEnterTMReady(object[] param)
  256. {
  257. if (RouteManager.IsATMMode)
  258. {
  259. Status = LLStatus.Ready_For_TM;
  260. return true;
  261. }
  262. StartControlPressure();
  263. Status = LLStatus.Ready_For_TM;
  264. return true;
  265. }
  266. private bool fnExitTMReady(object[] param)
  267. {
  268. if (RouteManager.IsATMMode)
  269. {
  270. Status = LLStatus.Not_Ready;
  271. return true;
  272. }
  273. StopControlPressure();
  274. Status = LLStatus.Not_Ready;
  275. return true;
  276. }
  277. private bool fnEnterEFEMReady(object[] param)
  278. {
  279. Status = LLStatus.Ready_For_EFEM;
  280. return true;
  281. }
  282. private bool fnExitEFEMReady(object[] param)
  283. {
  284. Status = LLStatus.Not_Ready;
  285. return true;
  286. }
  287. private bool fnMonitor(object[] param)
  288. {
  289. _debugRoutine();
  290. return true;
  291. }
  292. private bool fnError(object[] param)
  293. {
  294. IsOnline = false;
  295. return true;
  296. }
  297. private bool fnOnline(object[] param)
  298. {
  299. if (!IsInclude)
  300. {
  301. LOG.Write(eEvent.WARN_LL, Module, $"{Module} is excluded,can not be put online");
  302. return false;
  303. }
  304. IsOnline = true;
  305. return true;
  306. }
  307. private bool fnOffline(object[] param)
  308. {
  309. IsOnline = false;
  310. return true;
  311. }
  312. private bool FnSetInclude()
  313. {
  314. if (IsOnline == true)
  315. {
  316. LOG.Write(eEvent.WARN_LL, Module, $"{Module} is online,can not set Include");
  317. return false;
  318. }
  319. IsInclude = true;
  320. LOG.Write(eEvent.INFO_LL, Module, $"{Module} Set Include Success");
  321. return true;
  322. }
  323. private bool FnSetExclude()
  324. {
  325. if (IsOnline == true)
  326. {
  327. LOG.Write(eEvent.WARN_LL, Module, $"{Module} is online,can not set Exclude");
  328. return false;
  329. }
  330. IsInclude = false;
  331. LOG.Write(eEvent.INFO_LL, Module, $"{Module} Set Exclude Success");
  332. return true;
  333. }
  334. private bool fnAbort(object[] param)
  335. {
  336. return true;
  337. }
  338. private bool fnHome(object[] param)
  339. {
  340. //IsOnline = true;
  341. return true;
  342. }
  343. private bool fnHoming(object[] param)
  344. {
  345. return true;
  346. }
  347. private bool FnStartVent(object[] param)
  348. {
  349. return _ventingRoutine.Start() == RState.Running;
  350. }
  351. private bool FnTryAutoVent(object[] param)
  352. {
  353. if (RouteManager.IsATMMode)
  354. {
  355. PostMsg(MSG.TM_Exchange_Ready);
  356. return false;
  357. }
  358. return _ventingRoutine.Start() == RState.Running;
  359. }
  360. private bool FnVentTimeout(object[] param)
  361. {
  362. RState ret = _ventingRoutine.Monitor();
  363. if (ret == RState.Failed || ret == RState.Timeout)
  364. {
  365. PostMsg(MSG.Error);
  366. return false;
  367. }
  368. if(ret == RState.End)
  369. {
  370. MarkStateTime();
  371. return true;
  372. }
  373. return false;
  374. }
  375. private bool FnAbortVent(object[] param)
  376. {
  377. _ventingRoutine.Abort();
  378. return true;
  379. }
  380. private bool FnStartPump(object[] param)
  381. {
  382. return _pumpingRoutine.Start() == RState.Running;
  383. }
  384. private bool FnPumpTimeout(object[] param)
  385. {
  386. RState ret = _pumpingRoutine.Monitor();
  387. if (ret == RState.Failed || ret == RState.Timeout)
  388. {
  389. PostMsg(MSG.Error);
  390. return false;
  391. }
  392. if (ret == RState.End)
  393. {
  394. MarkStateTime();
  395. return true;
  396. }
  397. return false;
  398. }
  399. private bool FnAbortPump(object[] param)
  400. {
  401. _pumpingRoutine.Abort();
  402. return true;
  403. }
  404. private bool FnTryAutoPump(object[] param)
  405. {
  406. if (_JetTM.LLPumpStatus != JetTM.LLPumpState.Idle || RouteManager.IsATMMode)
  407. {
  408. PostMsg(MSG.EFEM_Exchange_Ready);
  409. return false;
  410. }
  411. return _pumpingRoutine.Start() == RState.Running;
  412. }
  413. private bool FnStartPurge(object[] param)
  414. {
  415. return _purgeRoutine.Start() == RState.Running;
  416. }
  417. private bool FnPurgeTimeout(object[] param)
  418. {
  419. RState ret = _purgeRoutine.Monitor();
  420. if (ret == RState.Failed || ret == RState.Timeout)
  421. {
  422. PostMsg(MSG.Error);
  423. return false;
  424. }
  425. return ret == RState.End;
  426. }
  427. private bool FnAbortPurge(object[] param)
  428. {
  429. _purgeRoutine.Abort();
  430. return true;
  431. }
  432. private bool FnStartLeakCheck(object[] param)
  433. {
  434. return _leakCheckRoutine.Start() == RState.Running;
  435. }
  436. private bool FnLeakCheckTimeout(object[] param)
  437. {
  438. RState ret = _leakCheckRoutine.Monitor();
  439. if (ret == RState.Failed || ret == RState.Timeout)
  440. {
  441. PostMsg(MSG.Error);
  442. return false;
  443. }
  444. return ret == RState.End;
  445. }
  446. private bool FnAbortLeakCheck(object[] param)
  447. {
  448. _leakCheckRoutine.Abort();
  449. return true;
  450. }
  451. private bool FnStartPrepareTM(object[] param)
  452. {
  453. if (RouteManager.IsATMMode)
  454. return true;
  455. return _pumpingRoutine.Start() == RState.Running;
  456. }
  457. private bool FnPreparaTMTimeout(object[] param)
  458. {
  459. if (RouteManager.IsATMMode)
  460. {
  461. if (fsm.ElapsedTime > 10000)
  462. {
  463. LOG.Write(eEvent.ERR_TM, Module, $"Cannot transfer wafer as {Module} is not ATM.");
  464. PostMsg(MSG.Error);
  465. return true;
  466. }
  467. return _JetTM.IsModuleATM(Module);
  468. }
  469. RState ret = _pumpingRoutine.Monitor();
  470. if (ret == RState.Failed || ret == RState.Timeout)
  471. {
  472. PostMsg(MSG.Error);
  473. return false;
  474. }
  475. return ret == RState.End;
  476. }
  477. private bool FnAbortPreparaTM(object[] param)
  478. {
  479. _pumpingRoutine.Abort();
  480. return true;
  481. }
  482. private bool FnStartPrepareEFEM(object[] param)
  483. {
  484. if (RouteManager.IsATMMode)
  485. return true;
  486. return _ventingRoutine.Start() == RState.Running;
  487. }
  488. private bool FnPrepareEFEMTimeout(object[] param)
  489. {
  490. if (RouteManager.IsATMMode)
  491. {
  492. if (fsm.ElapsedTime > 10000)
  493. {
  494. LOG.Write(eEvent.ERR_TM, Module, $"Cannot transfer wafer as {Module} is not ATM.");
  495. PostMsg(MSG.Error);
  496. return true;
  497. }
  498. return _JetTM.IsModuleATM(Module);
  499. }
  500. RState ret = _ventingRoutine.Monitor();
  501. if (ret == RState.Failed || ret == RState.Timeout)
  502. {
  503. PostMsg(MSG.Error);
  504. return false;
  505. }
  506. return ret == RState.End;
  507. }
  508. private bool FnAbortPrepareEFEM(object[] param)
  509. {
  510. _ventingRoutine.Abort();
  511. return true;
  512. }
  513. private bool LLCoolingTimer_Elapsed(object[] param)
  514. {
  515. if ((int)fsm.PrevState == (int)STATE.Venting && !WaferManager.Instance.CheckWaferEmpty(Module))
  516. {
  517. }
  518. return true;
  519. }
  520. private bool StartControlPressure()
  521. {
  522. _isEnableControlPressure = true;
  523. _controlPressureCheckPoint = SC.GetValue<int>($"{Module}.ControlPressureCheckPoint");
  524. _controlPressureSetPoint = SC.GetValue<int>($"{Module}.ControlPressureSetPoint");
  525. _controlFlowSetPoint = SC.GetValue<int>($"{Module}.{Module}_MFC1.DefaultSetPoint");
  526. //_JetTM.TurnFastPumpValve(Module, true);
  527. _JetTM.TurnSoftPumpValve(Module, true);
  528. _JetTM.TurnPurgeValve(Module, true);
  529. _JetTM.TurnN2Valve(true);
  530. if (Module == ModuleName.LLA)
  531. {
  532. _JetTM.SwitchLLAPressureMode(true);
  533. _JetTM.SetLLAPressure((int)_controlPressureSetPoint);
  534. }
  535. else if (Module == ModuleName.LLB)
  536. {
  537. _JetTM.SwitchLLBPressureMode(true);
  538. _JetTM.SetLLBPressure((int)_controlPressureSetPoint);
  539. }
  540. return true;
  541. }
  542. private bool StopControlPressure()
  543. {
  544. _isEnableControlPressure = false;
  545. //_JetTM.TurnFastPumpValve(Module, false);
  546. _JetTM.TurnSoftPumpValve(Module, false);
  547. _JetTM.TurnPurgeValve(Module, false);
  548. //_JetTM.TurnN2Valve(false);
  549. if (Module == ModuleName.LLA)
  550. {
  551. _JetTM.SwitchLLAPressureMode(false);
  552. _JetTM.SetLLAPressure(0);
  553. }
  554. else if (Module == ModuleName.LLB)
  555. {
  556. _JetTM.SwitchLLBPressureMode(false);
  557. _JetTM.SetLLBPressure(0);
  558. }
  559. return true;
  560. }
  561. private void _debugRoutine()
  562. {
  563. int flag = 0;
  564. // Test Home routine
  565. if (flag == 1)
  566. {
  567. PostMsg(MSG.Home);
  568. }
  569. else if (flag == 2)
  570. {
  571. PostMsg(MSG.Vent);
  572. }
  573. else if (flag == 3)
  574. {
  575. PostMsg(MSG.Pump);
  576. }
  577. //else if (flag == 4)
  578. //{
  579. // PostMsg(MSG.PumpLoadLock);
  580. //}
  581. //else if (flag == 5)
  582. //{
  583. // PostMsg(MSG.VentLoadLock);
  584. //}
  585. //else if (flag == 6)
  586. //{
  587. // PostMsg(MSG.PurgeLoadLock);
  588. //}
  589. //else if (flag == 7)
  590. //{
  591. // PostMsg(MSG.LaunchPump);
  592. //}
  593. //else if (flag == 8)
  594. //{
  595. // PostMsg(MSG.LaunchTurboPump);
  596. //}
  597. //else if (flag == 9)
  598. //{
  599. // PostMsg(MSG.LoadLockLeakCheck);
  600. //}
  601. else if (flag == 10)
  602. {
  603. PostMsg(MSG.CyclePurge);
  604. }
  605. //else if (flag == 11)
  606. //{
  607. // PostMsg(MSG.GasLinePurge);
  608. //}
  609. //else if (flag == 12)
  610. //{
  611. // PostMsg(MSG.LeakCheck);
  612. //}
  613. //else if (flag == 13)
  614. //{
  615. // PostMsg(MSG.GasLeakCheck);
  616. //}
  617. //else if (flag == 14)
  618. //{
  619. // PostMsg(MSG.LLPlace);
  620. //}
  621. //else if (flag == 15)
  622. //{
  623. // PostMsg(MSG.LLPick);
  624. //}
  625. //else if (flag == 16)
  626. //{
  627. // PostMsg(MSG.RunRecipe, "7777");
  628. //}
  629. //else if (flag == 17)
  630. //{
  631. // PostMsg(MSG.MFCVerification, "MFC2", (double)50, 10);
  632. //}
  633. }
  634. }
  635. }