PmOverviewViewModel.cs 84 KB

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