TMViewModel.cs 44 KB

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