ProcessDefine.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. using System;
  2. using System.Collections.Generic;
  3. //using System.
  4. using Venus_RT.Devices;
  5. using Venus_RT.Modules;
  6. using Aitex.Core.RT.Log;
  7. using Venus_Core;
  8. using Aitex.Core.RT.SCCore;
  9. using System.Reflection;
  10. using System.Diagnostics;
  11. //#pragma warning disable 0436
  12. namespace Venus_RT.Modules.PMs
  13. {
  14. class ProcessHelper
  15. {
  16. protected JetPMBase Chamber;
  17. private string Module;
  18. public RecipeHead m_RecipeHead;
  19. private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> startHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
  20. private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> checkerHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
  21. private static Dictionary<string, Action<ProcessUnitBase, RecipeStep>> endHelper = new Dictionary<string, Action<ProcessUnitBase, RecipeStep>>();
  22. private List<float> rfMatchC1 = new List<float>();
  23. private List<float> rfMatchC2 = new List<float>();
  24. private int rfMatchC1C2Index = 0;
  25. private List<float> biasRfMatchC1 = new List<float>();
  26. private List<float> biasRfMatchC2 = new List<float>();
  27. private int biasRfMatchC1C2Index = 0;
  28. public ProcessHelper(JetPMBase pm)
  29. {
  30. Chamber = pm;
  31. Module = pm.Module.ToString() ;
  32. Init();
  33. }
  34. private void Init()
  35. {
  36. startHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_Start(unit, step);
  37. checkerHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_Check(unit, step);
  38. endHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_End(unit, step);
  39. //startHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_Start(unit, step);
  40. //checkerHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_Check(unit, step);
  41. //endHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_End(unit, step);
  42. startHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_Start(unit, step);
  43. checkerHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_Check(unit, step);
  44. endHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_End(unit, step);
  45. startHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_Start(unit, step);
  46. checkerHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_Check(unit, step);
  47. endHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_End(unit, step);
  48. startHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_Start(unit, step);
  49. checkerHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_Check(unit, step);
  50. endHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_End(unit, step);
  51. startHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_Start(unit, step);
  52. checkerHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_Check(unit, step);
  53. endHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_End(unit, step);
  54. startHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_Start(unit, step);
  55. checkerHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_Check(unit, step);
  56. endHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_End(unit, step);
  57. }
  58. private RState PressureByPressureModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
  59. {
  60. var ProcessUnit = unit as PressureByPressureModeUnit;
  61. if (ProcessUnit.PressureUnitMode == PressureUnitMode.Pressure)
  62. {
  63. if (Chamber.SetPVPressure(ProcessUnit.StartValue))
  64. {
  65. return RState.Running;
  66. }
  67. }
  68. else if (ProcessUnit.PressureUnitMode == PressureUnitMode.Valve)
  69. {
  70. if (Chamber.SetPVPostion(ProcessUnit.StartValue))
  71. {
  72. return RState.Running;
  73. }
  74. }
  75. return RState.Failed;
  76. }
  77. private RState PressureByPressureModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
  78. {
  79. var ProcessUnit = unit as PressureByPressureModeUnit;
  80. if(ProcessUnit.EnableRamp)
  81. {
  82. if (ProcessUnit.PressureUnitMode == PressureUnitMode.Pressure)
  83. {
  84. if (Chamber.SetPVPressure(ProcessUnit.StartValue+ (int)((ProcessUnit.TargetValue - ProcessUnit.StartValue) * step.RampFactor())))
  85. return RState.Running;
  86. else
  87. return RState.Failed;
  88. }
  89. else if (ProcessUnit.PressureUnitMode == PressureUnitMode.Valve)
  90. {
  91. if (Chamber.SetPVPressure(ProcessUnit.StartValue + (int)((ProcessUnit.TargetValue - ProcessUnit.StartValue) * step.RampFactor())))
  92. return RState.Running;
  93. else
  94. return RState.Failed;
  95. }
  96. }
  97. if (ProcessUnit.PressureUnitMode == PressureUnitMode.Pressure)
  98. {
  99. if (step.Type == StepType.Stable && Chamber.ChamberPressure == ProcessUnit.StartValue)
  100. {
  101. return RState.End;
  102. }
  103. }
  104. else if (ProcessUnit.PressureUnitMode == PressureUnitMode.Valve )
  105. {
  106. if (step.Type == StepType.Stable && Chamber.GetPVPosition() == ProcessUnit.StartValue)
  107. {
  108. return RState.End;
  109. }
  110. }
  111. return RState.Running;
  112. }
  113. private void PressureByPressureModeUnit_End(ProcessUnitBase unit, RecipeStep step)
  114. {
  115. }
  116. #region Valve Mode已取消,合并到压力模式
  117. //private RState PressureByValveModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
  118. //{
  119. // var ProcessUnit = unit as PressureByValveModeUnit;
  120. // if (Chamber.SetPVPostion(ProcessUnit.StartPosition))
  121. // {
  122. // return RState.Running;
  123. // }
  124. // return RState.Failed;
  125. //}
  126. //private RState PressureByValveModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
  127. //{
  128. // var ProcessUnit = unit as PressureByValveModeUnit;
  129. // if (ProcessUnit.EnableRamp)
  130. // {
  131. // if (Chamber.SetPVPostion(ProcessUnit.StartPosition + (int)((ProcessUnit.TargetPosition - ProcessUnit.StartPosition) * step.RampFactor())))
  132. // return RState.Running;
  133. // else
  134. // return RState.Failed;
  135. // }
  136. // return RState.Running;
  137. //}
  138. //private void PressureByValveModeUnit_End(ProcessUnitBase unit, RecipeStep step)
  139. //{
  140. //}
  141. #endregion
  142. private RState TCPUnit_Start(ProcessUnitBase unit, RecipeStep step)
  143. {
  144. var ProcessUnit = unit as TCPUnit;
  145. if (ProcessUnit.RFPower > 5)
  146. {
  147. Chamber.GeneratorSetpower(ProcessUnit.RFPower);
  148. Chamber.GeneratorPowerOn(true);
  149. }
  150. else
  151. {
  152. Chamber.GeneratorSetpower(0);
  153. Chamber.GeneratorPowerOn(false);
  154. }
  155. int p1;
  156. int p2;
  157. if (ProcessUnit.TuneCapPreset > 0)
  158. {
  159. p1 = ProcessUnit.TuneCapPreset;
  160. }
  161. else
  162. {
  163. p1 = ProcessUnit.AutoTuneCapPreset;
  164. }
  165. if (ProcessUnit.LoadCapPreset > 0)
  166. {
  167. p2 = ProcessUnit.LoadCapPreset;
  168. }
  169. else
  170. {
  171. p2 = ProcessUnit.AutoLoadCapPreset;
  172. }
  173. Chamber.SetMatchPosition(p1, p2);
  174. rfMatchC1.Clear();
  175. rfMatchC1.Clear();
  176. rfMatchC1C2Index = 0;
  177. return RState.Running;
  178. }
  179. private RState TCPUnit_Check(ProcessUnitBase unit, RecipeStep step)
  180. {
  181. var _scPowerAlarmTime= SC.GetValue<double>($"{Chamber.Name}.Rf.PowerAlarmTime");
  182. var ProcessUnit = unit as TCPUnit;
  183. if(ProcessUnit.MaxReflectedPower > 0 && Chamber.ReflectPower > ProcessUnit.MaxReflectedPower && step.ElapsedTime() > _scPowerAlarmTime*1000)
  184. {
  185. LOG.Write(eEvent.ERR_PROCESS, Chamber.Module, $"Step:{step.StepNo} failed, RF Reflect Power:{Chamber.ReflectPower} exceeds the Max Limit:{ProcessUnit.MaxReflectedPower}");
  186. return RState.Failed;
  187. }
  188. if (step.ElapsedTime() > m_RecipeHead.RFHoldTime * 1000)
  189. {
  190. Chamber.GeneratorSetpower(0);
  191. Chamber.GeneratorPowerOn(false);
  192. }
  193. if (step.ElapsedTime() > rfMatchC1C2Index * 1000)
  194. {
  195. rfMatchC1.Add(Chamber.RFMatchC1);
  196. rfMatchC2.Add(Chamber.RFMatchC2);
  197. rfMatchC1C2Index += 1;
  198. }
  199. return RState.Running;
  200. }
  201. private void TCPUnit_End(ProcessUnitBase unit, RecipeStep step)
  202. {
  203. var ProcessUnit = unit as TCPUnit;
  204. if (rfMatchC1.Count >=6)
  205. {
  206. float allValue = 0;
  207. for (int i = 4; i < rfMatchC1.Count; i++)
  208. {
  209. allValue += rfMatchC1[i];
  210. }
  211. var average=allValue/ (rfMatchC1.Count-4);
  212. ProcessUnit.AutoTuneCapPreset = (int)average;
  213. }
  214. if (rfMatchC2.Count >= 6)
  215. {
  216. float allValue = 0;
  217. for (int i = 4; i < rfMatchC2.Count; i++)
  218. {
  219. allValue += rfMatchC2[i];
  220. }
  221. var average = allValue / (rfMatchC2.Count - 4);
  222. ProcessUnit.AutoLoadCapPreset = (int)average;
  223. }
  224. rfMatchC1.Clear();
  225. rfMatchC2.Clear();
  226. rfMatchC1C2Index = 0;
  227. }
  228. private RState BiasUnit_Start(ProcessUnitBase unit, RecipeStep step)
  229. {
  230. var ProcessUnit = unit as BiasUnit;
  231. if (ProcessUnit.BiasRFPower > 5)
  232. {
  233. Chamber.GeneratorBiasSetpower(ProcessUnit.BiasRFPower);
  234. Chamber.GeneratorBiasPowerOn(true);
  235. }
  236. int p1;
  237. int p2;
  238. if (ProcessUnit.BiasTuneCapPreset > 0)
  239. {
  240. p1 = ProcessUnit.BiasTuneCapPreset;
  241. }
  242. else
  243. {
  244. p1 = ProcessUnit.AutoBiasTuneCapPreset;
  245. }
  246. if (ProcessUnit.BiasLoadCapPreset > 0)
  247. {
  248. p2 = ProcessUnit.BiasLoadCapPreset;
  249. }
  250. else
  251. {
  252. p2 = ProcessUnit.AutoBiasLoadCapPreset;
  253. }
  254. Chamber.SetBiasMatchPosition(p1, p2);
  255. if(ProcessUnit.BiasGeneratorMode == GeneratorMode.Pulsing)
  256. {
  257. Chamber.SetBiasPulseMode(true);
  258. Chamber.SetBiasPulseRateFreq(ProcessUnit.PulseRateFreq);
  259. Chamber.SetDiasPulseDutyCycle(ProcessUnit.PulseDutyCycle);
  260. }
  261. biasRfMatchC1.Clear();
  262. biasRfMatchC1.Clear();
  263. biasRfMatchC1C2Index = 0;
  264. return RState.Running;
  265. }
  266. private RState BiasUnit_Check(ProcessUnitBase unit, RecipeStep step)
  267. {
  268. var _scPowerAlarmTime = SC.GetValue<double>($"{Chamber.Name}.BiasRf.PowerAlarmTime");
  269. var ProcessUnit = unit as BiasUnit;
  270. if (ProcessUnit.BiasMaxReflectedPower > 0 && Chamber.BiasReflectPower > ProcessUnit.BiasMaxReflectedPower && step.ElapsedTime() > _scPowerAlarmTime * 1000)
  271. {
  272. LOG.Write(eEvent.ERR_PROCESS, Chamber.Module, $"Step:{step.StepNo} failed, Bias Reflect Power:{Chamber.BiasReflectPower} exceeds the Max Limit:{ProcessUnit.BiasMaxReflectedPower}");
  273. return RState.Failed;
  274. }
  275. if (step.ElapsedTime() > m_RecipeHead.BiasRFHoldTime * 1000)
  276. {
  277. Chamber.GeneratorBiasSetpower(0);
  278. Chamber.GeneratorBiasPowerOn(false);
  279. }
  280. if (step.ElapsedTime() > biasRfMatchC1C2Index * 1000)
  281. {
  282. biasRfMatchC1.Add(Chamber.BiasRFMatchC1);
  283. biasRfMatchC2.Add(Chamber.BiasRFMatchC2);
  284. biasRfMatchC1C2Index += 1;
  285. }
  286. return RState.Running;
  287. }
  288. private void BiasUnit_End(ProcessUnitBase unit, RecipeStep step)
  289. {
  290. var ProcessUnit = unit as BiasUnit;
  291. Chamber.GeneratorBiasSetpower(0);
  292. Chamber.GeneratorBiasPowerOn(false);
  293. if (biasRfMatchC1.Count >= 6)
  294. {
  295. float allValue = 0;
  296. for (int i = 4; i < biasRfMatchC1.Count; i++)
  297. {
  298. allValue += biasRfMatchC1[i];
  299. }
  300. var average = allValue / (biasRfMatchC1.Count - 4);
  301. ProcessUnit.AutoBiasTuneCapPreset = (int)average;
  302. }
  303. if (biasRfMatchC2.Count >= 6)
  304. {
  305. float allValue = 0;
  306. for (int i = 4; i < biasRfMatchC2.Count; i++)
  307. {
  308. allValue += biasRfMatchC2[i];
  309. }
  310. var average = allValue / (biasRfMatchC2.Count - 4);
  311. ProcessUnit.AutoBiasLoadCapPreset = (int)average;
  312. }
  313. biasRfMatchC1.Clear();
  314. biasRfMatchC1.Clear();
  315. biasRfMatchC1C2Index = 0;
  316. }
  317. private RState GasControlUnit_Start(ProcessUnitBase unit, RecipeStep step)
  318. {
  319. Chamber.OpenValve(ValveType.GasFinal, true);
  320. var ProcessUnit = unit as GasControlUnit;
  321. Chamber.FlowGas(0, ProcessUnit.Gas1);
  322. if (ProcessUnit.Gas1 >= 1)
  323. {
  324. Chamber.OpenValve(ValveType.PV11, true);
  325. }
  326. Chamber.FlowGas(1, ProcessUnit.Gas2);
  327. if (ProcessUnit.Gas2 >= 1)
  328. {
  329. Chamber.OpenValve(ValveType.PV21, true);
  330. }
  331. Chamber.FlowGas(2, ProcessUnit.Gas3);
  332. if (ProcessUnit.Gas3 >= 1)
  333. {
  334. Chamber.OpenValve(ValveType.PV31,true);
  335. }
  336. Chamber.FlowGas(3, ProcessUnit.Gas4);
  337. if (ProcessUnit.Gas4 >= 1)
  338. {
  339. Chamber.OpenValve(ValveType.PV41, true);
  340. }
  341. Chamber.FlowGas(4, ProcessUnit.Gas5);
  342. Chamber.FlowGas(5, ProcessUnit.Gas6);
  343. Chamber.FlowGas(6, ProcessUnit.Gas7);
  344. Chamber.FlowGas(7, ProcessUnit.Gas8);
  345. return RState.Running;
  346. }
  347. private RState GasControlUnit_Check(ProcessUnitBase unit, RecipeStep step)
  348. {
  349. var ProcessUnit = unit as GasControlUnit;
  350. if(ProcessUnit.EnableRamp)
  351. {
  352. double rampFactor = step.RampFactor();
  353. Chamber.FlowGas(0, ProcessUnit.Gas1 + (ProcessUnit.Gas1Target - ProcessUnit.Gas1) * rampFactor);
  354. Chamber.FlowGas(1, ProcessUnit.Gas2 + (ProcessUnit.Gas2Target - ProcessUnit.Gas2) * rampFactor);
  355. Chamber.FlowGas(2, ProcessUnit.Gas3 + (ProcessUnit.Gas3Target - ProcessUnit.Gas3) * rampFactor);
  356. Chamber.FlowGas(3, ProcessUnit.Gas4 + (ProcessUnit.Gas4Target - ProcessUnit.Gas4) * rampFactor);
  357. Chamber.FlowGas(4, ProcessUnit.Gas5 + (ProcessUnit.Gas5Target - ProcessUnit.Gas5) * rampFactor);
  358. Chamber.FlowGas(5, ProcessUnit.Gas6 + (ProcessUnit.Gas6Target - ProcessUnit.Gas6) * rampFactor);
  359. Chamber.FlowGas(6, ProcessUnit.Gas7 + (ProcessUnit.Gas7Target - ProcessUnit.Gas7) * rampFactor);
  360. Chamber.FlowGas(7, ProcessUnit.Gas8 + (ProcessUnit.Gas8Target - ProcessUnit.Gas8) * rampFactor);
  361. }
  362. return RState.Running;
  363. }
  364. private void GasControlUnit_End(ProcessUnitBase unit, RecipeStep step)
  365. {
  366. Chamber.FlowGas(0, 0);
  367. Chamber.FlowGas(1, 0);
  368. Chamber.FlowGas(2, 0);
  369. Chamber.FlowGas(3, 0);
  370. Chamber.FlowGas(4, 0);
  371. Chamber.FlowGas(5, 0);
  372. Chamber.FlowGas(6, 0);
  373. Chamber.FlowGas(7, 0);
  374. }
  375. private RState ESCHVUnit_Start(ProcessUnitBase unit, RecipeStep step)
  376. {
  377. var ProcessUnit = unit as ESCHVUnit;
  378. Chamber.SetESCClampVoltage(ProcessUnit.ESCClampValtage);
  379. Chamber.SetBacksideHePressure(ProcessUnit.BacksideHelum);
  380. Chamber.SetBacksideHeThreshold(ProcessUnit.MinHeFlow, ProcessUnit.MaxHeFlow);
  381. return RState.Running;
  382. }
  383. private RState ESCHVUnit_Check(ProcessUnitBase unit, RecipeStep step)
  384. {
  385. if(Chamber.BackSideHeOutOfRange)
  386. {
  387. LOG.Write(eEvent.ERR_PROCESS, Chamber.Module, $"Step:{step.StepNo} failed, Backside Helium out of range.");
  388. return RState.Failed;
  389. }
  390. return RState.Running;
  391. }
  392. private void ESCHVUnit_End(ProcessUnitBase unit, RecipeStep step)
  393. {
  394. Chamber.SetESCClampVoltage(0);
  395. //Chamber.SetBacksideHePressure(0);
  396. Chamber.SetBacksideHeThreshold(0, 0);
  397. }
  398. private RState ProcessKitUnit_Start(ProcessUnitBase unit, RecipeStep step)
  399. {
  400. var ProcessUnit = unit as ProcessKitUnit;
  401. return RState.Running;
  402. }
  403. private RState ProcessKitUnit_Check(ProcessUnitBase unit, RecipeStep step)
  404. {
  405. var ProcessUnit = unit as ProcessKitUnit;
  406. return RState.Running;
  407. }
  408. private void ProcessKitUnit_End(ProcessUnitBase unit, RecipeStep step)
  409. {
  410. }
  411. public bool LoadMethods(ProcessUnitBase unit)
  412. {
  413. var className = $"{Module}.{unit.GetType().Name}";
  414. if(startHelper.ContainsKey(className) && checkerHelper.ContainsKey(className) && endHelper.ContainsKey(className))
  415. {
  416. unit.starter = startHelper[className];
  417. unit.checker = checkerHelper[className];
  418. unit.end = endHelper[className];
  419. return true;
  420. }
  421. return false;
  422. }
  423. private RState stepStarter(RecipeStep step)
  424. {
  425. step.StartStepTimer();
  426. switch (step.Type)
  427. {
  428. case StepType.EndPoint:
  429. Chamber.EPDStepStart(step.EPDConfig, step.StepNo);
  430. break;
  431. }
  432. return RState.Running;
  433. }
  434. private RState stepChecker(RecipeStep step)
  435. {
  436. switch(step.Type)
  437. {
  438. case StepType.Time:
  439. return step.ElapsedTime() >= step.Time * 1000 ? RState.End : RState.Running;
  440. case StepType.OverEtch:
  441. return step.ElapsedTime() >= (step.GetLastEPDStepTime() * step.OverEtchPercent / 100) ? RState.End : RState.Running;
  442. case StepType.EndPoint:
  443. if (step.ElapsedTime() > step.MaxEndPointTime * 1000)
  444. {
  445. LOG.Write(eEvent.INFO_PROCESS, Chamber.Module, $"Step:{step.StepNo} timeout, did not capture endpoint signal in {step.MaxEndPointTime} seconds");
  446. return RState.End;
  447. }
  448. else
  449. return Chamber.EPDCaptured ? RState.End : RState.Running;
  450. }
  451. return RState.Running;
  452. }
  453. private RState stepEnder(RecipeStep step)
  454. {
  455. if(step.Type == StepType.EndPoint)
  456. {
  457. Chamber.EPDStepStop();
  458. }
  459. //Chamber.GeneratorBiasPowerOn(false);
  460. //Chamber.GeneratorPowerOn(false);
  461. //Chamber.TurnPendulumValve(false);
  462. //Chamber.CloseValves();
  463. //Chamber.OpenValve(ValveType.TurboPumpPumping, true);
  464. //Chamber.OpenValve(ValveType.TurboPumpPurge, true);
  465. return RState.End;
  466. }
  467. public bool LoadStepFuns(RecipeStep step)
  468. {
  469. step.starter = stepStarter;
  470. step.checker = stepChecker;
  471. step.ender = stepEnder;
  472. return true;
  473. }
  474. }
  475. }