PmOverviewViewModel.cs 86 KB

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