EFEM2LPJetAB.xaml.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. using Aitex.Core.Common;
  2. using Aitex.Core.Util;
  3. using Aitex.Sorter.Common;
  4. using Aitex.Sorter.UI.Controls;
  5. using MECF.Framework.Common.CommonData;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Diagnostics;
  9. using System.Windows;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Media.Media3D;
  12. namespace EfemUI.Controls
  13. {
  14. /// <summary>
  15. /// EFEM2LPJet.xaml 的交互逻辑
  16. /// </summary>
  17. public partial class EFEM2LPJetAB : EFEMBase
  18. {
  19. public EFEM2LPJetAB()
  20. {
  21. InitializeComponent();
  22. root.DataContext = this;
  23. }
  24. public bool IsEnableTextMenu
  25. {
  26. get { return (bool)GetValue(IsEnableTextMenuProperty); }
  27. set { SetValue(IsEnableTextMenuProperty, value); }
  28. }
  29. // Using a DependencyProperty as the backing store for IsEnableTextMenu. This enables animation, styling, binding, etc...
  30. public static readonly DependencyProperty IsEnableTextMenuProperty =
  31. DependencyProperty.Register("IsEnableTextMenu", typeof(bool), typeof(EFEM2LPJetAB), new PropertyMetadata(true));
  32. public WaferInfo Aligner1Wafer
  33. {
  34. get { return (WaferInfo)GetValue(Aligner1WaferProperty); }
  35. set { SetValue(Aligner1WaferProperty, value); }
  36. }
  37. // Using a DependencyProperty as the backing store for Aligner1Wafer. This enables animation, styling, binding, etc...
  38. public static readonly DependencyProperty Aligner1WaferProperty =
  39. DependencyProperty.Register("Aligner1Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
  40. public WaferInfo Aligner2Wafer
  41. {
  42. get { return (WaferInfo)GetValue(Aligner2WaferProperty); }
  43. set { SetValue(Aligner2WaferProperty, value); }
  44. }
  45. // Using a DependencyProperty as the backing store for Aligner2Wafer. This enables animation, styling, binding, etc...
  46. public static readonly DependencyProperty Aligner2WaferProperty =
  47. DependencyProperty.Register("Aligner2Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
  48. public WaferInfo CoolingBuffer1Wafer
  49. {
  50. get { return (WaferInfo)GetValue(CoolingBuffer1WaferProperty); }
  51. set { SetValue(CoolingBuffer1WaferProperty, value); }
  52. }
  53. // Using a DependencyProperty as the backing store for CoolingBuffer1Wafer. This enables animation, styling, binding, etc...
  54. public static readonly DependencyProperty CoolingBuffer1WaferProperty =
  55. DependencyProperty.Register("CoolingBuffer1Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
  56. public WaferInfo CoolingBuffer2Wafer
  57. {
  58. get { return (WaferInfo)GetValue(CoolingBuffer2WaferProperty); }
  59. set { SetValue(CoolingBuffer2WaferProperty, value); }
  60. }
  61. // Using a DependencyProperty as the backing store for CoolingBuffer2Wafer. This enables animation, styling, binding, etc...
  62. public static readonly DependencyProperty CoolingBuffer2WaferProperty =
  63. DependencyProperty.Register("CoolingBuffer2Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
  64. public WaferInfo FlipperWafer
  65. {
  66. get { return (WaferInfo)GetValue(FlipperWaferProperty); }
  67. set { SetValue(FlipperWaferProperty, value); }
  68. }
  69. // Using a DependencyProperty as the backing store for FlipperWafer. This enables animation, styling, binding, etc...
  70. public static readonly DependencyProperty FlipperWaferProperty =
  71. DependencyProperty.Register("FlipperWafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
  72. public WaferDisplayMode WaferIDDisplayMode
  73. {
  74. get { return (WaferDisplayMode)GetValue(WaferDisplayModeProperty); }
  75. set { SetValue(WaferDisplayModeProperty, value); }
  76. }
  77. // Using a DependencyProperty as the backing store for WaferIDDisplayMode. This enables animation, styling, binding, etc...
  78. public static readonly DependencyProperty WaferDisplayModeProperty =
  79. DependencyProperty.Register("WaferIDDisplayMode", typeof(WaferDisplayMode), typeof(EFEM2LPJetAB), new PropertyMetadata(WaferDisplayMode.None));
  80. [Subscription("CoolingBuffer1Disable", "System")]
  81. public bool CoolingBuffer1Disable
  82. {
  83. get;
  84. set;
  85. }
  86. [Subscription("CoolingBuffer2Disable", "System")]
  87. public bool CoolingBuffer2Disable
  88. {
  89. get;
  90. set;
  91. }
  92. [Subscription("Aligner1Disable", "System")]
  93. public bool Aligner1Disable
  94. {
  95. get;
  96. set;
  97. }
  98. [Subscription("Aligner2Disable", "System")]
  99. public bool Aligner2Disable
  100. {
  101. get;
  102. set;
  103. }
  104. [Subscription("RobotMoveInfo", "Robot")]
  105. public RobotMoveInfo RobotMoveInfo
  106. {
  107. get;
  108. set;
  109. }
  110. public override Dictionary<string, StationPosition> StationPosition
  111. {
  112. get
  113. {
  114. return new Dictionary<string, StationPosition>
  115. {
  116. { "ArmA.System",new StationPosition()
  117. {
  118. StartPosition= new RobotPosition()
  119. {
  120. X=0,
  121. Root=155,
  122. Arm=240,
  123. Hand=236
  124. },
  125. EndPosition= new RobotPosition()
  126. {
  127. Root=155,
  128. Arm=240,
  129. Hand=236
  130. }
  131. }
  132. },
  133. { "ArmB.System",new StationPosition()
  134. {
  135. StartPosition= new RobotPosition()
  136. {
  137. X=0,
  138. Root=25,
  139. Arm=120,
  140. Hand=484
  141. },
  142. EndPosition= new RobotPosition()
  143. {
  144. Root=25,
  145. Arm=120,
  146. Hand=484
  147. }
  148. }
  149. },
  150. { "ArmA.LP1",new StationPosition()
  151. {
  152. StartPosition= new RobotPosition()
  153. {
  154. X=0,
  155. Root=228,
  156. Arm=179,
  157. Hand=67
  158. },
  159. EndPosition= new RobotPosition()
  160. {
  161. Root=189,
  162. Arm=225,
  163. Hand=52
  164. }
  165. }
  166. },
  167. { "ArmB.LP1",new StationPosition()
  168. {
  169. StartPosition= new RobotPosition()
  170. {
  171. X=0,
  172. Root=13,
  173. Arm=173,
  174. Hand=281
  175. },
  176. EndPosition= new RobotPosition()
  177. {
  178. Root=37,
  179. Arm=131,
  180. Hand=302
  181. }
  182. }
  183. },
  184. { "ArmA.LP2",new StationPosition()
  185. {
  186. StartPosition= new RobotPosition()
  187. {
  188. X=0,
  189. Root=159,
  190. Arm=187,
  191. Hand=93
  192. },
  193. EndPosition= new RobotPosition()
  194. {
  195. Root=147,
  196. Arm=227,
  197. Hand=61
  198. }
  199. }
  200. },
  201. { "ArmB.LP2",new StationPosition()
  202. {
  203. StartPosition= new RobotPosition()
  204. {
  205. X=0,
  206. Root=-33,
  207. Arm=178,
  208. Hand=286
  209. },
  210. EndPosition= new RobotPosition()
  211. {
  212. Root=-5,
  213. Arm=140,
  214. Hand=301
  215. }
  216. }
  217. },
  218. { "ArmA.Flipper",new StationPosition()
  219. {
  220. StartPosition= new RobotPosition()
  221. {
  222. X=0,
  223. Root=291,
  224. Arm=187,
  225. Hand=88
  226. },
  227. EndPosition= new RobotPosition()
  228. {
  229. Root=277,
  230. Arm=230,
  231. Hand=58
  232. }
  233. }
  234. },
  235. { "ArmB.Flipper",new StationPosition()
  236. {
  237. StartPosition= new RobotPosition()
  238. {
  239. X=0,
  240. Root=87,
  241. Arm=166,
  242. Hand=307
  243. },
  244. EndPosition= new RobotPosition()
  245. {
  246. Root=129,
  247. Arm=117,
  248. Hand=318
  249. }
  250. }
  251. },
  252. { "ArmA.CoolingBuffer1",new StationPosition()
  253. {
  254. StartPosition= new RobotPosition()//取完
  255. {
  256. X=0,
  257. Root=265,
  258. Arm=192,
  259. Hand=76
  260. },
  261. EndPosition= new RobotPosition()//去取
  262. {
  263. Root=258,
  264. Arm=228,
  265. Hand=50
  266. }
  267. }
  268. },
  269. { "ArmB.CoolingBuffer1",new StationPosition()
  270. {
  271. StartPosition= new RobotPosition()
  272. {
  273. X=0,
  274. Root=99,
  275. Arm=150,
  276. Hand=284
  277. },
  278. EndPosition= new RobotPosition()
  279. {
  280. Root=111,
  281. Arm=120,
  282. Hand=301
  283. }
  284. }
  285. },
  286. { "ArmA.CoolingBuffer2",new StationPosition()
  287. {
  288. StartPosition= new RobotPosition()
  289. {
  290. X=0,
  291. Root=255,
  292. Arm=200,
  293. Hand=55
  294. },
  295. EndPosition= new RobotPosition()
  296. {
  297. Root=230,
  298. Arm=235,
  299. Hand=45
  300. }
  301. }
  302. },
  303. { "ArmB.CoolingBuffer2",new StationPosition()
  304. {
  305. StartPosition= new RobotPosition()
  306. {
  307. X=0,
  308. Root=55,
  309. Arm=150,
  310. Hand=309
  311. },
  312. EndPosition= new RobotPosition()
  313. {
  314. Root=84,
  315. Arm=110,
  316. Hand=322
  317. }
  318. }
  319. },
  320. { "ArmA.Aligner1",new StationPosition()
  321. {
  322. StartPosition= new RobotPosition()
  323. {
  324. X=0,
  325. Root=95,
  326. Arm=200,
  327. Hand=66
  328. },
  329. EndPosition= new RobotPosition()
  330. {
  331. Root=75,
  332. Arm=230,
  333. Hand=57
  334. }
  335. }
  336. },
  337. { "ArmB.Aligner1",new StationPosition()
  338. {
  339. StartPosition= new RobotPosition()
  340. {
  341. X=0,
  342. Root=-100,
  343. Arm=172,
  344. Hand=290
  345. },
  346. EndPosition= new RobotPosition()
  347. {
  348. Root=-80,
  349. Arm=142,
  350. Hand=300
  351. }
  352. }
  353. },
  354. { "ArmA.Aligner2",new StationPosition()
  355. {
  356. StartPosition= new RobotPosition()
  357. {
  358. X=0,
  359. Root=132,
  360. Arm=205,
  361. Hand=49
  362. },
  363. EndPosition= new RobotPosition()
  364. {
  365. Root=88,
  366. Arm=250,
  367. Hand=49
  368. }
  369. }
  370. },
  371. { "ArmB.Aligner2",new StationPosition()
  372. {
  373. StartPosition= new RobotPosition()
  374. {
  375. X=0,
  376. Root=-81,
  377. Arm=164,
  378. Hand=304
  379. },
  380. EndPosition= new RobotPosition()
  381. {
  382. Root=-37,
  383. Arm=115,
  384. Hand=310
  385. }
  386. }
  387. },
  388. { "ArmA.Buffer",new StationPosition()
  389. {
  390. StartPosition= new RobotPosition()
  391. {
  392. X=0,
  393. Root=78,
  394. Arm=198,
  395. Hand=55
  396. },
  397. EndPosition= new RobotPosition()
  398. {
  399. Root=46,
  400. Arm=243,
  401. Hand=48
  402. }
  403. }
  404. },
  405. { "ArmB.Buffer",new StationPosition()
  406. {
  407. StartPosition= new RobotPosition()
  408. {
  409. X=0,
  410. Root=-126,
  411. Arm=173,
  412. Hand=278
  413. },
  414. EndPosition= new RobotPosition()
  415. {
  416. Root=-104,
  417. Arm=132,
  418. Hand=307
  419. }
  420. }
  421. },
  422. { "ArmA.LL1",new StationPosition()
  423. {
  424. StartPosition= new RobotPosition()
  425. {
  426. X=0,
  427. Root=79,
  428. Arm=141,
  429. Hand=410
  430. },
  431. EndPosition= new RobotPosition()
  432. {
  433. Root=143,
  434. Arm=130,
  435. Hand=357
  436. }
  437. }
  438. },
  439. { "ArmB.LL1",new StationPosition()
  440. {
  441. StartPosition= new RobotPosition()
  442. {
  443. X=0,
  444. Root=87,
  445. Arm=130,
  446. Hand=413
  447. },
  448. EndPosition= new RobotPosition()
  449. {
  450. Root=137,
  451. Arm=122,
  452. Hand=371
  453. }
  454. }
  455. },
  456. { "ArmA.LL2",new StationPosition()
  457. {
  458. StartPosition= new RobotPosition()
  459. {
  460. X=0,
  461. Root=73,
  462. Arm=220,
  463. Hand=337
  464. },
  465. EndPosition= new RobotPosition()
  466. {
  467. Root=24,
  468. Arm=236,
  469. Hand=370
  470. }
  471. }
  472. },
  473. { "ArmB.LL2",new StationPosition()
  474. {
  475. StartPosition= new RobotPosition()
  476. {
  477. X=0,
  478. Root=99,
  479. Arm=205,
  480. Hand=326
  481. },
  482. EndPosition= new RobotPosition()
  483. {
  484. Root=26,
  485. Arm=226,
  486. Hand=377
  487. }
  488. }
  489. }
  490. };
  491. }
  492. }
  493. [Subscription("Aligner1.IsEnable")]
  494. public bool Aligner1Enable
  495. {
  496. get;
  497. set;
  498. }
  499. [Subscription("Aligner2.IsEnable")]
  500. public bool Aligner2Enable
  501. {
  502. get;
  503. set;
  504. }
  505. [Subscription("Buffer.IsEnable")]
  506. public bool BufferEnable
  507. {
  508. get;
  509. set;
  510. }
  511. [Subscription("PMA.IsEnable")]
  512. public bool PMAEnable
  513. {
  514. get;
  515. set;
  516. }
  517. [Subscription("PMB.IsEnable")]
  518. public bool PMBEnable
  519. {
  520. get;
  521. set;
  522. }
  523. [Subscription("LP1.IsEnable")]
  524. public bool LP1Enable
  525. {
  526. get;
  527. set;
  528. }
  529. [Subscription("LP2.IsEnable")]
  530. public bool LP2Enable
  531. {
  532. get;
  533. set;
  534. }
  535. [Subscription("Flipper.IsEnable")]
  536. public bool FlipperEnable
  537. {
  538. get;
  539. set;
  540. }
  541. [Subscription("CoolingBuffer1.IsEnable")]
  542. public bool CoolingBuffer1Enable
  543. {
  544. get;
  545. set;
  546. }
  547. [Subscription("CoolingBuffer2.IsEnable")]
  548. public bool CoolingBuffer2Enable
  549. {
  550. get;
  551. set;
  552. }
  553. [Subscription("System.IsPMADoorOpen")]
  554. public bool IsPMADoorOpen
  555. {
  556. get;
  557. set;
  558. }
  559. [Subscription("System.IsPMBDoorOpen")]
  560. public bool IsPMBDoorOpen
  561. {
  562. get;
  563. set;
  564. }
  565. private bool _isFlipperOverOrigin;
  566. [Subscription("Flipper.IsFlipperOverOrigin")]
  567. public bool IsFlipperOverOrigin
  568. {
  569. get => _isFlipperOverOrigin;
  570. set
  571. {
  572. if (_isFlipperOverOrigin != value)
  573. {
  574. _isFlipperOverOrigin = value;
  575. //FlipperAnimation();
  576. }
  577. }
  578. }
  579. private bool _triggerFlipperTurnOver = false;
  580. private void FlipperAnimation()
  581. {
  582. DoubleAnimation da = new DoubleAnimation();
  583. da.Duration = new Duration(TimeSpan.FromSeconds(1));
  584. da.To = _isFlipperOverOrigin ? 0d : 180d;
  585. this.Dispatcher.Invoke(() =>
  586. {
  587. AxisAngleRotation3D aar = this.FindName("aar") as AxisAngleRotation3D;
  588. if (aar != null)
  589. {
  590. aar.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);
  591. }
  592. else
  593. {
  594. Debug.WriteLine("AxisAngleRotation3D named 'aar' not found.");
  595. }
  596. });
  597. //AxisAngleRotation3D aar = this.FindName("aar") as AxisAngleRotation3D;
  598. //aar.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);
  599. }
  600. }
  601. }