OperationOverViewModel.cs 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  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. if (dialog.ShowDialog() == true)
  513. {
  514. if ((bool)dialog.AlignFlag == true && !string.IsNullOrEmpty(dialog.Angle))
  515. {
  516. angel = Convert.ToDouble(dialog.Angle);
  517. }
  518. if ((bool)dialog.CoolingFlag == true && !string.IsNullOrEmpty(dialog.CoolingTime))
  519. {
  520. coolingtime = Convert.ToDouble(dialog.CoolingTime);
  521. }
  522. InvokeClient.Instance.Service.DoOperation("System.ReturnAllWafer", dialog.CoolingFlag, coolingtime, dialog.AlignFlag, angel);
  523. }
  524. }
  525. private void OnSetSequence(object obj)
  526. {
  527. var info = obj as WaferInfo;
  528. bool flag = info.SequenceName != "" ? false : true;
  529. if (info.ModuleID == "LP1")
  530. {
  531. AssociateSequence(LP1WaferAssociation, flag, info.SlotID);
  532. }
  533. else if (info.ModuleID == "LP2")
  534. {
  535. AssociateSequence(LP2WaferAssociation, flag, info.SlotID);
  536. }
  537. else if (info.ModuleID == "LP3")
  538. {
  539. AssociateSequence(LP3WaferAssociation, flag, info.SlotID);
  540. }
  541. }
  542. private void OnCreateJob(object obj)
  543. {
  544. var info = obj as WaferAssociationInfo;
  545. List<string> slotSequence = new List<string>();
  546. info.ModuleData.WaferManager.Wafers.ForEach(key => { slotSequence.Insert(0, key.SequenceName); });
  547. string jobId = info.LotId.Trim();
  548. if (string.IsNullOrEmpty(jobId))
  549. jobId = "CJ_Local_" + info.ModuleData.ModuleID;
  550. info.LotId = jobId;
  551. info.JobID = jobId;
  552. info.JobStatus = "WaitingForStart";
  553. info.LotIdSaved = true;
  554. Dictionary<string, object> param = new Dictionary<string, object>()
  555. {
  556. {"JobId", jobId},
  557. {"Module", info.ModuleData.ModuleID},
  558. {"SlotSequence", slotSequence.ToArray()},
  559. {"AutoStart", true},
  560. };
  561. InvokeClient.Instance.Service.DoOperation("System.CreateJob", param);
  562. }
  563. private void OnEnableAuto()
  564. {
  565. InvokeClient.Instance.Service.DoOperation("System.SetAutoMode");
  566. }
  567. private void OnEnableManual()
  568. {
  569. InvokeClient.Instance.Service.DoOperation("System.SetManualMode");
  570. }
  571. #endregion
  572. #region 私有方法
  573. private void Timer_Tick(object sender, EventArgs e)
  574. {
  575. LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
  576. LP2ModuleInfo = ModuleManager.ModuleInfos["LP2"];
  577. LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
  578. EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
  579. TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
  580. BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  581. BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  582. RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
  583. if (LLAIsInstalled == true)
  584. {
  585. LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
  586. LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
  587. }
  588. if (LLBIsInstalled == true)
  589. {
  590. LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
  591. LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
  592. }
  593. if (PMAIsInstalled == true)
  594. {
  595. PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
  596. PMARecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMA.CurrentRecipeResult");
  597. }
  598. if (PMBIsInstalled == true)
  599. {
  600. PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
  601. PMBRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMB.CurrentRecipeResult");
  602. }
  603. if (PMCIsInstalled == true)
  604. {
  605. PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
  606. PMCRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMC.CurrentRecipeResult");
  607. }
  608. if (PMDIsInstalled == true)
  609. {
  610. PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
  611. PMDRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMD.CurrentRecipeResult");
  612. }
  613. if (TMIsInstalled == true)
  614. {
  615. TMBladeAWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0];
  616. TMBladeBWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1];
  617. }
  618. if (EFEMIsInstalled == true)
  619. {
  620. EFEMBladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  621. EFEMBladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  622. Aligner1Wafer = ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers[0];
  623. }
  624. RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
  625. EfemRobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
  626. LP1WaferCount = LP1ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  627. LP2WaferCount = LP2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  628. LP3WaferCount = LP3ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
  629. }
  630. private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
  631. {
  632. string RobotTarget;
  633. if (oldValue == null || newValue == null)
  634. {
  635. return;
  636. }
  637. #region Rotating
  638. if ((oldValue.Action == RobotAction.None||oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Rotating))
  639. {
  640. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  641. if (TMRobotMoveActionBladeTarget != null)
  642. {
  643. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  644. }
  645. else
  646. {
  647. return;
  648. }
  649. var values = RobotTarget.Split('.');
  650. var arm = values[0];
  651. var module = values[1];
  652. if (arm == "ArmA")
  653. {
  654. Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  655. }
  656. else if (arm == "ArmB")
  657. {
  658. Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  659. }
  660. }
  661. #endregion
  662. #region pick 和 place LL
  663. else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
  664. {
  665. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  666. if (TMRobotMoveActionBladeTarget != null)
  667. {
  668. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  669. }
  670. else
  671. {
  672. return;
  673. }
  674. var values = RobotTarget.Split('.');
  675. var arm = values[0];
  676. var module = values[1];
  677. if (arm == "ArmA")
  678. {
  679. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  680. if (waferRobotTAction != Robot1TAction)
  681. {
  682. Robot1TAction = waferRobotTAction;
  683. }
  684. else
  685. {
  686. //await Task.Delay(100);
  687. }
  688. await Task.Delay(600);
  689. //Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  690. //await Task.Delay(600);
  691. Robot1XAction = WaferRobotXAction.Extend;
  692. 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))
  693. {
  694. await Task.Delay(100);
  695. }
  696. Robot1XAction = WaferRobotXAction.Retract;
  697. }
  698. else if (arm == "ArmB")
  699. {
  700. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  701. if (waferRobotTAction != Robot2TAction)
  702. {
  703. Robot2TAction = waferRobotTAction;
  704. }
  705. else
  706. {
  707. //await Task.Delay(100);
  708. }
  709. await Task.Delay(600);
  710. //Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  711. //await Task.Delay(600);
  712. Robot2XAction = WaferRobotXAction.Extend;
  713. 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))
  714. {
  715. await Task.Delay(100);
  716. }
  717. Robot2XAction = WaferRobotXAction.Retract;
  718. }
  719. }
  720. #endregion
  721. #region pick 和 place pm
  722. else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Extending)
  723. {
  724. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  725. if (TMRobotMoveActionBladeTarget != null)
  726. {
  727. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  728. }
  729. else
  730. {
  731. return;
  732. }
  733. var values = RobotTarget.Split('.');
  734. var arm = values[0];
  735. var module = values[1];
  736. if (arm == "ArmA")
  737. {
  738. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  739. if (waferRobotTAction != Robot1TAction)
  740. {
  741. Robot1TAction = waferRobotTAction;
  742. }
  743. else
  744. {
  745. // await Task.Delay(100);
  746. }
  747. await Task.Delay(600);
  748. Robot1XAction = WaferRobotXAction.Extend;
  749. }
  750. else if (arm == "ArmB")
  751. {
  752. var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  753. if (waferRobotTAction != Robot2TAction)
  754. {
  755. Robot2TAction = waferRobotTAction;
  756. }
  757. else
  758. {
  759. // await Task.Delay(100);
  760. }
  761. await Task.Delay(600);
  762. Robot2XAction = WaferRobotXAction.Extend;
  763. }
  764. }
  765. else if ((oldValue.Action == RobotAction.None|| oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Retracting)
  766. {
  767. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  768. if (TMRobotMoveActionBladeTarget != null)
  769. {
  770. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  771. }
  772. else
  773. {
  774. return;
  775. }
  776. var values = RobotTarget.Split('.');
  777. var arm = values[0];
  778. if (arm == "ArmA")
  779. {
  780. Robot1XAction = WaferRobotXAction.Retract;
  781. }
  782. else if (arm == "ArmB")
  783. {
  784. Robot2XAction = WaferRobotXAction.Retract;
  785. }
  786. }
  787. #endregion
  788. }
  789. private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
  790. {
  791. string RobotTarget;
  792. if (oldValue == null || newValue == null)
  793. {
  794. return;
  795. }
  796. #region pick 和 place LL
  797. if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget!=newValue.ArmTarget) && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
  798. {
  799. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  800. if (TMRobotMoveActionBladeTarget != null)
  801. {
  802. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  803. }
  804. else
  805. {
  806. return;
  807. }
  808. var values = RobotTarget.Split('.');
  809. var arm = values[0];
  810. var module = values[1];
  811. if (arm == "ArmA")
  812. {
  813. var robot3Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  814. //await Task.Delay(1000);
  815. await ChangePosition(robot3Robot3TAction);
  816. if (Robot3TAction != robot3Robot3TAction)
  817. {
  818. Robot3TAction = robot3Robot3TAction;
  819. await Task.Delay(600);
  820. }
  821. Robot3XAction = WaferRobotXAction.Extend;
  822. 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))
  823. {
  824. await Task.Delay(100);
  825. }
  826. Robot3XAction = WaferRobotXAction.Retract;
  827. }
  828. else if (arm == "ArmB")
  829. {
  830. var robot4Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  831. //await Task.Delay(1000);
  832. await ChangePosition(robot4Robot4TAction);
  833. if (Robot4TAction != robot4Robot4TAction)
  834. {
  835. Robot4TAction = robot4Robot4TAction;
  836. await Task.Delay(600);
  837. }
  838. //ChangePosition(Robot4TAction);
  839. //await Task.Delay(2000);
  840. Robot4XAction = WaferRobotXAction.Extend;
  841. 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))
  842. {
  843. await Task.Delay(100);
  844. }
  845. Robot4XAction = WaferRobotXAction.Retract;
  846. }
  847. }
  848. #endregion
  849. #region pick 和 place pm
  850. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
  851. {
  852. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  853. if (TMRobotMoveActionBladeTarget != null)
  854. {
  855. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  856. }
  857. else
  858. {
  859. return;
  860. }
  861. var values = RobotTarget.Split('.');
  862. var arm = values[0];
  863. var module = values[1];
  864. if (arm == "ArmA")
  865. {
  866. Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  867. await Task.Delay(1500);
  868. //ChangePosition(Robot3TAction);
  869. //await Task.Delay(2000);
  870. Robot3XAction = WaferRobotXAction.Extend;
  871. }
  872. else if (arm == "ArmB")
  873. {
  874. Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
  875. await Task.Delay(1500);
  876. //ChangePosition(Robot4TAction);
  877. //await Task.Delay(2000);
  878. Robot4XAction = WaferRobotXAction.Extend;
  879. }
  880. }
  881. if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
  882. {
  883. var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
  884. if (TMRobotMoveActionBladeTarget != null)
  885. {
  886. RobotTarget = TMRobotMoveActionBladeTarget.ToString();
  887. }
  888. else
  889. {
  890. return;
  891. }
  892. var values = RobotTarget.Split('.');
  893. var arm = values[0];
  894. if (arm == "ArmA")
  895. {
  896. Robot3XAction = WaferRobotXAction.Retract;
  897. await Task.Delay(3000);
  898. //ChangePosition(Robot3TAction);
  899. //await Task.Delay(2000);
  900. }
  901. else if (arm == "ArmB")
  902. {
  903. Robot4XAction = WaferRobotXAction.Retract;
  904. await Task.Delay(3000);
  905. //ChangePosition(Robot3TAction);
  906. //await Task.Delay(2000);
  907. }
  908. }
  909. #endregion
  910. }
  911. private void addDataKeys()
  912. {
  913. if (PMAIsInstalled == true)
  914. {
  915. m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
  916. m_RtDataKeys.Add("PMA.CurrentRecipeResult");
  917. m_RtDataKeys.Add("PMA.IsOnline");
  918. }
  919. if (PMBIsInstalled == true)
  920. {
  921. m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
  922. m_RtDataKeys.Add("PMB.CurrentRecipeResult");
  923. m_RtDataKeys.Add("PMB.IsOnline");
  924. }
  925. if (PMCIsInstalled == true)
  926. {
  927. m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
  928. m_RtDataKeys.Add("PMC.CurrentRecipeResult");
  929. m_RtDataKeys.Add("PMC.IsOnline");
  930. }
  931. if (PMDIsInstalled == true)
  932. {
  933. m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
  934. m_RtDataKeys.Add("PMD.CurrentRecipeResult");
  935. m_RtDataKeys.Add("PMD.IsOnline");
  936. }
  937. if (TMIsInstalled == true)
  938. {
  939. m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
  940. m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
  941. m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
  942. m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
  943. m_RtDataKeys.Add("TM.IsOnline");
  944. }
  945. if (LLAIsInstalled == true)
  946. {
  947. m_RtDataKeys.Add("LLA.IsOnline");
  948. m_RtDataKeys.Add($"TM.LLAPressureGauge.Value");
  949. m_RtDataKeys.Add($"TM.LLAVacSwitch.Value");
  950. m_RtDataKeys.Add($"TM.LLAATMSwitch.Value");
  951. }
  952. if (LLBIsInstalled == true)
  953. {
  954. m_RtDataKeys.Add("LLB.IsOnline");
  955. m_RtDataKeys.Add($"TM.LLBPressureGauge.Value");
  956. m_RtDataKeys.Add($"TM.LLBVacSwitch.Value");
  957. m_RtDataKeys.Add($"TM.LLBATMSwitch.Value");
  958. }
  959. if (EFEMIsInstalled == true)
  960. {
  961. m_RtDataKeys.Add("LP1.IsLoaded");
  962. m_RtDataKeys.Add("LP2.IsLoaded");
  963. m_RtDataKeys.Add("LP3.IsLoaded");
  964. m_RtDataKeys.Add("LP1.CassettePlaced");
  965. m_RtDataKeys.Add("LP2.CassettePlaced");
  966. m_RtDataKeys.Add("LP3.CassettePlaced");
  967. m_RtDataKeys.Add("EFEM.IsOnline");
  968. }
  969. m_RtDataKeys.Add("System.IsAutoMode");
  970. m_RtDataKeys.Add("Scheduler.CycledCount");
  971. m_RtDataKeys.Add("Scheduler.CycledWafer");
  972. m_RtDataKeys.Add("Scheduler.CycleSetPoint");
  973. m_RtDataKeys.Add("Scheduler.Throughput");
  974. }
  975. private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)
  976. {
  977. List<WaferInfo> wafers = info.ModuleData.WaferManager.Wafers;
  978. if (slot >= 0) //by wafer
  979. {
  980. int index = wafers.Count - slot - 1;
  981. if (index < wafers.Count)
  982. {
  983. if (flag && HasWaferOnSlot(wafers, index))
  984. wafers[index].SequenceName = info.SequenceName;
  985. else
  986. wafers[index].SequenceName = string.Empty;
  987. }
  988. }
  989. else //by from-to
  990. {
  991. for (int i = info.SlotFrom - 1; i < info.SlotTo; i++)
  992. {
  993. int index = wafers.Count - i - 1;
  994. if (index < wafers.Count)
  995. {
  996. if (flag && HasWaferOnSlot(wafers, index))
  997. wafers[index].SequenceName = info.SequenceName;
  998. else
  999. wafers[index].SequenceName = string.Empty;
  1000. }
  1001. }
  1002. }
  1003. switch (info.ModuleData.ModuleID)
  1004. {
  1005. case "LP1":
  1006. LP1WaferAssociation = info;
  1007. break;
  1008. case "LP2":
  1009. LP2WaferAssociation = info;
  1010. break;
  1011. case "LP3":
  1012. LP3WaferAssociation = info;
  1013. break;
  1014. }
  1015. }
  1016. private bool HasWaferOnSlot(List<WaferInfo> wafers, int index)
  1017. {
  1018. if (wafers[index].WaferStatus == 0)
  1019. return false;
  1020. return true;
  1021. }
  1022. private async Task ChangePosition(WaferRobotTAction waferRobotTAction)
  1023. {
  1024. await Task.Delay(500);
  1025. int delay = 500;
  1026. if (waferRobotTAction == WaferRobotTAction.LP1)
  1027. {
  1028. CurrentRobotPosition = RobotPosition.Left;
  1029. await Task.Delay(delay);
  1030. }
  1031. else if (waferRobotTAction == WaferRobotTAction.LP3)
  1032. {
  1033. CurrentRobotPosition = RobotPosition.Right;
  1034. await Task.Delay(delay);
  1035. }
  1036. else if (waferRobotTAction == WaferRobotTAction.LP2)
  1037. {
  1038. CurrentRobotPosition = RobotPosition.Middle;
  1039. await Task.Delay(delay);
  1040. }
  1041. else
  1042. {
  1043. CurrentRobotPosition = RobotPosition.Origin;
  1044. await Task.Delay(delay);
  1045. }
  1046. //await Task.Delay(100);
  1047. //else if (waferRobotTAction == WaferRobotTAction.LLA && CurrentRobotPosition != RobotPosition.Origin)
  1048. //{
  1049. // CurrentRobotPosition = RobotPosition.Origin;
  1050. // await Task.Delay(600);
  1051. //}
  1052. }
  1053. #endregion
  1054. }
  1055. }