TMViewModel.cs 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  1. using Aitex.Sorter.Common;
  2. using MECF.Framework.Common.CommonData;
  3. using MECF.Framework.Common.DataCenter;
  4. using MECF.Framework.Common.Equipment;
  5. using MECF.Framework.Common.OperationCenter;
  6. using MECF.Framework.Common.Schedulers;
  7. using OpenSEMI.ClientBase;
  8. using Prism.Commands;
  9. using Prism.Mvvm;
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Collections.ObjectModel;
  13. using System.Linq;
  14. using System.Threading.Tasks;
  15. using System.Windows.Threading;
  16. using Venus_Core;
  17. using Venus_MainPages.Unity;
  18. using Venus_Themes.CustomControls;
  19. using Venus_Themes.Unity;
  20. namespace Venus_MainPages.ViewModels
  21. {
  22. public enum TMModule
  23. {
  24. PMA, PMB, PMC, PMD, LLA, LLB
  25. }
  26. public enum TMBlade
  27. {
  28. Blade1, Blade2
  29. }
  30. internal class TMViewModel : BindableBase
  31. {
  32. #region 私有字段
  33. //private ModuleInfo m_PMAWafer;
  34. private ModuleInfo m_LLAModuleInfo;
  35. private ModuleInfo m_LLBModuleInfo;
  36. private ModuleInfo m_TMModuleInfo;
  37. private bool m_TMIsOFFline;
  38. private bool m_LLIsOFFline;
  39. private WaferInfo m_PMAWafer;
  40. private WaferInfo m_PMBWafer;
  41. private WaferInfo m_PMCWafer;
  42. private WaferInfo m_PMDWafer;
  43. private WaferInfo m_LLAWafer;
  44. private WaferInfo m_LLBWafer;
  45. private WaferInfo m_BladeAWafer;
  46. private WaferInfo m_BladeBWafer;
  47. private bool m_PMADoorIsOpen;
  48. //private bool m_PMBDoorIsOpen;
  49. //private bool m_PMCDoorIsOpen;
  50. //private bool m_PMDDoorIsOpen;
  51. private bool m_LLADoorIsOpen;
  52. private WaferRobotTAction m_WaferRobotTAction;
  53. private WaferRobotTAction m_Robot1TAction;
  54. private WaferRobotXAction m_Robot1XAction;
  55. private WaferRobotTAction m_Robot2TAction;
  56. private WaferRobotXAction m_Robot2XAction;
  57. private TMModule m_PickSelectedModule;
  58. private TMModule m_PlaceSelectedModule;
  59. private TMModule m_ExtendSelectedModule;
  60. private TMModule m_RetractSelectedModule;
  61. private TMBlade m_PickSelectedBlade;
  62. private TMBlade m_PlaceSelectedBlade;
  63. private TMBlade m_ExtendSelectedBlade;
  64. private TMBlade m_RetractSelectedBlade;
  65. private TMBlade m_GoToSelectedBlade;
  66. private ObservableCollection<int> m_PlaceSoltItemsSource = new ObservableCollection<int>();
  67. private ObservableCollection<int> m_PickSoltItemsSource = new ObservableCollection<int>();
  68. private ObservableCollection<int> m_ExtendSoltItemsSource = new ObservableCollection<int>();
  69. private ObservableCollection<int> m_RetractSoltItemsSource = new ObservableCollection<int>();
  70. private int m_PickSoltSelectedIndex;
  71. private int m_PlaceSoltSelectedIndex;
  72. private int m_ExtendSoltSelectedIndex;
  73. private int m_RetractSoltSelectedIndex;
  74. private List<string> m_RtDataKeys=new List<string> ();
  75. private Dictionary<string, object> m_RtDataValues;
  76. private string m_ModuleCheckedName="TM";
  77. private string m_RobotAction;
  78. private string m_RobotTarget;
  79. private string m_RobotArm;
  80. private bool m_PMAIsInstalled;
  81. private bool m_PMBIsInstalled;
  82. private bool m_PMCIsInstalled;
  83. private bool m_PMDIsInstalled;
  84. private bool m_LLAIsInstalled;
  85. private bool m_LLBIsInstalled;
  86. private bool m_TMIsInstalled;
  87. private List<string> m_OriginalCycle=new List<string> ();
  88. private List<string> m_ToCycle = new List<string>();
  89. private List<TMModule> m_TMModules= new List<TMModule>();
  90. private bool m_CycleEnable;
  91. private string m_OriginalCycleSelectedItem;
  92. private string m_ToCycleSelectedItem;
  93. private bool m_PMAIsCycle;
  94. private bool m_PMBIsCycle;
  95. private bool m_PMCIsCycle;
  96. private bool m_PMDIsCycle;
  97. private int m_CycleCount;
  98. #endregion
  99. #region 属性
  100. public List<string> OriginalCycle
  101. {
  102. get { return m_OriginalCycle; }
  103. set { SetProperty(ref m_OriginalCycle, value); }
  104. }
  105. public List<string> ToCycle
  106. {
  107. get { return m_ToCycle; }
  108. set { SetProperty(ref m_ToCycle, value); }
  109. }
  110. public string RobotAction2
  111. {
  112. get { return m_RobotAction; }
  113. set
  114. {
  115. //RobotActiont(m_RobotAction, value);
  116. SetProperty(ref m_RobotAction, value);
  117. }
  118. }
  119. public RobotMoveInfo m_robotMoveInfo;
  120. public RobotMoveInfo RobotMoveInfo
  121. {
  122. get { return m_robotMoveInfo; }
  123. set
  124. {
  125. RobotMoveInfoChanged(m_robotMoveInfo, value);
  126. m_robotMoveInfo = value;
  127. }
  128. }
  129. public string RobotTarget
  130. {
  131. get { return m_RobotTarget; }
  132. set
  133. {
  134. SetProperty(ref m_RobotTarget, value);
  135. }
  136. }
  137. public string RobotArm
  138. {
  139. get { return m_RobotArm; }
  140. set
  141. {
  142. SetProperty(ref m_RobotArm, value);
  143. }
  144. }
  145. int arm1oldWaferStatus = 100;
  146. int arm2oldWaferStatus = 100;
  147. private async void RobotMoveInfoChanged(RobotMoveInfo oldValue,RobotMoveInfo newValue)
  148. {
  149. if (oldValue == null ||newValue==null)
  150. {
  151. return;
  152. }
  153. #region pick 和 place LL
  154. if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
  155. {
  156. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  157. if (TMRobotMoveActionBladeTarget != null)
  158. {
  159. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  160. }
  161. else
  162. {
  163. return;
  164. }
  165. var values = RobotTarget.Split('.');
  166. var arm = values[0];
  167. var module = values[1];
  168. if (arm == "ArmA")
  169. {
  170. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  171. await Task.Delay(600);
  172. Robot1XAction = WaferRobotXAction.Extend;
  173. //await Task.Delay(3000);
  174. while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus!= 0)|| (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus == 0))
  175. {
  176. await Task.Delay(100);
  177. }
  178. Robot1XAction = WaferRobotXAction.Retract;
  179. }
  180. else if (arm == "ArmB")
  181. {
  182. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  183. await Task.Delay(600);
  184. Robot2XAction = WaferRobotXAction.Extend;
  185. while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus == 0))
  186. {
  187. await Task.Delay(100);
  188. }
  189. //await Task.Delay(3000);
  190. Robot2XAction = WaferRobotXAction.Retract;
  191. }
  192. }
  193. #endregion
  194. #region pick 和 place pm
  195. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
  196. {
  197. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  198. if (TMRobotMoveActionBladeTarget != null)
  199. {
  200. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  201. }
  202. else
  203. {
  204. return;
  205. }
  206. var values = RobotTarget.Split('.');
  207. var arm = values[0];
  208. var module = values[1];
  209. if (arm == "ArmA")
  210. {
  211. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  212. await Task.Delay(1500);
  213. Robot1XAction = WaferRobotXAction.Extend;
  214. }
  215. else if (arm == "ArmB")
  216. {
  217. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  218. await Task.Delay(1500);
  219. Robot2XAction = WaferRobotXAction.Extend;
  220. }
  221. }
  222. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
  223. {
  224. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  225. if (TMRobotMoveActionBladeTarget != null)
  226. {
  227. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  228. }
  229. else
  230. {
  231. return;
  232. }
  233. var values = RobotTarget.Split('.');
  234. var arm = values[0];
  235. if (arm == "ArmA")
  236. {
  237. Robot1XAction = WaferRobotXAction.Retract;
  238. }
  239. else if (arm == "ArmB")
  240. {
  241. Robot2XAction = WaferRobotXAction.Retract;
  242. }
  243. }
  244. #endregion
  245. #region Rotating
  246. if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Rotating))
  247. {
  248. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  249. if (TMRobotMoveActionBladeTarget != null)
  250. {
  251. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  252. }
  253. else
  254. {
  255. return;
  256. }
  257. var values = RobotTarget.Split('.');
  258. var arm = values[0];
  259. var module = values[1];
  260. if (arm == "ArmA")
  261. {
  262. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  263. }
  264. else if (arm == "ArmB")
  265. {
  266. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  267. }
  268. }
  269. #endregion
  270. arm1oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus;
  271. arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
  272. }
  273. private async void RobotActiont(string oldValue,string newValue)
  274. {
  275. if (oldValue == "None" && newValue == "Placing" && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus==1)
  276. {
  277. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  278. if (TMRobotMoveActionBladeTarget != null)
  279. {
  280. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  281. }
  282. else
  283. {
  284. return;
  285. }
  286. var values = RobotTarget.Split('.');
  287. var arm = values[0];
  288. var module = values[1];
  289. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  290. await Task.Delay(1500);
  291. Robot1XAction = WaferRobotXAction.Extend;
  292. if (arm == "ArmA")
  293. {
  294. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  295. await Task.Delay(1500);
  296. Robot1XAction = WaferRobotXAction.Extend;
  297. }
  298. else if (arm == "ArmB")
  299. {
  300. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  301. await Task.Delay(1500);
  302. Robot2XAction = WaferRobotXAction.Extend;
  303. }
  304. }
  305. if (oldValue == "None" && newValue == "Placing" && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus == 1)
  306. {
  307. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  308. if (TMRobotMoveActionBladeTarget != null)
  309. {
  310. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  311. }
  312. else
  313. {
  314. return;
  315. }
  316. var values = RobotTarget.Split('.');
  317. var arm = values[0];
  318. var module = values[1];
  319. if (arm == "ArmA")
  320. {
  321. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  322. await Task.Delay(1500);
  323. Robot1XAction = WaferRobotXAction.Extend;
  324. }
  325. else if (arm == "ArmB")
  326. {
  327. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  328. await Task.Delay(1500);
  329. Robot2XAction = WaferRobotXAction.Extend;
  330. }
  331. //Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  332. //await Task.Delay(1500);
  333. //Robot2XAction = WaferRobotXAction.Extend;
  334. }
  335. if (arm1oldWaferStatus != ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus)
  336. {
  337. Robot1XAction = WaferRobotXAction.Retract;
  338. }
  339. if (arm2oldWaferStatus != ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus)
  340. {
  341. Robot2XAction = WaferRobotXAction.Retract;
  342. }
  343. if (oldValue == "None" && newValue == "Picking" && ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus == 0)
  344. {
  345. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  346. if (TMRobotMoveActionBladeTarget != null)
  347. {
  348. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  349. }
  350. else
  351. {
  352. return;
  353. }
  354. var values = RobotTarget.Split('.');
  355. var arm = values[0];
  356. var module = values[1];
  357. if (arm == "ArmA")
  358. {
  359. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  360. await Task.Delay(1500);
  361. Robot1XAction = WaferRobotXAction.Extend;
  362. }
  363. else if (arm == "ArmB")
  364. {
  365. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  366. await Task.Delay(1500);
  367. Robot2XAction = WaferRobotXAction.Extend;
  368. }
  369. }
  370. #region pick 和 place pm
  371. if (oldValue == "None" && newValue == "Extending")
  372. {
  373. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  374. if (TMRobotMoveActionBladeTarget != null)
  375. {
  376. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  377. }
  378. else
  379. {
  380. return;
  381. }
  382. var values = RobotTarget.Split('.');
  383. var arm = values[0];
  384. var module = values[1];
  385. if (arm == "ArmA")
  386. {
  387. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  388. await Task.Delay(1500);
  389. Robot1XAction = WaferRobotXAction.Extend;
  390. }
  391. else if (arm == "ArmB")
  392. {
  393. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  394. await Task.Delay(1500);
  395. Robot2XAction = WaferRobotXAction.Extend;
  396. }
  397. }
  398. if (oldValue == "None" && newValue == "Retracting")
  399. {
  400. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  401. if (TMRobotMoveActionBladeTarget != null)
  402. {
  403. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  404. }
  405. else
  406. {
  407. return;
  408. }
  409. var values = RobotTarget.Split('.');
  410. var arm = values[0];
  411. if (arm == "ArmA")
  412. {
  413. Robot1XAction = WaferRobotXAction.Retract;
  414. }
  415. else if (arm == "ArmB")
  416. {
  417. Robot2XAction = WaferRobotXAction.Retract;
  418. }
  419. }
  420. #endregion
  421. arm1oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus;
  422. arm2oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus;
  423. }
  424. public WaferInfo LLAWafer
  425. {
  426. get { return m_LLAWafer; }
  427. set { SetProperty(ref m_LLAWafer, value); }
  428. }
  429. public WaferInfo LLBWafer
  430. {
  431. get { return m_LLBWafer; }
  432. set { SetProperty(ref m_LLBWafer, value); }
  433. }
  434. public WaferInfo PMAWafer
  435. {
  436. get { return m_PMAWafer; }
  437. set { SetProperty(ref m_PMAWafer, value); }
  438. }
  439. public WaferInfo PMBWafer
  440. {
  441. get { return m_PMBWafer; }
  442. set { SetProperty(ref m_PMBWafer, value); }
  443. }
  444. public WaferInfo PMCWafer
  445. {
  446. get { return m_PMCWafer; }
  447. set { SetProperty(ref m_PMCWafer, value); }
  448. }
  449. public WaferInfo PMDWafer
  450. {
  451. get { return m_PMDWafer; }
  452. set { SetProperty(ref m_PMDWafer, value); }
  453. }
  454. public WaferInfo BladeAWafer
  455. {
  456. get { return m_BladeAWafer; }
  457. set { SetProperty(ref m_BladeAWafer, value); }
  458. }
  459. public WaferInfo BladeBWafer
  460. {
  461. get { return m_BladeBWafer; }
  462. set { SetProperty(ref m_BladeBWafer, value); }
  463. }
  464. public ModuleInfo LLAModuleInfo
  465. {
  466. get { return m_LLAModuleInfo; }
  467. set { SetProperty(ref m_LLAModuleInfo, value); }
  468. }
  469. public ModuleInfo LLBModuleInfo
  470. {
  471. get { return m_LLBModuleInfo; }
  472. set { SetProperty(ref m_LLBModuleInfo, value); }
  473. }
  474. public ModuleInfo TMModuleInfo
  475. {
  476. get { return m_TMModuleInfo; }
  477. set { SetProperty(ref m_TMModuleInfo, value); }
  478. }
  479. public bool TMIsOFFline
  480. {
  481. get { return m_TMIsOFFline; }
  482. set { SetProperty(ref m_TMIsOFFline, value); }
  483. }
  484. public bool LLIsOFFline
  485. {
  486. get { return m_LLIsOFFline; }
  487. set { SetProperty(ref m_LLIsOFFline, value); }
  488. }
  489. public bool PMADoorIsOpen
  490. {
  491. get { return m_PMADoorIsOpen; }
  492. set { SetProperty(ref m_PMADoorIsOpen, value); }
  493. }
  494. public bool LLADoorIsOpen
  495. {
  496. get { return m_LLADoorIsOpen; }
  497. set { SetProperty(ref m_LLADoorIsOpen, value); }
  498. }
  499. public WaferRobotTAction WaferRobotTAction
  500. {
  501. get { return m_WaferRobotTAction; }
  502. set { SetProperty(ref m_WaferRobotTAction, value); }
  503. }
  504. public WaferRobotTAction Robot1TAction
  505. {
  506. get { return m_Robot1TAction; }
  507. set { SetProperty(ref m_Robot1TAction, value); }
  508. }
  509. public WaferRobotXAction Robot1XAction
  510. {
  511. get { return m_Robot1XAction; }
  512. set { SetProperty(ref m_Robot1XAction, value); }
  513. }
  514. public WaferRobotTAction Robot2TAction
  515. {
  516. get { return m_Robot2TAction; }
  517. set { SetProperty(ref m_Robot2TAction, value); }
  518. }
  519. public WaferRobotXAction Robot2XAction
  520. {
  521. get { return m_Robot2XAction; }
  522. set { SetProperty(ref m_Robot2XAction, value); }
  523. }
  524. public TMModule PickSelectedModule
  525. {
  526. get { return m_PickSelectedModule; }
  527. set { SetProperty(ref m_PickSelectedModule, value); }
  528. }
  529. public TMModule PlaceSelectedModule
  530. {
  531. get { return m_PlaceSelectedModule; }
  532. set { SetProperty(ref m_PlaceSelectedModule, value); }
  533. }
  534. public TMModule ExtendSelectedModule
  535. {
  536. get { return m_ExtendSelectedModule; }
  537. set { SetProperty(ref m_ExtendSelectedModule, value); }
  538. }
  539. public TMModule RetractSelectedModule
  540. {
  541. get { return m_RetractSelectedModule; }
  542. set { SetProperty(ref m_RetractSelectedModule, value); }
  543. }
  544. public TMBlade PickSelectedBlade
  545. {
  546. get { return m_PickSelectedBlade; }
  547. set { SetProperty(ref m_PickSelectedBlade, value); }
  548. }
  549. public TMBlade PlaceSelectedBlade
  550. {
  551. get { return m_PlaceSelectedBlade; }
  552. set { SetProperty(ref m_PlaceSelectedBlade, value); }
  553. }
  554. public TMBlade ExtendSelectedBlade
  555. {
  556. get { return m_ExtendSelectedBlade; }
  557. set { SetProperty(ref m_ExtendSelectedBlade, value); }
  558. }
  559. public TMBlade RetractSelectedBlade
  560. {
  561. get { return m_RetractSelectedBlade; }
  562. set { SetProperty(ref m_RetractSelectedBlade, value); }
  563. }
  564. public TMBlade GoToSelectedBlade
  565. {
  566. get { return m_GoToSelectedBlade; }
  567. set { SetProperty(ref m_GoToSelectedBlade, value); }
  568. }
  569. public ObservableCollection<int> PickSoltItemsSource
  570. {
  571. get { return m_PickSoltItemsSource; }
  572. set { SetProperty(ref m_PickSoltItemsSource, value); }
  573. }
  574. public ObservableCollection<int> PlaceSoltItemsSource
  575. {
  576. get { return m_PlaceSoltItemsSource; }
  577. set { SetProperty(ref m_PlaceSoltItemsSource, value); }
  578. }
  579. public ObservableCollection<int> ExtendSoltItemsSource
  580. {
  581. get { return m_ExtendSoltItemsSource; }
  582. set { SetProperty(ref m_ExtendSoltItemsSource, value); }
  583. }
  584. public ObservableCollection<int> RetractSoltItemsSource
  585. {
  586. get { return m_RetractSoltItemsSource; }
  587. set { SetProperty(ref m_RetractSoltItemsSource, value); }
  588. }
  589. public int PickSoltSelectedIndex
  590. {
  591. get { return m_PickSoltSelectedIndex; }
  592. set { SetProperty(ref m_PickSoltSelectedIndex, value); }
  593. }
  594. public int PlaceSoltSelectedIndex
  595. {
  596. get { return m_PlaceSoltSelectedIndex; }
  597. set { SetProperty(ref m_PlaceSoltSelectedIndex, value); }
  598. }
  599. public int ExtendSoltSelectedIndex
  600. {
  601. get { return m_ExtendSoltSelectedIndex; }
  602. set { SetProperty(ref m_ExtendSoltSelectedIndex, value); }
  603. }
  604. public int RetractSoltSelectedIndex
  605. {
  606. get { return m_RetractSoltSelectedIndex; }
  607. set { SetProperty(ref m_RetractSoltSelectedIndex, value); }
  608. }
  609. public Dictionary<string, object> RtDataValues
  610. {
  611. get { return m_RtDataValues; }
  612. set { SetProperty(ref m_RtDataValues, value); }
  613. }
  614. public bool PMAIsInstalled
  615. {
  616. get { return m_PMAIsInstalled; }
  617. set { SetProperty(ref m_PMAIsInstalled, value); }
  618. }
  619. public bool PMBIsInstalled
  620. {
  621. get { return m_PMBIsInstalled; }
  622. set { SetProperty(ref m_PMBIsInstalled, value); }
  623. }
  624. public bool PMCIsInstalled
  625. {
  626. get { return m_PMCIsInstalled; }
  627. set { SetProperty(ref m_PMCIsInstalled, value); }
  628. }
  629. public bool PMDIsInstalled
  630. {
  631. get { return m_PMDIsInstalled; }
  632. set { SetProperty(ref m_PMDIsInstalled, value); }
  633. }
  634. public bool LLAIsInstalled
  635. {
  636. get { return m_LLAIsInstalled; }
  637. set { SetProperty(ref m_LLAIsInstalled, value); }
  638. }
  639. public bool LLBIsInstalled
  640. {
  641. get { return m_LLBIsInstalled; }
  642. set { SetProperty(ref m_LLBIsInstalled, value); }
  643. }
  644. public bool TMIsInstalled
  645. {
  646. get { return m_TMIsInstalled; }
  647. set { SetProperty(ref m_TMIsInstalled, value); }
  648. }
  649. public List<TMModule> TMModules
  650. {
  651. get { return m_TMModules; }
  652. set { SetProperty(ref m_TMModules, value); }
  653. }
  654. public bool CycleEnable
  655. {
  656. get { return m_CycleEnable; }
  657. set { SetProperty(ref m_CycleEnable, value); }
  658. }
  659. public string OriginalCycleSelectedItem
  660. {
  661. get { return m_OriginalCycleSelectedItem; }
  662. set { SetProperty(ref m_OriginalCycleSelectedItem, value); }
  663. }
  664. public string ToCycleSelectedItem
  665. {
  666. get { return m_ToCycleSelectedItem; }
  667. set { SetProperty(ref m_ToCycleSelectedItem, value); }
  668. }
  669. public bool PMAIsCycle
  670. {
  671. get { return m_PMAIsCycle; }
  672. set { SetProperty(ref m_PMAIsCycle, value); }
  673. }
  674. public bool PMBIsCycle
  675. {
  676. get { return m_PMBIsCycle; }
  677. set { SetProperty(ref m_PMBIsCycle, value); }
  678. }
  679. public bool PMCIsCycle
  680. {
  681. get { return m_PMCIsCycle; }
  682. set { SetProperty(ref m_PMCIsCycle, value); }
  683. }
  684. public bool PMDIsCycle
  685. {
  686. get { return m_PMDIsCycle; }
  687. set { SetProperty(ref m_PMDIsCycle, value); }
  688. }
  689. public int CycleCount
  690. {
  691. get { return m_CycleCount; }
  692. set { SetProperty(ref m_CycleCount, value); }
  693. }
  694. #endregion
  695. #region 命令
  696. private DelegateCommand _RobotHomeCommand;
  697. public DelegateCommand RobotHomeCommand =>
  698. _RobotHomeCommand ?? (_RobotHomeCommand = new DelegateCommand(OnRobotHome));
  699. private DelegateCommand _GotoCommand;
  700. public DelegateCommand GotoCommand =>
  701. _GotoCommand ?? (_GotoCommand = new DelegateCommand(OnGoto));
  702. private DelegateCommand _ExtendCommand;
  703. public DelegateCommand ExtendCommand =>
  704. _ExtendCommand ?? (_ExtendCommand = new DelegateCommand(OnExtend));
  705. private DelegateCommand _RetractCommand;
  706. public DelegateCommand RetractCommand =>
  707. _RetractCommand ?? (_RetractCommand = new DelegateCommand(OnRetract));
  708. private DelegateCommand<object> _ModuleChangeCommand;
  709. public DelegateCommand<object> ModuleChangeCommand =>
  710. _ModuleChangeCommand ?? (_ModuleChangeCommand = new DelegateCommand<object>(OnModuleChange));
  711. private DelegateCommand _PickCommand;
  712. public DelegateCommand PickCommand =>
  713. _PickCommand ?? (_PickCommand = new DelegateCommand(OnPick));
  714. private DelegateCommand _PlaceCommand;
  715. public DelegateCommand PlaceCommand =>
  716. _PlaceCommand ?? (_PlaceCommand = new DelegateCommand(OnPlace));
  717. private DelegateCommand _HomeCommand;
  718. public DelegateCommand HomeCommand =>
  719. _HomeCommand ?? (_HomeCommand = new DelegateCommand(OnHome));
  720. private DelegateCommand _VentCommand;
  721. public DelegateCommand VentCommand =>
  722. _VentCommand ?? (_VentCommand = new DelegateCommand(OnVent));
  723. private DelegateCommand _PumpCommand;
  724. public DelegateCommand PumpCommand =>
  725. _PumpCommand ?? (_PumpCommand = new DelegateCommand(OnPump));
  726. private DelegateCommand _PurgeCommand;
  727. public DelegateCommand PurgeCommand =>
  728. _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
  729. private DelegateCommand<object> _ModuleCheckedCommand;
  730. public DelegateCommand<object> ModuleCheckedCommand =>
  731. _ModuleCheckedCommand ?? (_ModuleCheckedCommand = new DelegateCommand<object>(OnModuleChecked));
  732. private DelegateCommand _AbortCommand;
  733. public DelegateCommand AbortCommand =>
  734. _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
  735. private DelegateCommand _StartCycleCommand;
  736. public DelegateCommand StartCycleCommand =>
  737. _StartCycleCommand ?? (_StartCycleCommand = new DelegateCommand(OnStartCycle));
  738. private DelegateCommand _StopCycleCommand;
  739. public DelegateCommand StopCycleCommand =>
  740. _StopCycleCommand ?? (_StopCycleCommand = new DelegateCommand(OnStopCycle));
  741. private DelegateCommand _SystemHomeCommand;
  742. public DelegateCommand SystemHomeCommand =>
  743. _SystemHomeCommand ?? (_SystemHomeCommand = new DelegateCommand(OnSystemHome));
  744. private DelegateCommand<object> _ChamberDoorOpenCommand;
  745. public DelegateCommand<object> ChamberDoorOpenCommand =>
  746. _ChamberDoorOpenCommand ?? (_ChamberDoorOpenCommand = new DelegateCommand<object>(OnChamberDoorOpen));
  747. private DelegateCommand<object> _ChamberDoorCloseCommand;
  748. public DelegateCommand<object> ChamberDoorCloseCommand =>
  749. _ChamberDoorCloseCommand ?? (_ChamberDoorCloseCommand = new DelegateCommand<object>(OnChamberDoorClose));
  750. #endregion
  751. #region 构造函数
  752. public TMViewModel()
  753. {
  754. string allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString();
  755. PMAIsInstalled = allModules.Contains("PMA");
  756. PMBIsInstalled = allModules.Contains("PMB");
  757. PMCIsInstalled = allModules.Contains("PMC");
  758. PMDIsInstalled = allModules.Contains("PMD");
  759. LLAIsInstalled = allModules.Contains("LLA");
  760. LLBIsInstalled = allModules.Contains("LLB");
  761. TMIsInstalled= allModules.Contains("TM");
  762. if (PMAIsInstalled == true)
  763. {
  764. TMModules.Add(TMModule.PMA);
  765. }
  766. if (PMBIsInstalled == true)
  767. {
  768. TMModules.Add(TMModule.PMB);
  769. }
  770. if (PMCIsInstalled == true)
  771. {
  772. TMModules.Add(TMModule.PMC);
  773. }
  774. if (PMDIsInstalled == true)
  775. {
  776. TMModules.Add(TMModule.PMD);
  777. }
  778. if (LLAIsInstalled == true)
  779. {
  780. OriginalCycle.Add("LLA");
  781. ToCycle.Add("LLA");
  782. TMModules.Add(TMModule.LLA);
  783. }
  784. if (LLBIsInstalled == true)
  785. {
  786. OriginalCycle.Add("LLB");
  787. ToCycle.Add("LLB");
  788. TMModules.Add(TMModule.LLB);
  789. }
  790. addDataKeys();
  791. DispatcherTimer timer = new DispatcherTimer();
  792. timer.Interval = TimeSpan.FromSeconds(0.1);
  793. timer.Tick += Timer_Tick;
  794. timer.Start();
  795. PickSoltItemsSource.Add(1);
  796. PlaceSoltItemsSource.Add(1);
  797. ExtendSoltItemsSource.Add(1);
  798. RetractSoltItemsSource.Add(1);
  799. //Robot1TAction = WaferRobotTAction.PMA;
  800. //Robot2TAction = WaferRobotTAction.PMD;
  801. //UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
  802. //UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
  803. //UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
  804. }
  805. private void Timer_Tick(object sender, EventArgs e)
  806. {
  807. if (LLAIsInstalled == true)
  808. {
  809. LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers.FirstOrDefault(x=>x.WaferStatus!=0);
  810. LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
  811. }
  812. if (LLBIsInstalled == true)
  813. {
  814. LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
  815. LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
  816. }
  817. if (PMAIsInstalled == true)
  818. {
  819. PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
  820. }
  821. if (PMBIsInstalled == true)
  822. {
  823. PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
  824. }
  825. if (PMCIsInstalled == true)
  826. {
  827. PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
  828. }
  829. if (PMDIsInstalled == true)
  830. {
  831. PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
  832. }
  833. if (TMIsInstalled == true)
  834. {
  835. BladeAWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0];
  836. BladeBWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1];
  837. TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
  838. }
  839. RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
  840. var TMRobotMoveActionArmTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.ArmTarget");
  841. if (TMRobotMoveActionArmTarget != null)
  842. {
  843. RobotArm = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus.ToString();
  844. }
  845. var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
  846. if (TMRobotMoveActionBladeTarget != null)
  847. {
  848. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  849. }
  850. var TMRobotMoveActionRobotAction = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.RobotAction");
  851. if (TMRobotMoveActionRobotAction != null)
  852. {
  853. RobotAction2 = TMRobotMoveActionRobotAction.ToString();
  854. }
  855. RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
  856. }
  857. #endregion
  858. #region 命令方法
  859. private void OnRobotHome()
  860. {
  861. InvokeClient.Instance.Service.DoOperation($"TM.RobotHome", "TMRobot");
  862. }
  863. private void OnGoto()
  864. {
  865. if (GoToSelectedBlade == TMBlade.Blade1)
  866. {
  867. Robot1TAction = WaferRobotTAction;
  868. }
  869. else if (GoToSelectedBlade == TMBlade.Blade2)
  870. {
  871. Robot2TAction = WaferRobotTAction;
  872. }
  873. }
  874. private void OnExtend()
  875. {
  876. var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
  877. var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
  878. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.Extend}", moduleName, 0, selectedHand);
  879. }
  880. private void OnRetract()
  881. {
  882. var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
  883. var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
  884. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.Retract}", moduleName, 0, selectedHand);
  885. }
  886. private void OnModuleChange(object obj)
  887. {
  888. var value = obj.ToString();
  889. switch (value)
  890. {
  891. case "Pick":
  892. PickSoltItemsSource.Clear();
  893. if ((int)PickSelectedModule == 4)
  894. {
  895. for (int i = 1; i <= LLAModuleInfo.WaferManager.Wafers.Count; i++)
  896. {
  897. PickSoltItemsSource.Add(i);
  898. }
  899. }
  900. else if ((int)PickSelectedModule == 5)
  901. {
  902. for (int i = 1; i <= LLBModuleInfo.WaferManager.Wafers.Count; i++)
  903. {
  904. PickSoltItemsSource.Add(i);
  905. }
  906. }
  907. else
  908. {
  909. PickSoltItemsSource.Add(1);
  910. }
  911. PickSoltSelectedIndex = 0;
  912. break;
  913. case "Place":
  914. PlaceSoltItemsSource.Clear();
  915. if ((int)PlaceSelectedModule == 4)
  916. {
  917. for (int i = 1; i <= LLAModuleInfo.WaferManager.Wafers.Count; i++)
  918. {
  919. PlaceSoltItemsSource.Add(i);
  920. }
  921. }
  922. else if ((int)PlaceSelectedModule == 5)
  923. {
  924. for (int i = 1; i <= LLBModuleInfo.WaferManager.Wafers.Count; i++)
  925. {
  926. PlaceSoltItemsSource.Add(i);
  927. }
  928. }
  929. else
  930. {
  931. PlaceSoltItemsSource.Add(1);
  932. }
  933. PlaceSoltSelectedIndex = 0;
  934. break;
  935. case "Extend":
  936. ExtendSoltItemsSource.Clear();
  937. if ((int)ExtendSelectedModule == 4)
  938. {
  939. for (int i = 1; i <= LLAModuleInfo.WaferManager.Wafers.Count; i++)
  940. {
  941. ExtendSoltItemsSource.Add(i);
  942. }
  943. }
  944. else if ((int)ExtendSelectedModule == 5)
  945. {
  946. for (int i = 1; i <= LLBModuleInfo.WaferManager.Wafers.Count; i++)
  947. {
  948. ExtendSoltItemsSource.Add(i);
  949. }
  950. }
  951. else
  952. {
  953. ExtendSoltItemsSource.Add(1);
  954. }
  955. ExtendSoltSelectedIndex = 0;
  956. break;
  957. case "Retract":
  958. RetractSoltItemsSource.Clear();
  959. if ((int)RetractSelectedModule == 4)
  960. {
  961. for (int i = 1; i <= LLAModuleInfo.WaferManager.Wafers.Count; i++)
  962. {
  963. RetractSoltItemsSource.Add(i);
  964. }
  965. //RetractSoltItemsSource = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8 };
  966. }
  967. else if ((int)RetractSelectedModule == 5)
  968. {
  969. for (int i = 1; i <= LLBModuleInfo.WaferManager.Wafers.Count; i++)
  970. {
  971. RetractSoltItemsSource.Add(i);
  972. }
  973. }
  974. else
  975. {
  976. RetractSoltItemsSource.Add(1);
  977. }
  978. RetractSoltSelectedIndex = 0;
  979. break;
  980. }
  981. }
  982. private void OnPick()
  983. {
  984. Queue<MoveItem> moveItems = new Queue<MoveItem>();
  985. var moduleName= (ModuleName)Enum.Parse(typeof(ModuleName), PickSelectedModule.ToString(), true);
  986. var selectedHand= (Hand)Enum.Parse(typeof(Hand), PickSelectedBlade.ToString(), true);
  987. MoveItem moveItem = new MoveItem(moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, 0, 0, selectedHand);
  988. moveItems.Enqueue(moveItem);
  989. if ((int)PickSelectedModule > 3)
  990. {
  991. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPick}", moveItems);
  992. }
  993. else
  994. {
  995. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPick}", moveItems);
  996. }
  997. }
  998. private void OnPlace()
  999. {
  1000. Queue<MoveItem> moveItems = new Queue<MoveItem>();
  1001. var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
  1002. var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
  1003. MoveItem moveItem = new MoveItem(0,0,moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex]-1, selectedHand);
  1004. moveItems.Enqueue(moveItem);
  1005. if ((int)PlaceSelectedModule > 3)
  1006. {
  1007. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPlace}", moveItems);
  1008. }
  1009. else
  1010. {
  1011. InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPlace}", moveItems);
  1012. }
  1013. }
  1014. private void OnHome()
  1015. {
  1016. InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.Home");
  1017. }
  1018. private void OnVent()
  1019. {
  1020. InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Vent}");
  1021. }
  1022. private void OnPump()
  1023. {
  1024. InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Pump}");
  1025. }
  1026. private void OnPurge()
  1027. {
  1028. InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Purge}");
  1029. }
  1030. private void OnModuleChecked(object obj)
  1031. {
  1032. m_ModuleCheckedName=obj.ToString();
  1033. }
  1034. private void OnAbort()
  1035. {
  1036. InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Abort}");
  1037. }
  1038. private void OnStartCycle()
  1039. {
  1040. if (CycleEnable == false)
  1041. {
  1042. return;
  1043. }
  1044. List<string> strings = new List<string>();
  1045. if (OriginalCycleSelectedItem != "")
  1046. {
  1047. strings.Add(OriginalCycleSelectedItem);
  1048. }
  1049. else
  1050. {
  1051. return;
  1052. }
  1053. if (PMAIsCycle==true)
  1054. {
  1055. strings.Add("PMA");
  1056. }
  1057. if (PMBIsCycle == true)
  1058. {
  1059. strings.Add("PMB");
  1060. }
  1061. if (PMCIsCycle == true)
  1062. {
  1063. strings.Add("PMC");
  1064. }
  1065. if (PMDIsCycle == true)
  1066. {
  1067. strings.Add("PMD");
  1068. }
  1069. if (ToCycleSelectedItem != "")
  1070. {
  1071. strings.Add(ToCycleSelectedItem);
  1072. }
  1073. else
  1074. {
  1075. return;
  1076. }
  1077. InvokeClient.Instance.Service.DoOperation("TMCycle.Start", strings.ToArray(),CycleCount);
  1078. }
  1079. private void OnStopCycle()
  1080. {
  1081. InvokeClient.Instance.Service.DoOperation("TMCycle.Abort");
  1082. }
  1083. private void OnSystemHome()
  1084. {
  1085. InvokeClient.Instance.Service.DoOperation("System.Home");
  1086. }
  1087. private void OnChamberDoorOpen(object obj)
  1088. {
  1089. InvokeClient.Instance.Service.DoOperation($"{obj?.ToString()}.SlitDoor.Open");
  1090. }
  1091. private void OnChamberDoorClose(object obj)
  1092. {
  1093. InvokeClient.Instance.Service.DoOperation($"{obj?.ToString()}.SlitDoor.Close");
  1094. }
  1095. #endregion
  1096. #region 私有方法
  1097. private void addDataKeys()
  1098. {
  1099. m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
  1100. m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
  1101. m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
  1102. m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
  1103. m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
  1104. m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
  1105. m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
  1106. m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
  1107. m_RtDataKeys.Add("TMCycle.CycleIndex");
  1108. }
  1109. //private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
  1110. //{
  1111. // InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
  1112. //}
  1113. //private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
  1114. //{
  1115. // InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
  1116. //}
  1117. //private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
  1118. //{
  1119. // InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
  1120. //}
  1121. #endregion
  1122. }
  1123. }