OverKepler2300ViewModel.cs 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878
  1. using Aitex.Core.Common.DeviceData;
  2. using MECF.Framework.Common.DataCenter;
  3. using MECF.Framework.Common.OperationCenter;
  4. using Prism.Commands;
  5. using Prism.Mvvm;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Windows;
  9. using System.Windows.Threading;
  10. using Venus_Core;
  11. using Venus_MainPages.Views;
  12. using System.Linq;
  13. using System.Threading.Tasks;
  14. using System.IO;
  15. using Venus_Themes.CustomControls;
  16. using Venus_MainPages.Unity;
  17. using MECF.Framework.Common.CommonData.DeviceData;
  18. using Path = System.IO.Path;
  19. using Aitex.Core.RT.Log;
  20. using System.Windows.Controls;
  21. //using System.Drawing.Drawing2D;
  22. namespace Venus_MainPages.ViewModels
  23. {
  24. internal class OverKepler2300ViewModel : BindableBase
  25. {
  26. #region 私有字段
  27. private List<string> m_CurrentModuleRecipes = new List<string>();
  28. private bool m_PVN21ValveIsOpen;
  29. private bool m_PVN22ValveIsOpen;
  30. private bool m_N2ValveIsOpen;
  31. private bool m_PV11ValveIsOpen;
  32. private bool m_PV12ValveIsOpen;
  33. private bool m_PV21ValveIsOpen;
  34. private bool m_PV22ValveIsOpen;
  35. private bool m_PV31ValveIsOpen;
  36. private bool m_PV32ValveIsOpen;
  37. private bool m_PV41ValveIsOpen;
  38. private bool m_PV42ValveIsOpen;
  39. private bool m_MFC1ValveIsOpen;
  40. private bool m_MFC2ValveIsOpen;
  41. private bool m_MFC3ValveIsOpen;
  42. private bool m_MFC4ValveIsOpen;
  43. private bool m_MFC5ValveIsOpen;
  44. private bool m_MFC6ValveIsOpen;
  45. private bool m_MFC7ValveIsOpen;
  46. private bool m_MFC8ValveIsOpen;
  47. private bool m_GasFinalValveIsOpen;
  48. private bool m_SoftPumpValveIsOpen;
  49. private bool m_FastPumpValveIsOpen;
  50. private bool m_PVHe1ValveIsOpen;
  51. private bool m_PVHe2ValveIsOpen;
  52. private bool m_TurboPumpPumpingValveIsOpen;
  53. private bool m_TurboPumpPurgeValveIsOpen;
  54. private bool m_GuageValveIsOpen;
  55. private bool m_PendulumValveIsOpen;
  56. private double m_HeGasSetpoint;
  57. private int m_HePressureSetpoint;
  58. private float m_SRFFwdPowerSetpoint;
  59. private float m_BRFFwdPowerSetpoint;
  60. private float m_SRFMatchC1;
  61. private float m_SRFMatchC2;
  62. private float m_BRFMatchC1;
  63. private float m_BRFMatchC2;
  64. private double m_MFC1SetPoint;
  65. private double m_MFC2SetPoint;
  66. private double m_MFC3SetPoint;
  67. private double m_MFC4SetPoint;
  68. private double m_MFC5SetPoint;
  69. private double m_MFC6SetPoint;
  70. private double m_MFC7SetPoint;
  71. private double m_MFC8SetPoint;
  72. private double m_N2SetPoint;
  73. private AITMfcData m_MFC1Data;
  74. private AITMfcData m_MFC2Data;
  75. private AITMfcData m_MFC3Data;
  76. private AITMfcData m_MFC4Data;
  77. private AITMfcData m_MFC5Data;
  78. private AITMfcData m_MFC6Data;
  79. private AITMfcData m_MFC7Data;
  80. private AITMfcData m_MFC8Data;
  81. private AITMfcData m_MFCHeData;
  82. private AITMfcData m_MFCN2Data;
  83. private AITHeaterData m_ValveHeaterData;
  84. private AITHeaterData m_ForelineHeaterData;
  85. private AITHeaterData m_WallHeaterData;
  86. private AITHeaterData m_PendulumHeaterData;
  87. private AITRfData m_SRFData;
  88. private AITRfData m_BRFData;
  89. private AITMatchData m_SMatchData;
  90. private AITMatchData m_BMatchData;
  91. private AITPendulumValveData m_PendulumValveData;
  92. private PMState m_PMCurrentState;
  93. private bool m_SourceRFFanInterlock;
  94. private bool m_IsWLK;
  95. private bool m_IsWaterFlowOk;
  96. private bool m_IsTurboPumpInterlock;
  97. private bool m_IsCDAOK;
  98. private bool m_SensorGasBoxDoor;
  99. private bool m_SensorGasBoxPressure;
  100. private bool m_PumpIsOpen;
  101. private bool m_TurboIsOpen;
  102. private bool m_IsATM;
  103. private bool m_IsVAC;
  104. private List<string> m_RtDataKeys;
  105. private Dictionary<string, object> m_RtDataValues;
  106. private int m_PositionValue;
  107. private bool m_IsPositionMode;
  108. private int m_ESCVoltage;
  109. private bool m_GasIsFlowing;
  110. private bool m_IsProcessing;
  111. private bool m_IsAutoMode;
  112. private string m_SelectedRecipe;
  113. private float m_ChillerTempSetpoint;
  114. private float m_InnerChillerTempSetpoint;
  115. private float m_OuterChillerTempSetpoint;
  116. private float m_TopChillerTempSetpoint;
  117. private float m_WallTempSetpoint;
  118. private bool m_HeIsPressureMode = true;
  119. private bool m_ChillerIsOn;
  120. private bool m_InnerChillerIsOn;
  121. private bool m_OuterChillerIsOn;
  122. private bool m_TopChillerIsOn;
  123. private float m_ChamberPressure;
  124. private float m_ProcessPressure;
  125. private float m_ForelinePressurePressure;
  126. private float m_ESCHePressure;
  127. ButterflyValveView butterflyValveMessageBox;
  128. HeaterView heaterView;
  129. private int m_TurboPumpRotationalSpeed;
  130. private bool m_LiftPinIsUp;
  131. private bool m_IsSlitDoorClosed;
  132. private bool m_IsLidClosed;
  133. private float m_ChillerTemperature;
  134. private float m_InnerTemperature;
  135. private float m_OuterTemperature;
  136. private float m_TopTemperature;
  137. private int m_ESCHVOutputVoltage;
  138. //private float m_MatchC1;
  139. //private float m_MatchC2;
  140. //private float m_BiasMatchC1;
  141. //private float m_BiasMatchC2;
  142. private float m_PendulumValvePosition;
  143. private bool m_IsTurboPumpAtSpeed;
  144. private bool m_TurboPumpWaterFlowSwitch;
  145. private bool m_IsHasWafer;
  146. private Recipe m_CurrentRecipe = new Recipe();
  147. private RecipeResult m_CurrentRecipeResult = new RecipeResult();
  148. private RecipeStep m_CurrentRecipeStep = new RecipeStep();
  149. private double m_ChamberPressureFeedBack;
  150. private double m_TurboN2FlowSetPoint;
  151. private string m_ModuleName;
  152. private string m_WaferID;
  153. private int? currentRecipeNumber;
  154. private bool m_IsInclude;
  155. private int m_SelectedRecipeIndex=-1;
  156. private ComboBoxItem m_SelectedRecipeType;
  157. #endregion
  158. #region 属性
  159. public bool IsInclude
  160. {
  161. get { return m_IsInclude; }
  162. set { SetProperty(ref m_IsInclude, value); }
  163. }
  164. public List<string> CurrentModuleRecipes
  165. {
  166. get { return m_CurrentModuleRecipes; }
  167. set { SetProperty(ref m_CurrentModuleRecipes, value); }
  168. }
  169. public Recipe CurrentRecipe
  170. {
  171. get { return m_CurrentRecipe; }
  172. set { SetProperty(ref m_CurrentRecipe, value); }
  173. }
  174. public RecipeResult CurrentRecipeResult
  175. {
  176. get { return m_CurrentRecipeResult; }
  177. set { SetProperty(ref m_CurrentRecipeResult, value); }
  178. }
  179. public RecipeStep CurrentRecipeStep
  180. {
  181. get { return m_CurrentRecipeStep; }
  182. set { SetProperty(ref m_CurrentRecipeStep, value); }
  183. }
  184. public bool IsHasWafer
  185. {
  186. get { return m_IsHasWafer; }
  187. set { SetProperty(ref m_IsHasWafer, value); }
  188. }
  189. public bool IsTurboPumpAtSpeed
  190. {
  191. get { return m_IsTurboPumpAtSpeed; }
  192. set { SetProperty(ref m_IsTurboPumpAtSpeed, value); }
  193. }
  194. public bool TurboPumpWaterFlowSwitch
  195. {
  196. get { return m_TurboPumpWaterFlowSwitch; }
  197. set { SetProperty(ref m_TurboPumpWaterFlowSwitch, value); }
  198. }
  199. public float PendulumValvePosition
  200. {
  201. get { return m_PendulumValvePosition; }
  202. set { SetProperty(ref m_PendulumValvePosition, value); }
  203. }
  204. public AITMatchData BMatchData
  205. {
  206. get { return m_BMatchData; }
  207. set { SetProperty(ref m_BMatchData, value); }
  208. }
  209. public AITMatchData SMatchData
  210. {
  211. get { return m_SMatchData; }
  212. set { SetProperty(ref m_SMatchData, value); }
  213. }
  214. //public float BiasMatchC1
  215. //{
  216. // get { return m_BiasMatchC1; }
  217. // set
  218. // {
  219. // SetProperty(ref m_BiasMatchC1, value);
  220. // }
  221. //}
  222. //public float BiasMatchC2
  223. //{
  224. // get { return m_BiasMatchC2; }
  225. // set
  226. // {
  227. // SetProperty(ref m_BiasMatchC2, value);
  228. // }
  229. //}
  230. //public float MatchC1
  231. //{
  232. // get { return m_MatchC1; }
  233. // set
  234. // {
  235. // SetProperty(ref m_MatchC1, value);
  236. // }
  237. //}
  238. //public float MatchC2
  239. //{
  240. // get { return m_MatchC2; }
  241. // set
  242. // {
  243. // SetProperty(ref m_MatchC2, value);
  244. // }
  245. //}
  246. public AITPendulumValveData PendulumValveData
  247. {
  248. get { return m_PendulumValveData; }
  249. set
  250. {
  251. SetProperty(ref m_PendulumValveData, value);
  252. }
  253. }
  254. //public AITHVData ESCHVData
  255. //{
  256. // get { return m_ESCHVData; }
  257. // set
  258. // {
  259. // SetProperty(ref m_ESCHVData, value);
  260. // }
  261. //}
  262. public int ESCHVOutputVoltage
  263. {
  264. get { return m_ESCHVOutputVoltage; }
  265. set
  266. {
  267. SetProperty(ref m_ESCHVOutputVoltage, value);
  268. }
  269. }
  270. public float ChillerTemperature
  271. {
  272. get { return m_ChillerTemperature; }
  273. set
  274. {
  275. SetProperty(ref m_ChillerTemperature, value);
  276. }
  277. }
  278. public float InnerTemperature
  279. {
  280. get { return m_InnerTemperature; }
  281. set
  282. {
  283. SetProperty(ref m_InnerTemperature, value);
  284. }
  285. }
  286. public float OuterTemperature
  287. {
  288. get { return m_OuterTemperature; }
  289. set
  290. {
  291. SetProperty(ref m_OuterTemperature, value);
  292. }
  293. }
  294. public float TopTemperature
  295. {
  296. get { return m_TopTemperature; }
  297. set
  298. {
  299. SetProperty(ref m_TopTemperature, value);
  300. }
  301. }
  302. //public float HVTemperature
  303. //{
  304. // get { return m_HVTemperature; }
  305. // set
  306. // {
  307. // SetProperty(ref m_HVTemperature, value);
  308. // }
  309. //}
  310. public bool IsLidClosed
  311. {
  312. get { return m_IsLidClosed; }
  313. set
  314. {
  315. SetProperty(ref m_IsLidClosed, value);
  316. }
  317. }
  318. public bool IsSlitDoorClosed
  319. {
  320. get { return m_IsSlitDoorClosed; }
  321. set
  322. {
  323. SetProperty(ref m_IsSlitDoorClosed, value);
  324. }
  325. }
  326. public bool LiftPinIsUp
  327. {
  328. get { return m_LiftPinIsUp; }
  329. set
  330. {
  331. SetProperty(ref m_LiftPinIsUp, value);
  332. }
  333. }
  334. public int TurboPumpRotationalSpeed
  335. {
  336. get { return m_TurboPumpRotationalSpeed; }
  337. set
  338. {
  339. SetProperty(ref m_TurboPumpRotationalSpeed, value);
  340. }
  341. }
  342. public float ESCHePressure
  343. {
  344. get { return m_ESCHePressure; }
  345. set
  346. {
  347. SetProperty(ref m_ESCHePressure, value);
  348. }
  349. }
  350. public float ChamberPressure
  351. {
  352. get { return m_ChamberPressure; }
  353. set
  354. {
  355. SetProperty(ref m_ChamberPressure, value);
  356. }
  357. }
  358. public float ProcessPressure
  359. {
  360. get { return m_ProcessPressure; }
  361. set
  362. {
  363. SetProperty(ref m_ProcessPressure, value);
  364. }
  365. }
  366. public float ForelinePressure
  367. {
  368. get { return m_ForelinePressurePressure; }
  369. set
  370. {
  371. SetProperty(ref m_ForelinePressurePressure, value);
  372. }
  373. }
  374. public bool SourceRFFanInterlock
  375. {
  376. get { return m_SourceRFFanInterlock; }
  377. set
  378. {
  379. SetProperty(ref m_SourceRFFanInterlock, value);
  380. }
  381. }
  382. public bool IsWLK
  383. {
  384. get { return m_IsWLK; }
  385. set
  386. {
  387. SetProperty(ref m_IsWLK, value);
  388. }
  389. }
  390. public bool IsWaterFlowOk
  391. {
  392. get { return m_IsWaterFlowOk; }
  393. set
  394. {
  395. SetProperty(ref m_IsWaterFlowOk, value);
  396. }
  397. }
  398. public bool IsCDAOK
  399. {
  400. get { return m_IsCDAOK; }
  401. set
  402. {
  403. SetProperty(ref m_IsCDAOK, value);
  404. }
  405. }
  406. public bool SensorGasBoxDoor
  407. {
  408. get { return m_SensorGasBoxDoor; }
  409. set
  410. {
  411. SetProperty(ref m_SensorGasBoxDoor, value);
  412. }
  413. }
  414. public bool SensorGasBoxPressure
  415. {
  416. get { return m_SensorGasBoxPressure; }
  417. set
  418. {
  419. SetProperty(ref m_SensorGasBoxPressure, value);
  420. }
  421. }
  422. public bool IsTurboPumpInterlock
  423. {
  424. get { return m_IsTurboPumpInterlock; }
  425. set
  426. {
  427. SetProperty(ref m_IsTurboPumpInterlock, value);
  428. }
  429. }
  430. public string ModuleName
  431. {
  432. get { return m_ModuleName; }
  433. set
  434. {
  435. SetProperty(ref m_ModuleName, value);
  436. }
  437. }
  438. public double MFC1SetPoint
  439. {
  440. get { return m_MFC1SetPoint; }
  441. set { SetProperty(ref m_MFC1SetPoint, value); }
  442. }
  443. public double MFC2SetPoint
  444. {
  445. get { return m_MFC2SetPoint; }
  446. set { SetProperty(ref m_MFC2SetPoint, value); }
  447. }
  448. public double MFC3SetPoint
  449. {
  450. get { return m_MFC3SetPoint; }
  451. set { SetProperty(ref m_MFC3SetPoint, value); }
  452. }
  453. public double MFC4SetPoint
  454. {
  455. get { return m_MFC4SetPoint; }
  456. set { SetProperty(ref m_MFC4SetPoint, value); }
  457. }
  458. public double MFC5SetPoint
  459. {
  460. get { return m_MFC5SetPoint; }
  461. set { SetProperty(ref m_MFC5SetPoint, value); }
  462. }
  463. public double MFC6SetPoint
  464. {
  465. get { return m_MFC6SetPoint; }
  466. set { SetProperty(ref m_MFC6SetPoint, value); }
  467. }
  468. public double MFC7SetPoint
  469. {
  470. get { return m_MFC7SetPoint; }
  471. set { SetProperty(ref m_MFC7SetPoint, value); }
  472. }
  473. public double MFC8SetPoint
  474. {
  475. get { return m_MFC8SetPoint; }
  476. set { SetProperty(ref m_MFC8SetPoint, value); }
  477. }
  478. public double N2SetPoint
  479. {
  480. get { return m_N2SetPoint; }
  481. set { SetProperty(ref m_N2SetPoint, value); }
  482. }
  483. public double TurboN2FlowSetPoint
  484. {
  485. get { return m_TurboN2FlowSetPoint; }
  486. set
  487. {
  488. if (value != m_TurboN2FlowSetPoint)
  489. {
  490. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", value);
  491. }
  492. SetProperty(ref m_TurboN2FlowSetPoint, value);
  493. }
  494. }
  495. public AITMfcData MFC1Data
  496. {
  497. get { return m_MFC1Data; }
  498. set { SetProperty(ref m_MFC1Data, value); }
  499. }
  500. public AITMfcData MFC2Data
  501. {
  502. get { return m_MFC2Data; }
  503. set { SetProperty(ref m_MFC2Data, value); }
  504. }
  505. public AITMfcData MFC3Data
  506. {
  507. get { return m_MFC3Data; }
  508. set { SetProperty(ref m_MFC3Data, value); }
  509. }
  510. public AITMfcData MFC4Data
  511. {
  512. get { return m_MFC4Data; }
  513. set { SetProperty(ref m_MFC4Data, value); }
  514. }
  515. public AITMfcData MFC5Data
  516. {
  517. get { return m_MFC5Data; }
  518. set { SetProperty(ref m_MFC5Data, value); }
  519. }
  520. public AITMfcData MFC6Data
  521. {
  522. get { return m_MFC6Data; }
  523. set { SetProperty(ref m_MFC6Data, value); }
  524. }
  525. public AITMfcData MFC7Data
  526. {
  527. get { return m_MFC7Data; }
  528. set { SetProperty(ref m_MFC7Data, value); }
  529. }
  530. public AITMfcData MFC8Data
  531. {
  532. get { return m_MFC8Data; }
  533. set { SetProperty(ref m_MFC8Data, value); }
  534. }
  535. public AITMfcData MFCHeData
  536. {
  537. get { return m_MFCHeData; }
  538. set { SetProperty(ref m_MFCHeData, value); }
  539. }
  540. public AITMfcData MFCN2Data
  541. {
  542. get { return m_MFCN2Data; }
  543. set { SetProperty(ref m_MFCN2Data, value); }
  544. }
  545. public AITHeaterData ValveHeaterData
  546. {
  547. get { return m_ValveHeaterData; }
  548. set { SetProperty(ref m_ValveHeaterData, value); }
  549. }
  550. public AITHeaterData ForelineHeaterData
  551. {
  552. get { return m_ForelineHeaterData; }
  553. set { SetProperty(ref m_ForelineHeaterData, value); }
  554. }
  555. public AITHeaterData WallHeaterData
  556. {
  557. get { return m_WallHeaterData; }
  558. set { SetProperty(ref m_WallHeaterData, value); }
  559. }
  560. public AITHeaterData PendulumHeaterData
  561. {
  562. get { return m_PendulumHeaterData; }
  563. set { SetProperty(ref m_PendulumHeaterData, value); }
  564. }
  565. public AITRfData SRFData
  566. {
  567. get { return m_SRFData; }
  568. set { SetProperty(ref m_SRFData, value); }
  569. }
  570. public AITRfData BRFData
  571. {
  572. get { return m_BRFData; }
  573. set { SetProperty(ref m_BRFData, value); }
  574. }
  575. public PMState PMCurrentState
  576. {
  577. get { return m_PMCurrentState; }
  578. set { SetProperty(ref m_PMCurrentState, value); }
  579. }
  580. #region 阀
  581. public bool GasFinalValveIsOpen
  582. {
  583. get { return m_GasFinalValveIsOpen; }
  584. set { SetProperty(ref m_GasFinalValveIsOpen, value); }
  585. }
  586. public bool PVN21ValveIsOpen
  587. {
  588. get { return m_PVN21ValveIsOpen; }
  589. set { SetProperty(ref m_PVN21ValveIsOpen, value); }
  590. }
  591. public bool PVN22ValveIsOpen
  592. {
  593. get { return m_PVN22ValveIsOpen; }
  594. set { SetProperty(ref m_PVN22ValveIsOpen, value); }
  595. }
  596. public bool N2ValveIsOpen
  597. {
  598. get { return m_N2ValveIsOpen; }
  599. set { SetProperty(ref m_N2ValveIsOpen, value); }
  600. }
  601. public bool PV11ValveIsOpen
  602. {
  603. get { return m_PV11ValveIsOpen; }
  604. set { SetProperty(ref m_PV11ValveIsOpen, value); }
  605. }
  606. public bool PV12ValveIsOpen
  607. {
  608. get { return m_PV12ValveIsOpen; }
  609. set { SetProperty(ref m_PV12ValveIsOpen, value); }
  610. }
  611. public bool MFC1ValveIsOpen
  612. {
  613. get { return m_MFC1ValveIsOpen; }
  614. set { SetProperty(ref m_MFC1ValveIsOpen, value); }
  615. }
  616. public bool PV21ValveIsOpen
  617. {
  618. get { return m_PV21ValveIsOpen; }
  619. set { SetProperty(ref m_PV21ValveIsOpen, value); }
  620. }
  621. public bool PV22ValveIsOpen
  622. {
  623. get { return m_PV22ValveIsOpen; }
  624. set { SetProperty(ref m_PV22ValveIsOpen, value); }
  625. }
  626. public bool MFC2ValveIsOpen
  627. {
  628. get { return m_MFC2ValveIsOpen; }
  629. set { SetProperty(ref m_MFC2ValveIsOpen, value); }
  630. }
  631. public bool PV31ValveIsOpen
  632. {
  633. get { return m_PV31ValveIsOpen; }
  634. set { SetProperty(ref m_PV31ValveIsOpen, value); }
  635. }
  636. public bool PV32ValveIsOpen
  637. {
  638. get { return m_PV32ValveIsOpen; }
  639. set { SetProperty(ref m_PV32ValveIsOpen, value); }
  640. }
  641. public bool MFC3ValveIsOpen
  642. {
  643. get { return m_MFC3ValveIsOpen; }
  644. set { SetProperty(ref m_MFC3ValveIsOpen, value); }
  645. }
  646. public bool PV41ValveIsOpen
  647. {
  648. get { return m_PV41ValveIsOpen; }
  649. set { SetProperty(ref m_PV41ValveIsOpen, value); }
  650. }
  651. public bool PV42ValveIsOpen
  652. {
  653. get { return m_PV42ValveIsOpen; }
  654. set { SetProperty(ref m_PV42ValveIsOpen, value); }
  655. }
  656. public bool MFC4ValveIsOpen
  657. {
  658. get { return m_MFC4ValveIsOpen; }
  659. set { SetProperty(ref m_MFC4ValveIsOpen, value); }
  660. }
  661. public bool MFC5ValveIsOpen
  662. {
  663. get { return m_MFC5ValveIsOpen; }
  664. set { SetProperty(ref m_MFC5ValveIsOpen, value); }
  665. }
  666. public bool MFC6ValveIsOpen
  667. {
  668. get { return m_MFC6ValveIsOpen; }
  669. set { SetProperty(ref m_MFC6ValveIsOpen, value); }
  670. }
  671. public bool MFC7ValveIsOpen
  672. {
  673. get { return m_MFC7ValveIsOpen; }
  674. set { SetProperty(ref m_MFC7ValveIsOpen, value); }
  675. }
  676. public bool MFC8ValveIsOpen
  677. {
  678. get { return m_MFC8ValveIsOpen; }
  679. set { SetProperty(ref m_MFC8ValveIsOpen, value); }
  680. }
  681. public bool PVHe1ValveIsOpen
  682. {
  683. get { return m_PVHe1ValveIsOpen; }
  684. set { SetProperty(ref m_PVHe1ValveIsOpen, value); }
  685. }
  686. public bool PVHe2ValveIsOpen
  687. {
  688. get { return m_PVHe2ValveIsOpen; }
  689. set { SetProperty(ref m_PVHe2ValveIsOpen, value); }
  690. }
  691. public bool TurboPumpPumpingValveIsOpen
  692. {
  693. get { return m_TurboPumpPumpingValveIsOpen; }
  694. set { SetProperty(ref m_TurboPumpPumpingValveIsOpen, value); }
  695. }
  696. public bool TurboPumpPurgeValveIsOpen
  697. {
  698. get { return m_TurboPumpPurgeValveIsOpen; }
  699. set { SetProperty(ref m_TurboPumpPurgeValveIsOpen, value); }
  700. }
  701. public bool SoftPumpValveIsOpen
  702. {
  703. get { return m_SoftPumpValveIsOpen; }
  704. set { SetProperty(ref m_SoftPumpValveIsOpen, value); }
  705. }
  706. public bool FastPumpValveIsOpen
  707. {
  708. get { return m_FastPumpValveIsOpen; }
  709. set { SetProperty(ref m_FastPumpValveIsOpen, value); }
  710. }
  711. public bool GuageValveIsOpen
  712. {
  713. get { return m_GuageValveIsOpen; }
  714. set { SetProperty(ref m_GuageValveIsOpen, value); }
  715. }
  716. #endregion
  717. public Dictionary<string, object> RtDataValues
  718. {
  719. get { return m_RtDataValues; }
  720. set { SetProperty(ref m_RtDataValues, value); }
  721. }
  722. public bool PumpIsOpen
  723. {
  724. get { return m_PumpIsOpen; }
  725. set { SetProperty(ref m_PumpIsOpen, value); }
  726. }
  727. public bool PendulumValveIsOpen
  728. {
  729. get { return m_PendulumValveIsOpen; }
  730. set { SetProperty(ref m_PendulumValveIsOpen, value); }
  731. }
  732. public bool TurboIsOpen
  733. {
  734. get { return m_TurboIsOpen; }
  735. set { SetProperty(ref m_TurboIsOpen, value); }
  736. }
  737. public bool IsATM
  738. {
  739. get { return m_IsATM; }
  740. set { SetProperty(ref m_IsATM, value); }
  741. }
  742. public bool IsVAC
  743. {
  744. get { return m_IsVAC; }
  745. set { SetProperty(ref m_IsVAC, value); }
  746. }
  747. //public bool BRFIsOn
  748. //{
  749. // get { return m_BRFIsOn; }
  750. // set { SetProperty(ref m_BRFIsOn, value); }
  751. //}
  752. //public bool SRFIsOn
  753. //{
  754. // get { return m_SRFIsOn; }
  755. // set { SetProperty(ref m_SRFIsOn, value); }
  756. //}
  757. public int PositionValue
  758. {
  759. get { return m_PositionValue; }
  760. set { SetProperty(ref m_PositionValue, value); }
  761. }
  762. public bool IsPositionMode
  763. {
  764. get { return m_IsPositionMode; }
  765. set { SetProperty(ref m_IsPositionMode, value); }
  766. }
  767. public double HeGasSetpoint
  768. {
  769. get { return m_HeGasSetpoint; }
  770. set
  771. {
  772. SetProperty(ref m_HeGasSetpoint, value);
  773. }
  774. }
  775. public int HePressureSetpoint
  776. {
  777. get { return m_HePressureSetpoint; }
  778. set
  779. {
  780. SetProperty(ref m_HePressureSetpoint, value);
  781. }
  782. }
  783. public float SRFFwdPowerSetpoint
  784. {
  785. get { return m_SRFFwdPowerSetpoint; }
  786. set { SetProperty(ref m_SRFFwdPowerSetpoint, value); }
  787. }
  788. public float BRFFwdPowerSetpoint
  789. {
  790. get { return m_BRFFwdPowerSetpoint; }
  791. set { SetProperty(ref m_BRFFwdPowerSetpoint, value); }
  792. }
  793. public int ESCVoltage
  794. {
  795. get { return m_ESCVoltage; }
  796. set { SetProperty(ref m_ESCVoltage, value); }
  797. }
  798. public float SRFMatchC1
  799. {
  800. get { return m_SRFMatchC1; }
  801. set { SetProperty(ref m_SRFMatchC1, value); }
  802. }
  803. public float SRFMatchC2
  804. {
  805. get { return m_SRFMatchC2; }
  806. set { SetProperty(ref m_SRFMatchC2, value); }
  807. }
  808. public float BRFMatchC1
  809. {
  810. get { return m_BRFMatchC1; }
  811. set { SetProperty(ref m_BRFMatchC1, value); }
  812. }
  813. public float BRFMatchC2
  814. {
  815. get { return m_BRFMatchC2; }
  816. set { SetProperty(ref m_BRFMatchC2, value); }
  817. }
  818. public bool GasIsFlowing
  819. {
  820. get { return m_GasIsFlowing; }
  821. set { SetProperty(ref m_GasIsFlowing, value); }
  822. }
  823. public bool IsProcessing
  824. {
  825. get { return m_IsProcessing; }
  826. set { SetProperty(ref m_IsProcessing, value); }
  827. }
  828. public bool IsAutoMode
  829. {
  830. get { return m_IsAutoMode; }
  831. set { SetProperty(ref m_IsAutoMode, value); }
  832. }
  833. public string SelectedRecipe
  834. {
  835. get { return m_SelectedRecipe; }
  836. set { SetProperty(ref m_SelectedRecipe, value); }
  837. }
  838. public float ChillerTempSetpoint
  839. {
  840. get { return m_ChillerTempSetpoint; }
  841. set { SetProperty(ref m_ChillerTempSetpoint, value); }
  842. }
  843. public float InnerChillerTempSetpoint
  844. {
  845. get { return m_InnerChillerTempSetpoint; }
  846. set { SetProperty(ref m_InnerChillerTempSetpoint, value); }
  847. }
  848. public float OuterChillerTempSetpoint
  849. {
  850. get { return m_OuterChillerTempSetpoint; }
  851. set { SetProperty(ref m_OuterChillerTempSetpoint, value); }
  852. }
  853. public float TopChillerTempSetpoint
  854. {
  855. get { return m_TopChillerTempSetpoint; }
  856. set { SetProperty(ref m_TopChillerTempSetpoint, value); }
  857. }
  858. public float WallTempSetpoint
  859. {
  860. get { return m_WallTempSetpoint; }
  861. set { SetProperty(ref m_WallTempSetpoint, value); }
  862. }
  863. public bool HeIsPressureMode
  864. {
  865. get { return m_HeIsPressureMode; }
  866. set { SetProperty(ref m_HeIsPressureMode, value); }
  867. }
  868. public bool ChillerIsOn
  869. {
  870. get { return m_ChillerIsOn; }
  871. set { SetProperty(ref m_ChillerIsOn, value); }
  872. }
  873. public bool InnerChillerIsOn
  874. {
  875. get { return m_InnerChillerIsOn; }
  876. set { SetProperty(ref m_InnerChillerIsOn, value); }
  877. }
  878. public bool OuterChillerIsOn
  879. {
  880. get { return m_OuterChillerIsOn; }
  881. set { SetProperty(ref m_OuterChillerIsOn, value); }
  882. }
  883. public bool TopChillerIsOn
  884. {
  885. get { return m_TopChillerIsOn; }
  886. set { SetProperty(ref m_TopChillerIsOn, value); }
  887. }
  888. public double ChamberPressureFeedBack
  889. {
  890. get { return m_ChamberPressureFeedBack; }
  891. set { SetProperty(ref m_ChamberPressureFeedBack, value); }
  892. }
  893. public string WaferID
  894. {
  895. get { return m_WaferID; }
  896. set { SetProperty(ref m_WaferID, value); }
  897. }
  898. public int SelectedRecipeIndex
  899. {
  900. get { return m_SelectedRecipeIndex; }
  901. set { SetProperty(ref m_SelectedRecipeIndex, value); }
  902. }
  903. public ComboBoxItem SelectedRecipeType
  904. {
  905. get { return m_SelectedRecipeType; }
  906. set { SetProperty(ref m_SelectedRecipeType, value); }
  907. }
  908. #endregion
  909. #region 命令
  910. private DelegateCommand _PMInitCommnad;
  911. public DelegateCommand PMInitCommnad =>
  912. _PMInitCommnad ?? (_PMInitCommnad = new DelegateCommand(OnPMInit));
  913. private DelegateCommand _PMAbortCommnad;
  914. public DelegateCommand PMAbortCommnad =>
  915. _PMAbortCommnad ?? (_PMAbortCommnad = new DelegateCommand(OnPMAbort));
  916. private DelegateCommand _GasCommand;
  917. public DelegateCommand GasCommand =>
  918. _GasCommand ?? (_GasCommand = new DelegateCommand(OnGas));
  919. private DelegateCommand _HeCommand;
  920. public DelegateCommand HeCommand =>
  921. _HeCommand ?? (_HeCommand = new DelegateCommand(OnHe));
  922. private DelegateCommand _RfCommand;
  923. public DelegateCommand RfCommand =>
  924. _RfCommand ?? (_RfCommand = new DelegateCommand(OnRf));
  925. private DelegateCommand _PurgeCommand;
  926. public DelegateCommand PurgeCommand =>
  927. _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
  928. private DelegateCommand _VentCommand;
  929. public DelegateCommand VentCommand =>
  930. _VentCommand ?? (_VentCommand = new DelegateCommand(OnVent));
  931. private DelegateCommand _PumpCommand;
  932. public DelegateCommand PumpCommand =>
  933. _PumpCommand ?? (_PumpCommand = new DelegateCommand(OnPump));
  934. private DelegateCommand _OpenPumpCommand;
  935. public DelegateCommand OpenPumpCommand =>
  936. _OpenPumpCommand ?? (_OpenPumpCommand = new DelegateCommand(OnOpenPump));
  937. private DelegateCommand _ClosePumpCommand;
  938. public DelegateCommand ClosePumpCommand =>
  939. _ClosePumpCommand ?? (_ClosePumpCommand = new DelegateCommand(OnClosePump));
  940. private DelegateCommand _OpenTurboPumpCommand;
  941. public DelegateCommand OpenTurboPumpCommand =>
  942. _OpenTurboPumpCommand ?? (_OpenTurboPumpCommand = new DelegateCommand(OnOpenTurboPump));
  943. private DelegateCommand _CloseTurboPumpCommand;
  944. public DelegateCommand CloseTurboPumpCommand =>
  945. _CloseTurboPumpCommand ?? (_CloseTurboPumpCommand = new DelegateCommand(OnCloseTurboPump));
  946. private DelegateCommand _OpenPendulumValveCommand;
  947. public DelegateCommand OpenPendulumValveCommand =>
  948. _OpenPendulumValveCommand ?? (_OpenPendulumValveCommand = new DelegateCommand(OnOpenPendulumValve));
  949. private DelegateCommand _ClosePendulumValveCommand;
  950. public DelegateCommand ClosePendulumValveCommand =>
  951. _ClosePendulumValveCommand ?? (_ClosePendulumValveCommand = new DelegateCommand(OnClosePendulumValve));
  952. private DelegateCommand<object> _PinUpDownCommand;
  953. public DelegateCommand<object> PinUpDownCommand =>
  954. _PinUpDownCommand ?? (_PinUpDownCommand = new DelegateCommand<object>(OnPinUpDown));
  955. private DelegateCommand<object> _LidUpDownCommand;
  956. public DelegateCommand<object> LidUpDownCommand =>
  957. _LidUpDownCommand ?? (_LidUpDownCommand = new DelegateCommand<object>(OnLidUpDown));
  958. private DelegateCommand _SetSRfCommand;
  959. public DelegateCommand SetSRfCommand =>
  960. _SetSRfCommand ?? (_SetSRfCommand = new DelegateCommand(OnSetSRf));
  961. private DelegateCommand _SetBRfCommand;
  962. public DelegateCommand SetBRfCommand =>
  963. _SetBRfCommand ?? (_SetBRfCommand = new DelegateCommand(OnSetBRf));
  964. private DelegateCommand _OpenButterflyValveViewCommand;
  965. public DelegateCommand OpenButterflyValveViewCommand =>
  966. _OpenButterflyValveViewCommand ?? (_OpenButterflyValveViewCommand = new DelegateCommand(OnOpenButterflyValveView));
  967. //private DelegateCommand _HVCommand;
  968. //public DelegateCommand HVCommand =>
  969. // _HVCommand ?? (_HVCommand = new DelegateCommand(OnHV));
  970. //private DelegateCommand _HVSetCommand;
  971. //public DelegateCommand HVSetCommand =>
  972. // _HVSetCommand ?? (_HVSetCommand = new DelegateCommand(OnHVSet));
  973. private DelegateCommand _LoadRecipeCommand;
  974. public DelegateCommand LoadRecipeCommand =>
  975. _LoadRecipeCommand ?? (_LoadRecipeCommand = new DelegateCommand(OnLoadRecipe));
  976. private DelegateCommand<object> _ControlValveCommand;
  977. public DelegateCommand<object> ControlValveCommand =>
  978. _ControlValveCommand ?? (_ControlValveCommand = new DelegateCommand<object>(OnControlValve));
  979. private DelegateCommand<object> _RunRecipeCommand;
  980. public DelegateCommand<object> RunRecipeCommand =>
  981. _RunRecipeCommand ?? (_RunRecipeCommand = new DelegateCommand<object>(OnRunRecipe));
  982. private DelegateCommand<object> _SetChillerTempCommand;
  983. public DelegateCommand<object> SetChillerTempCommand =>
  984. _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand<object>(OnSetChillerTemp));
  985. private DelegateCommand<object> _OnOffChillerCommand;
  986. public DelegateCommand<object> OnOffChillerCommand =>
  987. _OnOffChillerCommand ?? (_OnOffChillerCommand = new DelegateCommand<object>(OnOffChiller));
  988. private DelegateCommand<object> _HeaterCommand;
  989. public DelegateCommand<object> HeaterCommand =>
  990. _HeaterCommand ?? (_HeaterCommand = new DelegateCommand<object>(OnHeater));
  991. private DelegateCommand _EndStepCommand;
  992. public DelegateCommand EndStepCommand =>
  993. _EndStepCommand ?? (_EndStepCommand = new DelegateCommand(OnEndStep));
  994. private DelegateCommand _OnlineCommand;
  995. public DelegateCommand OnlineCommand =>
  996. _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
  997. private DelegateCommand _OfflineCommand;
  998. public DelegateCommand OfflineCommand =>
  999. _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
  1000. private DelegateCommand<object> _AbortRecipeCommnad;
  1001. public DelegateCommand<object> AbortRecipeCommnad =>
  1002. _AbortRecipeCommnad ?? (_AbortRecipeCommnad = new DelegateCommand<object>(OnAbortRecipe));
  1003. private DelegateCommand _IncludeCommand;
  1004. public DelegateCommand IncludeCommand =>
  1005. _IncludeCommand ?? (_IncludeCommand = new DelegateCommand(OnInclude));
  1006. private DelegateCommand _SwitchTypeCommand;
  1007. public DelegateCommand SwitchTypeCommand =>
  1008. _SwitchTypeCommand ?? (_SwitchTypeCommand = new DelegateCommand(OnSwitchType));
  1009. #endregion
  1010. #region 构造函数
  1011. public OverKepler2300ViewModel()
  1012. {
  1013. m_RtDataKeys = new List<string>();
  1014. m_IsATM = true;
  1015. ModuleName = "PMA";
  1016. //CurrentModuleRecipes = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList();
  1017. DispatcherTimer timer = new DispatcherTimer();
  1018. timer.Interval = TimeSpan.FromSeconds(0.5);
  1019. timer.Tick += timer_Tick;
  1020. timer.Start();
  1021. }
  1022. #endregion
  1023. #region 命令方法
  1024. private void OnControlValve(object obj)
  1025. {
  1026. CommonValveControl commonValveControl = (CommonValveControl)obj;
  1027. if (commonValveControl.IsCanEdit == true)
  1028. {
  1029. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", Convert.ToInt32(commonValveControl.Tag.ToString()), !commonValveControl.Status);
  1030. string operation = commonValveControl.Status ? "关闭" : "打开";
  1031. LOG.Info($"{ModuleName},{operation}{((ValveType)Convert.ToInt32(commonValveControl.Tag.ToString())).ToString()}阀");
  1032. }
  1033. }
  1034. private void OnPMInit()
  1035. {
  1036. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Home");
  1037. }
  1038. private async void OnGas()
  1039. {
  1040. await Task.Run(async () =>
  1041. {
  1042. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas1.SetPoint", MFC1SetPoint);
  1043. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas2.SetPoint", MFC2SetPoint);
  1044. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas3.SetPoint", MFC3SetPoint);
  1045. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas4.SetPoint", MFC4SetPoint);
  1046. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas5.SetPoint", MFC5SetPoint);
  1047. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas6.SetPoint", MFC6SetPoint);
  1048. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas7.SetPoint", MFC7SetPoint);
  1049. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas8.SetPoint", MFC8SetPoint);
  1050. await Task.Delay(1000);
  1051. object[] mfc = new object[8];
  1052. string[] mfcSetPoint = new string[8];
  1053. mfc[0] = MFC1Data.SetPoint;
  1054. mfc[1] = MFC2Data.SetPoint;
  1055. mfc[2] = MFC3Data.SetPoint;
  1056. mfc[3] = MFC4Data.SetPoint;
  1057. mfc[4] = MFC5Data.SetPoint;
  1058. mfc[5] = MFC6Data.SetPoint;
  1059. mfc[6] = MFC7Data.SetPoint;
  1060. mfc[7] = MFC8Data.SetPoint;
  1061. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.GasFlow}", mfc);
  1062. string operation = GasIsFlowing ? "关闭" : "打开";
  1063. LOG.Info($"{ModuleName},{operation}GasFlow({mfc[0]},{mfc[1]},{mfc[2]},{mfc[3]},{mfc[4]},{mfc[5]},{mfc[6]},{mfc[7]})");
  1064. });
  1065. }
  1066. private void OnHe()
  1067. {
  1068. if (PVHe1ValveIsOpen == true)
  1069. {
  1070. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBacksideHeFlow", 0.0d);
  1071. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBacksideHePressure", 0);
  1072. }
  1073. else
  1074. {
  1075. if (HeIsPressureMode)
  1076. {
  1077. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBacksideHePressure", HeGasSetpoint);
  1078. }
  1079. else
  1080. {
  1081. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBacksideHeFlow", HeGasSetpoint);
  1082. }
  1083. }
  1084. }
  1085. private void OnRf()
  1086. {
  1087. if (PMCurrentState == PMState.RfPowering)
  1088. {
  1089. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1090. }
  1091. else
  1092. {
  1093. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.RfPower}");
  1094. }
  1095. }
  1096. private void OnPurge()
  1097. {
  1098. if (PMCurrentState == PMState.Purging)
  1099. {
  1100. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1101. }
  1102. else
  1103. {
  1104. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
  1105. }
  1106. }
  1107. private void OnVent()
  1108. {
  1109. if (PMCurrentState == PMState.Venting)
  1110. {
  1111. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1112. }
  1113. else
  1114. {
  1115. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Vent");
  1116. }
  1117. }
  1118. private void OnPump()
  1119. {
  1120. if (PMCurrentState == PMState.Pumping)
  1121. {
  1122. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1123. return;
  1124. }
  1125. string BasePressureSetPoint = QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.Pump.PumpBasePressure").ToString();
  1126. string PumpLimitSetPoint = QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.Pump.PumpTimeLimit").ToString();
  1127. // 设置底压
  1128. double basePressure = string.IsNullOrEmpty(BasePressureSetPoint) ? 0 : Convert.ToDouble(BasePressureSetPoint);
  1129. if (basePressure <= 0.01 || basePressure >= 1000)
  1130. {
  1131. MessageBox.Show($"基准压力设定值 {basePressure} 无效,应该在0到1000毫托之间");
  1132. return;
  1133. }
  1134. double pumpLimit = string.IsNullOrEmpty(PumpLimitSetPoint) ? 0 : Convert.ToDouble(PumpLimitSetPoint);
  1135. if (pumpLimit <= 0.01 || pumpLimit >= 1200)
  1136. {
  1137. MessageBox.Show($"抽气时间应该在0到1200之间,当前设定值{pumpLimit}");
  1138. return;
  1139. }
  1140. InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{ModuleName}.Pump.PumpBasePressure", basePressure.ToString());
  1141. InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{ModuleName}.Pump.PumpTimeLimit", pumpLimit.ToString());
  1142. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Pump");
  1143. }
  1144. private void OnOpenPump()
  1145. {
  1146. if (PMCurrentState == PMState.LaunchingPump)
  1147. {
  1148. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1149. return;
  1150. }
  1151. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartPump");
  1152. }
  1153. private void OnClosePump()
  1154. {
  1155. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClosePump");
  1156. }
  1157. private void OnOpenTurboPump()
  1158. {
  1159. if (PMCurrentState == PMState.LaunchingTurboPump)
  1160. {
  1161. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
  1162. return;
  1163. }
  1164. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartTurboPump");
  1165. }
  1166. private void OnCloseTurboPump()
  1167. {
  1168. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.CloseTurboPump");
  1169. }
  1170. private void OnOpenPendulumValve()
  1171. {
  1172. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TurnPendulumValve", true);
  1173. }
  1174. private void OnClosePendulumValve()
  1175. {
  1176. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TurnPendulumValve", false);
  1177. }
  1178. private void OnPinUpDown(object upDown)
  1179. {
  1180. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetLiftPin", Convert.ToBoolean(upDown));
  1181. }
  1182. private void OnLidUpDown(object upDown)
  1183. {
  1184. //var value = (bool)upDown;
  1185. if (upDown.ToString() == "Up")
  1186. {
  1187. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.Lid}.{AITCylinderOperation.Open}");
  1188. }
  1189. else
  1190. {
  1191. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.Lid}.{AITCylinderOperation.Close}");
  1192. }
  1193. }
  1194. private void OnSetSRf()
  1195. {
  1196. if (SRFData.IsRfOn == true)
  1197. {
  1198. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetSRf", SRFFwdPowerSetpoint, false);
  1199. }
  1200. else
  1201. {
  1202. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.Match}.{AITRfOperation.SetMatchPosition}", SRFMatchC1, SRFMatchC2);
  1203. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetSRf", SRFFwdPowerSetpoint, true);
  1204. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.Match}.{AITRfOperation.SetMatchProcessMode}", "Auto");
  1205. }
  1206. }
  1207. private void OnSetBRf()
  1208. {
  1209. if (BRFData.IsRfOn == true)
  1210. {
  1211. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBRf", BRFFwdPowerSetpoint, false);
  1212. }
  1213. else
  1214. {
  1215. if (GasIsFlowing == true)
  1216. {
  1217. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.BiasMatch}.{AITRfOperation.SetMatchPosition}", BRFMatchC1, BRFMatchC2);
  1218. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBRf", BRFFwdPowerSetpoint, true);
  1219. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{VenusDevice.BiasMatch}.{AITRfOperation.SetMatchProcessMode}", "Auto");
  1220. }
  1221. }
  1222. }
  1223. private void OnPMAbort()
  1224. {
  1225. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
  1226. }
  1227. private void OnOpenButterflyValveView()
  1228. {
  1229. var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is Window) as Window;
  1230. if (butterflyValveMessageBox == null || butterflyValveMessageBox.IsVisible == false)
  1231. {
  1232. butterflyValveMessageBox = new ButterflyValveView(ModuleName.ToString());
  1233. butterflyValveMessageBox.WindowStartupLocation = WindowStartupLocation.Manual;
  1234. butterflyValveMessageBox.Left = 700;
  1235. butterflyValveMessageBox.Top = 600;
  1236. butterflyValveMessageBox.Show();
  1237. butterflyValveMessageBox.Owner = _mainWindow;
  1238. }
  1239. }
  1240. private void OnLoadRecipe()
  1241. {
  1242. string recipeType = SelectedRecipeType.Content.ToString();
  1243. CurrentModuleRecipes = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, recipeType)).ToList();
  1244. }
  1245. //private void OnHVSet()
  1246. //{
  1247. // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHV", ESCVoltage);
  1248. //}
  1249. private void OnSwitchType()
  1250. {
  1251. SelectedRecipeIndex = -1;
  1252. }
  1253. private void OnRunRecipe(object obj)
  1254. {
  1255. if (SelectedRecipeIndex == -1)
  1256. {
  1257. return;
  1258. }
  1259. string recipeName = CurrentModuleRecipes[SelectedRecipeIndex];
  1260. string recipeType = SelectedRecipeType.Content.ToString();
  1261. ClearData();
  1262. var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, recipeType, recipeName + ".rcp");
  1263. CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
  1264. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.RunRecipe}", recipeName, ModuleManager.ModuleInfos[ModuleName].WaferManager.Wafers[0].WaferID, recipeType);
  1265. LOG.Info($"{ModuleName},Run Recipe {recipeName},");
  1266. }
  1267. private void OnSetChillerTemp(object obj)
  1268. {
  1269. float offset;
  1270. float setPoint;
  1271. var chillerType = (ChillerType)Enum.Parse(typeof(ChillerType), obj.ToString());
  1272. switch (chillerType)
  1273. {
  1274. case ChillerType.Chiller:
  1275. var value = (QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.Chiller.ChillerTemperatureOffset").ToString());
  1276. float.TryParse(value, out offset);
  1277. setPoint = ChillerTempSetpoint;
  1278. break;
  1279. case ChillerType.InnerChiller:
  1280. var Innervalue = (QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.InnerChiller.ChillerTemperatureOffset").ToString());
  1281. float.TryParse(Innervalue, out offset);
  1282. setPoint = InnerChillerTempSetpoint;
  1283. break;
  1284. case ChillerType.OuterChiller:
  1285. var Outervalue = (QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.OuterChiller.ChillerTemperatureOffset").ToString());
  1286. float.TryParse(Outervalue, out offset);
  1287. setPoint = OuterChillerTempSetpoint;
  1288. break;
  1289. case ChillerType.TopChiller:
  1290. var Topvalue = (QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.TopChiller.ChillerTemperatureOffset").ToString());
  1291. float.TryParse(Topvalue, out offset);
  1292. setPoint = TopChillerTempSetpoint;
  1293. break;
  1294. default:
  1295. return;
  1296. }
  1297. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeatChiller", chillerType.ToString(), setPoint, offset);
  1298. }
  1299. private void OnOffChiller(object obj)
  1300. {
  1301. var chillerType = (ChillerType)Enum.Parse(typeof(ChillerType), obj.ToString());
  1302. switch (chillerType)
  1303. {
  1304. case ChillerType.Chiller:
  1305. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", chillerType.ToString(), !ChillerIsOn);
  1306. break;
  1307. case ChillerType.InnerChiller:
  1308. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", chillerType.ToString(), !InnerChillerIsOn);
  1309. break;
  1310. case ChillerType.OuterChiller:
  1311. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", chillerType.ToString(), !OuterChillerIsOn);
  1312. break;
  1313. case ChillerType.TopChiller:
  1314. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", chillerType.ToString(), !TopChillerIsOn);
  1315. break;
  1316. default:
  1317. return;
  1318. }
  1319. }
  1320. private void OnHeater(object obj)
  1321. {
  1322. if (IsAutoMode == true)
  1323. {
  1324. return;
  1325. }
  1326. AITHeaterData heaterData = obj as AITHeaterData;
  1327. var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is Window) as Window;
  1328. if (heaterView == null || heaterView.IsVisible == false)
  1329. {
  1330. heaterView = new HeaterView(heaterData, ModuleName);
  1331. heaterView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
  1332. heaterView.Owner = _mainWindow;
  1333. heaterView.Show();
  1334. }
  1335. }
  1336. private void OnEndStep()
  1337. {
  1338. //if (CurrentRecipeResult?.RecipeStepNumber != null && CurrentRecipeResult?.RecipeStepNumber != CurrentRecipeResult?.RecipeStepCount)
  1339. //{
  1340. // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ManualEndStep");
  1341. //}
  1342. //else if (CurrentRecipeResult?.RecipeStepNumber != null && CurrentRecipeResult?.RecipeStepNumber == CurrentRecipeResult?.RecipeStepCount)
  1343. //{
  1344. // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
  1345. //}
  1346. if (CurrentRecipeResult?.RecipeStepNumber != null)
  1347. {
  1348. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ManualEndStep");
  1349. }
  1350. }
  1351. private void OnOnline()
  1352. {
  1353. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Online}");
  1354. }
  1355. private void OnOffline()
  1356. {
  1357. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Offline}");
  1358. }
  1359. private async void OnAbortRecipe(object obj)
  1360. {
  1361. if (PMCurrentState != PMState.Processing)
  1362. {
  1363. return;
  1364. }
  1365. switch (obj.ToString())
  1366. {
  1367. case "0":
  1368. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
  1369. break;
  1370. case "1":
  1371. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
  1372. //if (ESCHVData.IsOn == true)
  1373. //{
  1374. // await Task.Delay(3000);
  1375. // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHVIsOn", false);
  1376. //}
  1377. break;
  1378. case "2":
  1379. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
  1380. await Task.Delay(3000);
  1381. InvokeClient.Instance.Service.DoOperation("ReturnWafer", ModuleName, 0);
  1382. break;
  1383. }
  1384. }
  1385. private void OnInclude()
  1386. {
  1387. if (IsInclude)
  1388. {
  1389. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Include}");
  1390. }
  1391. else
  1392. {
  1393. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Exclude}");
  1394. }
  1395. }
  1396. #endregion
  1397. #region 私有方法
  1398. private void ClearData()
  1399. {
  1400. ESCVoltage = 0;
  1401. SRFFwdPowerSetpoint = 0;
  1402. SRFMatchC1 = 0;
  1403. SRFMatchC2 = 0;
  1404. BRFFwdPowerSetpoint = 0;
  1405. BRFMatchC1 = 0;
  1406. BRFMatchC2 = 0;
  1407. HeGasSetpoint = 0;
  1408. MFC1SetPoint = 0;
  1409. MFC2SetPoint = 0;
  1410. MFC3SetPoint = 0;
  1411. MFC4SetPoint = 0;
  1412. MFC5SetPoint = 0;
  1413. MFC6SetPoint = 0;
  1414. MFC7SetPoint = 0;
  1415. MFC8SetPoint = 0;
  1416. }
  1417. private IEnumerable<string> GetFilesNames(string path)
  1418. {
  1419. if (Directory.Exists(path))
  1420. {
  1421. return Directory.GetFiles(path, "*.rcp")?
  1422. .Select(Path.GetFileNameWithoutExtension);
  1423. }
  1424. else
  1425. {
  1426. return new List<string>();
  1427. }
  1428. }
  1429. void timer_Tick(object sender, EventArgs e)
  1430. {
  1431. RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
  1432. if (RtDataValues == null)
  1433. {
  1434. return;
  1435. }
  1436. TurboN2FlowSetPoint = Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.TurboN2FlowSetPoint"));
  1437. PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
  1438. GasFinalValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGasFinal.IsOpen");
  1439. PV11ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV11.IsOpen");
  1440. PV12ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV12.IsOpen");
  1441. PV21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV21.IsOpen");
  1442. PV22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV22.IsOpen");
  1443. PV31ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV31.IsOpen");
  1444. PV32ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV32.IsOpen");
  1445. PV41ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV41.IsOpen");
  1446. PV42ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV42.IsOpen");
  1447. MFC1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc1.IsOpen");
  1448. MFC2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc2.IsOpen");
  1449. MFC3ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc3.IsOpen");
  1450. MFC4ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc4.IsOpen");
  1451. MFC5ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc5.IsOpen");
  1452. MFC6ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc6.IsOpen");
  1453. MFC7ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc7.IsOpen");
  1454. MFC8ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc8.IsOpen");
  1455. N2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveN2.IsOpen");
  1456. SoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveSoftPump.IsOpen");
  1457. FastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveFastPump.IsOpen");
  1458. GuageValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGuage.IsOpen");
  1459. PVHe1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe1.IsOpen");
  1460. PVHe2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe2.IsOpen");
  1461. PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
  1462. PVN22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN22.IsOpen");
  1463. TurboPumpPumpingValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPumping.IsOpen");
  1464. TurboPumpPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPurge.IsOpen");
  1465. WaferID = IsHasWafer ? ModuleManager.ModuleInfos[ModuleName].WaferManager.Wafers[0].SourceName : "";
  1466. PumpIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.PumpIsRunning");
  1467. TurboIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpIsRunning");
  1468. LiftPinIsUp = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.LiftPinIsUp");
  1469. IsSlitDoorClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsSlitDoorClosed");
  1470. IsLidClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsLidClosed");
  1471. PendulumValvePosition = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.GetPVPosition");
  1472. TurboPumpRotationalSpeed = Convert.ToInt32(RtDataValues[$"{ModuleName}.TurboPumpRotationalSpeed"].ToString());
  1473. PositionValue = -((int)((PendulumValvePosition) * 0.09));
  1474. PMCurrentState = (PMState)Enum.Parse(typeof(PMState), RtDataValues[$"{ModuleName}.FsmState"].ToString());
  1475. GasIsFlowing = PMCurrentState == PMState.GasFlowing;
  1476. IsProcessing = PMCurrentState == PMState.Processing || PMCurrentState == PMState.Clean;
  1477. MFC1Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas1");
  1478. MFC2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas2");
  1479. MFC3Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas3");
  1480. MFC4Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas4");
  1481. MFC5Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas5");
  1482. MFC6Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas6");
  1483. MFC7Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas7");
  1484. MFC8Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas8");
  1485. MFCHeData = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcHe");
  1486. MFCN2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcN2");
  1487. SRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.Rf}.DeviceData");
  1488. BRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasRf}.DeviceData");
  1489. PendulumValveData = CommonFunction.GetValue<AITPendulumValveData>(RtDataValues, $"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
  1490. //ESCHVData= CommonFunction.GetValue<AITHVData>(RtDataValues, $"{ModuleName}.{VenusDevice.ESCHV}.DeviceData");
  1491. BMatchData = CommonFunction.GetValue<AITMatchData>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.DeviceData");
  1492. SMatchData = CommonFunction.GetValue<AITMatchData>(RtDataValues, $"{ModuleName}.{VenusDevice.Match}.DeviceData");
  1493. ValveHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ValveHeater.DeviceData"];
  1494. ForelineHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ForelineHeater.DeviceData"];
  1495. WallHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.WallHeater.DeviceData"];
  1496. PendulumHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.PendulumHeater.DeviceData"];
  1497. ChamberPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ChamberPressure");
  1498. ProcessPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessPressure");
  1499. ForelinePressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ForelinePressure");
  1500. ESCHePressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ESCHePressure");
  1501. //ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
  1502. InnerTemperature = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ChillerInnerTemp");
  1503. OuterTemperature = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ChillerOuterTemp");
  1504. TopTemperature = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ChillerTopTemp");
  1505. InnerChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.InnerChiller.IsOn");
  1506. OuterChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.OuterChiller.IsOn");
  1507. TopChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TopChiller.IsOn");
  1508. SourceRFFanInterlock = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.SourceRFFanInterlock");
  1509. IsWLK = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWLK");
  1510. IsWaterFlowOk = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWaterFlowOk");
  1511. IsTurboPumpInterlock = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpInterlock");
  1512. IsCDAOK = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsCDA_OK");
  1513. SensorGasBoxDoor = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxDoorSW.Value");
  1514. SensorGasBoxPressure = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxPressureSW.Value");
  1515. IsATM = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsATM");
  1516. IsVAC = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsVAC");
  1517. ESCHVOutputVoltage = CommonFunction.GetValue<int>(RtDataValues, $"{ModuleName}.ESCHV.OutputVoltage");
  1518. //MatchC1 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.Match}.C1");
  1519. //MatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.Match}.C2");
  1520. //BiasMatchC1 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C1");
  1521. //BiasMatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C2");
  1522. TurboPumpWaterFlowSwitch = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpWaterFlowSwitch.Value");
  1523. IsTurboPumpAtSpeed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpAtSpeed");
  1524. IsHasWafer = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.HasWafer");
  1525. if (PMCurrentState == PMState.Processing || PMCurrentState == PMState.Clean)
  1526. {
  1527. CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
  1528. if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber != currentRecipeNumber)
  1529. {
  1530. var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,CurrentRecipeResult.RecipeType, CurrentRecipeResult.RecipeName + ".rcp");
  1531. CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
  1532. CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
  1533. }
  1534. currentRecipeNumber = CurrentRecipeResult.RecipeStepNumber;
  1535. }
  1536. //else
  1537. //{
  1538. // CurrentRecipeResult = null;
  1539. // CurrentRecipeStep = null;
  1540. //}
  1541. if (Math.Abs(100 - ProcessPressure) > 1 && ProcessPressure < 100)
  1542. {
  1543. ChamberPressureFeedBack = ProcessPressure;
  1544. }
  1545. else
  1546. {
  1547. ChamberPressureFeedBack = ChamberPressure;
  1548. }
  1549. IsAutoMode= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsOnline");
  1550. IsInclude = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsInclude");
  1551. }
  1552. public void addDataKeys()
  1553. {
  1554. m_RtDataKeys.Clear();
  1555. m_RtDataKeys.Add($"{ModuleName}.MfcGas1");
  1556. m_RtDataKeys.Add($"{ModuleName}.MfcGas2");
  1557. m_RtDataKeys.Add($"{ModuleName}.MfcGas3");
  1558. m_RtDataKeys.Add($"{ModuleName}.MfcGas4");
  1559. m_RtDataKeys.Add($"{ModuleName}.MfcGas5");
  1560. m_RtDataKeys.Add($"{ModuleName}.MfcGas6");
  1561. m_RtDataKeys.Add($"{ModuleName}.MfcGas7");
  1562. m_RtDataKeys.Add($"{ModuleName}.MfcGas8");
  1563. m_RtDataKeys.Add($"{ModuleName}.MfcHe");
  1564. m_RtDataKeys.Add($"{ModuleName}.MfcN2");
  1565. m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
  1566. m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
  1567. m_RtDataKeys.Add($"{ModuleName}.ProcessPressure");
  1568. m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
  1569. m_RtDataKeys.Add($"{ModuleName}.ESCHePressure");
  1570. m_RtDataKeys.Add($"{ModuleName}.IsATM");
  1571. m_RtDataKeys.Add($"{ModuleName}.IsVAC");
  1572. m_RtDataKeys.Add($"{ModuleName}.LiftPinIsUp");
  1573. m_RtDataKeys.Add($"{ModuleName}.LiftPinIsDown");
  1574. m_RtDataKeys.Add($"{ModuleName}.ValvePVN21.IsOpen");
  1575. m_RtDataKeys.Add($"{ModuleName}.ValvePVN22.IsOpen");
  1576. m_RtDataKeys.Add($"{ModuleName}.ValvePV11.IsOpen");
  1577. m_RtDataKeys.Add($"{ModuleName}.ValvePV12.IsOpen");
  1578. m_RtDataKeys.Add($"{ModuleName}.ValvePV21.IsOpen");
  1579. m_RtDataKeys.Add($"{ModuleName}.ValvePV22.IsOpen");
  1580. m_RtDataKeys.Add($"{ModuleName}.ValvePV31.IsOpen");
  1581. m_RtDataKeys.Add($"{ModuleName}.ValvePV32.IsOpen");
  1582. m_RtDataKeys.Add($"{ModuleName}.ValvePV41.IsOpen");
  1583. m_RtDataKeys.Add($"{ModuleName}.ValvePV42.IsOpen");
  1584. m_RtDataKeys.Add($"{ModuleName}.ValveMfc1.IsOpen");
  1585. m_RtDataKeys.Add($"{ModuleName}.ValveMfc2.IsOpen");
  1586. m_RtDataKeys.Add($"{ModuleName}.ValveMfc3.IsOpen");
  1587. m_RtDataKeys.Add($"{ModuleName}.ValveMfc4.IsOpen");
  1588. m_RtDataKeys.Add($"{ModuleName}.ValveMfc5.IsOpen");
  1589. m_RtDataKeys.Add($"{ModuleName}.ValveMfc6.IsOpen");
  1590. m_RtDataKeys.Add($"{ModuleName}.ValveMfc7.IsOpen");
  1591. m_RtDataKeys.Add($"{ModuleName}.ValveMfc8.IsOpen");
  1592. m_RtDataKeys.Add($"{ModuleName}.ValveGasFinal.IsOpen");
  1593. m_RtDataKeys.Add($"{ModuleName}.ValveSoftPump.IsOpen");
  1594. m_RtDataKeys.Add($"{ModuleName}.ValveFastPump.IsOpen");
  1595. m_RtDataKeys.Add($"{ModuleName}.ValveN2.IsOpen");
  1596. m_RtDataKeys.Add($"{ModuleName}.ValvePVHe1.IsOpen");
  1597. m_RtDataKeys.Add($"{ModuleName}.ValvePVHe2.IsOpen");
  1598. m_RtDataKeys.Add($"{ModuleName}.ValveTurboPumpPumping.IsOpen");
  1599. m_RtDataKeys.Add($"{ModuleName}.ValveTurboPumpPurge.IsOpen");
  1600. m_RtDataKeys.Add($"{ModuleName}.ValvePVN21.IsOpen");
  1601. m_RtDataKeys.Add($"{ModuleName}.ValvePVN22.IsOpen");
  1602. m_RtDataKeys.Add($"{ModuleName}.ValveGuage.IsOpen");
  1603. m_RtDataKeys.Add($"{ModuleName}.TurboPumpIsRunning");
  1604. m_RtDataKeys.Add($"{ModuleName}.PumpIsRunning");
  1605. m_RtDataKeys.Add($"{ModuleName}.IsSlitDoorClosed");
  1606. m_RtDataKeys.Add($"{ModuleName}.IsLidClosed");
  1607. m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.Rf}.DeviceData");
  1608. m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.BiasRf}.DeviceData");
  1609. //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.Match}.C1");
  1610. //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.Match}.C2");
  1611. // m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.Match}.WorkMode");
  1612. //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.BiasMatch}.C1");
  1613. //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.BiasMatch}.C2");
  1614. m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
  1615. //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.ESCHV}.DeviceData");
  1616. m_RtDataKeys.Add($"{ModuleName}.TurboPumpRotationalSpeed");
  1617. m_RtDataKeys.Add($"{ModuleName}.GetPVPosition");
  1618. m_RtDataKeys.Add($"{ModuleName}.IsWaterFlowOk");
  1619. m_RtDataKeys.Add($"{ModuleName}.IsWLK");
  1620. m_RtDataKeys.Add($"{ModuleName}.IsCDA_OK");
  1621. m_RtDataKeys.Add($"{ModuleName}.SourceRFFanInterlock");
  1622. m_RtDataKeys.Add($"{ModuleName}.IsTurboPumpInterlock");
  1623. m_RtDataKeys.Add($"{ModuleName}.GasBoxDoorSW.Value");
  1624. m_RtDataKeys.Add($"{ModuleName}.GasBoxPressureSW.Value");
  1625. m_RtDataKeys.Add($"{ModuleName}.InnerChiller.IsOn");
  1626. m_RtDataKeys.Add($"{ModuleName}.OuterChiller.IsOn");
  1627. m_RtDataKeys.Add($"{ModuleName}.TopChiller.IsOn");
  1628. m_RtDataKeys.Add($"{ModuleName}.ValveHeater.DeviceData");
  1629. m_RtDataKeys.Add($"{ModuleName}.ForelineHeater.DeviceData");
  1630. m_RtDataKeys.Add($"{ModuleName}.WallHeater.DeviceData");
  1631. m_RtDataKeys.Add($"{ModuleName}.PendulumHeater.DeviceData");
  1632. m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.Match}.DeviceData");
  1633. m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.BiasMatch}.DeviceData");
  1634. m_RtDataKeys.Add($"{ModuleName}.FsmState");
  1635. m_RtDataKeys.Add($"{ModuleName}.IsTurboPumpAtSpeed");
  1636. m_RtDataKeys.Add($"{ModuleName}.TurboPumpWaterFlowSwitch.Value");
  1637. m_RtDataKeys.Add($"{ModuleName}.HasWafer");
  1638. m_RtDataKeys.Add($"{ModuleName}.CurrentRecipeResult");
  1639. m_RtDataKeys.Add($"{ModuleName}.ChillerInnerTemp");
  1640. m_RtDataKeys.Add($"{ModuleName}.ChillerOuterTemp");
  1641. m_RtDataKeys.Add($"{ModuleName}.ChillerTopTemp");
  1642. m_RtDataKeys.Add($"{ModuleName}.IsOnline");
  1643. m_RtDataKeys.Add($"{ModuleName}.IsInclude");
  1644. }
  1645. #endregion
  1646. }
  1647. }