OverKepler2200AViewModel.cs 66 KB

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