LLEntity.cs 24 KB

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