PmOverviewViewModel.cs 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Windows;
  6. using System.Windows.Media;
  7. using Aitex.Core.Common.DeviceData;
  8. using Aitex.Core.Util;
  9. using Aitex.Core.Utilities;
  10. using Caliburn.Micro;
  11. using MECF.Framework.Common.DataCenter;
  12. using MECF.Framework.Common.Equipment;
  13. using MECF.Framework.Common.OperationCenter;
  14. using MECF.Framework.Common.RecipeCenter;
  15. using OpenSEMI.ClientBase;
  16. using Virgo_DCommon;
  17. using Virgo_DUI.Client.Models.Recipe;
  18. using Virgo_DUI.Client.Models.Sys;
  19. using Ax = Aitex.Core.Common;
  20. namespace Virgo_DUI.Client.Models.PMs
  21. {
  22. public class PmOverviewViewModel : ModuleUiViewModelBase, ISupportMultipleSystem
  23. {
  24. private object[] _oldmfc = new object[3] { 0.0, 0.0, 0.0 };
  25. //public Ax.WaferInfo PMWafer { get; set; }
  26. //private Ax.WaferSize _PMWaferType = Ax.WaferSize.WS6;
  27. //public Ax.WaferSize PMWaferType
  28. //{
  29. // get
  30. // {
  31. // return _PMWaferType;
  32. // }
  33. // set
  34. // {
  35. // _PMWaferType = value;
  36. // NotifyOfPropertyChange("PMWaferType");
  37. // }
  38. //}
  39. private int _BottomPinStatus = 0;
  40. public int BottomPinStatus
  41. {
  42. get
  43. {
  44. return _BottomPinStatus;
  45. }
  46. set
  47. {
  48. _BottomPinStatus = value;
  49. NotifyOfPropertyChange("BottomPinStatus");
  50. }
  51. }
  52. private int _MidPinStatus = 0;
  53. public int MidPinStatus
  54. {
  55. get
  56. {
  57. return _MidPinStatus;
  58. }
  59. set
  60. {
  61. _MidPinStatus = value;
  62. NotifyOfPropertyChange("MidPinStatus");
  63. }
  64. }
  65. private int _TopPinStatus = 0;
  66. public int TopPinStatus
  67. {
  68. get
  69. {
  70. return _TopPinStatus;
  71. }
  72. set
  73. {
  74. _TopPinStatus = value;
  75. NotifyOfPropertyChange("TopPinStatus");
  76. }
  77. }
  78. private int _CoverStatus = 0;
  79. public int CoverStatus
  80. {
  81. get
  82. {
  83. return _CoverStatus;
  84. }
  85. set
  86. {
  87. _CoverStatus = value;
  88. NotifyOfPropertyChange("CoverStatus");
  89. }
  90. }
  91. //private int _ChamberStatus;
  92. //public int ChamberStatus
  93. //{
  94. // get { return _ChamberStatus; }
  95. // set
  96. // {
  97. // _ChamberStatus = value;
  98. // NotifyOfPropertyChange("ChamberStatus");
  99. // }
  100. //}
  101. private List<PMParameter> _PMParameters;
  102. public List<PMParameter> PMParameters
  103. {
  104. get
  105. {
  106. return _PMParameters;
  107. }
  108. set
  109. {
  110. _PMParameters = value;
  111. NotifyOfPropertyChange("PMParameters");
  112. }
  113. }
  114. private List<PMParameter> _Temperatures;
  115. public List<PMParameter> Temperatures
  116. {
  117. get
  118. {
  119. return _Temperatures;
  120. }
  121. set
  122. {
  123. _Temperatures = value;
  124. NotifyOfPropertyChange("Temperatures");
  125. }
  126. }
  127. private List<GaslineItem> _Gaslines;
  128. public List<GaslineItem> Gaslines
  129. {
  130. get
  131. {
  132. return _Gaslines;
  133. }
  134. set
  135. {
  136. _Gaslines = value;
  137. NotifyOfPropertyChange("Gaslines");
  138. }
  139. }
  140. [Subscription("ModuleWaferList")]
  141. public Ax.WaferInfo[] ChamberWafer
  142. {
  143. get;
  144. set;
  145. }
  146. [Subscription("SlitDoor.DeviceData")]
  147. public AITCylinderData SlitDoorData
  148. {
  149. get;
  150. set;
  151. }
  152. [Subscription("LiftPin.DeviceData")]
  153. public AITCylinderData LiftPinData
  154. {
  155. get;
  156. set;
  157. }
  158. [Subscription("Inch3Pin.DeviceData")]
  159. public AITCylinderData UpperPinData
  160. {
  161. get;
  162. set;
  163. }
  164. [Subscription("Inch4Pin.DeviceData")]
  165. public AITCylinderData LowerPinData
  166. {
  167. get;
  168. set;
  169. }
  170. [Subscription("Lid.DeviceData")]
  171. public AITCylinderData LidData
  172. {
  173. get;
  174. set;
  175. }
  176. [Subscription("LidLocker.DeviceData")]
  177. public AITCylinderData LidLockerData
  178. {
  179. get;
  180. set;
  181. }
  182. [Subscription("IsOnline")]
  183. public bool IsOnline { get; set; }
  184. [Subscription("LeakRate")]
  185. public double LeakRate { get; set; }
  186. [Subscription(Virgo_DDevice.ValveMfc1)]
  187. public AITValveData GP1Valve
  188. {
  189. get;
  190. set;
  191. }
  192. [Subscription(Virgo_DDevice.ValveMfc2)]
  193. public AITValveData GP2Valve
  194. {
  195. get;
  196. set;
  197. }
  198. [Subscription(Virgo_DDevice.ValveMfc3)]
  199. public AITValveData GP3Valve
  200. {
  201. get;
  202. set;
  203. }
  204. [Subscription(Virgo_DDevice.ValveMfc4)]
  205. public AITValveData GP4Valve
  206. {
  207. get;
  208. set;
  209. }
  210. //[Subscription(Virgo_DDevice.ValveMfc5)]
  211. //public AITValveData GP5Valve
  212. //{
  213. // get;
  214. // set;
  215. //}
  216. [Subscription(Virgo_DDevice.ValveChamberPurge)]
  217. public AITValveData ChamberPurgeValve
  218. {
  219. get;
  220. set;
  221. }
  222. [Subscription(Virgo_DDevice.ValveChamberPurge)]
  223. public AITValveData SoftVentVlv { get; set; }
  224. [Subscription(Virgo_DDevice.ValveFastVent)]
  225. public AITValveData FastVentVlv { get; set; }
  226. [Subscription(Virgo_DDevice.ValveSoftPumping)]
  227. public AITValveData SoftPumpVlv { get; set; }
  228. [Subscription(Virgo_DDevice.ValveFastPumping)]
  229. public AITValveData FastPumpVlv { get; set; }
  230. [Subscription(Virgo_DDevice.ValveN2Supply)]
  231. public AITValveData N2SupplyVlv { get; set; }
  232. [Subscription(Virgo_DDevice.ValveProcess)]
  233. public AITValveData ProcessVlv { get; set; }
  234. [Subscription("SensorATMSwitch")]
  235. public AITSensorData SensorATMSwitch { get; set; }
  236. [Subscription("SensorVacSwitch")]
  237. public AITSensorData SensorVacSwitch { get; set; }
  238. [Subscription("SensorWaterFlowOk")]
  239. public AITSensorData SensorWaterFlowOk { get; set; }
  240. [Subscription("SensorCDAPressureOk")]
  241. public AITSensorData SensorCDAPressureOk { get; set; }
  242. [Subscription("SourceFan1")]
  243. public AITSensorData SourceFan1 { get; set; }
  244. [Subscription("SourceFan2")]
  245. public AITSensorData SourceFan2 { get; set; }
  246. [Subscription("SensorWaterLeakOk")]
  247. public AITSensorData SensorWaterLeakOk { get; set; }
  248. //[Subscription("SensorArmNotExtend")]
  249. //public AITSensorData SensorArmNotExtend { get; set; }
  250. private AITMfcData _mfc1;
  251. [Subscription(Virgo_DDevice.MfcGas1)]
  252. public AITMfcData GP1Mfc
  253. {
  254. get
  255. {
  256. return _mfc1;
  257. }
  258. set
  259. {
  260. _mfc1 = value;
  261. if (IsAutoMode && ((int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount") >= 1))
  262. {
  263. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas1.FeedBack").Setpoint = _mfc1.SetPoint.ToString("F1");
  264. }
  265. }
  266. }
  267. private AITMfcData _mfc2;
  268. [Subscription(Virgo_DDevice.MfcGas2)]
  269. public AITMfcData GP2Mfc
  270. {
  271. get
  272. {
  273. return _mfc2;
  274. }
  275. set
  276. {
  277. _mfc2 = value;
  278. if (IsAutoMode && ((int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount") >= 2))
  279. {
  280. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas2.FeedBack").Setpoint = _mfc2.SetPoint.ToString("F1");
  281. }
  282. }
  283. }
  284. private AITMfcData _mfc3;
  285. [Subscription(Virgo_DDevice.MfcGas3)]
  286. public AITMfcData GP3Mfc
  287. {
  288. get
  289. {
  290. return _mfc3;
  291. }
  292. set
  293. {
  294. _mfc3 = value;
  295. if (IsAutoMode && ((int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount") >= 3))
  296. {
  297. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas3.FeedBack").Setpoint = _mfc3.SetPoint.ToString("F1");
  298. }
  299. }
  300. }
  301. private AITMfcData _mfc4;
  302. [Subscription(Virgo_DDevice.MfcGas4)]
  303. public AITMfcData GP4Mfc
  304. {
  305. get
  306. {
  307. return _mfc4;
  308. }
  309. set
  310. {
  311. _mfc4 = value;
  312. if (IsAutoMode && ((int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount") >= 4))
  313. {
  314. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas4.FeedBack").Setpoint = _mfc4.SetPoint.ToString("F1");
  315. }
  316. }
  317. }
  318. //private AITMfcData _mfc5;
  319. //[Subscription(Virgo_DDevice.MfcGas5)]
  320. //public AITMfcData GP5Mfc
  321. //{
  322. // get
  323. // {
  324. // return _mfc5;
  325. // }
  326. // set
  327. // {
  328. // _mfc5 = value;
  329. // if (IsAutoMode && ((int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount") >= 5))
  330. // {
  331. // PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas5.FeedBack").Setpoint = _mfc5.SetPoint.ToString("F1");
  332. // }
  333. // }
  334. //}
  335. [Subscription("HeaterChamber.DeviceData")]
  336. public AITHeaterData HeaterChamber { get; set; }
  337. [Subscription("ForelineHeater.DeviceData")]
  338. public AITHeaterData ForelineHeater { get; set; }
  339. [Subscription(Virgo_DDevice.ProcessGauge)]
  340. public AITPressureMeterData ProcessGauge { get; set; }
  341. [Subscription(Virgo_DDevice.PressureGauge)]
  342. public AITPressureMeterData PressureGauge { get; set; }
  343. [Subscription(Virgo_DDevice.ForelineGauge)]
  344. public AITPressureMeterData ForelineGauge { get; set; }
  345. private AITRfData _rf;
  346. [Subscription("Rf.DeviceData")]
  347. public AITRfData Rf
  348. {
  349. get
  350. {
  351. return _rf;
  352. }
  353. set
  354. {
  355. _rf = value;
  356. if (IsAutoMode)
  357. {
  358. PMParameters.Find(x => x.Name == $"{SystemName}.Rf.PowerOnTime").Setpoint = "";
  359. PMParameters.Find(x => x.Name == $"{SystemName}.Rf.ForwardPower").Setpoint = _rf.PowerSetPoint.ToString("F0");
  360. RfDutySetPoint = _rf.DutySetPoint.ToString("F0");
  361. NotifyOfPropertyChange("RfDutySetPoint");
  362. RfFrequencySetPoint = _rf.FrequencySetPoint.ToString("F0");
  363. NotifyOfPropertyChange("RfFrequencySetPoint");
  364. RfModeSetPoint = _rf.WorkMode == (int)RfMode.ContinuousWaveMode ? "Continuous" : "Pulsing";
  365. NotifyOfPropertyChange("RfModeSetPoint");
  366. }
  367. }
  368. }
  369. private AITRfMatchData _match;
  370. [Subscription("Match.DeviceData")]
  371. public AITRfMatchData Match
  372. {
  373. get
  374. {
  375. return _match;
  376. }
  377. set
  378. {
  379. _match = value;
  380. RfMatchPositionC1SetPoint = _match.TunePosition1.ToString("F0");
  381. NotifyOfPropertyChange("RfMatchPositionC1SetPoint");
  382. RfMatchPositionC2SetPoint = _match.TunePosition2.ToString("F0");
  383. NotifyOfPropertyChange("RfMatchPositionC2SetPoint");
  384. }
  385. }
  386. [Subscription("MainPump.DeviceData")]
  387. public AITPumpData MainPumpData { get; set; }
  388. private AITThrottleValveData _tv;
  389. [Subscription(Virgo_DDevice.ThrottleValve)]
  390. public AITThrottleValveData Tv
  391. {
  392. get
  393. {
  394. return _tv;
  395. }
  396. set
  397. {
  398. _tv = value;
  399. if (IsAutoMode)
  400. {
  401. PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVMode").Setpoint = _tv.Mode == (int)PressureCtrlMode.TVPressureCtrl ? "Pressure"
  402. : _tv.Mode == (int)PressureCtrlMode.TVPositionCtrl ? "Position" : "Undefined";
  403. PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVMode").Feedback = _tv.Mode == (int)PressureCtrlMode.TVPressureCtrl ? "Pressure"
  404. : _tv.Mode == (int)PressureCtrlMode.TVPositionCtrl ? "Position" : "Undefined";
  405. PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVPosition").Setpoint = _tv.PositionSetPoint.ToString("F0");
  406. PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVPressure").Setpoint = _tv.PressureSetPoint.ToString("F0");
  407. ThrottleValveModeSetPoint = _tv.TextMode;
  408. NotifyOfPropertyChange("ThrottleValveModeSetPoint");
  409. ThrottleValvePositionSetPoint = _tv.PositionSetPoint.ToString("F0");
  410. NotifyOfPropertyChange("ThrottleValvePositionSetPoint");
  411. ThrottleValvePressureSetPoint = _tv.PressureSetPoint.ToString("F0");
  412. NotifyOfPropertyChange("ThrottleValvePressureSetPoint");
  413. }
  414. }
  415. }
  416. public double TvHeight { get; set; }
  417. public Visibility TvVisible { get; set; }
  418. private AITSensorData _chamberDoorLid = new AITSensorData();
  419. [Subscription(Virgo_DDevice.ChamberLid)]
  420. public AITSensorData ChamberDoorLid
  421. {
  422. get
  423. {
  424. return _chamberDoorLid;
  425. }
  426. set
  427. {
  428. _chamberDoorLid = value;
  429. }
  430. }
  431. private bool _isAutoMode;
  432. private R_TRIG _trigChangeToAuto = new R_TRIG();
  433. [Subscription(StateData.IsAutoMode)]
  434. public bool IsAutoMode
  435. {
  436. get
  437. {
  438. return _isAutoMode;
  439. }
  440. set
  441. {
  442. _isAutoMode = value;
  443. _trigChangeToAuto.CLK = _isAutoMode;
  444. if (_trigChangeToAuto.Q)
  445. {
  446. RfTimeSetPoint = "";
  447. NotifyOfPropertyChange("RfTimeSetPoint");
  448. RfModeSetPoint = "";
  449. NotifyOfPropertyChange("RfModeSetPoint");
  450. PMParameters.Find(x => x.Name == $"{SystemName}.Rf.ForwardPower").Setpoint = "";
  451. RfFrequencySetPoint = "";
  452. NotifyOfPropertyChange("RfFrequencySetPoint");
  453. RfDutySetPoint = "";
  454. NotifyOfPropertyChange("RfDutySetPoint");
  455. RfMatchPositionC1SetPoint = "";
  456. NotifyOfPropertyChange("RfMatchPositionC1SetPoint");
  457. RfMatchPositionC2SetPoint = "";
  458. NotifyOfPropertyChange("RfMatchPositionC2SetPoint");
  459. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas1.FeedBack").Setpoint = "";
  460. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas1.FeedBack").Setpoint = "";
  461. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas1.FeedBack").Setpoint = "";
  462. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas1.FeedBack").Setpoint = "";
  463. ElectrodeTemperatureSetPoint = "";
  464. NotifyOfPropertyChange("ElectrodeTemperatureSetPoint");
  465. StepModeSetPoint = "";
  466. NotifyOfPropertyChange("StepModeSetPoint");
  467. }
  468. }
  469. }
  470. public bool IsManualMode
  471. {
  472. get
  473. {
  474. return !IsAutoMode;
  475. }
  476. }
  477. public bool IsRfManualMode
  478. {
  479. get
  480. {
  481. return !IsAutoMode && ((PMState)PMStatus == PMState.GasFlowing || (PMState)PMStatus == PMState.RfPowering);
  482. }
  483. }
  484. public bool IsMatchPositionInputEnabled
  485. {
  486. get
  487. {
  488. if (Rf != null && Match.TuneMode1 == EnumRfMatchTuneMode.Auto)
  489. return false;
  490. return IsManualMode;
  491. }
  492. }
  493. [Subscription(StateData.RecipeStepNo)]
  494. public int RecipeStepNo
  495. {
  496. get;
  497. set;
  498. }
  499. private int _recipeStepMode;
  500. [Subscription(StateData.RecipeStepMode)]
  501. public int RecipeStepMode
  502. {
  503. get
  504. {
  505. return _recipeStepMode;
  506. }
  507. set
  508. {
  509. _recipeStepMode = value;
  510. if (IsAutoMode)
  511. {
  512. switch (_recipeStepMode)
  513. {
  514. //case (int)EndByCondition.EndByHeatUp:
  515. // StepModeSetPoint = "Heat Up";
  516. // break;
  517. //case (int)EndByCondition.EndByRfTime:
  518. // StepModeSetPoint = "RF Time";
  519. // break;
  520. default:
  521. StepModeSetPoint = "Step Time";
  522. break;
  523. }
  524. NotifyOfPropertyChange("StepModeSetPoint");
  525. }
  526. }
  527. }
  528. [Subscription(StateData.RecipeProcessTime)]
  529. public string RecipeProcessTime
  530. {
  531. get;
  532. set;
  533. }
  534. [Subscription(StateData.PumpTime)]
  535. public string PumpTime
  536. {
  537. get;
  538. set;
  539. }
  540. [Subscription(StateData.PMState)]
  541. public int PMStatus { get; set; }
  542. [Subscription(StateData.IsPumpingOkForProcess)]
  543. public bool IsPumpingOkForProcess
  544. {
  545. get;
  546. set;
  547. }
  548. [Subscription(StateData.IsCoolingOkForProcess)]
  549. public bool IsCoolingOkForProcess
  550. {
  551. get;
  552. set;
  553. }
  554. [Subscription(StateData.IsGasFlowingOkForProcess)]
  555. public bool IsGasFlowingOkForProcess
  556. {
  557. get;
  558. set;
  559. }
  560. [Subscription(StateData.DataLogName)]
  561. public string DataLogName
  562. {
  563. get;
  564. set;
  565. }
  566. [Subscription(StateData.TotalCycle)]
  567. public int TotalCycle
  568. {
  569. get;
  570. set;
  571. }
  572. public string TvText
  573. {
  574. get
  575. {
  576. //if (Tv == null || !SCLocal.PressureControlConfig.EnableThrottleValve)
  577. return "";
  578. //return string.Format("{0}%", Tv.PositionFeedback.ToString("F0"));
  579. }
  580. }
  581. public string TvTextBackground
  582. {
  583. get
  584. {
  585. if (Tv == null)
  586. return "Transparent";
  587. if (Tv.State != 1)
  588. return "Red";
  589. return "Green";
  590. }
  591. }
  592. public string PmOperationMode
  593. {
  594. get
  595. {
  596. return IsAutoMode ? "Auto" : "Manual";
  597. }
  598. }
  599. public string PmOnlineMode
  600. {
  601. get
  602. {
  603. return IsOnline ? "Online" : "Offline";
  604. }
  605. }
  606. public bool IsOnlineButtonEnabled
  607. {
  608. get { return !IsOnline; }
  609. }
  610. public bool IsOfflineButtonEnabled
  611. {
  612. get { return IsOnline; }
  613. }
  614. [IgnorePropertyChange]
  615. public bool BasePressureSetPointSaved { get; set; }
  616. [IgnorePropertyChange]
  617. public bool PumpLimitSetPointSaved { get; set; }
  618. public double ElectrodeTemperatureFeedback
  619. {
  620. get
  621. {
  622. return 0;
  623. //return SCLocal.CoolingConfig.EnableElectrodeTcLeftAsControlTc ? (ElectrodeLeftThermalCouple!= null ? ElectrodeLeftThermalCouple.FeedBack :0) :
  624. // (ElectrodeRightThermalCouple!=null ? ElectrodeRightThermalCouple.FeedBack : 0);
  625. }
  626. }
  627. public int WaferLength
  628. {
  629. get
  630. {
  631. Ax.WaferInfo wafer = ChamberWafer==null ? new Ax.WaferInfo() : ChamberWafer[0];
  632. if (wafer.IsEmpty)
  633. return 0;
  634. switch (wafer.Size)
  635. {
  636. case Ax.WaferSize.WS3: return 85;
  637. case Ax.WaferSize.WS4: return 125;
  638. default: return 145;
  639. }
  640. }
  641. }
  642. public string WaferSize
  643. {
  644. get
  645. {
  646. Ax.WaferInfo wafer = ChamberWafer == null ? new Ax.WaferInfo() : ChamberWafer[0];
  647. if (wafer.IsEmpty)
  648. return "";
  649. switch (wafer.Size)
  650. {
  651. case Ax.WaferSize.WS3: return "3'";
  652. case Ax.WaferSize.WS4: return "4'";
  653. default: return "6'";
  654. }
  655. }
  656. }
  657. public bool IsLiftPinUp
  658. {
  659. get { return LiftPinData != null && LiftPinData.OpenFeedback; }
  660. }
  661. public bool EnableLiftPinUp
  662. {
  663. get { return !IsAutoMode && LiftPinData != null && !LiftPinData.OpenFeedback; }
  664. }
  665. public bool EnableLock
  666. {
  667. get { return LidLockerData != null && !LidLockerData.OpenSetPoint; }
  668. }
  669. public bool IsLiftPinDown
  670. {
  671. get { return LiftPinData != null && LiftPinData.CloseFeedback; }
  672. }
  673. public bool EnableLiftPinDown
  674. {
  675. get { return !IsAutoMode && LiftPinData != null && !LiftPinData.CloseFeedback; }
  676. }
  677. public bool EnableUnlock
  678. {
  679. get { return LidLockerData != null && !LidLockerData.CloseSetPoint; }
  680. }
  681. public bool IsUpperPinUp
  682. {
  683. get { return UpperPinData != null && UpperPinData.OpenFeedback; }
  684. }
  685. public bool EnableUpperPinUp
  686. {
  687. get { return !IsAutoMode && UpperPinData != null && !UpperPinData.OpenFeedback; }
  688. }
  689. public bool IsUpperPinDown
  690. {
  691. get { return UpperPinData != null && UpperPinData.CloseFeedback; }
  692. }
  693. public bool EnableUpperPinDown
  694. {
  695. get { return !IsAutoMode && UpperPinData != null && !UpperPinData.CloseFeedback; }
  696. }
  697. public bool IsLowerPinUp
  698. {
  699. get { return LowerPinData != null && LowerPinData.OpenFeedback; }
  700. }
  701. public bool EnableLowerPinUp
  702. {
  703. get { return !IsAutoMode && LowerPinData != null && !LowerPinData.OpenFeedback; }
  704. }
  705. public bool IsLowerPinDown
  706. {
  707. get { return LowerPinData != null && LowerPinData.CloseFeedback; }
  708. }
  709. public bool EnableLowerPinDown
  710. {
  711. get { return !IsAutoMode && LowerPinData != null && !LowerPinData.CloseFeedback; }
  712. }
  713. public bool IsSmallPinVisible
  714. {
  715. get { return (int)QueryDataClient.Instance.Service.GetConfig($"System.SmallWafer") == 0 ? false : true; }
  716. }
  717. public bool IsMidPinVisible
  718. {
  719. get { return (int)QueryDataClient.Instance.Service.GetConfig($"System.MidWafer") == 0 ? false : true; }
  720. }
  721. public int SmallPinHeight
  722. {
  723. get { return IsSmallPinVisible ? 32 : 0; }
  724. }
  725. public int MediumPinHeight
  726. {
  727. get { return IsMidPinVisible ? 32 : 0; }
  728. }
  729. public string SmallPinUpText
  730. {
  731. get { return $"{(int)QueryDataClient.Instance.Service.GetConfig($"System.SmallWafer")}' Pin 升"; }
  732. }
  733. public string SmallPinDownText
  734. {
  735. get { return $"{(int)QueryDataClient.Instance.Service.GetConfig($"System.SmallWafer")}' Pin 降"; }
  736. }
  737. public string MediumPinUpText
  738. {
  739. get { return $"{(int)QueryDataClient.Instance.Service.GetConfig($"System.MidWafer")}' Pin 升"; }
  740. }
  741. public string MediumPinDownText
  742. {
  743. get { return $"{(int)QueryDataClient.Instance.Service.GetConfig($"System.MidWafer")}' Pin 降"; }
  744. }
  745. public bool IsLidOpen
  746. {
  747. get { return LidData != null && !LidData.CloseFeedback; }
  748. }
  749. public bool EnableCloseLid
  750. {
  751. get
  752. {
  753. return LidData != null && !LidData.CloseFeedback;
  754. }
  755. }
  756. public bool EnableOpenLid
  757. {
  758. get
  759. {
  760. return LidData != null && LidData.CloseFeedback;
  761. }
  762. }
  763. public bool IsSlitValveOpen
  764. {
  765. get { return SlitDoorData != null && SlitDoorData.OpenFeedback; }
  766. }
  767. public bool IsSlitValveClose
  768. {
  769. get { return !IsSlitValveOpen; }
  770. }
  771. public bool EnableCloseSlitValve
  772. {
  773. get
  774. {
  775. return !IsAutoMode && SlitDoorData != null && !SlitDoorData.CloseFeedback;
  776. }
  777. }
  778. public bool EnableOpenSlitValve
  779. {
  780. get
  781. {
  782. return !IsAutoMode && SlitDoorData != null && SlitDoorData.CloseFeedback;
  783. }
  784. }
  785. public bool EnableRfTimeSetPoint
  786. {
  787. get
  788. {
  789. return IsManualMode;
  790. }
  791. }
  792. //public bool IsEnableCloseLid
  793. //{
  794. // get
  795. // {
  796. // return !ChamberDoorLid.IsClose && !IsAutoMode;
  797. // }
  798. //}
  799. public bool IsLeftTcAsControlTc
  800. {
  801. get
  802. {
  803. return true;//SCLocal.CoolingConfig.EnableElectrodeTcLeftAsControlTc;
  804. }
  805. }
  806. public bool IsRightTcAsControlTc
  807. {
  808. get
  809. {
  810. return !IsLeftTcAsControlTc;
  811. }
  812. }
  813. public bool IsEnableRecipeScan
  814. {
  815. get
  816. {
  817. return IsAutoMode && !IsProcessing;
  818. }
  819. }
  820. public bool IsEnableLotScan
  821. {
  822. get
  823. {
  824. return IsAutoMode && !IsProcessing;
  825. }
  826. }
  827. public bool IsEnableSelectRecipe
  828. {
  829. get
  830. {
  831. return IsAutoMode && !IsProcessing;
  832. }
  833. }
  834. public bool IsEnableStartRecipe
  835. {
  836. get
  837. {
  838. return IsAutoMode && !string.IsNullOrEmpty(SelectedRecipeName) && !IsProcessing;
  839. }
  840. }
  841. public bool IsEnableNextStep
  842. {
  843. get
  844. {
  845. return IsAutoMode && IsProcessing;
  846. }
  847. }
  848. public bool IsEnableStopRecipe
  849. {
  850. get
  851. {
  852. return IsAutoMode && IsProcessing;
  853. }
  854. }
  855. public bool IsBarcodeEnabled
  856. {
  857. get;
  858. set;
  859. }
  860. public bool IsRfPowerOn
  861. {
  862. get
  863. {
  864. return Rf != null && Rf.IsRfOn;
  865. }
  866. }
  867. public bool SensorValue
  868. {
  869. get
  870. {
  871. return false;
  872. }
  873. }
  874. public bool IsManualButtonEnabled
  875. {
  876. get
  877. {
  878. return IsAutoMode;
  879. }
  880. }
  881. public bool IsAutoButtonEnabled
  882. {
  883. get
  884. {
  885. return !IsAutoMode;
  886. }
  887. }
  888. public bool IsPumping
  889. {
  890. get
  891. {
  892. return (PMState)PMStatus == PMState.Pumping;
  893. }
  894. }
  895. public bool IsStartPumping
  896. {
  897. get
  898. {
  899. return (PMState)PMStatus == PMState.LaunchingPump;
  900. }
  901. }
  902. public string RecipeStepNoDisplay
  903. {
  904. get
  905. {
  906. return (PMState)PMStatus == PMState.Processing ? RecipeStepNo.ToString() : "--";
  907. }
  908. }
  909. public string RecipeStepModeDisplay
  910. {
  911. get
  912. {
  913. if ((PMState)PMStatus != PMState.Processing)
  914. return "--";
  915. switch (RecipeStepMode)
  916. {
  917. //case (int)EndByCondition.EndByHeatUp:
  918. // return "Heat Up Mode";
  919. //case (int)EndByCondition.EndByRfTime:
  920. // return "RF Time Mode";
  921. default:
  922. return "Step Time Mode";
  923. }
  924. }
  925. }
  926. private string _pumpButtonBackground = "#376092";
  927. public string PumpButtonBackground
  928. {
  929. get
  930. {
  931. if (IsPumping)
  932. {
  933. _pumpButtonBackground = _pumpButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  934. return _pumpButtonBackground;
  935. }
  936. if (IsPumpingOkForProcess)
  937. return "#00C900";
  938. return "#376092";
  939. }
  940. }
  941. public bool IsGasFlowing
  942. {
  943. get
  944. {
  945. return (PMState)PMStatus == PMState.GasFlowing;
  946. }
  947. }
  948. private string _gasFlowButtonBackground = "CadetBlue";
  949. public string GasFlowButtonBackground
  950. {
  951. get
  952. {
  953. if (IsGasFlowing)
  954. {
  955. _gasFlowButtonBackground = _gasFlowButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  956. return _gasFlowButtonBackground;
  957. }
  958. if (IsGasFlowingOkForProcess)
  959. return "#00C900";
  960. return "CadetBlue";
  961. }
  962. }
  963. public bool IsCooling
  964. {
  965. get
  966. {
  967. return true;//ElectrodeCoolingWaterValve!=null && ElectrodeCoolingWaterValve.IsOpen;
  968. }
  969. }
  970. private string _coolingButtonBackground = "CadetBlue";
  971. public string CoolingButtonBackground
  972. {
  973. get
  974. {
  975. if (IsCooling)
  976. {
  977. _coolingButtonBackground = _coolingButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  978. return _coolingButtonBackground;
  979. }
  980. if (IsCoolingOkForProcess)
  981. return "#00C900";
  982. return "CadetBlue";
  983. }
  984. }
  985. public bool IsRfPowering
  986. {
  987. get
  988. {
  989. return (PMState)PMStatus == PMState.RfPowering;
  990. }
  991. }
  992. public bool IsLeakCheck
  993. {
  994. get
  995. {
  996. return (PMState)PMStatus == PMState.LeakCheck;
  997. }
  998. }
  999. private string _rfPowerButtonBackground = "CadetBlue";
  1000. public string RfPowerButtonBackground
  1001. {
  1002. get
  1003. {
  1004. if (IsRfPowering)
  1005. {
  1006. _rfPowerButtonBackground = _rfPowerButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  1007. return _rfPowerButtonBackground;
  1008. }
  1009. return "CadetBlue";
  1010. }
  1011. }
  1012. public bool IsCyclePurging => (PMState)PMStatus == PMState.Purge;
  1013. private string _cyclePurgeButtonBackground = "CadetBlue";
  1014. public string CyclePurgeButtonBackground
  1015. {
  1016. get
  1017. {
  1018. if (IsCyclePurging)
  1019. {
  1020. _cyclePurgeButtonBackground = _cyclePurgeButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  1021. return _cyclePurgeButtonBackground;
  1022. }
  1023. return "CadetBlue";
  1024. }
  1025. }
  1026. public bool IsVenting
  1027. {
  1028. get
  1029. {
  1030. return (PMState)PMStatus == PMState.Venting;
  1031. }
  1032. }
  1033. private string _ventButtonBackground = "CadetBlue";
  1034. public string VentButtonBackground
  1035. {
  1036. get
  1037. {
  1038. if (IsVenting)
  1039. {
  1040. _ventButtonBackground = _ventButtonBackground == "#95B3D7" ? "Blue" : "#95B3D7";
  1041. return _ventButtonBackground;
  1042. }
  1043. return "CadetBlue";
  1044. }
  1045. }
  1046. public bool IsProcessing
  1047. {
  1048. get
  1049. {
  1050. return (PMState)PMStatus == PMState.PreProcess || (PMState)PMStatus == PMState.Processing || (PMState)PMStatus == PMState.PostProcess;
  1051. }
  1052. }
  1053. public Visibility RfPowerOnChamberVisibility
  1054. {
  1055. get
  1056. {
  1057. return IsRfPowerOn ? Visibility.Visible : Visibility.Hidden;
  1058. }
  1059. }
  1060. public Visibility BoostPumpVisibility
  1061. {
  1062. get;
  1063. set;
  1064. }
  1065. public bool IsRfPowerOnEnabled
  1066. {
  1067. get
  1068. {
  1069. return !IsRfPowerOn;
  1070. }
  1071. }
  1072. public bool IsRfPowerOffEnabled
  1073. {
  1074. get
  1075. {
  1076. return IsRfPowerOn;
  1077. }
  1078. }
  1079. public string ChamberStatus
  1080. {
  1081. get
  1082. {
  1083. return $"{(PMState)PMStatus}";
  1084. }
  1085. }
  1086. public Brush ChamberStatusBkColor
  1087. {
  1088. get
  1089. {
  1090. switch ((PMState)PMStatus)
  1091. {
  1092. case PMState.Error:
  1093. return Brushes.Red;
  1094. case PMState.Idle:
  1095. return Brushes.LightGray;
  1096. default:
  1097. return Brushes.LightGreen;
  1098. }
  1099. //return Brushes.Transparent;
  1100. }
  1101. }
  1102. public Brush ChamberStatusForeColor
  1103. {
  1104. get
  1105. {
  1106. if (true)
  1107. return Brushes.Black;
  1108. //else if (false)
  1109. // return Brushes.LightGreen;
  1110. //return Brushes.Red;
  1111. }
  1112. }
  1113. public Brush PMOnlineColor
  1114. {
  1115. get
  1116. {
  1117. if (IsOnline)
  1118. return Brushes.LimeGreen;
  1119. return Brushes.Transparent;
  1120. }
  1121. }
  1122. public double RfReflectPower
  1123. {
  1124. get;
  1125. set;
  1126. }
  1127. public double RfForwardPower
  1128. {
  1129. get;
  1130. set;
  1131. }
  1132. public object[] RfPowerOnCommandParameter
  1133. {
  1134. get
  1135. {
  1136. return new object[] { Virgo_DDevice.Rf.ToString(), AITRfOperation.SetPowerOnOff.ToString(), "true" };
  1137. }
  1138. }
  1139. public object[] RfPowerOffCommandParameter
  1140. {
  1141. get
  1142. {
  1143. return new object[] { Virgo_DDevice.Rf.ToString(), AITRfOperation.SetPowerOnOff.ToString(), "false" };
  1144. }
  1145. }
  1146. public double LotBarcodeHeight
  1147. {
  1148. get
  1149. {
  1150. return IsBarcodeEnabled ? 35 : 0;
  1151. }
  1152. }
  1153. public double DataLogHeight
  1154. {
  1155. get
  1156. {
  1157. return IsBarcodeEnabled ? 0 : 35;
  1158. }
  1159. }
  1160. public double RecipeBarcodeHeight
  1161. {
  1162. get
  1163. {
  1164. return IsBarcodeEnabled ? 35 : 0;
  1165. }
  1166. }
  1167. public string RecipeBarcodeInputText
  1168. {
  1169. get;
  1170. set;
  1171. }
  1172. public int RecipeBarcodeLength
  1173. {
  1174. get;
  1175. set;
  1176. }
  1177. public int LotBarcodeLength
  1178. {
  1179. get;
  1180. set;
  1181. }
  1182. public int LotBarcodeMaxCount
  1183. {
  1184. get;
  1185. set;
  1186. }
  1187. [IgnorePropertyChange]
  1188. public string BasePressureSetPoint
  1189. {
  1190. get;
  1191. set;
  1192. }
  1193. [IgnorePropertyChange]
  1194. public string PumpLimitSetPoint
  1195. {
  1196. get;
  1197. set;
  1198. }
  1199. [IgnorePropertyChange]
  1200. public string ManualProcessElectrodeCriticalTemperatureSetPoint
  1201. {
  1202. get;
  1203. set;
  1204. }
  1205. private string _stepModeSetPoint = "";
  1206. [IgnorePropertyChange]
  1207. public string StepModeSetPoint
  1208. {
  1209. get
  1210. {
  1211. return _stepModeSetPoint;
  1212. }
  1213. set
  1214. {
  1215. _stepModeSetPoint = value;
  1216. }
  1217. }
  1218. [IgnorePropertyChange]
  1219. public string ElectrodeTemperatureSetPoint
  1220. {
  1221. get;
  1222. set;
  1223. }
  1224. [IgnorePropertyChange]
  1225. public string ThrottleValveModeSetPoint
  1226. {
  1227. get;
  1228. set;
  1229. }
  1230. [IgnorePropertyChange]
  1231. public string ThrottleValvePositionSetPoint
  1232. {
  1233. get;
  1234. set;
  1235. }
  1236. [IgnorePropertyChange]
  1237. public string ThrottleValvePressureSetPoint
  1238. {
  1239. get;
  1240. set;
  1241. }
  1242. [IgnorePropertyChange]
  1243. public string BoostPumpPressureSetPoint
  1244. {
  1245. get;
  1246. set;
  1247. }
  1248. [IgnorePropertyChange]
  1249. public string RfTimeSetPoint
  1250. {
  1251. get;
  1252. set;
  1253. }
  1254. private string _rfModeSetPoint;
  1255. [IgnorePropertyChange]
  1256. public string RfModeSetPoint
  1257. {
  1258. get
  1259. {
  1260. return _rfModeSetPoint;
  1261. }
  1262. set
  1263. {
  1264. _rfModeSetPoint = value;
  1265. }
  1266. }
  1267. [IgnorePropertyChange]
  1268. public string RfFrequencySetPoint
  1269. {
  1270. get;
  1271. set;
  1272. }
  1273. [IgnorePropertyChange]
  1274. public string RfDutySetPoint
  1275. {
  1276. get;
  1277. set;
  1278. }
  1279. [IgnorePropertyChange]
  1280. public string RfMatchPositionC1SetPoint
  1281. {
  1282. get;
  1283. set;
  1284. }
  1285. [IgnorePropertyChange]
  1286. public string RfMatchPositionC2SetPoint
  1287. {
  1288. get;
  1289. set;
  1290. }
  1291. private string _selectedRecipeName;
  1292. [Subscription("RecipeName")]
  1293. public string SelectedRecipeName
  1294. {
  1295. get
  1296. {
  1297. return _selectedRecipeName;
  1298. }
  1299. set
  1300. {
  1301. if (string.IsNullOrEmpty(value))
  1302. return;
  1303. _selectedRecipeName = value;
  1304. if (IsAutoMode)
  1305. {
  1306. InvokePropertyChanged("SelectedRecipeName");
  1307. }
  1308. }
  1309. }
  1310. [Subscription("ProcessStatus")]
  1311. public string ProcessStatus
  1312. {
  1313. get;
  1314. set;
  1315. }
  1316. [Subscription("RecipeStepTimeElapsed")]
  1317. public string RecipeStepTimeElapsed
  1318. {
  1319. get;
  1320. set;
  1321. }
  1322. [Subscription("RecipeStepTimeSetPoint")]
  1323. public string RecipeStepTimeSetPoint
  1324. {
  1325. get;
  1326. set;
  1327. }
  1328. [Subscription("RecipeSteps")]
  1329. public string RecipeSteps
  1330. {
  1331. get;
  1332. set;
  1333. }
  1334. private string _recipeStepRfTimeSetPoint;
  1335. [Subscription("RecipeStepRfTimeSetPoint")]
  1336. public string RecipeStepRfTimeSetPoint
  1337. {
  1338. get
  1339. {
  1340. return _recipeStepRfTimeSetPoint;
  1341. }
  1342. set
  1343. {
  1344. _recipeStepRfTimeSetPoint = value;
  1345. if (IsAutoMode)
  1346. {
  1347. RfTimeSetPoint = _recipeStepRfTimeSetPoint;
  1348. InvokePropertyChanged("RfTimeSetPoint");
  1349. }
  1350. }
  1351. }
  1352. //public string RecipeStatusBackground
  1353. //{
  1354. // get
  1355. // {
  1356. // return IsProcessing ? "Green" : "Blue";
  1357. // }
  1358. //}
  1359. public ObservableCollection<string> RFModeItems
  1360. {
  1361. get;
  1362. set;
  1363. }
  1364. public bool IsRFModeSelectable
  1365. {
  1366. get;
  1367. set;
  1368. }
  1369. public bool IsFullControlPermission
  1370. {
  1371. get;
  1372. set;
  1373. }
  1374. public bool EnableDeviceControl
  1375. {
  1376. get
  1377. {
  1378. return IsFullControlPermission;
  1379. }
  1380. }
  1381. public PmOverviewViewModel()
  1382. {
  1383. BasePressureSetPointSaved = true;
  1384. PumpLimitSetPointSaved = true;
  1385. }
  1386. protected override void OnActivate()
  1387. {
  1388. base.OnActivate();
  1389. BasePressureSetPoint = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.Pump.PumpBasePressure").ToString();
  1390. PumpLimitSetPoint = ((float)(double)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.Pump.PumpTimeLimit")).ToString();
  1391. }
  1392. protected override void OnDeactivate(bool close)
  1393. {
  1394. base.OnDeactivate(close);
  1395. }
  1396. protected override void OnInitialize()
  1397. {
  1398. base.OnInitialize();
  1399. InitGasLine();
  1400. InitParameterList(SystemName);
  1401. foreach (var pmParameter in PMParameters)
  1402. {
  1403. Subscribe(pmParameter.Name);
  1404. }
  1405. }
  1406. private void InitGasLine()
  1407. {
  1408. Gaslines = new List<GaslineItem>();
  1409. int count = (int)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.GasCount");
  1410. for (byte index = 1; index <= count; index++)
  1411. {
  1412. var gasName = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas{index}.GasName");
  1413. Gaslines.Add(new GaslineItem
  1414. {
  1415. Index = index,
  1416. Display = gasName.ToString(),
  1417. ValveName = $"{SystemName}.ValveMfc{index}",
  1418. MfcName = $"{SystemName}.MfcGas{index}"
  1419. });
  1420. }
  1421. }
  1422. public List<PMParameter> InitParameterList(string pmID)
  1423. {
  1424. PMParameters = new List<PMParameter>();
  1425. // 工艺时间
  1426. PMParameters.Add(new PMParameter
  1427. {
  1428. Name = $"{pmID}.RecipeProcessTime", Display = "工艺总时间 (s)", Type = ParameterType.Share, Feedback = "00:00:00"
  1429. });
  1430. // 工艺步数
  1431. PMParameters.Add(new PMParameter
  1432. {
  1433. Name = $"{pmID}.StepNo",
  1434. Display = "工艺步数",
  1435. Type = ParameterType.Share,
  1436. Feedback = "0",
  1437. Setpoint = ""
  1438. });
  1439. // 工艺每一步运行时间
  1440. PMParameters.Add(new PMParameter
  1441. {
  1442. Name = $"{pmID}.RecipeStepTimeElapsed",
  1443. Display = "当前步时间 (s)",
  1444. Type = ParameterType.Default,
  1445. Feedback = "0",
  1446. Setpoint = "",
  1447. SetpointEnabled = false
  1448. });
  1449. // process gauge
  1450. PMParameters.Add(new PMParameter
  1451. {
  1452. Name = $"{pmID}.ProcessGauge.Value",
  1453. Display = "工艺压力(mTorr)",
  1454. Type = ParameterType.Share,
  1455. Feedback = "0",
  1456. SetpointEnabled = false
  1457. });
  1458. // pressure gauge
  1459. //PMParameters.Add(new PMParameter
  1460. //{
  1461. // Name = $"{pmID}.PressureGauge.Value", Display = "腔体压力(mTorr)",
  1462. // Type = ParameterType.Share, Feedback = "0", SetpointEnabled = false
  1463. //});
  1464. // foreline gauge
  1465. // 蝶阀运作模式
  1466. PMParameters.Add(new PMParameter
  1467. {
  1468. Name = $"{pmID}.IoThrottleValve.ThrottleValve.TVMode",
  1469. Display = "蝶阀运行模式",
  1470. Type = ParameterType.DropDownList,
  1471. SetpointEnabled = true,
  1472. Selections = new List<string> { "Position", "Pressure" },
  1473. Setpoint = "Pressure",
  1474. Feedback = "Pressure"
  1475. });
  1476. // 蝶阀位置
  1477. PMParameters.Add(new PMParameter
  1478. {
  1479. Name = $"{pmID}.IoThrottleValve.ThrottleValve.TVPosition", Display = "蝶阀位置 (%)",
  1480. Type = ParameterType.Default, Feedback = "0", Setpoint = "", SetpointEnabled = true
  1481. });
  1482. // 蝶阀压力
  1483. PMParameters.Add(new PMParameter
  1484. {
  1485. Name = $"{pmID}.IoThrottleValve.ThrottleValve.TVPressure", Display = "蝶阀压力 (mTorr)",
  1486. Type = ParameterType.Default, Feedback = "0", Setpoint = "", SetpointEnabled = true
  1487. });
  1488. // 底座温度
  1489. PMParameters.Add(new PMParameter
  1490. {
  1491. Name = $"{pmID}.IoTemperatureCtrl.TemperatureControl.SubstrateTemperature",
  1492. Display = "底座温度 (℃)",
  1493. Type = ParameterType.Default,
  1494. Feedback = "0",
  1495. Setpoint = "",
  1496. SetpointEnabled = true
  1497. });
  1498. // 射频时间
  1499. PMParameters.Add(new PMParameter
  1500. {
  1501. Name = $"{pmID}.Rf.PowerOnTime", Display = "射频时间 (s)", Type = ParameterType.Default,
  1502. Feedback = "0", Setpoint = "", SetpointEnabled = true
  1503. });
  1504. //para = new PMParameter() { Display = "RF Mode", Type = ParameterType.DropDownList, Feedback = "Manual", SetpointEnabled = true };
  1505. //para.Selections = new List<string>() { "Manual", "Auto" };
  1506. //paras.Add(para);
  1507. // 设定功率
  1508. PMParameters.Add(new PMParameter
  1509. {
  1510. Name = $"{pmID}.Rf.ForwardPower", Display = "射频功率 (w)", Type = ParameterType.Default,
  1511. Feedback = "", Setpoint = "", SetpointEnabled = true
  1512. });
  1513. // ReflectPower
  1514. PMParameters.Add(new PMParameter
  1515. {
  1516. Name = $"{pmID}.Rf.ReflectPower",
  1517. Display = "反射功率 (w)",
  1518. Type = ParameterType.Share,
  1519. Setpoint = ""
  1520. });
  1521. //// Match C1
  1522. //PMParameters.Add(new PMParameter
  1523. //{
  1524. // Name =$"{pmID}.Match.TunePosition1", Display = "Match C1 (%)", Type = ParameterType.Default, Feedback = "", Setpoint = "",
  1525. // SetpointEnabled = true
  1526. //});
  1527. //// Match C2
  1528. //PMParameters.Add(new PMParameter
  1529. //{
  1530. // Name = $"{pmID}.Match.TunePosition2", Display = "Match C2 (%)", Type = ParameterType.Default, Feedback = "", Setpoint = "",
  1531. // SetpointEnabled = true
  1532. //});
  1533. // Match C1
  1534. PMParameters.Add(new PMParameter()
  1535. {
  1536. Name = $"{pmID}.Match.TunePosition1",
  1537. Display = "匹配器 C1 (%)",
  1538. Type = ParameterType.Share,
  1539. Setpoint = ""
  1540. });
  1541. // Match C2
  1542. PMParameters.Add(new PMParameter()
  1543. {
  1544. Name = $"{pmID}.Match.TunePosition2",
  1545. Display = "匹配器 C2 (%)",
  1546. Type = ParameterType.Share,
  1547. Setpoint = ""
  1548. });
  1549. // Vpp
  1550. PMParameters.Add(new PMParameter()
  1551. {
  1552. Name = $"{pmID}.Match.VPP",
  1553. Display = "Vpp", Type = ParameterType.Share, Setpoint = ""
  1554. });
  1555. // 气体
  1556. foreach (var gas in Gaslines)
  1557. {
  1558. PMParameters.Add(new PMParameter
  1559. {
  1560. Name = $"{pmID}.IoMfc.MfcGas{gas.Index}.FeedBack",
  1561. Display = $"{gas.Display} (sccm)",
  1562. Type = ParameterType.Default,
  1563. Feedback = "0",
  1564. Setpoint = "0",
  1565. SetpointEnabled = true
  1566. });
  1567. }
  1568. return PMParameters;
  1569. }
  1570. public void SelectRecipe()
  1571. {
  1572. if (!Enum.TryParse(SystemName, out ModuleName mod))
  1573. return;
  1574. RecipeSequenceSelectDialogViewModel dialog = new RecipeSequenceSelectDialogViewModel();
  1575. dialog.DisplayName = "Select Recipe";
  1576. dialog.Files = new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles(RecipeClient.Instance.Service.GetRecipes(mod, false).ToList()));
  1577. WindowManager wm = new WindowManager();
  1578. bool? bret = wm.ShowDialog(dialog);
  1579. if ((bool)bret)
  1580. {
  1581. SelectedRecipeName = dialog.DialogResult;
  1582. }
  1583. }
  1584. public void UnLoad()
  1585. {
  1586. }
  1587. public void Start()
  1588. {
  1589. if (string.IsNullOrWhiteSpace(this.SelectedRecipeName))
  1590. {
  1591. DialogBox.ShowError("请选择工艺程序文件");
  1592. return;
  1593. }
  1594. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.RunRecipe}", $"{SystemName}\\{this.SelectedRecipeName}");
  1595. }
  1596. public void NextStep()
  1597. {
  1598. if (MessageBox.Show("跳至下一步工艺?", QueryDataClient.Instance.Service.GetConfig($"System.DisplayLogoName")?.ToString(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
  1599. {
  1600. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.SkipCurrentStep}");
  1601. }
  1602. }
  1603. public void Stop()
  1604. {
  1605. if (MessageBox.Show("停止当前工艺?", QueryDataClient.Instance.Service.GetConfig($"System.DisplayLogoName")?.ToString(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
  1606. {
  1607. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.AbortRecipe}");
  1608. }
  1609. }
  1610. public void SetManual()
  1611. {
  1612. InvokeClient.Instance.Service.DoOperation($"{SystemName}.PmManual");
  1613. }
  1614. public void SetAuto()
  1615. {
  1616. InvokeClient.Instance.Service.DoOperation($"{SystemName}.PmAuto");
  1617. }
  1618. public void SetOnline()
  1619. {
  1620. InvokeClient.Instance.Service.DoOperation($"{SystemName}.PmOnline");
  1621. }
  1622. public void SetInit()
  1623. {
  1624. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Home");
  1625. }
  1626. public void AbortPM()
  1627. {
  1628. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Abort");
  1629. }
  1630. public void SetOffline()
  1631. {
  1632. InvokeClient.Instance.Service.DoOperation($"{SystemName}.PmOffline");
  1633. }
  1634. public void UnlockLid()
  1635. {
  1636. InvokeClient.Instance.Service.DoOperation($"{SystemName}.UnlockLid");
  1637. }
  1638. public void LockLid()
  1639. {
  1640. InvokeClient.Instance.Service.DoOperation($"{SystemName}.LockLid");
  1641. }
  1642. public void OpenSlitValve()
  1643. {
  1644. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SlitDoor.Open");
  1645. }
  1646. public void CloseSlitValve()
  1647. {
  1648. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SlitDoor.Close");
  1649. }
  1650. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  1651. {
  1652. foreach (var pmParameter in PMParameters)
  1653. {
  1654. string paraName = pmParameter.Name;
  1655. if (!data.ContainsKey(paraName))
  1656. continue;
  1657. pmParameter.Feedback = $"{data[paraName]:N0}";
  1658. if (paraName == $"{SystemName}.IoThrottleValve.ThrottleValve.TVMode")
  1659. {
  1660. pmParameter.Feedback = pmParameter.Setpoint;
  1661. }
  1662. if (paraName == $"{SystemName}.Rf.PowerOnTime")
  1663. {
  1664. pmParameter.Feedback = $"{data[$"{SystemName}.Rf.PowerOnTime"]}";
  1665. }
  1666. if (paraName == $"{SystemName}.Match.TunePosition1"|| paraName == $"{SystemName}.Match.TunePosition2")
  1667. {
  1668. pmParameter.Feedback = $"{data[paraName]:N2}";
  1669. }
  1670. if (paraName == $"{SystemName}.StepTime")
  1671. {
  1672. pmParameter.Feedback = $"{data[$"{SystemName}.RecipeStepTimeElapsed"]:N0}";
  1673. pmParameter.Setpoint = $"{data[$"{SystemName}.RecipeStepTimeSetPoint"]:N0}";
  1674. }
  1675. if (paraName == $"{SystemName}.StepNo")
  1676. {
  1677. pmParameter.Setpoint = $"{data[$"{SystemName}.RecipeSteps"]:N0}";
  1678. }
  1679. if (paraName == $"{SystemName}.RecipeStepTimeElapsed")
  1680. {
  1681. pmParameter.Setpoint = $"{data[$"{SystemName}.RecipeStepTimeSetPoint"]:N0}";
  1682. }
  1683. if (paraName == ($"{SystemName}.IoTemperatureCtrl.TemperatureControl.SubstrateTemperature"))
  1684. {
  1685. if(IsAutoMode)
  1686. {
  1687. pmParameter.Setpoint = string.Format("{0:N1}", ((AITHeaterData)data[$"{SystemName}.HeaterChamber.DeviceData"]).SetPoint);
  1688. }
  1689. pmParameter.Feedback = string.Format("{0:N1}", ((AITHeaterData)data[$"{SystemName}.HeaterChamber.DeviceData"]).FeedBack);
  1690. }
  1691. }
  1692. foreach (var gasLine in Gaslines)
  1693. {
  1694. if (data.ContainsKey(gasLine.ValveName))
  1695. {
  1696. gasLine.ValveData = (AITValveData)data[gasLine.ValveName];
  1697. gasLine.NotifyOfPropertyChange("ValveData");
  1698. }
  1699. if (data.ContainsKey(gasLine.MfcName))
  1700. {
  1701. gasLine.MfcData = (AITMfcData)data[gasLine.MfcName];
  1702. //gasLine.Display = gasLine.MfcData.DisplayName;
  1703. gasLine.Display = gasLine.MfcData.DeviceName + " " + gasLine.MfcData.DisplayName + " " + gasLine.MfcData.Scale + " " + gasLine.MfcData.Unit;
  1704. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas{gasLine.Index}.FeedBack").Display = gasLine.Display;
  1705. PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas{gasLine.Index}.FeedBack").NotifyOfPropertyChange("Display");
  1706. gasLine.NotifyOfPropertyChange("MfcData");
  1707. }
  1708. }
  1709. }
  1710. public void DoStartPump()
  1711. {
  1712. if (IsStartPumping)
  1713. {
  1714. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.Abort}");
  1715. return;
  1716. }
  1717. InvokeClient.Instance.Service.DoOperation($"{SystemName}.StartPump");
  1718. }
  1719. // Pumpdown
  1720. public void DoPump()
  1721. {
  1722. if (IsPumping)
  1723. {
  1724. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.Abort}");
  1725. return;
  1726. }
  1727. if (IsPumpingOkForProcess)
  1728. {
  1729. InvokeClient.Instance.Service.DoOperation($"{SystemName}.StopPump");
  1730. return;
  1731. }
  1732. // 设置底压
  1733. double basePressure = string.IsNullOrEmpty(BasePressureSetPoint) ? 0 : Convert.ToDouble(BasePressureSetPoint);
  1734. if (basePressure <= 0.01 || basePressure >= 1000)
  1735. {
  1736. MessageBox.Show($"基准压力设定值 {basePressure} 无效,应该在0到1000毫托之间");
  1737. return;
  1738. }
  1739. double pumpLimit = string.IsNullOrEmpty(PumpLimitSetPoint) ? 0 : Convert.ToDouble(PumpLimitSetPoint);
  1740. if (pumpLimit <= 0.01 || pumpLimit >= 1200)
  1741. {
  1742. MessageBox.Show($"抽气时间应该在0到1200之间,当前设定值{pumpLimit}");
  1743. return;
  1744. }
  1745. InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{SystemName}.Pump.PumpBasePressure", basePressure.ToString());
  1746. InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{SystemName}.Pump.PumpTimeLimit", pumpLimit.ToString());
  1747. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Pump");
  1748. // pump down 过程中tv 全开
  1749. var tvMode = PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVMode");
  1750. tvMode.Feedback = "Position";
  1751. PumpLimitSetPointSaved = true;
  1752. BasePressureSetPointSaved = true;
  1753. NotifyOfPropertyChange(nameof(PumpLimitSetPointSaved));
  1754. NotifyOfPropertyChange(nameof(BasePressureSetPointSaved));
  1755. }
  1756. private void MoveGuidePin(MovementPosition pos)
  1757. {
  1758. switch (pos)
  1759. {
  1760. case MovementPosition.Down:
  1761. BottomPinStatus = 1;
  1762. TopPinStatus = 0;
  1763. MidPinStatus = 0;
  1764. break;
  1765. case MovementPosition.Up:
  1766. BottomPinStatus = 0;
  1767. TopPinStatus = 1;
  1768. MidPinStatus = 0;
  1769. break;
  1770. case MovementPosition.Middle:
  1771. BottomPinStatus = 0;
  1772. TopPinStatus = 0;
  1773. MidPinStatus = 1;
  1774. break;
  1775. default:
  1776. break;
  1777. }
  1778. }
  1779. public void Purge()
  1780. {
  1781. if (IsCyclePurging)
  1782. {
  1783. InvokeClient.Instance.Service.DoOperation($"{SystemName}.StopPurge");
  1784. }
  1785. else
  1786. {
  1787. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Purge");
  1788. }
  1789. }
  1790. public void LeakCheck()
  1791. {
  1792. if (!IsLeakCheck)
  1793. {
  1794. InvokeClient.Instance.Service.DoOperation($"{SystemName}.LeakCheck");
  1795. }
  1796. }
  1797. public void Vent()
  1798. {
  1799. //OverviewPMProvider.Instance.Vent("PM1");
  1800. if (!IsVenting)
  1801. {
  1802. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Vent");
  1803. return;
  1804. }
  1805. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.Abort}");
  1806. }
  1807. /// <summary>
  1808. /// 流气
  1809. /// </summary>
  1810. public void Gas()
  1811. {
  1812. if (!this.HandleThrottleValve())
  1813. return;
  1814. //GasLine 跳号Enable
  1815. object[] mfc = new object[4];
  1816. string[] mfcSetPoint = new string[4];
  1817. for (int i = 0; i < 4; i++)
  1818. {
  1819. if ((bool)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas{i + 1}.Enable"))
  1820. {
  1821. mfcSetPoint[i] = PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas{i + 1}.FeedBack").Setpoint;
  1822. if (string.IsNullOrWhiteSpace(mfcSetPoint[i]))
  1823. {
  1824. DialogBox.ShowError("请输入气体流量值");
  1825. return;
  1826. }
  1827. }
  1828. mfc[i] = Convert.ToDouble(string.IsNullOrEmpty(mfcSetPoint[i]) ? "0.0" : mfcSetPoint[i]);
  1829. }
  1830. //object[] mfc = new object[Gaslines.Count];
  1831. //string[] mfcSetPoint = new string[Gaslines.Count];
  1832. //for (int index = 0; index < Gaslines.Count; index++)
  1833. //{
  1834. // mfcSetPoint[index] = PMParameters.Find(x => x.Name == $"{SystemName}.IoMfc.MfcGas{index + 1}.FeedBack").Setpoint;
  1835. // if (string.IsNullOrWhiteSpace(mfcSetPoint[index]))
  1836. // {
  1837. // DialogBox.ShowError("请输入气体流量值");
  1838. // return;
  1839. // }
  1840. // mfc[index] = Convert.ToDouble(string.IsNullOrEmpty(mfcSetPoint[index]) ? "0.0" : mfcSetPoint[index]);
  1841. //}
  1842. if ((IsGasFlowing
  1843. && (Math.Abs((double)mfc[0] - (double)_oldmfc[0]) < 0.01)
  1844. && (Math.Abs((double)mfc[1] - (double)_oldmfc[1]) < 0.01)
  1845. && (Math.Abs((double)mfc[2] - (double)_oldmfc[2]) < 0.01)
  1846. && (Math.Abs((double)mfc[3] - (double)_oldmfc[3]) < 0.01))
  1847. || (IsGasFlowing && (Math.Abs((double)mfc[0]) <= 0.01 && Math.Abs((double)mfc[1]) <= 0.01 && Math.Abs((double)mfc[2]) <= 0.01 && Math.Abs((double)mfc[3]) <= 0.01) ))
  1848. {
  1849. InvokeClient.Instance.Service.DoOperation($"{SystemName}.Abort");
  1850. return;
  1851. }
  1852. _oldmfc = mfc;
  1853. InvokeClient.Instance.Service.DoOperation($"{SystemName}.GasFlow", mfc);
  1854. }
  1855. /// <summary>
  1856. /// 处理蝶阀
  1857. /// </summary>
  1858. /// <returns></returns>
  1859. private bool HandleThrottleValve()
  1860. {
  1861. var tvMode = PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVMode");
  1862. string tvModeSp = "TV" + tvMode.Setpoint + "Ctrl";
  1863. if (!Enum.TryParse(tvModeSp, out PressureCtrlMode ctrlMode))
  1864. {
  1865. MessageBox.Show("Select the mode of Throttle valve");
  1866. return false;
  1867. }
  1868. switch (ctrlMode)
  1869. {
  1870. case PressureCtrlMode.TVPressureCtrl:
  1871. string tvPressureSP = PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVPressure").Setpoint;
  1872. if (string.IsNullOrWhiteSpace(tvPressureSP))
  1873. {
  1874. DialogBox.ShowError("请输入蝶阀 pressure value");
  1875. return false;
  1876. }
  1877. double pressure = Convert.ToDouble(tvPressureSP);
  1878. if (pressure < 0 || pressure > 756000)
  1879. {
  1880. DialogBox.ShowError($"压力设定值 {pressure} 无效,应该介于0到756000之间");
  1881. return false;
  1882. }
  1883. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{Virgo_DDevice.ThrottleValve}.{AITThrottleValveOperation.SetPressure}", pressure);
  1884. break;
  1885. case PressureCtrlMode.TVPositionCtrl:
  1886. string tvPositionSP = PMParameters.Find(x => x.Name == $"{SystemName}.IoThrottleValve.ThrottleValve.TVPosition").Setpoint;
  1887. if (string.IsNullOrWhiteSpace(tvPositionSP))
  1888. {
  1889. DialogBox.ShowError("请输入蝶阀 Position value");
  1890. return false;
  1891. }
  1892. double position = Convert.ToDouble(tvPositionSP);
  1893. if (position < 0 || position > 100)
  1894. {
  1895. DialogBox.ShowError($"蝶阀位置 {position} 无效,应该在0到100之间");
  1896. return false;
  1897. }
  1898. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{Virgo_DDevice.ThrottleValve}.{AITThrottleValveOperation.SetPosition}", position);
  1899. break;
  1900. default:
  1901. break;
  1902. }
  1903. tvMode.Feedback = tvModeSp;
  1904. return true;
  1905. }
  1906. public void Heat()
  1907. {
  1908. var para_temp = PMParameters.Find(x => x.Name == $"{SystemName}.IoTemperatureCtrl.TemperatureControl.SubstrateTemperature");
  1909. var temp = para_temp.Setpoint;
  1910. if (double.TryParse(temp, out double dt))
  1911. {
  1912. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.Heat}", dt);
  1913. }
  1914. else
  1915. {
  1916. DialogBox.ShowError("设定温度无效");
  1917. }
  1918. }
  1919. // RF Power
  1920. public void RF()
  1921. {
  1922. if (IsRfPowering)
  1923. {
  1924. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.Abort}");
  1925. return;
  1926. }
  1927. //EndByCondition endBy = EndByCondition.EndByRfTime;
  1928. //RfMode rfMode = RfMode.ContinuousWaveMode;
  1929. // 射频功率
  1930. string rfPowerSetPoint = PMParameters.Find(x => x.Name == $"{SystemName}.Rf.ForwardPower").Setpoint;
  1931. if (string.IsNullOrWhiteSpace(rfPowerSetPoint))
  1932. {
  1933. DialogBox.ShowWarning("Input RF power set value first");
  1934. return;
  1935. }
  1936. // 射频时间
  1937. string sRFTime = PMParameters.Find(x => x.Name == $"{SystemName}.Rf.PowerOnTime").Setpoint;
  1938. if (string.IsNullOrWhiteSpace(sRFTime))
  1939. {
  1940. DialogBox.ShowError("Input RF power time");
  1941. return;
  1942. }
  1943. //// Match C1
  1944. //string rfMatchC1SetPoint = PMParameters.Find(x => x.Name == $"{SystemName}.Match.TunePosition1").Setpoint;
  1945. //if (string.IsNullOrWhiteSpace(rfMatchC1SetPoint))
  1946. //{
  1947. // DialogBox.ShowWarning("Input Match C1 set value first");
  1948. // return;
  1949. //}
  1950. //// Match C2
  1951. //string rfMatchC2SetPoint = PMParameters.Find(x => x.Name == $"{SystemName}.Match.TunePosition2").Setpoint;
  1952. //if (string.IsNullOrWhiteSpace(rfMatchC2SetPoint))
  1953. //{
  1954. // DialogBox.ShowWarning("Input Match C2 set value first");
  1955. // return;
  1956. //}
  1957. double rf_sp = Convert.ToDouble(rfPowerSetPoint);
  1958. //double match1_sp = Convert.ToDouble(rfMatchC1SetPoint);
  1959. //double match2_sp = Convert.ToDouble(rfMatchC2SetPoint);
  1960. double match1_sp = 0.0;
  1961. double match2_sp = 0.0;
  1962. double rf_time = Convert.ToDouble(sRFTime);
  1963. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.RfPower}", rf_sp, rf_time, match1_sp, match2_sp);
  1964. }
  1965. // Lift pin method
  1966. public void MoveLiftPinUp()
  1967. {
  1968. InvokeClient.Instance.Service.DoOperation($"{SystemName}.LiftPin.Open");
  1969. }
  1970. public void MoveLiftPinDown()
  1971. {
  1972. InvokeClient.Instance.Service.DoOperation($"{SystemName}.LiftPin.Close");
  1973. }
  1974. // Guide pin method
  1975. public void MovePin3Up()
  1976. {
  1977. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.MoveGuidePin}", Ax.WaferSize.WS3, 2);
  1978. }
  1979. public void MovePin3Down()
  1980. {
  1981. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.MoveGuidePin}", Ax.WaferSize.WS3, 1);
  1982. }
  1983. public void MovePin4Up()
  1984. {
  1985. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.MoveGuidePin}", Ax.WaferSize.WS4, 2);
  1986. }
  1987. public void MovePin4Down()
  1988. {
  1989. InvokeClient.Instance.Service.DoOperation($"{SystemName}.{RtOperation.MoveGuidePin}", Ax.WaferSize.WS4, 1);
  1990. }
  1991. }
  1992. }