OverKepler2300ViewModel.cs 70 KB

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