OperationViewModelLPAB.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. using System.Collections.Generic;
  2. using System.Windows;
  3. using System.Windows.Controls;
  4. using Aitex.Core.Common;
  5. using Aitex.Core.UI.MVVM;
  6. using Aitex.Sorter.UI.Controls;
  7. using System.Windows.Input;
  8. using Aitex.Core.Util;
  9. using Aitex.Core.Utilities;
  10. using Aitex.Sorter.Common;
  11. using MECF.Framework.Common.OperationCenter;
  12. using MECF.Framework.Common.CommonData;
  13. using System;
  14. using EfemUI.Views.CarrierList;
  15. using MECF.Framework.Common.Equipment;
  16. using System.Collections.ObjectModel;
  17. using System.Linq;
  18. using Aitex.Sorter.UI.Controls.Common;
  19. namespace Aitex.Sorter.UI.ViewModel
  20. {
  21. class OperationViewModelLPAB : OperationMultiLPViewModel
  22. {
  23. #region CMD
  24. public ICommand StartCycleCommand { get; set; }
  25. public ICommand SetWaferSize3 { get; set; }
  26. public ICommand SetWaferSize4 { get; set; }
  27. public ICommand SetWaferSize6 { get; set; }
  28. public ICommand SetWaferSize8 { get; set; }
  29. public ICommand SetWaferThick { get; set; }
  30. public ICommand SetWaferThin { get; set; }
  31. public ICommand SetLPSlot13 { get; set; }
  32. public ICommand SetLPSlot25 { get; set; }
  33. public ICommand SetFFUCommand { get; set; }
  34. public ICommand SetTransCarrierTypeCommand { get; set; }
  35. public ICommand MapCommand { get; set; }
  36. public ICommand LoadCommand { get; set; }
  37. public ICommand UnloadCommand { get; set; }
  38. public ICommand ReadLPIDCommand { get; set; }
  39. #endregion
  40. public ObservableCollection<FoupListItem> BufferList { get; set; }
  41. public bool EnablePageControl
  42. {
  43. get { return !IsOnlineMode; }
  44. }
  45. [Subscription("System.Robot.CurrentReadSpeedData")]
  46. public int CurrentReadSpeedData { get; set; }
  47. [Subscription("FFU.FFU1Speed")]
  48. public int FFU1Speed { get; set; }
  49. [Subscription("System.IsOnlineMode")]
  50. public bool IsOnlineMode
  51. {
  52. get;
  53. set;
  54. }
  55. [Subscription("LP1.WaferSizeInfo")]
  56. public string WaferSize1 { get; set; }
  57. [Subscription("LP2.WaferSizeInfo")]
  58. public string WaferSize2 { get; set; }
  59. [Subscription("Aligner1.Aligner1.WaferSizeByWafer")]
  60. public string WaferSizeAligner1 { get; set; }
  61. [Subscription("Aligner2.Aligner2.WaferSizeByWafer")]
  62. public string WaferSizeAligner2 { get; set; }
  63. [Subscription("CoolingBuffer1.CoolingBuffer1.WaferSizeByWafer")]
  64. public string WaferSizeCoolingBuffer1 { get; set; }
  65. [Subscription("CoolingBuffer2.CoolingBuffer2.WaferSizeByWafer")]
  66. public string WaferSizeCoolingBuffer2 { get; set; }
  67. [Subscription("Buffer1.WaferSizeByWafer")]
  68. public string WaferSizeBuffer1 { get; set; }
  69. [Subscription("Buffer2.WaferSizeByWafer")]
  70. public string WaferSizeBuffer2 { get; set; }
  71. [Subscription("LL1.WaferSize")]
  72. public string WaferSizeLL1 { get; set; }
  73. [Subscription("LL2.WaferSize")]
  74. public string WaferSizeLL2 { get; set; }
  75. //[Subscription("Buffer1.WaferSize")]
  76. //public string WaferSizeBuffer1 { get; set; }
  77. //[Subscription("Buffer2.WaferSize")]
  78. //public string WaferSizeBuffer2 { get; set; }
  79. [Subscription("Robot.Blade1WaferSize")]
  80. public string WaferSizeRobot1 { get; set; }
  81. [Subscription("Robot.Blade2WaferSize")]
  82. public string WaferSizeRobot2 { get; set; }
  83. [Subscription("Robot.WaferSize")]
  84. public string WaferSizeRobot { get; set; }
  85. [Subscription("LP1.WaferThickness")]
  86. public string LP1WaferThickness { get; set; }
  87. [Subscription("LP2.WaferThickness")]
  88. public string LP2WaferThickness { get; set; }
  89. [Subscription("Cooling1.WaferThickness")]
  90. public string Cooling1WaferThickness { get; set; }
  91. [Subscription("Cooling2.WaferThickness")]
  92. public string Cooling2WaferThickness { get; set; }
  93. [Subscription("LL1.WaferThickness")]
  94. public string PMAWaferThickness { get; set; }
  95. [Subscription("LL2.WaferThickness")]
  96. public string PMBWaferThickness { get; set; }
  97. [Subscription("Buffer1.WaferThickness")]
  98. public string Buffer1WaferThickness { get; set; }
  99. [Subscription("Buffer2.WaferThickness")]
  100. public string Buffer2WaferThickness { get; set; }
  101. [Subscription("Aligner1.WaferThickness")]
  102. public string Aligner1WaferThickness { get; set; }
  103. [Subscription("Aligner2.WaferThickness")]
  104. public string Aligner2WaferThickness { get; set; }
  105. [Subscription("Upper.WaferThickness")]
  106. public string UpperWaferThickness { get; set; }
  107. [Subscription("Lower.WaferThickness")]
  108. public string LowerWaferThickness { get; set; }
  109. [Subscription("LP1.ValidSlotsNumber")]
  110. public int LP1ValidSlotsNumber { get; set; }
  111. [Subscription("LP2.ValidSlotsNumber")]
  112. public int LP2ValidSlotsNumber { get; set; }
  113. [Subscription("System.IsEnableBufferMap")]
  114. public bool IsBufferMapEnable { get; set; }
  115. [Subscription("System.IsEnableIdentifyThickness")]
  116. public bool IsEnableIdentifyThickness { get; set; }
  117. [Subscription("System.IsEnableMultiWaferSize")]
  118. public bool IsEnableMultiWaferSize { get; set; }
  119. [Subscription("System.IsEnableMultiWaferSizeShow")]
  120. public bool IsEnableMultiWaferSizeShow { get; set; }
  121. [Subscription("System.IsSlotShowOpposite")]
  122. public bool IsSlotShowOpposite { get; set; }
  123. public Visibility SlotShow2 => IsSlotShowOpposite ? Visibility.Hidden : Visibility.Visible;
  124. public Visibility SlotShow1 => !IsSlotShowOpposite ? Visibility.Hidden : Visibility.Visible;
  125. public Visibility EnableIdentifyThickness
  126. {
  127. get
  128. {
  129. if (IsEnableIdentifyThickness)
  130. return Visibility.Visible;
  131. return Visibility.Hidden;
  132. }
  133. }
  134. public Visibility EnableMultiWaferSize
  135. {
  136. get
  137. {
  138. if (IsEnableMultiWaferSize && IsEnableMultiWaferSizeShow)
  139. return Visibility.Visible;
  140. return Visibility.Hidden;
  141. }
  142. }
  143. [Subscription(ParamName.ModuleWaferList, DeviceName.CoolingBuffer1)]
  144. public WaferInfo[] CoolingBuffer1Wafers
  145. {
  146. get;
  147. set;
  148. }
  149. public WaferInfo CoolingBuffer1Wafer
  150. {
  151. get => CoolingBuffer1Wafers != null ? CoolingBuffer1Wafers[0] : null;
  152. }
  153. [Subscription(ParamName.ModuleWaferList, DeviceName.CoolingBuffer2)]
  154. public WaferInfo[] CoolingBuffer2Wafers
  155. {
  156. get;
  157. set;
  158. }
  159. public WaferInfo CoolingBuffer2Wafer
  160. {
  161. get => CoolingBuffer2Wafers != null ? CoolingBuffer2Wafers[0] : null;
  162. }
  163. [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner1)]
  164. public WaferInfo[] Aligner1Wafers
  165. {
  166. get;
  167. set;
  168. }
  169. public WaferInfo Aligner1Wafer
  170. {
  171. get => Aligner1Wafers != null ? Aligner1Wafers[0] : null;
  172. }
  173. [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner2)]
  174. public WaferInfo[] Aligner2Wafers
  175. {
  176. get;
  177. set;
  178. }
  179. public WaferInfo Aligner2Wafer
  180. {
  181. get => Aligner2Wafers != null ? Aligner2Wafers[0] : null;
  182. }
  183. [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer)]
  184. public WaferInfo[] LlbWaferInfo
  185. {
  186. get
  187. {
  188. return BufferList.Count >= 1 ? BufferList[0].WaferInfos : null;
  189. }
  190. set => UpdateBufferWafers(value, 0);
  191. }
  192. [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer1)]
  193. public WaferInfo[] LlbWaferInfo1
  194. {
  195. get
  196. {
  197. return BufferList.Count >= 2 ? BufferList[1].WaferInfos : null;
  198. }
  199. set => UpdateBufferWafers(value, 1);
  200. }
  201. [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer2)]
  202. public WaferInfo[] LlbWaferInfo2
  203. {
  204. get
  205. {
  206. return BufferList.Count >= 3 ? BufferList[2].WaferInfos : null;
  207. }
  208. set => UpdateBufferWafers(value, 2);
  209. }
  210. [Subscription("ValidSlotsNumber", DeviceName.Buffer)]
  211. public int ValidSlotsNum
  212. {
  213. get
  214. {
  215. return BufferList.Count >= 1 ? BufferList[0].SlotCount : 0;
  216. }
  217. set
  218. {
  219. if (BufferList.Count >= 1) BufferList[0].SlotCount = value;
  220. }
  221. }
  222. [Subscription("ValidSlotsNumber", DeviceName.Buffer1)]
  223. public int ValidSlotsNum1
  224. {
  225. get
  226. {
  227. return BufferList.Count >= 2 ? BufferList[1].SlotCount : 0;
  228. }
  229. set
  230. {
  231. if (BufferList.Count >= 2) BufferList[1].SlotCount = value;
  232. }
  233. }
  234. [Subscription("ValidSlotsNumber", DeviceName.Buffer2)]
  235. public int ValidSlotsNum2
  236. {
  237. get
  238. {
  239. return BufferList.Count >= 3 ? BufferList[2].SlotCount : 0;
  240. }
  241. set
  242. {
  243. if(BufferList.Count >= 3) BufferList[2].SlotCount = value;
  244. }
  245. }
  246. /// <summary>
  247. /// Update Buffer WaferInfos
  248. /// </summary>
  249. /// <param name="sourceWaferInfos"></param>
  250. /// <param name="index"></param>
  251. private void UpdateBufferWafers(WaferInfo[] sourceWaferInfos, int index)
  252. {
  253. WaferInfo[] wafers;
  254. if (IsSlotShowOpposite)
  255. {
  256. wafers = UpdateWaferInfo(sourceWaferInfos.ToArray());
  257. }
  258. else
  259. {
  260. wafers = UpdateWaferInfo(sourceWaferInfos.Reverse().ToArray());
  261. }
  262. if (BufferList.Count < index + 1) return;
  263. if (index == 0)
  264. {
  265. BufferList[index].IsShow = BufferEnable;
  266. }
  267. else if (index == 1)
  268. {
  269. BufferList[index].IsShow = Buffer1Enable;
  270. }
  271. else if (index == 2)
  272. {
  273. BufferList[index].IsShow = Buffer2Enable;
  274. }
  275. if (BufferList[index].WaferInfos == null)
  276. {
  277. BufferList[index].WaferInfos = wafers;
  278. }
  279. else
  280. {
  281. for (int i = 0; i < BufferList[index].WaferInfos.Length; i++)
  282. {
  283. BufferList[index].WaferInfos[i].Update(wafers[i]);
  284. }
  285. }
  286. }
  287. #region Cycle
  288. [IgnorePropertyChange]
  289. public ComboBoxItem CycleFrom { get; set; }
  290. [IgnorePropertyChange]
  291. public ComboBoxItem CycleTo { get; set; }
  292. [IgnorePropertyChange]
  293. public bool Ll1IsChecked { get; set; }
  294. [IgnorePropertyChange]
  295. public bool Ll2IsChecked { get; set; }
  296. [IgnorePropertyChange]
  297. public bool Ll3IsChecked { get; set; }
  298. [IgnorePropertyChange]
  299. public bool Ll4IsChecked { get; set; }
  300. [IgnorePropertyChange]
  301. public bool Ll5IsChecked { get; set; }
  302. [IgnorePropertyChange]
  303. public bool Ll6IsChecked { get; set; }
  304. [IgnorePropertyChange]
  305. public bool Ll7IsChecked { get; set; }
  306. [IgnorePropertyChange]
  307. public bool Ll8IsChecked { get; set; }
  308. [IgnorePropertyChange]
  309. public bool CoolingBuffer1IsChecked { get; set; }
  310. [IgnorePropertyChange]
  311. public bool CoolingBuffer2IsChecked { get; set; }
  312. [IgnorePropertyChange]
  313. public bool Aligner1IsChecked { get; set; }
  314. [IgnorePropertyChange]
  315. public bool Aligner2IsChecked { get; set; }
  316. [IgnorePropertyChange]
  317. public bool BufferIsChecked { get; set; }
  318. [IgnorePropertyChange]
  319. public bool Buffer1IsChecked { get; set; }
  320. [IgnorePropertyChange]
  321. public bool Buffer2IsChecked { get; set; }
  322. #endregion
  323. #region Moudle Enable Flag
  324. [Subscription("LP1.IsEnable")]
  325. public bool LP1Enable { get; set; }
  326. [Subscription("LP2.IsEnable")]
  327. public bool LP2Enable { get; set; }
  328. [Subscription("Aligner1.IsEnable")]
  329. public bool Aligner1Enable { get; set; }
  330. [Subscription("Aligner2.IsEnable")]
  331. public bool Aligner2Enable { get; set; }
  332. [Subscription("Buffer.IsEnable")]
  333. public bool BufferEnable { get; set; }
  334. [Subscription("Buffer1.IsEnable")]
  335. public bool Buffer1Enable { get; set; }
  336. [Subscription("Buffer2.IsEnable")]
  337. public bool Buffer2Enable { get; set; }
  338. [Subscription("PMA.IsEnable")]
  339. public bool PMAEnable { get; set; }
  340. [Subscription("PMB.IsEnable")]
  341. public bool PMBEnable { get; set; }
  342. [Subscription("CoolingBuffer1.IsEnable")]
  343. public bool CoolingBuffer1Enable { get; set; }
  344. [Subscription("CoolingBuffer2.IsEnable")]
  345. public bool CoolingBuffer2Enable { get; set; }
  346. #endregion
  347. public Visibility ServerVisibility { get; set; }
  348. [Subscription("System.Robot.IsLeftArmPressureSensorON")]
  349. public bool IsLeftArmPressureSensorON
  350. {
  351. get; set;
  352. }
  353. [Subscription("System.Robot.IsRightArmPressureSensorON")]
  354. public bool IsRightArmPressureSensorON
  355. {
  356. get; set;
  357. }
  358. [Subscription("LP1.InfoPadCarrierTypeInformation")]
  359. public string LP1CarrierType
  360. {
  361. get => _lp1CarrierType;
  362. set => _lp1CarrierType = value;
  363. }
  364. private string _lp1CarrierType;
  365. [Subscription("LP2.InfoPadCarrierTypeInformation")]
  366. public string LP2CarrierType
  367. {
  368. get => _lp2CarrierType;
  369. set => _lp2CarrierType = value;
  370. }
  371. private string _lp2CarrierType;
  372. [Subscription("LP3.InfoPadCarrierTypeInformation")]
  373. public string LP3CarrierType
  374. {
  375. get => _lp3CarrierType;
  376. set => _lp3CarrierType = value;
  377. }
  378. private string _lp3CarrierType;
  379. [Subscription("LP1.IsAutoDetectCarrierType")]
  380. public bool LP1IsAutoDetectCarrierType { get; set; }
  381. [Subscription("LP2.IsAutoDetectCarrierType")]
  382. public bool LP2IsAutoDetectCarrierType { get; set; }
  383. [Subscription("LP3.IsAutoDetectCarrierType")]
  384. public bool LP3IsAutoDetectCarrierType { get; set; }
  385. [Subscription("LP1.ValidCarrierTypeList")]
  386. public Tuple<int, string>[] LP1ValidCarrierTypeList { get; set; }
  387. [Subscription("LP2.ValidCarrierTypeList")]
  388. public Tuple<int, string>[] LP2ValidCarrierTypeList { get; set; }
  389. [Subscription("LP3.ValidCarrierTypeList")]
  390. public Tuple<int, string>[] LP3ValidCarrierTypeList { get; set; }
  391. [Subscription("System.IsNoRunning")]
  392. public bool IsNoRunning { get; set; }
  393. public bool IsShowLP1CarrierType
  394. {
  395. get
  396. { return !LP1IsAutoDetectCarrierType; }
  397. }
  398. public bool IsShowLP2CarrierType
  399. {
  400. get
  401. { return !LP2IsAutoDetectCarrierType; }
  402. }
  403. public bool IsShowLP3CarrierType
  404. {
  405. get
  406. { return !LP3IsAutoDetectCarrierType; }
  407. }
  408. public Thickness _PMThickness = new Thickness(0, 0, 0, 0);
  409. public Thickness PMThickness
  410. {
  411. get
  412. {
  413. if (!IsEnableIdentifyThickness && !IsEnableMultiWaferSize)
  414. {
  415. _PMThickness.Left = 0;
  416. _PMThickness.Top = -100;
  417. _PMThickness.Right = 0;
  418. _PMThickness.Bottom = 0;
  419. }
  420. else if (!IsEnableIdentifyThickness && IsEnableMultiWaferSize && !IsEnableMultiWaferSizeShow)
  421. {
  422. _PMThickness.Left = 0;
  423. _PMThickness.Top = -100;
  424. _PMThickness.Right = 0;
  425. _PMThickness.Bottom = 0;
  426. }
  427. else
  428. {
  429. _PMThickness.Left = 680;
  430. _PMThickness.Top = 645;
  431. _PMThickness.Right = 0;
  432. _PMThickness.Bottom = 50;
  433. }
  434. return _PMThickness;
  435. }
  436. }
  437. public Thickness _RobotThickness = new Thickness(0, 0, 0, 0);
  438. public Thickness RobotThickness
  439. {
  440. get
  441. {
  442. if (!IsEnableIdentifyThickness && !IsEnableMultiWaferSize)
  443. {
  444. _RobotThickness.Left = 0;
  445. _RobotThickness.Top = 300;
  446. _RobotThickness.Right = 0;
  447. _RobotThickness.Bottom = 0;
  448. }
  449. else if (!IsEnableIdentifyThickness && IsEnableMultiWaferSize && !IsEnableMultiWaferSizeShow)
  450. {
  451. _RobotThickness.Left = 0;
  452. _RobotThickness.Top = 300;
  453. _RobotThickness.Right = 0;
  454. _RobotThickness.Bottom = 0;
  455. }
  456. else
  457. {
  458. _RobotThickness.Left = 10;
  459. _RobotThickness.Top = 633;
  460. _RobotThickness.Right = 0;
  461. _RobotThickness.Bottom = 10;
  462. }
  463. return _RobotThickness;
  464. }
  465. }
  466. /// <summary>
  467. /// Update LoadPort WaferInfo
  468. /// </summary>
  469. /// <param name="sourceWaferInfos"></param>
  470. /// <param name="index"></param>
  471. public override void UpdateWafers(WaferInfo[] sourceWaferInfos, int index)
  472. {
  473. if (IsSlotShowOpposite)
  474. {
  475. var wafers = UpdateWaferInfo(sourceWaferInfos);
  476. if(sourceWaferInfos == null) return;
  477. if(index == 0 && FoupList[index] != null)
  478. {
  479. FoupList[index].IsShow = LP1Enable;
  480. }
  481. if (FoupList[index].WaferInfos == null)
  482. {
  483. FoupList[index].WaferInfos = wafers;
  484. }
  485. else
  486. {
  487. for (int i = 0; i < FoupList[index].WaferInfos.Length; i++)
  488. {
  489. FoupList[index].WaferInfos[i].Update(wafers[i]);
  490. }
  491. }
  492. }
  493. else
  494. {
  495. var wafers = UpdateWaferInfo(sourceWaferInfos.Reverse().ToArray());
  496. if (sourceWaferInfos == null) return;
  497. if (index == 0 && FoupList[index] != null)
  498. {
  499. FoupList[index].IsShow = LP1Enable;
  500. }
  501. if (FoupList[index].WaferInfos == null)
  502. {
  503. FoupList[index].WaferInfos = wafers;
  504. }
  505. else
  506. {
  507. for (int i = 0; i < FoupList[index].WaferInfos.Length; i++)
  508. {
  509. FoupList[index].WaferInfos[i].Update(wafers[i]);
  510. }
  511. }
  512. }
  513. }
  514. public OperationViewModelLPAB() : base(1)
  515. {
  516. WaferTransferOptionCommand = new DelegateCommand<WaferTransferOption>(BeforeTransfer);
  517. SetWaferSize3 = new DelegateCommand<string>(PerformSetWaferSize3);
  518. SetWaferSize4 = new DelegateCommand<string>(PerformSetWaferSize4);
  519. SetWaferSize6 = new DelegateCommand<string>(PerformSetWaferSize6);
  520. SetWaferSize8 = new DelegateCommand<string>(PerformSetWaferSize8);
  521. SetWaferThick = new DelegateCommand<string>(PerformSetWaferThick);
  522. SetWaferThin = new DelegateCommand<string>(PerformSetWaferThin);
  523. SetLPSlot13 = new DelegateCommand<string>(PerformSetSlot13);
  524. SetLPSlot25 = new DelegateCommand<string>(PerformSetSlot25);
  525. StartCycleCommand = new DelegateCommand<object>(StartCycle);
  526. SetFFUCommand = new DelegateCommand<string>(SetFFUSpeed);
  527. MapCommand = new DelegateCommand<DependencyObject>(DoMap);
  528. LoadCommand = new DelegateCommand<DependencyObject>(DoLoad);
  529. UnloadCommand = new DelegateCommand<DependencyObject>(DoUnload);
  530. SetTransCarrierTypeCommand = new DelegateCommand<string>(SetTransCarrierType);
  531. }
  532. protected void DoMap(DependencyObject sender)
  533. {
  534. var command = CommandHelper.GetCommandItem(sender);
  535. InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);
  536. }
  537. protected void DoLoad(DependencyObject sender)
  538. {
  539. var command = CommandHelper.GetCommandItem(sender);
  540. InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);
  541. }
  542. protected void DoUnload(DependencyObject sender)
  543. {
  544. var command = CommandHelper.GetCommandItem(sender);
  545. InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);
  546. }
  547. private void SetTransCarrierType(string obj)
  548. {
  549. var LPName = obj;
  550. Tuple<int, string>[] input = null;
  551. switch (LPName)
  552. {
  553. case "LP1":
  554. input = LP1ValidCarrierTypeList;
  555. break;
  556. case "LP2":
  557. input = LP2ValidCarrierTypeList;
  558. break;
  559. case "LP3":
  560. input = LP3ValidCarrierTypeList;
  561. break;
  562. default:
  563. break;
  564. }
  565. // Tuple<int, string>[] tempTuple = new Tuple<int, string>[] { Tuple.Create(0, "CarrierType0"), Tuple.Create(1, "CarrierType1") };
  566. if (input == null)
  567. {
  568. MessageBox.Show($"{LPName}ValidCarrierTypeList is null", "Value Null");
  569. }
  570. else
  571. {
  572. var SelectCarrierTypeDialog = new SelectCarrierTypeDialog(input);
  573. if ((bool)SelectCarrierTypeDialog.ShowDialog())
  574. {
  575. InvokeClient.Instance.Service.DoOperation($"{LPName}.SetInfoPadIndex", SelectCarrierTypeDialog.SelectIndex);
  576. }
  577. }
  578. }
  579. private void SetFFUSpeed(string obj)
  580. {
  581. InvokeClient.Instance.Service.DoOperation($"FFU.SetSpeed", new object[] { obj });
  582. }
  583. private void PerformSetSlot13(string obj)
  584. {
  585. InvokeClient.Instance.Service.DoOperation("System.SetSlot13", obj);
  586. }
  587. private void PerformSetSlot25(string obj)
  588. {
  589. InvokeClient.Instance.Service.DoOperation("System.SetSlot25", obj);
  590. }
  591. private void PerformSetWaferSize8(string obj)
  592. {
  593. InvokeClient.Instance.Service.DoOperation("System.SetWaferSize8", obj);
  594. }
  595. private void PerformSetWaferSize6(string obj)
  596. {
  597. InvokeClient.Instance.Service.DoOperation("System.SetWaferSize6", obj);
  598. }
  599. private void PerformSetWaferSize4(string obj)
  600. {
  601. InvokeClient.Instance.Service.DoOperation("System.SetWaferSize4", obj);
  602. }
  603. private void PerformSetWaferSize3(string obj)
  604. {
  605. InvokeClient.Instance.Service.DoOperation("System.SetWaferSize3", obj);
  606. }
  607. private void PerformSetWaferThick(string obj)
  608. {
  609. InvokeClient.Instance.Service.DoOperation("System.SetWaferThick", obj);
  610. }
  611. private void PerformSetWaferThin(string obj)
  612. {
  613. InvokeClient.Instance.Service.DoOperation("System.SetWaferThin", obj);
  614. }
  615. private void StartCycle(object obj)
  616. {
  617. if (CycleFrom == null || CycleTo == null)
  618. return;
  619. List<string> _lstPassThrough = new List<string>()
  620. {
  621. };
  622. if (Aligner1IsChecked)
  623. _lstPassThrough.Add("Aligner1");
  624. if (Aligner2IsChecked)
  625. _lstPassThrough.Add("Aligner2");
  626. if (Ll1IsChecked)
  627. _lstPassThrough.Add("LL1");
  628. if (Ll2IsChecked)
  629. _lstPassThrough.Add("LL2");
  630. if (BufferIsChecked)
  631. _lstPassThrough.Add("Buffer");
  632. if (Buffer1IsChecked)
  633. _lstPassThrough.Add("Buffer1");
  634. if (Buffer2IsChecked)
  635. _lstPassThrough.Add("Buffer2");
  636. if (CoolingBuffer1IsChecked)
  637. _lstPassThrough.Add("CoolingBuffer1");
  638. if (CoolingBuffer2IsChecked)
  639. _lstPassThrough.Add("CoolingBuffer2");
  640. if (obj.ToString() == "Cycle")
  641. {
  642. InvokeClient.Instance.Service.DoOperation("System.StartCycle", new object[] {(string)CycleFrom.Content,
  643. (string)CycleTo.Content, _lstPassThrough.ToArray()
  644. });
  645. }
  646. //else if (obj.ToString() == "Benchmark")
  647. //{
  648. // InvokeClient.Instance.Service.DoOperation("Benchmark", paramsArgs);
  649. //}
  650. }
  651. public ICommand WaferTransferOptionCommand
  652. {
  653. get; set;
  654. }
  655. protected virtual void BeforeTransfer(WaferTransferOption option)
  656. {
  657. option.Setting.ShowAlign = false;
  658. option.Setting.ShowLaserMarker = false;
  659. option.Setting.ShowT7Code = false;
  660. //option.Setting.ShowBlade = false;
  661. }
  662. protected override void InitFoupList()
  663. {
  664. base.InitFoupList();
  665. FoupList[0].FoupType = Controls.FoupType.Loadport;
  666. InitBufferList(1);
  667. BufferList[0].FoupType = Controls.FoupType.NoButton;
  668. }
  669. protected readonly ModuleName[] bufferSet = new ModuleName[]
  670. {
  671. ModuleName.Buffer,
  672. ModuleName.Buffer1,
  673. ModuleName.Buffer2,
  674. };
  675. public void InitBufferList(int bufferCount)
  676. {
  677. BufferList = new ObservableCollection<FoupListItem>();
  678. for (var i = 0; i < bufferCount; i++)
  679. {
  680. var foupListItem = new FoupListItem
  681. {
  682. DeviceName = bufferSet[i].ToString(),
  683. CarrierName = bufferSet[i].ToString(),
  684. CarrierMode = LoadPortCarrierMode.Loader,
  685. Station = bufferSet[i],
  686. IsShow = true
  687. };
  688. BufferList.Add(foupListItem);
  689. }
  690. }
  691. protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
  692. {
  693. //ServerVisibility = ((bool)QueryDataClient.Instance.Service.GetConfig("System.EfemServerEnable")) ? Visibility.Visible : Visibility.Hidden;
  694. //data[UIKey(UnitName.LoadportA.ToString(), ParamName.FoupDoorState)] = FoupDoorState.Close;
  695. base.InvokeBeforeUpdateProperty(data);
  696. }
  697. }
  698. }