SchedulerLoaderTransporter.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. using Aitex.Core.RT.Fsm;
  2. using Aitex.Core.Util;
  3. using MECF.Framework.Common.CommonData;
  4. using MECF.Framework.Common.Equipment;
  5. using MECF.Framework.Common.SubstrateTrackings;
  6. using CyberX8_Core;
  7. using CyberX8_RT.Modules;
  8. using CyberX8_RT.Modules.Loader;
  9. using CyberX8_RT.Modules.Transporter;
  10. using CyberX8_RT.Modules.PUF;
  11. using System;
  12. using System.Collections.Generic;
  13. using System.Linq;
  14. using System.ServiceModel.Syndication;
  15. using System.Text;
  16. using System.Threading.Tasks;
  17. using CyberX8_RT.Modules.Prewet;
  18. using Aitex.Core.RT.Device;
  19. using CyberX8_RT.Devices.AXIS;
  20. using MECF.Framework.Common.WaferHolder;
  21. using Aitex.Core.RT.Log;
  22. namespace CyberX8_RT.Schedulers.Transporter
  23. {
  24. public class SchedulerLoaderTransporter : SchedulerModule
  25. {
  26. private enum TransBufferToLoaderStep
  27. {
  28. None,
  29. NotifyLoaderPrepare,
  30. WaitLoaderPrePare,
  31. PickUpValidate,
  32. PickUpValidateMoveto,
  33. Place,
  34. End
  35. }
  36. #region 内部变量
  37. private LoaderEntity _loaderEntity;
  38. private TransporterEntity _loaderTransporterEntity;
  39. private TransporterEntity _processTransporterEntity;
  40. private TransBufferToLoaderStep _transBufferToLoaderStep = TransBufferToLoaderStep.None;
  41. private SchedulerPostMsg _schedulerPostMsg = new SchedulerPostMsg();
  42. private bool _postMsgResult = false;
  43. #endregion
  44. #region 属性
  45. public override bool IsIdle
  46. {
  47. get { return _state == RState.End; }
  48. }
  49. public bool IsBusy
  50. {
  51. get { return _state == RState.Running; }
  52. }
  53. public override bool IsError
  54. {
  55. get { return _state==RState.Failed||_state==RState.Timeout; }
  56. }
  57. #endregion
  58. /// <summary>
  59. /// 构造函数
  60. /// </summary>
  61. /// <param name="module"></param>
  62. public SchedulerLoaderTransporter(ModuleName module) : base(module.ToString())
  63. {
  64. _loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());
  65. _loaderTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter2.ToString());
  66. _processTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter1.ToString());
  67. }
  68. /// <summary>
  69. /// 执行
  70. /// </summary>
  71. /// <param name="parameter"></param>
  72. /// <returns></returns>
  73. public override bool RunProcess(object recipe, object parameter,List<SchedulerSyncModuleMessage> syncMessages)
  74. {
  75. if (parameter==null||!(parameter is WaferHolderMoveItem))
  76. {
  77. return false;
  78. }
  79. SynchorinzeModuleMessages(syncMessages);
  80. WaferHolderMoveItem waferHolderMoveItem=(WaferHolderMoveItem)parameter;
  81. if(waferHolderMoveItem.SourceModule!=ModuleName.Unknown&&waferHolderMoveItem.DestModule!=ModuleName.Unknown)
  82. {
  83. SchedulerProcessTransporter schedulerProcessTransporter = (SchedulerProcessTransporter)SchedulerManager.Instance.GetScheduler(ModuleName.Transporter1);
  84. if(schedulerProcessTransporter.IsBusy&&_processTransporterEntity.IsIdle)
  85. {
  86. return false;
  87. }
  88. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.SourceModule.ToString()))
  89. {
  90. return false;
  91. }
  92. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.DestModule.ToString()))
  93. {
  94. return false;
  95. }
  96. string strSource = waferHolderMoveItem.SourceModule.ToString();
  97. if(waferHolderMoveItem.SourceModule==ModuleName.Loader1)
  98. {
  99. strSource = "Loader";
  100. }
  101. //由于PickUpValidate可能存在校验失败的现象
  102. if (!WaferHolderManager.Instance.HasWaferHolder(strSource)&&_loaderTransporterEntity.State!=(int)TransporterState.PickUpValidateComplete)
  103. {
  104. return false;
  105. }
  106. string strDest = waferHolderMoveItem.DestModule.ToString();
  107. if(waferHolderMoveItem.DestModule==ModuleName.Loader1)
  108. {
  109. strDest = "Loader";
  110. }
  111. if(WaferHolderManager.Instance.HasWaferHolder(strDest))
  112. {
  113. return false;
  114. }
  115. if (waferHolderMoveItem.DestModule==ModuleName.Loader1)
  116. {
  117. return TransferWaferHolderToLoader(waferHolderMoveItem);
  118. }
  119. else if(waferHolderMoveItem.SourceModule==ModuleName.Loader1)
  120. {
  121. return TransWaferHolderFromLoader(waferHolderMoveItem);
  122. }
  123. else if(waferHolderMoveItem.SourceModuleType!=ModuleType.Loader&&waferHolderMoveItem.DestModuleType!=ModuleType.Loader)
  124. {
  125. return TransferWaferHolderNonLoader(waferHolderMoveItem);
  126. }
  127. }
  128. return true;
  129. }
  130. /// <summary>
  131. /// WaferHolder从Loader移动至Buffer
  132. /// </summary>
  133. private bool TransWaferHolderFromLoader(WaferHolderMoveItem waferHolderMoveItem)
  134. {
  135. if (_loaderEntity.IsBusy)
  136. {
  137. return false;
  138. }
  139. if (_loaderEntity.WaferHolderInfo == null)
  140. {
  141. return false;
  142. }
  143. bool result = _loaderTransporterEntity.CheckToPostMessage<TransporterState, TransporterMSG>(Aitex.Core.RT.Log.eEvent.WARN_TRANSPORTER,
  144. Module.ToString(), (int)TransporterMSG.Transfer, "Loader", waferHolderMoveItem.DestModule.ToString());
  145. if (result)
  146. {
  147. _state = RState.Running;
  148. _schedulerPostMsg.Reset();
  149. _postMsgResult = false;
  150. }
  151. return result;
  152. }
  153. /// <summary>
  154. /// WaferHolder从Buffer移动至Loader
  155. /// </summary>
  156. private bool TransferWaferHolderToLoader(WaferHolderMoveItem waferHolderMoveItem)
  157. {
  158. if (_loaderEntity.WaferHolderInfo != null)
  159. {
  160. return false;
  161. }
  162. if (_loaderEntity.IsIdle)
  163. {
  164. bool loaderResult = _loaderEntity.CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.WARN_LOADER,
  165. _loaderEntity.Module.ToString(), (int)LoaderMSG.PrepareForPlace);
  166. if (loaderResult)
  167. {
  168. _transBufferToLoaderStep = TransBufferToLoaderStep.WaitLoaderPrePare;
  169. }
  170. return false;
  171. }
  172. else if (_loaderEntity.State == (int)LOADERSTATE.WaitForUnload&&_transBufferToLoaderStep<TransBufferToLoaderStep.PickUpValidate)
  173. {
  174. _transBufferToLoaderStep = TransBufferToLoaderStep.PickUpValidate;
  175. return false;
  176. }
  177. else if (_transBufferToLoaderStep == TransBufferToLoaderStep.WaitLoaderPrePare)
  178. {
  179. if (_loaderEntity.State == (int)LOADERSTATE.WaitForUnload)
  180. {
  181. _transBufferToLoaderStep = TransBufferToLoaderStep.PickUpValidate;
  182. }
  183. return false;
  184. }
  185. else if (_transBufferToLoaderStep == TransBufferToLoaderStep.PickUpValidate)
  186. {
  187. if(_loaderTransporterEntity.IsBusy)
  188. {
  189. return false;
  190. }
  191. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.SourceModule.ToString()))
  192. {
  193. return false;
  194. }
  195. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.DestModule.ToString()))
  196. {
  197. return false;
  198. }
  199. bool result = _loaderTransporterEntity.CheckToPostMessage<TransporterState, TransporterMSG>(Aitex.Core.RT.Log.eEvent.WARN_TRANSPORTER,
  200. Module.ToString(), (int)TransporterMSG.PickUpValidate, waferHolderMoveItem.SourceModule.ToString());
  201. if (result)
  202. {
  203. _transBufferToLoaderStep= TransBufferToLoaderStep.PickUpValidateMoveto;
  204. _state = RState.Running;
  205. _schedulerPostMsg.Reset();
  206. _postMsgResult = false;
  207. return true;
  208. }
  209. }
  210. return false;
  211. }
  212. /// <summary>
  213. /// 传输WaferHolder(无WaferHolder)
  214. /// </summary>
  215. /// <param name="waferHolderMoveItem"></param>
  216. private bool TransferWaferHolderNonLoader(WaferHolderMoveItem waferHolderMoveItem)
  217. {
  218. IModuleEntity moduleEntity = Singleton<RouteManager>.Instance.GetModule<IModuleEntity>(waferHolderMoveItem.DestModule.ToString());
  219. if (moduleEntity != null)
  220. {
  221. if (waferHolderMoveItem.SourceModule == ModuleName.Unknown || waferHolderMoveItem.DestModule == ModuleName.Unknown)
  222. {
  223. return false;
  224. }
  225. if (moduleEntity.Module == ModuleName.Prewet1)
  226. {
  227. PrewetEntity prewetEntity = moduleEntity as PrewetEntity;
  228. if(prewetEntity.State!=(int)PrewetState.WaitForPlace)
  229. {
  230. return false;
  231. }
  232. }
  233. else
  234. {
  235. if (!moduleEntity.IsIdle)
  236. {
  237. return false;
  238. }
  239. }
  240. if (waferHolderMoveItem.SourceModule != ModuleName.Unknown)
  241. {
  242. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.SourceModule.ToString()))
  243. {
  244. return false;
  245. }
  246. }
  247. if (waferHolderMoveItem.DestModule != ModuleName.Unknown)
  248. {
  249. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.DestModule.ToString()))
  250. {
  251. return false;
  252. }
  253. }
  254. bool result = _loaderTransporterEntity.CheckToPostMessage<TransporterState, TransporterMSG>(Aitex.Core.RT.Log.eEvent.WARN_TRANSPORTER,
  255. Module.ToString(), (int)TransporterMSG.Transfer, waferHolderMoveItem.SourceModule.ToString(), waferHolderMoveItem.DestModule.ToString());
  256. if (result)
  257. {
  258. _state = RState.Running;
  259. _postMsgResult = false;
  260. _schedulerPostMsg.Reset();
  261. }
  262. return result;
  263. }
  264. return false;
  265. }
  266. /// <summary>
  267. /// 监控执行
  268. /// </summary>
  269. /// <returns></returns>
  270. public override bool MonitorProcess(SchedulerSequence schedulerSequence, bool hasMatchWafer)
  271. {
  272. WaferHolderMoveItem moveItem=schedulerSequence.Parameters as WaferHolderMoveItem;
  273. //检验PostMsg的结果
  274. if (!_postMsgResult)
  275. {
  276. if (_loaderTransporterEntity.IsError)
  277. {
  278. return false;
  279. }
  280. _postMsgResult = CheckPostMsg(moveItem);
  281. if (!_postMsgResult)
  282. {
  283. return false;
  284. }
  285. }
  286. if (moveItem.DestModule == ModuleName.Loader1)
  287. {
  288. if (_transBufferToLoaderStep == TransBufferToLoaderStep.PickUpValidateMoveto)
  289. {
  290. if (_loaderTransporterEntity.IsIdle)
  291. {
  292. _state = RState.Failed;
  293. _transBufferToLoaderStep = TransBufferToLoaderStep.None;
  294. return false;
  295. }
  296. if (_loaderTransporterEntity.State == (int)TransporterState.PickUpValidateComplete)
  297. {
  298. if (!_loaderTransporterEntity.CheckOtherEntityStatus("Loader"))
  299. {
  300. return false;
  301. }
  302. bool result = _loaderTransporterEntity.CheckToPostMessage<TransporterState, TransporterMSG>(Aitex.Core.RT.Log.eEvent.WARN_TRANSPORTER,
  303. Module.ToString(), (int)TransporterMSG.MoveTo, "Loader");
  304. if (result)
  305. {
  306. _transBufferToLoaderStep = TransBufferToLoaderStep.Place;
  307. }
  308. }
  309. return true;
  310. }
  311. else if (_transBufferToLoaderStep == TransBufferToLoaderStep.Place)
  312. {
  313. if (_loaderTransporterEntity.State == (int)TransporterState.ValidateMoveToComplete)
  314. {
  315. bool result = _loaderTransporterEntity.CheckToPostMessage<TransporterState, TransporterMSG>(Aitex.Core.RT.Log.eEvent.WARN_TRANSPORTER,
  316. Module.ToString(), (int)TransporterMSG.Place, "Loader");
  317. if (result)
  318. {
  319. _transBufferToLoaderStep = TransBufferToLoaderStep.End;
  320. }
  321. }
  322. return true;
  323. }
  324. }
  325. if (_loaderTransporterEntity.IsIdle)
  326. {
  327. if(_loaderTransporterEntity.WaferHolderInfo!=null)
  328. {
  329. return false;
  330. }
  331. PrewetPickComplete(schedulerSequence);
  332. _state = RState.End;
  333. }
  334. return true;
  335. }
  336. /// <summary>
  337. /// 检验PostMsg的结果
  338. /// </summary>
  339. /// <param name="waferHolderMoveItem"></param>
  340. /// <returns></returns>
  341. private bool CheckPostMsg(WaferHolderMoveItem waferHolderMoveItem)
  342. {
  343. if (waferHolderMoveItem.DestModule == ModuleName.Loader1)
  344. {
  345. return _schedulerPostMsg.PostMsg<TransporterState,TransporterMSG>(_loaderTransporterEntity, _loaderTransporterEntity.State,
  346. eEvent.WARN_TRANSPORTER,Module.ToString(), (int)TransporterMSG.PickUpValidate,
  347. (int)TransporterState.PickUpValidating, waferHolderMoveItem.SourceModule.ToString());
  348. }
  349. else
  350. {
  351. return _schedulerPostMsg.PostMsg<TransporterState, TransporterMSG>(_loaderTransporterEntity, _loaderTransporterEntity.State,
  352. eEvent.WARN_TRANSPORTER, Module.ToString(), (int)TransporterMSG.Transfer,
  353. (int)TransporterState.Transfering, waferHolderMoveItem.SourceModule.ToString(),waferHolderMoveItem.DestModule.ToString());
  354. }
  355. }
  356. /// <summary>
  357. /// PrewetPick完成事件
  358. /// </summary>
  359. private void PrewetPickComplete(SchedulerSequence sequence)
  360. {
  361. if (sequence.Parameters is WaferHolderMoveItem)
  362. {
  363. WaferHolderMoveItem waferHolderMoveItem = (WaferHolderMoveItem)sequence.Parameters;
  364. if (waferHolderMoveItem.SourceModule == ModuleName.Prewet1)
  365. {
  366. PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(ModuleName.Prewet1.ToString());
  367. if (prewetEntity.State == (int)PrewetState.WaitForPick)
  368. {
  369. prewetEntity.CheckToPostMessage<PrewetState, PrewetMsg>(Aitex.Core.RT.Log.eEvent.WARN_PREWET, ModuleName.Prewet1.ToString(),
  370. (int)PrewetMsg.PickComplete);
  371. }
  372. }
  373. }
  374. }
  375. /// <summary>
  376. /// 检验前置条件
  377. /// </summary>
  378. /// <param name="sequenceIndex"></param>
  379. /// <param name="parameter"></param>
  380. /// <returns></returns>
  381. public override bool CheckPrecondition(List<SchedulerSequence> schedulerSequences, int sequenceIndex, object parameter, string materialId, ref string reason)
  382. {
  383. _state = RState.Init;
  384. if(!(parameter is WaferHolderMoveItem))
  385. {
  386. reason = "parameter is not WaferHolderMoveItem";
  387. return false;
  388. }
  389. if (_state == RState.Running)
  390. {
  391. reason = "scheduler module is already running";
  392. return false;
  393. }
  394. if (_loaderTransporterEntity.IsBusy)
  395. {
  396. reason = "loader transporter entity is busy";
  397. return false;
  398. }
  399. if (_loaderTransporterEntity.WaferHolderInfo != null&& _loaderTransporterEntity.State != (int)TransporterState.PickUpValidateComplete)
  400. {
  401. reason = "loader transporter has wafer shuttle,but state is not PickUpValidateComplete";
  402. return false;
  403. }
  404. //电机是否还在执行动作
  405. JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Transporter2}.Gantry");
  406. if (gantryAxis == null)
  407. {
  408. reason = "loader transporter gantry is null";
  409. return false;
  410. }
  411. if (gantryAxis.Status == RState.Running)
  412. {
  413. reason = "loader transporter gantry is running";
  414. return false;
  415. }
  416. JetAxisBase elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Transporter2}.Elevator");
  417. if (elevatorAxis == null)
  418. {
  419. reason = "loader transporter elevator is null";
  420. return false;
  421. }
  422. if (elevatorAxis.Status == RState.Running)
  423. {
  424. reason = "loader transporter elevator is running";
  425. return false;
  426. }
  427. WaferHolderMoveItem waferHolderMoveItem = (WaferHolderMoveItem)parameter;
  428. //更新未知目标模块
  429. bool result= UpdateUnkownTargetModule(schedulerSequences,waferHolderMoveItem,sequenceIndex, materialId);
  430. if(!result)
  431. {
  432. reason = "loader transporter moveitem target module is unknown";
  433. return false;
  434. }
  435. //更新未知源模块
  436. UpdateUnkownSourceModule(schedulerSequences, waferHolderMoveItem, sequenceIndex,materialId);
  437. if (waferHolderMoveItem.SourceModule != ModuleName.Unknown)
  438. {
  439. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.SourceModule.ToString()))
  440. {
  441. reason = $"loader transporter {waferHolderMoveItem.SourceModule} conflict process transporter";
  442. return false;
  443. }
  444. }
  445. if (waferHolderMoveItem.DestModule != ModuleName.Unknown)
  446. {
  447. if (!_loaderTransporterEntity.CheckOtherEntityStatus(waferHolderMoveItem.DestModule.ToString()))
  448. {
  449. reason = $"loader transporter {waferHolderMoveItem.DestModule} conflict process transporter";
  450. return false;
  451. }
  452. }
  453. //目标为Prewet
  454. if (waferHolderMoveItem.DestModule == ModuleName.Prewet1)
  455. {
  456. bool prewetCondition= CheckTargetPrewetCondition();
  457. if (!prewetCondition)
  458. {
  459. reason = "loader transporter destmodule prewet condition is not avaible";
  460. }
  461. return prewetCondition;
  462. }
  463. //源为Prewet
  464. if (waferHolderMoveItem.SourceModule == ModuleName.Prewet1)
  465. {
  466. bool prewetCondition= CheckSourcePrewetCondition();
  467. if (!prewetCondition)
  468. {
  469. reason = "loader transporter sourcemodule prewet condition is not avaible";
  470. }
  471. }
  472. return true;
  473. }
  474. /// <summary>
  475. /// 更新未知目标模块
  476. /// </summary>
  477. private bool UpdateUnkownTargetModule(List<SchedulerSequence> schedulerSequences, WaferHolderMoveItem waferHolderMoveItem, int sequenceIndex,string materialId)
  478. {
  479. SchedulerSequence currentSequence = schedulerSequences[sequenceIndex];
  480. if (waferHolderMoveItem.DestModule == ModuleName.Unknown)
  481. {
  482. ModuleName moduleName = SchedulerSequenceManager.Instance.GetAvaibleEmptyModuleCell(waferHolderMoveItem.DestModuleType,currentSequence.SequenceType);
  483. if (moduleName == ModuleName.Unknown)
  484. {
  485. return false;
  486. }
  487. else
  488. {
  489. waferHolderMoveItem.DestModule = moduleName;
  490. if (sequenceIndex + 1 < schedulerSequences.Count)
  491. {
  492. SchedulerSequence sequence = schedulerSequences[sequenceIndex + 1];
  493. if (sequence.SchedulerModule == null)
  494. {
  495. sequence.SchedulerModule = SchedulerManager.Instance.GetScheduler(moduleName);
  496. sequence.ModuleName = moduleName;
  497. LOG.WriteLog(eEvent.INFO_TRANSPORTER, Module.ToString(), $"{materialId} loadertransporter confirm source module {moduleName}");
  498. }
  499. }
  500. }
  501. }
  502. return true;
  503. }
  504. /// <summary>
  505. /// 更新未知源模块
  506. /// </summary>
  507. private void UpdateUnkownSourceModule(List<SchedulerSequence> schedulerSequences, WaferHolderMoveItem waferHolderMoveItem,int sequenceIndex,string materialId)
  508. {
  509. if (waferHolderMoveItem.SourceModule == ModuleName.Unknown)
  510. {
  511. if (sequenceIndex >= 1 && sequenceIndex - 1 < schedulerSequences.Count)
  512. {
  513. SchedulerSequence preSchedulerSequence = schedulerSequences[sequenceIndex - 1];
  514. if (preSchedulerSequence != null && preSchedulerSequence.SchedulerModule != null)
  515. {
  516. waferHolderMoveItem.SourceModule = preSchedulerSequence.SchedulerModule.Module;
  517. LOG.WriteLog(eEvent.INFO_TRANSPORTER, Module.ToString(), $"{materialId} loadertransporter confirm source module {preSchedulerSequence.SchedulerModule.Module}");
  518. }
  519. }
  520. }
  521. }
  522. /// <summary>
  523. /// 检验目标Prewet前置条件
  524. /// </summary>
  525. /// <returns></returns>
  526. private bool CheckTargetPrewetCondition()
  527. {
  528. PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(ModuleName.Prewet1.ToString());
  529. if(prewetEntity.IsIdle)
  530. {
  531. prewetEntity.CheckToPostMessage<PrewetState, PrewetMsg>(Aitex.Core.RT.Log.eEvent.WARN_PREWET, ModuleName.Prewet1.ToString(),
  532. (int)PrewetMsg.PrepareToPlace);
  533. }
  534. else if(prewetEntity.State==(int)PrewetState.WaitForPlace)
  535. {
  536. return true;
  537. }
  538. return false;
  539. }
  540. /// <summary>
  541. /// 检验源Prewet前置条件
  542. /// </summary>
  543. /// <returns></returns>
  544. private bool CheckSourcePrewetCondition()
  545. {
  546. PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(ModuleName.Prewet1.ToString());
  547. if (prewetEntity.State == (int)PrewetState.WaitForPick||prewetEntity.IsError)
  548. {
  549. return true;
  550. }
  551. return false;
  552. }
  553. public override void ResetTask()
  554. {
  555. base.ResetTask();
  556. _schedulerPostMsg.Reset();
  557. _postMsgResult = false;
  558. }
  559. }
  560. }