OperationOverViewModel.cs 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  1. using MECF.Framework.Common.CommonData;
  2. using MECF.Framework.Common.DataCenter;
  3. using MECF.Framework.Common.Equipment;
  4. using MECF.Framework.Common.OperationCenter;
  5. using OpenSEMI.ClientBase;
  6. using Prism.Commands;
  7. using Prism.Mvvm;
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using System.Windows.Threading;
  15. using Venus_Core;
  16. using Venus_MainPages.Unity;
  17. using Venus_MainPages.Views;
  18. using Venus_Themes.CustomControls;
  19. using Venus_Themes.Unity;
  20. using static Venus_Themes.UserControls.EFEM;
  21. namespace Venus_MainPages.ViewModels
  22. {
  23. public class OperationOverViewModel : BindableBase
  24. {
  25. #region 私有字段
  26. private bool m_TabIsChecked = true;
  27. private ModuleInfo m_LP1ModuleInfo;
  28. private ModuleInfo m_LP2ModuleInfo;
  29. private ModuleInfo m_LLAModuleInfo;
  30. private ModuleInfo m_LLBModuleInfo;
  31. private ModuleInfo m_LP3ModuleInfo;
  32. private ModuleInfo m_EFEMModuleInfo;
  33. private ModuleInfo m_TMModuleInfo;
  34. private WaferRobotTAction m_Robot1TAction;
  35. private WaferRobotXAction m_Robot1XAction;
  36. private WaferRobotTAction m_Robot2TAction;
  37. private WaferRobotXAction m_Robot2XAction;
  38. private WaferRobotTAction m_Robot3TAction;
  39. private WaferRobotXAction m_Robot3XAction;
  40. private WaferRobotTAction m_Robot4TAction;
  41. private WaferRobotXAction m_Robot4XAction;
  42. private RobotMoveInfo m_robotMoveInfo;
  43. private WaferInfo m_PMAWafer;
  44. private WaferInfo m_PMBWafer;
  45. private WaferInfo m_PMCWafer;
  46. private WaferInfo m_PMDWafer;
  47. private WaferInfo m_LLAWafer;
  48. private WaferInfo m_LLBWafer;
  49. private WaferInfo m_TMBladeAWafer;
  50. private WaferInfo m_TMBladeBWafer;
  51. private List<string> m_RtDataKeys = new List<string>();
  52. private Dictionary<string, object> m_RtDataValues;
  53. private bool m_PMAIsInstalled;
  54. private bool m_PMBIsInstalled;
  55. private bool m_PMCIsInstalled;
  56. private bool m_PMDIsInstalled;
  57. private bool m_LLAIsInstalled;
  58. private bool m_LLBIsInstalled;
  59. private bool m_TMIsInstalled;
  60. private bool m_EFEMIsInstalled;
  61. private WaferInfo m_EFEMBladeAWafer;
  62. private WaferInfo m_EFEMBladeBWafer;
  63. private WaferInfo m_Aligner1Wafer;
  64. private int m_LP1WaferCount;
  65. private int m_LP2WaferCount;
  66. private int m_LP3WaferCount;
  67. private WaferAssociationInfo _lp1WaferAssociation;
  68. private WaferAssociationInfo _lp2WaferAssociation;
  69. private WaferAssociationInfo _lp3WaferAssociation;
  70. private int m_CycledWafer;
  71. private int m_CycleCountDisplay;
  72. private RobotPosition m_CurrentRobotPosition;
  73. private WaferInfo m_BladeAWafer;
  74. private WaferInfo m_BladeBWafer;
  75. private RecipeResult m_PMARecipeResult;
  76. private RecipeResult m_PMBRecipeResult;
  77. private RecipeResult m_PMCRecipeResult;
  78. private RecipeResult m_PMDRecipeResult;
  79. private string m_ATMModeIsOn;
  80. #endregion
  81. #region 属性
  82. public bool TabIsChecked
  83. {
  84. get { return m_TabIsChecked; }
  85. set { SetProperty(ref m_TabIsChecked, value); }
  86. }
  87. public ModuleInfo LP1ModuleInfo
  88. {
  89. get { return m_LP1ModuleInfo; }
  90. set { SetProperty(ref m_LP1ModuleInfo, value); }
  91. }
  92. public ModuleInfo LLAModuleInfo
  93. {
  94. get { return m_LLAModuleInfo; }
  95. set { SetProperty(ref m_LLAModuleInfo, value); }
  96. }
  97. public ModuleInfo LLBModuleInfo
  98. {
  99. get { return m_LLBModuleInfo; }
  100. set { SetProperty(ref m_LLBModuleInfo, value); }
  101. }
  102. public ModuleInfo EFEMModuleInfo
  103. {
  104. get { return m_EFEMModuleInfo; }
  105. set { SetProperty(ref m_EFEMModuleInfo, value); }
  106. }
  107. public ModuleInfo TMModuleInfo
  108. {
  109. get { return m_TMModuleInfo; }
  110. set { SetProperty(ref m_TMModuleInfo, value); }
  111. }
  112. public ModuleInfo LP2ModuleInfo
  113. {
  114. get { return m_LP2ModuleInfo; }
  115. set { SetProperty(ref m_LP2ModuleInfo, value); }
  116. }
  117. public ModuleInfo LP3ModuleInfo
  118. {
  119. get { return m_LP3ModuleInfo; }
  120. set { SetProperty(ref m_LP3ModuleInfo, value); }
  121. }
  122. public WaferRobotTAction Robot1TAction
  123. {
  124. get { return m_Robot1TAction; }
  125. set { SetProperty(ref m_Robot1TAction, value); }
  126. }
  127. public WaferRobotXAction Robot1XAction
  128. {
  129. get { return m_Robot1XAction; }
  130. set { SetProperty(ref m_Robot1XAction, value); }
  131. }
  132. public WaferRobotTAction Robot2TAction
  133. {
  134. get { return m_Robot2TAction; }
  135. set { SetProperty(ref m_Robot2TAction, value); }
  136. }
  137. public WaferRobotXAction Robot2XAction
  138. {
  139. get { return m_Robot2XAction; }
  140. set { SetProperty(ref m_Robot2XAction, value); }
  141. }
  142. public WaferRobotTAction Robot3TAction
  143. {
  144. get { return m_Robot3TAction; }
  145. set { SetProperty(ref m_Robot3TAction, value); }
  146. }
  147. public WaferRobotXAction Robot3XAction
  148. {
  149. get { return m_Robot3XAction; }
  150. set { SetProperty(ref m_Robot3XAction, value); }
  151. }
  152. public WaferRobotTAction Robot4TAction
  153. {
  154. get { return m_Robot4TAction; }
  155. set { SetProperty(ref m_Robot4TAction, value); }
  156. }
  157. public WaferRobotXAction Robot4XAction
  158. {
  159. get { return m_Robot4XAction; }
  160. set { SetProperty(ref m_Robot4XAction, value); }
  161. }
  162. public RobotMoveInfo RobotMoveInfo
  163. {
  164. get { return m_robotMoveInfo; }
  165. set
  166. {
  167. RobotMoveInfoChanged(m_robotMoveInfo, value);
  168. //m_robotMoveInfo = value;
  169. SetProperty(ref m_robotMoveInfo, value);
  170. }
  171. }
  172. public WaferInfo LLAWafer
  173. {
  174. get { return m_LLAWafer; }
  175. set { SetProperty(ref m_LLAWafer, value); }
  176. }
  177. public WaferInfo LLBWafer
  178. {
  179. get { return m_LLBWafer; }
  180. set { SetProperty(ref m_LLBWafer, value); }
  181. }
  182. public WaferInfo PMAWafer
  183. {
  184. get { return m_PMAWafer; }
  185. set { SetProperty(ref m_PMAWafer, value); }
  186. }
  187. public WaferInfo PMBWafer
  188. {
  189. get { return m_PMBWafer; }
  190. set { SetProperty(ref m_PMBWafer, value); }
  191. }
  192. public WaferInfo PMCWafer
  193. {
  194. get { return m_PMCWafer; }
  195. set { SetProperty(ref m_PMCWafer, value); }
  196. }
  197. public WaferInfo PMDWafer
  198. {
  199. get { return m_PMDWafer; }
  200. set { SetProperty(ref m_PMDWafer, value); }
  201. }
  202. public WaferInfo TMBladeAWafer
  203. {
  204. get { return m_TMBladeAWafer; }
  205. set { SetProperty(ref m_TMBladeAWafer, value); }
  206. }
  207. public WaferInfo TMBladeBWafer
  208. {
  209. get { return m_TMBladeBWafer; }
  210. set { SetProperty(ref m_TMBladeBWafer, value); }
  211. }
  212. public Dictionary<string, object> RtDataValues
  213. {
  214. get { return m_RtDataValues; }
  215. set { SetProperty(ref m_RtDataValues, value); }
  216. }
  217. public bool PMAIsInstalled
  218. {
  219. get { return m_PMAIsInstalled; }
  220. set { SetProperty(ref m_PMAIsInstalled, value); }
  221. }
  222. public bool PMBIsInstalled
  223. {
  224. get { return m_PMBIsInstalled; }
  225. set { SetProperty(ref m_PMBIsInstalled, value); }
  226. }
  227. public bool PMCIsInstalled
  228. {
  229. get { return m_PMCIsInstalled; }
  230. set { SetProperty(ref m_PMCIsInstalled, value); }
  231. }
  232. public bool PMDIsInstalled
  233. {
  234. get { return m_PMDIsInstalled; }
  235. set { SetProperty(ref m_PMDIsInstalled, value); }
  236. }
  237. public bool LLAIsInstalled
  238. {
  239. get { return m_LLAIsInstalled; }
  240. set { SetProperty(ref m_LLAIsInstalled, value); }
  241. }
  242. public bool LLBIsInstalled
  243. {
  244. get { return m_LLBIsInstalled; }
  245. set { SetProperty(ref m_LLBIsInstalled, value); }
  246. }
  247. public bool TMIsInstalled
  248. {
  249. get { return m_TMIsInstalled; }
  250. set { SetProperty(ref m_TMIsInstalled, value); }
  251. }
  252. public bool EFEMIsInstalled
  253. {
  254. get { return m_EFEMIsInstalled; }
  255. set { SetProperty(ref m_EFEMIsInstalled, value); }
  256. }
  257. public WaferInfo EFEMBladeAWafer
  258. {
  259. get { return m_EFEMBladeAWafer; }
  260. set { SetProperty(ref m_EFEMBladeAWafer, value); }
  261. }
  262. public WaferInfo EFEMBladeBWafer
  263. {
  264. get { return m_EFEMBladeBWafer; }
  265. set { SetProperty(ref m_EFEMBladeBWafer, value); }
  266. }
  267. public WaferInfo Aligner1Wafer
  268. {
  269. get { return m_Aligner1Wafer; }
  270. set { SetProperty(ref m_Aligner1Wafer, value); }
  271. }
  272. public int LP1WaferCount
  273. {
  274. get { return m_LP1WaferCount; }
  275. set { SetProperty(ref m_LP1WaferCount, value); }
  276. }
  277. public int LP2WaferCount
  278. {
  279. get { return m_LP2WaferCount; }
  280. set { SetProperty(ref m_LP2WaferCount, value); }
  281. }
  282. public int LP3WaferCount
  283. {
  284. get { return m_LP3WaferCount; }
  285. set { SetProperty(ref m_LP3WaferCount, value); }
  286. }
  287. public WaferAssociationInfo LP1WaferAssociation
  288. {
  289. get { return _lp1WaferAssociation; }
  290. set { SetProperty(ref _lp1WaferAssociation, value); }
  291. }
  292. public WaferAssociationInfo LP2WaferAssociation
  293. {
  294. get { return _lp2WaferAssociation; }
  295. set { SetProperty(ref _lp2WaferAssociation, value); }
  296. }
  297. public WaferAssociationInfo LP3WaferAssociation
  298. {
  299. get { return _lp3WaferAssociation; }
  300. set { SetProperty(ref _lp3WaferAssociation, value); }
  301. }
  302. public int CycledWafer
  303. {
  304. get { return m_CycledWafer; }
  305. set { SetProperty(ref m_CycledWafer, value); }
  306. }
  307. public int CycleCountDisplay
  308. {
  309. get { return m_CycleCountDisplay; }
  310. set { SetProperty(ref m_CycleCountDisplay, value); }
  311. }
  312. public RobotMoveInfo m_EfemRobotMoveInfo;
  313. public RobotMoveInfo EfemRobotMoveInfo
  314. {
  315. get { return m_EfemRobotMoveInfo; }
  316. set
  317. {
  318. EFEMRobotMoveInfoChanged(m_EfemRobotMoveInfo, value);
  319. //m_EfemRobotMoveInfo = value;
  320. SetProperty(ref m_EfemRobotMoveInfo, value);
  321. }
  322. }
  323. public RobotPosition CurrentRobotPosition
  324. {
  325. get { return m_CurrentRobotPosition; }
  326. set { SetProperty(ref m_CurrentRobotPosition, value); }
  327. }
  328. public WaferInfo BladeAWafer
  329. {
  330. get { return m_BladeAWafer; }
  331. set { SetProperty(ref m_BladeAWafer, value); }
  332. }
  333. public WaferInfo BladeBWafer
  334. {
  335. get { return m_BladeBWafer; }
  336. set { SetProperty(ref m_BladeBWafer, value); }
  337. }
  338. public RecipeResult PMARecipeResult
  339. {
  340. get { return m_PMARecipeResult; }
  341. set { SetProperty(ref m_PMARecipeResult, value); }
  342. }
  343. public RecipeResult PMBRecipeResult
  344. {
  345. get { return m_PMBRecipeResult; }
  346. set { SetProperty(ref m_PMBRecipeResult, value); }
  347. }
  348. public RecipeResult PMCRecipeResult
  349. {
  350. get { return m_PMCRecipeResult; }
  351. set { SetProperty(ref m_PMCRecipeResult, value); }
  352. }
  353. public RecipeResult PMDRecipeResult
  354. {
  355. get { return m_PMDRecipeResult; }
  356. set { SetProperty(ref m_PMDRecipeResult, value); }
  357. }
  358. public string ATMModeIsOn
  359. {
  360. get { return m_ATMModeIsOn; }
  361. set { SetProperty(ref m_ATMModeIsOn, value); }
  362. }
  363. #endregion
  364. #region 命令
  365. private DelegateCommand _LoadCommand;
  366. public DelegateCommand LoadCommand =>
  367. _LoadCommand ?? (_LoadCommand = new DelegateCommand(OnLoad));
  368. private DelegateCommand<object> _LoadWaferCommand;
  369. public DelegateCommand<object> LoadWaferCommand =>
  370. _LoadWaferCommand ?? (_LoadWaferCommand = new DelegateCommand<object>(OnLoadWafer));
  371. private DelegateCommand<object> _UnLoadWaferCommand;
  372. public DelegateCommand<object> UnLoadWaferCommand =>
  373. _UnLoadWaferCommand ?? (_UnLoadWaferCommand = new DelegateCommand<object>(OnUnLoadWafer));
  374. private DelegateCommand<object> _SelectAllCommand;
  375. public DelegateCommand<object> SelectAllCommand =>
  376. _SelectAllCommand ?? (_SelectAllCommand = new DelegateCommand<object>(OnSelectAll));
  377. private DelegateCommand<object> _UnSelectAllCommand;
  378. public DelegateCommand<object> UnSelectAllCommand =>
  379. _UnSelectAllCommand ?? (_UnSelectAllCommand = new DelegateCommand<object>(OnUnSelectAll));
  380. private DelegateCommand<object> _StartCommand;
  381. public DelegateCommand<object> StartCommand =>
  382. _StartCommand ?? (_StartCommand = new DelegateCommand<object>(OnStart));
  383. private DelegateCommand<object> _StopCommand;
  384. public DelegateCommand<object> StopCommand =>
  385. _StopCommand ?? (_StopCommand = new DelegateCommand<object>(OnStop));
  386. private DelegateCommand<object> _AbortCommand;
  387. public DelegateCommand<object> AbortCommand =>
  388. _AbortCommand ?? (_AbortCommand = new DelegateCommand<object>(OnAbort));
  389. private DelegateCommand _HomeAllCommand;
  390. public DelegateCommand HomeAllCommand =>
  391. _HomeAllCommand ?? (_HomeAllCommand = new DelegateCommand(OnHomeAll));
  392. private DelegateCommand _PauseAllJobCommand;
  393. public DelegateCommand PauseAllJobCommand =>
  394. _PauseAllJobCommand ?? (_PauseAllJobCommand = new DelegateCommand(OnPauseAllJob));
  395. private DelegateCommand _AbortAllCommand;
  396. public DelegateCommand AbortAllCommand =>
  397. _AbortAllCommand ?? (_AbortAllCommand = new DelegateCommand(OnAbortAll));
  398. private DelegateCommand _ReturnAllWaferCommand;
  399. public DelegateCommand ReturnAllWaferCommand =>
  400. _ReturnAllWaferCommand ?? (_ReturnAllWaferCommand = new DelegateCommand(OnReturnAllWafer));
  401. private DelegateCommand<object> _SetSequenceCommand;
  402. public DelegateCommand<object> SetSequenceCommand =>
  403. _SetSequenceCommand ?? (_SetSequenceCommand = new DelegateCommand<object>(OnSetSequence));
  404. private DelegateCommand<object> _CreateJobCommand;
  405. public DelegateCommand<object> CreateJobCommand =>
  406. _CreateJobCommand ?? (_CreateJobCommand = new DelegateCommand<object>(OnCreateJob));
  407. private DelegateCommand _EnableAutoCommand;
  408. public DelegateCommand EnableAutoCommand =>
  409. _EnableAutoCommand ?? (_EnableAutoCommand = new DelegateCommand(OnEnableAuto));
  410. private DelegateCommand _EnableManualCommand;
  411. public DelegateCommand EnableManualCommand =>
  412. _EnableManualCommand ?? (_EnableManualCommand = new DelegateCommand(OnEnableManual));
  413. public bool SwitchFlag;
  414. #endregion
  415. #region 构造函数
  416. public OperationOverViewModel()
  417. {
  418. DispatcherTimer timer = new DispatcherTimer();
  419. timer.Interval = TimeSpan.FromSeconds(0.1);
  420. timer.Tick += Timer_Tick;
  421. timer.Start();
  422. string allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString();
  423. PMAIsInstalled = allModules.Contains("PMA");
  424. PMBIsInstalled = allModules.Contains("PMB");
  425. PMCIsInstalled = allModules.Contains("PMC");
  426. PMDIsInstalled = allModules.Contains("PMD");
  427. LLAIsInstalled = allModules.Contains("LLA");
  428. LLBIsInstalled = allModules.Contains("LLB");
  429. EFEMIsInstalled = allModules.Contains("EFEM");
  430. TMIsInstalled = allModules.Contains("TM");
  431. addDataKeys();
  432. SwitchFlag = false;
  433. ATMModeIsOn = Convert.ToBoolean(QueryDataClient.Instance.Service.GetConfig("System.IsATMMode")) == true ? "ATM Mode On" : "ATM Mode Off";
  434. }
  435. #endregion
  436. #region 命令方法
  437. private void OnLoad()
  438. {
  439. if (!SwitchFlag)
  440. {
  441. LP1WaferAssociation = new WaferAssociationInfo();
  442. LP3WaferAssociation = new WaferAssociationInfo();
  443. LP2WaferAssociation = new WaferAssociationInfo();
  444. LP1WaferAssociation.ModuleData = ModuleManager.ModuleInfos["LP1"];
  445. LP2WaferAssociation.ModuleData = ModuleManager.ModuleInfos["LP2"];
  446. LP3WaferAssociation.ModuleData = ModuleManager.ModuleInfos["LP3"];
  447. SwitchFlag = true;
  448. }
  449. }
  450. private void OnLoadWafer(object obj)
  451. {
  452. InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Load", ModuleManager.ModuleInfos[obj.ToString()].ModuleID);
  453. }
  454. private void OnUnLoadWafer(object obj)
  455. {
  456. InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Unload", ModuleManager.ModuleInfos[obj.ToString()].ModuleID);
  457. }
  458. private void OnSelectAll(object obj)
  459. {
  460. var info = obj as WaferAssociationInfo;
  461. info.SlotFrom = 1;
  462. info.SlotTo = 25;
  463. AssociateSequence(info, true);
  464. }
  465. private void OnUnSelectAll(object obj)
  466. {
  467. var info = obj as WaferAssociationInfo;
  468. info.SlotFrom = 1;
  469. info.SlotTo = 25;
  470. AssociateSequence(info, false);
  471. }
  472. private void OnStart(object obj)
  473. {
  474. var info = obj as WaferAssociationInfo;
  475. InvokeClient.Instance.Service.DoOperation("System.StartJob", info.LotId);
  476. }
  477. private void OnStop(object obj)
  478. {
  479. var info = obj as WaferAssociationInfo;
  480. InvokeClient.Instance.Service.DoOperation("System.PauseJob", info.JobID);
  481. }
  482. private void OnAbort(object obj)
  483. {
  484. var info = obj as WaferAssociationInfo;
  485. InvokeClient.Instance.Service.DoOperation("System.ResumeJob", info.JobID);
  486. }
  487. private void OnHomeAll()
  488. {
  489. InvokeClient.Instance.Service.DoOperation("System.HomeAll");
  490. }
  491. private void OnPauseAllJob()
  492. {
  493. InvokeClient.Instance.Service.DoOperation("System.PauseJob", LP1WaferAssociation.JobID);
  494. InvokeClient.Instance.Service.DoOperation("System.PauseJob", LP2WaferAssociation.JobID);
  495. InvokeClient.Instance.Service.DoOperation("System.PauseJob", LP3WaferAssociation.JobID);
  496. }
  497. private void OnAbortAll()
  498. {
  499. InvokeClient.Instance.Service.DoOperation("System.Abort");
  500. }
  501. private void OnReturnAllWafer()
  502. {
  503. //Dialog
  504. WaferDialogView dialog = new WaferDialogView()
  505. {
  506. Owner = Application.Current.MainWindow,
  507. };
  508. dialog.Height = 300;
  509. dialog.Width = 400;
  510. double angel = 0;
  511. double coolingtime = 0;
  512. string message = "Please Confirm Return Wafer";
  513. WaferDialogViewModel vm = new WaferDialogViewModel();
  514. vm.ConfirmText = message;
  515. dialog.DataContext = vm;
  516. if (dialog.ShowDialog() == true)
  517. {
  518. if ((bool)dialog.AlignFlag == true && !string.IsNullOrEmpty(dialog.Angle))
  519. {
  520. angel = Convert.ToDouble(dialog.Angle);
  521. }
  522. if ((bool)dialog.CoolingFlag == true && !string.IsNullOrEmpty(dialog.CoolingTime))
  523. {
  524. coolingtime = Convert.ToDouble(dialog.CoolingTime);
  525. }
  526. InvokeClient.Instance.Service.DoOperation("System.ReturnAllWafer", dialog.CoolingFlag, coolingtime, dialog.AlignFlag, angel);
  527. }
  528. }
  529. private void OnSetSequence(object obj)
  530. {
  531. var info = obj as WaferInfo;
  532. bool flag = info.SequenceName != "" ? false : true;
  533. if (info.ModuleID == "LP1")
  534. {
  535. AssociateSequence(LP1WaferAssociation, flag, info.SlotID);
  536. }
  537. else if (info.ModuleID == "LP2")
  538. {
  539. AssociateSequence(LP2WaferAssociation, flag, info.SlotID);
  540. }
  541. else if (info.ModuleID == "LP3")
  542. {
  543. AssociateSequence(LP3WaferAssociation, flag, info.SlotID);
  544. }
  545. }
  546. private void OnCreateJob(object obj)
  547. {
  548. var info = obj as WaferAssociationInfo;
  549. List<string> slotSequence = new List<string>();
  550. info.ModuleData.WaferManager.Wafers.ForEach(key => { slotSequence.Insert(0, key.SequenceName); });
  551. string jobId = info.LotId.Trim();
  552. if (string.IsNullOrEmpty(jobId))
  553. jobId = "CJ_Local_" + info.ModuleData.ModuleID;
  554. info.LotId = jobId;
  555. info.JobID = jobId;
  556. info.JobStatus = "WaitingForStart";
  557. info.LotIdSaved = true;
  558. Dictionary<string, object> param = new Dictionary<string, object>()
  559. {
  560. {"JobId", jobId},
  561. {"Module", info.ModuleData.ModuleID},
  562. {"SlotSequence", slotSequence.ToArray()},
  563. {"AutoStart", true},
  564. };
  565. InvokeClient.Instance.Service.DoOperation("System.CreateJob", param);
  566. }
  567. private void OnEnableAuto()
  568. {
  569. InvokeClient.Instance.Service.DoOperation("System.SetAutoMode");
  570. }
  571. private void OnEnableManual()
  572. {
  573. InvokeClient.Instance.Service.DoOperation("System.SetManualMode");
  574. }
  575. #endregion
  576. #region 私有方法
  577. private void Timer_Tick(object sender, EventArgs e)
  578. {
  579. LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
  580. LP2ModuleInfo = ModuleManager.ModuleInfos["LP2"];
  581. LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
  582. EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
  583. TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
  584. BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  585. BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  586. RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
  587. if (LLAIsInstalled == true)
  588. {
  589. LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
  590. LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
  591. }
  592. if (LLBIsInstalled == true)
  593. {
  594. LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
  595. LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
  596. }
  597. if (PMAIsInstalled == true)
  598. {
  599. PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
  600. PMARecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMA.CurrentRecipeResult");
  601. }
  602. if (PMBIsInstalled == true)
  603. {
  604. PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
  605. PMBRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMB.CurrentRecipeResult");
  606. }
  607. if (PMCIsInstalled == true)
  608. {
  609. PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
  610. PMCRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMC.CurrentRecipeResult");
  611. }
  612. if (PMDIsInstalled == true)
  613. {
  614. PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
  615. PMDRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMD.CurrentRecipeResult");
  616. }
  617. if (TMIsInstalled == true)
  618. {
  619. TMBladeAWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0];
  620. TMBladeBWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1];
  621. }
  622. if (EFEMIsInstalled == true)
  623. {
  624. EFEMBladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  625. EFEMBladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  626. Aligner1Wafer = ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers[0];
  627. }
  628. RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
  629. EfemRobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
  630. LP1WaferCount = LP1ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  631. LP2WaferCount = LP2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  632. LP3WaferCount = LP3ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  633. }
  634. private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
  635. {
  636. string RobotTarget;
  637. if (oldValue == null || newValue == null)
  638. {
  639. return;
  640. }
  641. #region Rotating
  642. if ((oldValue.Action == RobotAction.None||oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Rotating))
  643. {
  644. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  645. if (TMRobotMoveActionBladeTarget != null)
  646. {
  647. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  648. }
  649. else
  650. {
  651. return;
  652. }
  653. var values = RobotTarget.Split('.');
  654. var arm = values[0];
  655. var module = values[1];
  656. if (arm == "ArmA")
  657. {
  658. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  659. }
  660. else if (arm == "ArmB")
  661. {
  662. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  663. }
  664. }
  665. #endregion
  666. #region pick 和 place LL
  667. else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
  668. {
  669. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  670. if (TMRobotMoveActionBladeTarget != null)
  671. {
  672. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  673. }
  674. else
  675. {
  676. return;
  677. }
  678. var values = RobotTarget.Split('.');
  679. var arm = values[0];
  680. var module = values[1];
  681. if (arm == "ArmA")
  682. {
  683. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  684. if (waferRobotTAction != Robot1TAction)
  685. {
  686. Robot1TAction = waferRobotTAction;
  687. }
  688. else
  689. {
  690. //await Task.Delay(100);
  691. }
  692. await Task.Delay(600);
  693. //Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  694. //await Task.Delay(600);
  695. Robot1XAction = WaferRobotXAction.Extend;
  696. 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))
  697. {
  698. await Task.Delay(100);
  699. }
  700. Robot1XAction = WaferRobotXAction.Retract;
  701. }
  702. else if (arm == "ArmB")
  703. {
  704. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  705. if (waferRobotTAction != Robot2TAction)
  706. {
  707. Robot2TAction = waferRobotTAction;
  708. }
  709. else
  710. {
  711. //await Task.Delay(100);
  712. }
  713. await Task.Delay(600);
  714. //Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  715. //await Task.Delay(600);
  716. Robot2XAction = WaferRobotXAction.Extend;
  717. 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))
  718. {
  719. await Task.Delay(100);
  720. }
  721. Robot2XAction = WaferRobotXAction.Retract;
  722. }
  723. }
  724. #endregion
  725. #region pick 和 place pm
  726. else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Extending)
  727. {
  728. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  729. if (TMRobotMoveActionBladeTarget != null)
  730. {
  731. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  732. }
  733. else
  734. {
  735. return;
  736. }
  737. var values = RobotTarget.Split('.');
  738. var arm = values[0];
  739. var module = values[1];
  740. if (arm == "ArmA")
  741. {
  742. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  743. if (waferRobotTAction != Robot1TAction)
  744. {
  745. Robot1TAction = waferRobotTAction;
  746. }
  747. else
  748. {
  749. // await Task.Delay(100);
  750. }
  751. await Task.Delay(600);
  752. Robot1XAction = WaferRobotXAction.Extend;
  753. }
  754. else if (arm == "ArmB")
  755. {
  756. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  757. if (waferRobotTAction != Robot2TAction)
  758. {
  759. Robot2TAction = waferRobotTAction;
  760. }
  761. else
  762. {
  763. // await Task.Delay(100);
  764. }
  765. await Task.Delay(600);
  766. Robot2XAction = WaferRobotXAction.Extend;
  767. }
  768. }
  769. else if ((oldValue.Action == RobotAction.None|| oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Retracting)
  770. {
  771. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  772. if (TMRobotMoveActionBladeTarget != null)
  773. {
  774. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  775. }
  776. else
  777. {
  778. return;
  779. }
  780. var values = RobotTarget.Split('.');
  781. var arm = values[0];
  782. if (arm == "ArmA")
  783. {
  784. Robot1XAction = WaferRobotXAction.Retract;
  785. }
  786. else if (arm == "ArmB")
  787. {
  788. Robot2XAction = WaferRobotXAction.Retract;
  789. }
  790. }
  791. #endregion
  792. }
  793. private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
  794. {
  795. string RobotTarget;
  796. if (oldValue == null || newValue == null)
  797. {
  798. return;
  799. }
  800. #region pick 和 place LL
  801. if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget!=newValue.ArmTarget) && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
  802. {
  803. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  804. if (TMRobotMoveActionBladeTarget != null)
  805. {
  806. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  807. }
  808. else
  809. {
  810. return;
  811. }
  812. var values = RobotTarget.Split('.');
  813. var arm = values[0];
  814. var module = values[1];
  815. if (arm == "ArmA")
  816. {
  817. var robot3Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  818. //await Task.Delay(1000);
  819. await ChangePosition(robot3Robot3TAction);
  820. if (Robot3TAction != robot3Robot3TAction)
  821. {
  822. Robot3TAction = robot3Robot3TAction;
  823. await Task.Delay(600);
  824. }
  825. Robot3XAction = WaferRobotXAction.Extend;
  826. while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus == 0))
  827. {
  828. await Task.Delay(100);
  829. }
  830. Robot3XAction = WaferRobotXAction.Retract;
  831. }
  832. else if (arm == "ArmB")
  833. {
  834. var robot4Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  835. //await Task.Delay(1000);
  836. await ChangePosition(robot4Robot4TAction);
  837. if (Robot4TAction != robot4Robot4TAction)
  838. {
  839. Robot4TAction = robot4Robot4TAction;
  840. await Task.Delay(600);
  841. }
  842. //ChangePosition(Robot4TAction);
  843. //await Task.Delay(2000);
  844. Robot4XAction = WaferRobotXAction.Extend;
  845. while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus == 0))
  846. {
  847. await Task.Delay(100);
  848. }
  849. Robot4XAction = WaferRobotXAction.Retract;
  850. }
  851. }
  852. #endregion
  853. #region pick 和 place pm
  854. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
  855. {
  856. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  857. if (TMRobotMoveActionBladeTarget != null)
  858. {
  859. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  860. }
  861. else
  862. {
  863. return;
  864. }
  865. var values = RobotTarget.Split('.');
  866. var arm = values[0];
  867. var module = values[1];
  868. if (arm == "ArmA")
  869. {
  870. Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  871. await Task.Delay(1500);
  872. //ChangePosition(Robot3TAction);
  873. //await Task.Delay(2000);
  874. Robot3XAction = WaferRobotXAction.Extend;
  875. }
  876. else if (arm == "ArmB")
  877. {
  878. Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  879. await Task.Delay(1500);
  880. //ChangePosition(Robot4TAction);
  881. //await Task.Delay(2000);
  882. Robot4XAction = WaferRobotXAction.Extend;
  883. }
  884. }
  885. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
  886. {
  887. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  888. if (TMRobotMoveActionBladeTarget != null)
  889. {
  890. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  891. }
  892. else
  893. {
  894. return;
  895. }
  896. var values = RobotTarget.Split('.');
  897. var arm = values[0];
  898. if (arm == "ArmA")
  899. {
  900. Robot3XAction = WaferRobotXAction.Retract;
  901. await Task.Delay(3000);
  902. //ChangePosition(Robot3TAction);
  903. //await Task.Delay(2000);
  904. }
  905. else if (arm == "ArmB")
  906. {
  907. Robot4XAction = WaferRobotXAction.Retract;
  908. await Task.Delay(3000);
  909. //ChangePosition(Robot3TAction);
  910. //await Task.Delay(2000);
  911. }
  912. }
  913. #endregion
  914. }
  915. private void addDataKeys()
  916. {
  917. if (PMAIsInstalled == true)
  918. {
  919. m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
  920. m_RtDataKeys.Add("PMA.CurrentRecipeResult");
  921. m_RtDataKeys.Add("PMA.IsOnline");
  922. }
  923. if (PMBIsInstalled == true)
  924. {
  925. m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
  926. m_RtDataKeys.Add("PMB.CurrentRecipeResult");
  927. m_RtDataKeys.Add("PMB.IsOnline");
  928. }
  929. if (PMCIsInstalled == true)
  930. {
  931. m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
  932. m_RtDataKeys.Add("PMC.CurrentRecipeResult");
  933. m_RtDataKeys.Add("PMC.IsOnline");
  934. }
  935. if (PMDIsInstalled == true)
  936. {
  937. m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
  938. m_RtDataKeys.Add("PMD.CurrentRecipeResult");
  939. m_RtDataKeys.Add("PMD.IsOnline");
  940. }
  941. if (TMIsInstalled == true)
  942. {
  943. m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
  944. m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
  945. m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
  946. m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
  947. m_RtDataKeys.Add("TM.IsOnline");
  948. }
  949. if (LLAIsInstalled == true)
  950. {
  951. m_RtDataKeys.Add("LLA.IsOnline");
  952. m_RtDataKeys.Add($"TM.LLAPressureGauge.Value");
  953. m_RtDataKeys.Add($"TM.LLAVacSwitch.Value");
  954. m_RtDataKeys.Add($"TM.LLAATMSwitch.Value");
  955. }
  956. if (LLBIsInstalled == true)
  957. {
  958. m_RtDataKeys.Add("LLB.IsOnline");
  959. m_RtDataKeys.Add($"TM.LLBPressureGauge.Value");
  960. m_RtDataKeys.Add($"TM.LLBVacSwitch.Value");
  961. m_RtDataKeys.Add($"TM.LLBATMSwitch.Value");
  962. }
  963. if (EFEMIsInstalled == true)
  964. {
  965. m_RtDataKeys.Add("LP1.IsLoaded");
  966. m_RtDataKeys.Add("LP2.IsLoaded");
  967. m_RtDataKeys.Add("LP3.IsLoaded");
  968. m_RtDataKeys.Add("LP1.CassettePlaced");
  969. m_RtDataKeys.Add("LP2.CassettePlaced");
  970. m_RtDataKeys.Add("LP3.CassettePlaced");
  971. m_RtDataKeys.Add("EFEM.IsOnline");
  972. }
  973. m_RtDataKeys.Add("System.IsAutoMode");
  974. m_RtDataKeys.Add("Scheduler.CycledCount");
  975. m_RtDataKeys.Add("Scheduler.CycledWafer");
  976. m_RtDataKeys.Add("Scheduler.CycleSetPoint");
  977. m_RtDataKeys.Add("Scheduler.Throughput");
  978. }
  979. private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)
  980. {
  981. List<WaferInfo> wafers = info.ModuleData.WaferManager.Wafers;
  982. if (slot >= 0) //by wafer
  983. {
  984. int index = wafers.Count - slot - 1;
  985. if (index < wafers.Count)
  986. {
  987. if (flag && HasWaferOnSlot(wafers, index))
  988. wafers[index].SequenceName = info.SequenceName;
  989. else
  990. wafers[index].SequenceName = string.Empty;
  991. }
  992. }
  993. else //by from-to
  994. {
  995. for (int i = info.SlotFrom - 1; i < info.SlotTo; i++)
  996. {
  997. int index = wafers.Count - i - 1;
  998. if (index < wafers.Count)
  999. {
  1000. if (flag && HasWaferOnSlot(wafers, index))
  1001. wafers[index].SequenceName = info.SequenceName;
  1002. else
  1003. wafers[index].SequenceName = string.Empty;
  1004. }
  1005. }
  1006. }
  1007. switch (info.ModuleData.ModuleID)
  1008. {
  1009. case "LP1":
  1010. LP1WaferAssociation = info;
  1011. break;
  1012. case "LP2":
  1013. LP2WaferAssociation = info;
  1014. break;
  1015. case "LP3":
  1016. LP3WaferAssociation = info;
  1017. break;
  1018. }
  1019. }
  1020. private bool HasWaferOnSlot(List<WaferInfo> wafers, int index)
  1021. {
  1022. if (wafers[index].WaferStatus == 0)
  1023. return false;
  1024. return true;
  1025. }
  1026. private async Task ChangePosition(WaferRobotTAction waferRobotTAction)
  1027. {
  1028. await Task.Delay(500);
  1029. int delay = 500;
  1030. if (waferRobotTAction == WaferRobotTAction.LP1)
  1031. {
  1032. CurrentRobotPosition = RobotPosition.Left;
  1033. await Task.Delay(delay);
  1034. }
  1035. else if (waferRobotTAction == WaferRobotTAction.LP3)
  1036. {
  1037. CurrentRobotPosition = RobotPosition.Right;
  1038. await Task.Delay(delay);
  1039. }
  1040. else if (waferRobotTAction == WaferRobotTAction.LP2)
  1041. {
  1042. CurrentRobotPosition = RobotPosition.Middle;
  1043. await Task.Delay(delay);
  1044. }
  1045. else
  1046. {
  1047. CurrentRobotPosition = RobotPosition.Origin;
  1048. await Task.Delay(delay);
  1049. }
  1050. //await Task.Delay(100);
  1051. //else if (waferRobotTAction == WaferRobotTAction.LLA && CurrentRobotPosition != RobotPosition.Origin)
  1052. //{
  1053. // CurrentRobotPosition = RobotPosition.Origin;
  1054. // await Task.Delay(600);
  1055. //}
  1056. }
  1057. #endregion
  1058. }
  1059. }