LoaderEntity.cs 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Fsm;
  4. using Aitex.Core.RT.Log;
  5. using Aitex.Core.RT.OperationCenter;
  6. using Aitex.Core.RT.Routine;
  7. using Aitex.Core.RT.SCCore;
  8. using Aitex.Core.Util;
  9. using Aitex.Core.Utilities;
  10. using MECF.Framework.Common.Equipment;
  11. using MECF.Framework.Common.SubstrateTrackings;
  12. using MECF.Framework.Common.Utilities;
  13. using MECF.Framework.Common.WaferHolder;
  14. using CyberX8_Core;
  15. using CyberX8_RT.Devices.AXIS;
  16. using CyberX8_RT.Devices.Loader;
  17. using System;
  18. using System.Collections.Generic;
  19. using System.Linq;
  20. using System.Text;
  21. using System.Threading.Tasks;
  22. using MECF.Framework.Common.Alarm;
  23. using MECF.Framework.Common.CommonData;
  24. using MECF.Framework.Common.Routine;
  25. using System.Collections;
  26. using System.Windows.Markup;
  27. using MECF.Framework.Common.CommonData.Loader;
  28. using Aitex.Core.Common;
  29. using MECF.Framework.RT.Core.Equipments;
  30. using CyberX8_RT.Modules.Dryer;
  31. namespace CyberX8_RT.Modules.Loader
  32. {
  33. public class LoaderEntity : Entity, IEntity, IModuleEntity
  34. {
  35. public enum LotTrackDatasStatus
  36. {
  37. None,
  38. Half,
  39. Complete
  40. }
  41. #region 属性
  42. public ModuleName Module { get; private set; }
  43. public bool IsInit
  44. {
  45. get { return fsm.State == (int)LOADERSTATE.Init; }
  46. }
  47. public bool IsIdle
  48. {
  49. get
  50. {
  51. return fsm.State == (int)LOADERSTATE.Idle;
  52. }
  53. }
  54. public bool IsError
  55. {
  56. get { return fsm.State == (int)LOADERSTATE.Error; }
  57. }
  58. public bool IsBusy
  59. {
  60. get { return !IsInit && !IsError && !IsIdle; }
  61. }
  62. public bool IsAuto { get; } = true;
  63. /// <summary>
  64. /// 是否为工程模式
  65. /// </summary>
  66. public bool IsEngineering { get; } = false;
  67. /// <summary>
  68. /// 是否为产品模式
  69. /// </summary>
  70. public bool IsProduction { get; } = true;
  71. public bool IsHomed
  72. {
  73. get { return _isHomed; }
  74. }
  75. /// <summary>
  76. /// 当前状态机状态
  77. /// </summary>
  78. public int State { get { return fsm.State; } }
  79. /// <summary>
  80. /// 是否禁用
  81. /// </summary>
  82. public bool IsDisable { get; internal set; }
  83. /// <summary>
  84. /// Rotation是否SwitchOn
  85. /// </summary>
  86. public bool IsRotationSwitchOn
  87. {
  88. get { return _rotationAxis.IsSwitchOn; }
  89. }
  90. /// <summary>
  91. /// ShuttleA是否SwitchOn
  92. /// </summary>
  93. public bool IsShuttleASwitchOn
  94. {
  95. get { return _shuttleAAxis.IsSwitchOn; }
  96. }
  97. /// <summary>
  98. /// ShuttleB是否SwitchOn
  99. /// </summary>
  100. public bool IsShuttleBSwitchOn
  101. {
  102. get { return _shuttleBAxis.IsSwitchOn; }
  103. }
  104. /// <summary>
  105. /// TiltA是否SwitchOn
  106. /// </summary>
  107. public bool IsTiltASwitchOn
  108. {
  109. get { return _tiltAAxis.IsSwitchOn; }
  110. }
  111. /// <summary>
  112. /// TiltB是否SwitchOn
  113. /// </summary>
  114. public bool IsTiltBSwitchOn
  115. {
  116. get { return _tiltBAxis.IsSwitchOn; }
  117. }
  118. /// <summary>
  119. /// CrsA是否SwitchOn
  120. /// </summary>
  121. public bool IsCrsASwitchOn
  122. {
  123. get { return _crsAAxis.IsSwitchOn; }
  124. }
  125. /// <summary>
  126. /// CrsB是否SwitchOn
  127. /// </summary>
  128. public bool IsCrsBSwitchOn
  129. {
  130. get { return _crsBAxis.IsSwitchOn; }
  131. }
  132. /// <summary>
  133. /// WaferHolder信息
  134. /// </summary>
  135. public WaferHolderInfo WaferHolderInfo { get { return WaferHolderManager.Instance.GetWaferHolder("Loader"); } }
  136. #endregion
  137. #region 内部变量
  138. private bool _isHomed = false;
  139. private IRoutine _currentRoutine;
  140. /// <summary>
  141. /// Loader当前unload、load操作Slot
  142. /// </summary>
  143. private Dictionary<string, List<string>> _loaderOperatingWaferInfosList = new Dictionary<string, List<string>> { { "unload", new List<string>(new string[2]) }, { "load", new List<string>(new string[2]) } };
  144. #region Axis
  145. JetAxisBase _shuttleAAxis;
  146. JetAxisBase _shuttleBAxis;
  147. JetAxisBase _tiltAAxis;
  148. JetAxisBase _tiltBAxis;
  149. JetAxisBase _crsAAxis;
  150. JetAxisBase _crsBAxis;
  151. JetAxisBase _rotationAxis;
  152. LoaderSideDevice _sideA;
  153. LoaderSideDevice _sideB;
  154. LoaderCommonDevice _loaderCommon;
  155. #endregion
  156. #region routine
  157. private LoaderHomeAllRoutine _homeAllRoutine;
  158. private LoaderSwitchAllOnRoutine _switchAllOnRoutine;
  159. private LoaderSwitchAllOffRoutine _switchAllOffRoutine;
  160. private LoaderUnloadSideRoutine _unloadSideRoutine;
  161. private LoaderLoadSideRoutine _loadSideRoutine;
  162. #endregion
  163. #region LotTrackDatas
  164. /// <summary>
  165. /// Load LotTrackData
  166. /// </summary>
  167. private List<LoaderLotTrackData> _loadLotTrackDatas = new List<LoaderLotTrackData>();
  168. /// <summary>
  169. /// UnLoad LotTrackData
  170. /// </summary>
  171. private List<LoaderLotTrackData> _unloadLotTrackDatas = new List<LoaderLotTrackData>();
  172. /// <summary>
  173. /// UnLoad LotTrackDataBuffer
  174. /// </summary>
  175. private List<LoaderLotTrackData> _unloadLotTrackDatasBuffer = new List<LoaderLotTrackData>();
  176. /// <summary>
  177. /// LeakTest LotTrackData
  178. /// </summary>
  179. private List<LoaderFlowLotTrackData> _flowLotTrackdatas = new List<LoaderFlowLotTrackData>();
  180. /// <summary>
  181. /// LoadTime
  182. /// </summary>
  183. private List<DateTime> _loadTimeList = new List<DateTime>();
  184. /// <summary>
  185. /// LoadTime
  186. /// </summary>
  187. private List<DateTime> _unloadTimeList = new List<DateTime>();
  188. /// <summary>
  189. /// Unload Start Time
  190. /// </summary>
  191. private DateTime _unloadStartTime;
  192. /// <summary>
  193. /// LotTrackHead
  194. /// </summary>
  195. private LotTrackFileHeaderCommonData _headerdata;
  196. /// <summary>
  197. /// Load Datas Status
  198. private LotTrackDatasStatus _loadDatasStatus = LotTrackDatasStatus.None;
  199. /// <summary>
  200. /// Unload Datas Status
  201. /// </summary>
  202. private LotTrackDatasStatus _unloadDatasStatus = LotTrackDatasStatus.None;
  203. /// <summary>
  204. /// Unload Datas Buffer Status
  205. /// </summary>
  206. private LotTrackDatasStatus _unloadDatasBufferStatus = LotTrackDatasStatus.None;
  207. /// <summary>
  208. /// Flow Test Datas status
  209. /// </summary>
  210. private LotTrackDatasStatus _flowTestDatasStatus = LotTrackDatasStatus.None;
  211. #endregion
  212. #endregion
  213. /// <summary>
  214. /// 构造函数
  215. /// </summary>
  216. /// <param name="module"></param>
  217. public LoaderEntity(ModuleName module)
  218. {
  219. this.Module = module;
  220. _shuttleAAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.ShuttleA");
  221. _shuttleBAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.ShuttleB");
  222. _tiltAAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.TiltA");
  223. _tiltBAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.TiltB");
  224. _crsAAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.LSA");
  225. _crsBAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.LSB");
  226. _rotationAxis = DEVICE.GetDevice<JetAxisBase>($"{module}.Rotation");
  227. _sideA = DEVICE.GetDevice<LoaderSideDevice>($"{Module}.SideA");
  228. _sideB = DEVICE.GetDevice<LoaderSideDevice>($"{Module}.SideB");
  229. _loaderCommon = DEVICE.GetDevice<LoaderCommonDevice>($"{module}.Common");
  230. WaferManager.Instance.SubscribeLocation(Module, 2);
  231. InitialOperation();
  232. InitializeRoutine();
  233. InitialDATA();
  234. InitialFsm();
  235. }
  236. /// <summary>
  237. /// 初始化操作
  238. /// </summary>
  239. private void InitialOperation()
  240. {
  241. OP.Subscribe($"{Module}.Abort", (cmd, args) => { return CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.Abort); });
  242. OP.Subscribe($"{Module}.ClearError", (cmd, args) => { return CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.ClearError); });
  243. OP.Subscribe($"{Module}.Common.HomeAll", (cmd, args) => { PostMsg((int)LoaderMSG.HomeAll); return true; });
  244. OP.Subscribe($"{Module}.Common.SwitchOnAll", (cmd, args) => { PostMsg((int)LoaderMSG.SwitchOnAll); return true; });
  245. OP.Subscribe($"{Module}.Common.SwitchOffAll", (cmd, args) => { PostMsg((int)LoaderMSG.SwitchOffAll); return true; });
  246. }
  247. /// <summary>
  248. /// 初始化Routine
  249. /// </summary>
  250. private void InitializeRoutine()
  251. {
  252. _homeAllRoutine=new LoaderHomeAllRoutine(Module.ToString());
  253. _switchAllOnRoutine=new LoaderSwitchAllOnRoutine(Module.ToString());
  254. _switchAllOffRoutine=new LoaderSwitchAllOffRoutine(Module.ToString());
  255. _unloadSideRoutine = new LoaderUnloadSideRoutine(Module.ToString());
  256. _loadSideRoutine=new LoaderLoadSideRoutine(Module.ToString());
  257. }
  258. /// <summary>
  259. /// 初始化数据
  260. /// </summary>
  261. private void InitialDATA()
  262. {
  263. InitializeSvid();
  264. DATA.Subscribe($"{Module}.FsmState", () => ((LOADERSTATE)fsm.State).ToString(), SubscriptionAttribute.FLAG.IgnoreSaveDB);
  265. DATA.Subscribe($"{Module}.IsHomed", () => _isHomed, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  266. DATA.Subscribe($"{Module}.IsError", () => IsError, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  267. }
  268. /// <summary>
  269. /// 初始化SVID
  270. /// </summary>
  271. private void InitializeSvid()
  272. {
  273. DATA.Subscribe($"{Module}.State", () => ((LOADERSTATE)fsm.State).ToString(), SubscriptionAttribute.FLAG.IgnoreSaveDB);
  274. DATA.Subscribe($"{Module}.LotID", () => WaferHolderInfo?.LotId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  275. DATA.Subscribe($"{Module}.WSID", () => WaferHolderInfo?.Id, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  276. DATA.Subscribe($"{Module}.LSAID", () => WaferHolderInfo?.CrsAId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  277. DATA.Subscribe($"{Module}.LSBID", () => WaferHolderInfo?.CrsBId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  278. DATA.Subscribe($"{Module}.SequenceRecipe", () => WaferHolderInfo?.SequenceId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  279. DATA.Subscribe($"{Module}.WaferAID", () => WaferHolderInfo?.WaferAId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  280. DATA.Subscribe($"{Module}.WaferBID", () => WaferHolderInfo?.WaferBId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  281. DATA.Subscribe($"{Module}.Task", () => WaferHolderInfo?.CurrentControlJobId, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  282. }
  283. /// <summary>
  284. /// 初始化状态机
  285. /// </summary>
  286. private void InitialFsm()
  287. {
  288. fsm = new StateMachine<LoaderEntity>(Module.ToString(), (int)LOADERSTATE.Init, 100);
  289. fsm.EnableRepeatedMsg(true);
  290. AnyStateTransition(LoaderMSG.Error, EnterError, LOADERSTATE.Error);
  291. AnyStateTransition(LoaderMSG.ReturnInit, EnterInit, LOADERSTATE.Init);
  292. AnyStateTransition(LoaderMSG.ReturnIdle, NullFunc, LOADERSTATE.Idle);
  293. AnyStateTransition(LoaderMSG.Abort, Abort, LOADERSTATE.Init);
  294. //clear error
  295. Transition(LOADERSTATE.Error, LoaderMSG.ClearError, ResumeError, LOADERSTATE.Init);
  296. //HomeAll
  297. AnyStateTransition(LoaderMSG.HomeAll, HomeAll, LOADERSTATE.Homing);
  298. Transition(LOADERSTATE.Homing, FSM_MSG.TIMER, HomeAllMonitor, LOADERSTATE.Idle);
  299. //Switch On All
  300. Transition(LOADERSTATE.Error, LoaderMSG.SwitchOnAll, SwitchOnAll, LOADERSTATE.SwitchOning);
  301. Transition(LOADERSTATE.Init, LoaderMSG.SwitchOnAll, SwitchOnAll, LOADERSTATE.SwitchOning);
  302. Transition(LOADERSTATE.Idle, LoaderMSG.SwitchOnAll, SwitchOnAll, LOADERSTATE.SwitchOning);
  303. Transition(LOADERSTATE.SwitchOning, FSM_MSG.TIMER, SwitchOnAllMonitor, LOADERSTATE.Init);
  304. //Switch Off All
  305. Transition(LOADERSTATE.Error, LoaderMSG.SwitchOffAll, SwitchOffAll, LOADERSTATE.SwitchOffing);
  306. Transition(LOADERSTATE.Init, LoaderMSG.SwitchOffAll, SwitchOffAll, LOADERSTATE.SwitchOffing);
  307. Transition(LOADERSTATE.Idle, LoaderMSG.SwitchOffAll, SwitchOffAll, LOADERSTATE.SwitchOffing);
  308. Transition(LOADERSTATE.SwitchOffing, FSM_MSG.TIMER, SwitchOffAllMonitor, LOADERSTATE.Init);
  309. //Prepare for Place
  310. Transition(LOADERSTATE.Idle, LoaderMSG.PrepareForPlace, PrePareForPlace, LOADERSTATE.PrepreForPlacing);
  311. Transition(LOADERSTATE.PrepreForPlacing, FSM_MSG.TIMER, PrepareForPlaceMonitor, LOADERSTATE.WaitForUnload);
  312. Transition(LOADERSTATE.Idle, LoaderMSG.ReadyForPuf, NullFunc, LOADERSTATE.WaitForUnload);
  313. Transition(LOADERSTATE.WaitForUnload, LoaderMSG.UnloadSide, UnloadSide, LOADERSTATE.Unloading);
  314. Transition(LOADERSTATE.Unloading, FSM_MSG.TIMER, UnloadSideMonitor, LOADERSTATE.WaitForLoad);
  315. Transition(LOADERSTATE.WaitForLoad, LoaderMSG.LoadSide, LoadSide, LOADERSTATE.Loading);
  316. Transition(LOADERSTATE.Loading, FSM_MSG.TIMER, LoadSideMonitor, LOADERSTATE.Idle);
  317. //Flip
  318. Transition(LOADERSTATE.Idle, LoaderMSG.WaitFlip, NullFunc, LOADERSTATE.WaitForFlip);
  319. Transition(LOADERSTATE.WaitForFlip,LoaderMSG.PrepareForPlace, PrePareForPlace, LOADERSTATE.PrepreForPlacing);
  320. //Retry
  321. Transition(LOADERSTATE.Error, LoaderMSG.Retry, NullFunc, LOADERSTATE.Retrying);
  322. Transition(LOADERSTATE.Retrying,FSM_MSG.TIMER,LoaderRetry,LOADERSTATE.Retrying);
  323. Transition(LOADERSTATE.Retrying, LoaderMSG.UnloadSide, RetryUnloadSide, LOADERSTATE.Unloading);
  324. Transition(LOADERSTATE.Retrying, LoaderMSG.LoadSide, RetryLoadSide, LOADERSTATE.Loading);
  325. //ConfirmComplete
  326. Transition(LOADERSTATE.Init, LoaderMSG.ConfirmComplete, ClearModuleAlarm, LOADERSTATE.Init);
  327. Transition(LOADERSTATE.Idle, LoaderMSG.ConfirmComplete, ClearModuleAlarm, LOADERSTATE.Idle);
  328. Transition(LOADERSTATE.Error, LoaderMSG.ConfirmComplete, NullFunc, LOADERSTATE.ConfirmCompleting);
  329. Transition(LOADERSTATE.ConfirmCompleting,FSM_MSG.TIMER,ConfirmComplete, LOADERSTATE.ConfirmCompleting);
  330. Transition(LOADERSTATE.ConfirmCompleting, LoaderMSG.PrepareForPlace, NullFunc, LOADERSTATE.WaitForUnload);
  331. Transition(LOADERSTATE.ConfirmCompleting,LoaderMSG.UnloadSide,ConfirmUnloadSide, LOADERSTATE.WaitForLoad);
  332. Transition(LOADERSTATE.ConfirmCompleting, LoaderMSG.LoadSide, ConfirmLoadSide, LOADERSTATE.Idle);
  333. EnumLoop<LOADERSTATE>.ForEach((item) => { fsm.MapState((int)item, item.ToString()); });
  334. EnumLoop<LoaderMSG>.ForEach((item) => { fsm.MapMessage((int)item, item.ToString()); });
  335. }
  336. /// <summary>
  337. /// 恢复错误
  338. /// </summary>
  339. /// <param name="param"></param>
  340. /// <returns></returns>
  341. private bool ResumeError(object[] param)
  342. {
  343. if (_isHomed)
  344. {
  345. PostMsg(LoaderMSG.ReturnIdle);
  346. return false;
  347. }
  348. return true;
  349. }
  350. /// <summary>
  351. /// 检验Loader两边waferSize不一致
  352. /// </summary>
  353. /// <returns></returns>
  354. public bool CheckLoaderWaferSizeNotEqual()
  355. {
  356. int sideAWaferSize = SC.GetValue<int>($"Loader1.SideAWaferSize");
  357. int sideBWaferSize = SC.GetValue<int>($"Loader1.SideBWaferSize");
  358. return sideAWaferSize != sideBWaferSize;
  359. }
  360. #region Abort
  361. private bool Abort(object parameter)
  362. {
  363. bool preHomed = IsHomed;
  364. _shuttleAAxis.StopPositionOperation();
  365. _shuttleBAxis.StopPositionOperation();
  366. _tiltAAxis.StopPositionOperation();
  367. _tiltBAxis.StopPositionOperation();
  368. _crsAAxis.StopPositionOperation();
  369. _crsBAxis.StopPositionOperation();
  370. _rotationAxis.StopPositionOperation();
  371. if (_currentRoutine != null)
  372. {
  373. _currentRoutine.Abort();
  374. _currentRoutine = null;
  375. }
  376. if (preHomed)
  377. {
  378. PostMsg(LoaderMSG.ReturnIdle);
  379. return false;
  380. }
  381. //Header信息
  382. if (_headerdata != null)
  383. {
  384. WaferHolderInfo info = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  385. _headerdata.SequenceRecipe = (info != null ? $"{info.SequenceRecipe.SequenceType}\\" + $"{info.SequenceRecipe.Ppid}.seq.rcp" : null);
  386. _headerdata.ProcessTransferList = (info != null ? info.SchedulerModules : null);
  387. LoaderLotTrackUtil.ExportLoaderLotTrack(Module.ToString(), _unloadLotTrackDatas, _loadLotTrackDatas, _flowLotTrackdatas, _headerdata, _loaderOperatingWaferInfosList,
  388. _loadTimeList, _unloadTimeList, _unloadStartTime, LotTrackDatasStatus.None, LotTrackDatasStatus.None, LotTrackDatasStatus.None, _unloadLotTrackDatasBuffer, LotTrackDatasStatus.None);
  389. }
  390. return true;
  391. }
  392. #endregion
  393. /// <summary>
  394. /// 进入错误状态
  395. /// </summary>
  396. /// <param name="param"></param>
  397. /// <returns></returns>
  398. private bool EnterError(object param)
  399. {
  400. return true;
  401. }
  402. /// <summary>
  403. /// 进入初始化状态
  404. /// </summary>
  405. /// <param name="param"></param>
  406. /// <returns></returns>
  407. private bool EnterInit(object param)
  408. {
  409. _isHomed = false;
  410. return true;
  411. }
  412. #region HomeAll
  413. /// <summary>
  414. /// Home All
  415. /// </summary>
  416. /// <param name="param"></param>
  417. /// <returns></returns>
  418. private bool HomeAll(object[] param)
  419. {
  420. _isHomed = false;
  421. bool result= _homeAllRoutine.Start(param) == RState.Running;
  422. if (result)
  423. {
  424. _currentRoutine = _homeAllRoutine;
  425. }
  426. return result;
  427. }
  428. /// <summary>
  429. /// Load All监控
  430. /// </summary>
  431. /// <param name="param"></param>
  432. /// <returns></returns>
  433. private bool HomeAllMonitor(object[] param)
  434. {
  435. RState state = _homeAllRoutine.Monitor();
  436. if (state==RState.Failed||state==RState.Timeout)
  437. {
  438. _currentRoutine = null;
  439. PostMsg(LoaderMSG.Error);
  440. return false;
  441. }
  442. bool result= state == RState.End;
  443. if(result)
  444. {
  445. _currentRoutine = null;
  446. _isHomed = true;
  447. }
  448. return result;
  449. }
  450. #endregion
  451. #region Switch On All
  452. private bool SwitchOnAll(object[] param)
  453. {
  454. return _switchAllOnRoutine.Start(param) == RState.Running;
  455. }
  456. private bool SwitchOnAllMonitor(object[] param)
  457. {
  458. RState state = _switchAllOnRoutine.Monitor();
  459. if (state == RState.Failed || state == RState.Timeout)
  460. {
  461. PostMsg(LoaderMSG.ReturnInit);
  462. return false;
  463. }
  464. bool result= state == RState.End;
  465. if(result)
  466. {
  467. _isHomed = false;
  468. }
  469. return result;
  470. }
  471. #endregion
  472. #region Switch Off All
  473. private bool SwitchOffAll(object[] param)
  474. {
  475. return _switchAllOffRoutine.Start(param) == RState.Running;
  476. }
  477. private bool SwitchOffAllMonitor(object[] param)
  478. {
  479. RState state = _switchAllOffRoutine.Monitor();
  480. if (state == RState.Failed || state == RState.Timeout)
  481. {
  482. PostMsg(LoaderMSG.ReturnInit);
  483. return false;
  484. }
  485. bool result = state == RState.End;
  486. if (result)
  487. {
  488. _isHomed = false;
  489. }
  490. return result;
  491. }
  492. #endregion
  493. #region Prepare for Place
  494. /// <summary>
  495. /// Prepare For Place
  496. /// </summary>
  497. /// <returns></returns>
  498. private bool PrePareForPlace(object[] param)
  499. {
  500. //默认"TRNPA"
  501. string str = (param==null||param.Length==0)? "TRNPA":param[0].ToString();
  502. return _rotationAxis.PositionStation(str);
  503. }
  504. /// <summary>
  505. /// Prepare For Place监控
  506. /// </summary>
  507. /// <param name="param"></param>
  508. /// <returns></returns>
  509. private bool PrepareForPlaceMonitor(object param)
  510. {
  511. RState ret = _rotationAxis.Status;
  512. if (ret == RState.End)
  513. {
  514. return true;
  515. }
  516. if (ret == RState.Failed || ret == RState.Timeout)
  517. {
  518. PostMsg(LoaderMSG.Error);
  519. }
  520. return false;
  521. }
  522. #endregion
  523. #region Unload Side
  524. /// <summary>
  525. /// Unload Side
  526. /// </summary>
  527. /// <param name="param"></param>
  528. /// <returns></returns>
  529. private bool UnloadSide(object[] param)
  530. {
  531. bool result= _unloadSideRoutine.Start(param) == RState.Running;
  532. if(result)
  533. {
  534. LotTrackDataClear();
  535. _currentRoutine = _unloadSideRoutine;
  536. _unloadLotTrackDatas.Clear();
  537. _unloadLotTrackDatasBuffer.Clear();
  538. _unloadTimeList.Clear();
  539. _unloadTimeList.Add(DateTime.Now);
  540. _unloadStartTime = DateTime.Now;
  541. _loaderOperatingWaferInfosList["unload"] = GetWaferInfo();
  542. //Header信息
  543. _headerdata = new LotTrackFileHeaderCommonData();
  544. _headerdata.SoftWareVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
  545. if (SC.ContainsItem("System.ToolID")) _headerdata.ToolID = SC.GetStringValue("System.ToolID");
  546. _loadDatasStatus = LotTrackDatasStatus.None;
  547. _unloadDatasStatus = LotTrackDatasStatus.None;
  548. _flowTestDatasStatus = LotTrackDatasStatus.None;
  549. _headerdata.ProcessTransferList = new List<string>();
  550. }
  551. return result;
  552. }
  553. /// <summary>
  554. /// Retry UloadSide
  555. /// </summary>
  556. /// <param name="param"></param>
  557. /// <returns></returns>
  558. private bool RetryUnloadSide(object[] param)
  559. {
  560. int stepIndex = (int)param[0];
  561. bool result = _unloadSideRoutine.Retry(stepIndex)==RState.Running;
  562. if (result)
  563. {
  564. _unloadDatasStatus = LotTrackDatasStatus.Half;
  565. _unloadLotTrackDatas.Clear();
  566. _currentRoutine = _unloadSideRoutine;
  567. }
  568. return result;
  569. }
  570. /// <summary>
  571. /// Unload Side监控
  572. /// </summary>
  573. /// <param name="param"></param>
  574. /// <returns></returns>
  575. private bool UnloadSideMonitor(object param)
  576. {
  577. RState ret = _unloadSideRoutine.Monitor();
  578. if (ret == RState.End)
  579. {
  580. AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(), LOADERSTATE.Unloading.ToString());
  581. _unloadLotTrackDatas = _unloadSideRoutine.UnloadLotTrackDatas;
  582. _unloadLotTrackDatasBuffer.AddRange(_unloadSideRoutine.UnloadLotTrackDatas);
  583. _unloadTimeList.Add(DateTime.Now);
  584. //Header信息
  585. WaferHolderInfo info = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  586. _headerdata.SequenceRecipe = ((info != null && info.SequenceRecipe != null) ? $"{info.SequenceRecipe.SequenceType}\\" + $"{info.SequenceRecipe.Ppid}.seq.rcp" : "");
  587. if (info != null) _headerdata.ProcessTransferList.AddRange(info.SchedulerModules);
  588. info.SchedulerModules.Clear();
  589. LoaderLotTrackUtil.ExportLoaderLotTrack(Module.ToString(), _unloadLotTrackDatas, _loadLotTrackDatas, _flowLotTrackdatas, _headerdata, _loaderOperatingWaferInfosList,
  590. _loadTimeList, _unloadTimeList, _unloadStartTime, _unloadDatasStatus, _loadDatasStatus, _flowTestDatasStatus, _unloadLotTrackDatasBuffer, _unloadDatasStatus, true);
  591. return true;
  592. }
  593. if (ret == RState.Failed || ret == RState.Timeout)
  594. {
  595. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  596. {
  597. AlarmList alarmList = new AlarmList(Module.ToString(), ((LOADERSTATE)fsm.State).ToString(), (int)LoaderMSG.UnloadSide,
  598. _unloadSideRoutine.ErrorMsg, _unloadSideRoutine.ErrorStep, (int)AlarmType.Error);
  599. AlarmListManager.Instance.AddAlarm(alarmList);
  600. }
  601. PostMsg(LoaderMSG.Error);
  602. _unloadLotTrackDatas = _unloadSideRoutine.UnloadLotTrackDatas;
  603. _unloadLotTrackDatasBuffer.AddRange(_unloadSideRoutine.UnloadLotTrackDatas);
  604. ////Header信息
  605. WaferHolderInfo info = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  606. _headerdata.SequenceRecipe = ((info != null && info.SequenceRecipe != null) ? $"{info.SequenceRecipe.SequenceType}\\" + $"{info.SequenceRecipe.Ppid}.seq.rcp" : "");
  607. if (info != null) _headerdata.ProcessTransferList.AddRange(info.SchedulerModules);
  608. info.SchedulerModules.Clear();
  609. LoaderLotTrackUtil.ExportLoaderLotTrack(Module.ToString(), _unloadLotTrackDatas, _loadLotTrackDatas, _flowLotTrackdatas, _headerdata, _loaderOperatingWaferInfosList,
  610. _loadTimeList, _unloadTimeList, _unloadStartTime, _unloadDatasStatus, _loadDatasStatus, _flowTestDatasStatus, _unloadLotTrackDatasBuffer, _unloadDatasStatus, true);
  611. }
  612. return false;
  613. }
  614. /// <summary>
  615. /// 确认UnloadAll是否完成
  616. /// </summary>
  617. /// <param name="param"></param>
  618. /// <returns></returns>
  619. private bool ConfirmUnloadSide(object[] param)
  620. {
  621. int stepIdex=(int)param[0];
  622. bool result = _unloadSideRoutine.CheckCompleteCondition(stepIdex);
  623. if(!result)
  624. {
  625. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  626. {
  627. AlarmList alarmList = new AlarmList(Module.ToString(), ((LOADERSTATE)fsm.State).ToString(), (int)LoaderMSG.UnloadSide,
  628. _unloadSideRoutine.ErrorMsg, _unloadSideRoutine.ErrorStep, (int)AlarmType.Error);
  629. AlarmListManager.Instance.AddAlarm(alarmList);
  630. }
  631. PostMsg(LoaderMSG.Error);
  632. }
  633. else
  634. {
  635. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  636. {
  637. AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(), LOADERSTATE.Unloading.ToString());
  638. }
  639. }
  640. return result;
  641. }
  642. #endregion
  643. #region Load Side
  644. /// <summary>
  645. /// Load Side
  646. /// </summary>
  647. /// <param name="param"></param>
  648. /// <returns></returns>
  649. private bool LoadSide(object[] param)
  650. {
  651. bool result= _loadSideRoutine.Start(param) == RState.Running;
  652. if(result)
  653. {
  654. _currentRoutine = _loadSideRoutine;
  655. //_loadTimeList.Clear();
  656. _flowLotTrackdatas.Clear();
  657. _loadLotTrackDatas.Clear();
  658. _loadDatasStatus = LotTrackDatasStatus.None;
  659. _flowTestDatasStatus = LotTrackDatasStatus.None;
  660. _unloadDatasStatus = LotTrackDatasStatus.Complete;
  661. _unloadDatasBufferStatus = LotTrackDatasStatus.None;
  662. }
  663. return result;
  664. }
  665. /// <summary>
  666. /// Retry LoadSide
  667. /// </summary>
  668. /// <param name="param"></param>
  669. /// <returns></returns>
  670. private bool RetryLoadSide(object[] param)
  671. {
  672. int stepIndex = (int)param[0];
  673. bool result = _loadSideRoutine.Retry(stepIndex) == RState.Running;
  674. if (result)
  675. {
  676. _unloadDatasStatus = LotTrackDatasStatus.Complete;
  677. _unloadDatasBufferStatus = LotTrackDatasStatus.Complete;
  678. SetLotTrackDatasStatus(stepIndex);
  679. _currentRoutine = _loadSideRoutine;
  680. }
  681. return result;
  682. }
  683. /// <summary>
  684. /// 监控LoadSide
  685. /// </summary>
  686. /// <param name="param"></param>
  687. /// <returns></returns>
  688. private bool LoadSideMonitor(object param)
  689. {
  690. RState ret = _loadSideRoutine.Monitor();
  691. if (ret == RState.End)
  692. {
  693. AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(), LOADERSTATE.Loading.ToString());
  694. _loadLotTrackDatas = _loadSideRoutine.LoadLotTrackDatas;
  695. _loadTimeList = _loadSideRoutine.LoadTimeList;
  696. _flowLotTrackdatas = _loadSideRoutine.FlowLotTrackDatas;
  697. bool clearFlag = _loadDatasStatus == LotTrackDatasStatus.None && _flowTestDatasStatus == LotTrackDatasStatus.None;
  698. _loaderOperatingWaferInfosList["load"] = GetWaferInfo(clearFlag);
  699. //Header信息
  700. WaferHolderInfo info = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  701. _headerdata.SequenceRecipe = ((info != null && info.SequenceRecipe != null) ? $"{info.SequenceRecipe.SequenceType}\\" + $"{info.SequenceRecipe.Ppid}.seq.rcp" : "");
  702. if(info != null) _headerdata.ProcessTransferList.AddRange(info.SchedulerModules);
  703. info.SchedulerModules.Clear();
  704. LoaderLotTrackUtil.ExportLoaderLotTrack(Module.ToString(), _unloadLotTrackDatas, _loadLotTrackDatas, _flowLotTrackdatas, _headerdata, _loaderOperatingWaferInfosList,
  705. _loadTimeList, _unloadTimeList,_unloadStartTime, _unloadDatasStatus, _loadDatasStatus, _flowTestDatasStatus, _unloadLotTrackDatasBuffer, _unloadDatasBufferStatus);
  706. return true;
  707. }
  708. if (ret == RState.Failed || ret == RState.Timeout)
  709. {
  710. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  711. {
  712. AlarmList alarmList = new AlarmList(Module.ToString(), ((LOADERSTATE)fsm.State).ToString(), (int)LoaderMSG.LoadSide,
  713. _loadSideRoutine.ErrorMsg, _loadSideRoutine.ErrorStep, (int)AlarmType.Error);
  714. AlarmListManager.Instance.AddAlarm(alarmList);
  715. }
  716. PostMsg(LoaderMSG.Error);
  717. _loadLotTrackDatas = _loadSideRoutine.LoadLotTrackDatas;
  718. _loadTimeList = _loadSideRoutine.LoadTimeList;
  719. _flowLotTrackdatas = _loadSideRoutine.FlowLotTrackDatas;
  720. bool clearFlag = _loadDatasStatus == LotTrackDatasStatus.None && _flowTestDatasStatus == LotTrackDatasStatus.None;
  721. _loaderOperatingWaferInfosList["load"] = GetWaferInfo(clearFlag);
  722. //Header信息
  723. WaferHolderInfo info = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  724. _headerdata.SequenceRecipe = ((info != null && info.SequenceRecipe != null) ? $"{info.SequenceRecipe.SequenceType}\\" + $"{info.SequenceRecipe.Ppid}.seq.rcp" : "");
  725. if (info != null) _headerdata.ProcessTransferList.AddRange(info.SchedulerModules);
  726. info.SchedulerModules.Clear();
  727. LoaderLotTrackUtil.ExportLoaderLotTrack(Module.ToString(), _unloadLotTrackDatas, _loadLotTrackDatas, _flowLotTrackdatas, _headerdata, _loaderOperatingWaferInfosList,
  728. _loadTimeList, _unloadTimeList, _unloadStartTime, _unloadDatasStatus, _loadDatasStatus, _flowTestDatasStatus, _unloadLotTrackDatasBuffer, _unloadDatasBufferStatus);
  729. }
  730. return false;
  731. }
  732. /// <summary>
  733. /// 确认UnloadSide是否完成
  734. /// </summary>
  735. /// <param name="param"></param>
  736. /// <returns></returns>
  737. private bool ConfirmLoadSide(object[] param)
  738. {
  739. int stepIdex = (int)param[0];
  740. bool result = _loadSideRoutine.CheckCompleteCondition(stepIdex);
  741. if (!result)
  742. {
  743. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  744. {
  745. AlarmList alarmList = new AlarmList(Module.ToString(), ((LOADERSTATE)fsm.State).ToString(), (int)LoaderMSG.LoadSide,
  746. _loadSideRoutine.ErrorMsg, _loadSideRoutine.ErrorStep, (int)AlarmType.Error);
  747. AlarmListManager.Instance.AddAlarm(alarmList);
  748. }
  749. PostMsg(LoaderMSG.Error);
  750. }
  751. else
  752. {
  753. if (Singleton<RouteManager>.Instance.IsAutoRunning)
  754. {
  755. AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(),LOADERSTATE.Loading.ToString());
  756. }
  757. }
  758. return result;
  759. }
  760. #endregion
  761. #region LotTrack
  762. /// <summary>
  763. /// 获取Wafer信息
  764. /// </summary>
  765. private List<string> GetWaferInfo(bool clearPath = false)
  766. {
  767. List<string> waferIDs = new List<string>(new string[2]);
  768. WaferHolderInfo whInfo = WaferHolderManager.Instance.GetWaferHolder(Module.ToString());
  769. if (whInfo == null) return null;
  770. waferIDs[0] = string.IsNullOrEmpty(whInfo.WaferAId) ? "" : whInfo.WaferAId;
  771. waferIDs[1] = string.IsNullOrEmpty(whInfo.WaferBId) ? "" : whInfo.WaferBId;
  772. if (clearPath && !string.IsNullOrEmpty(waferIDs[0])) WaferManager.Instance.ClearWaferLotTrackPath(ModuleName.Loader1, 0);
  773. if (clearPath && !string.IsNullOrEmpty(waferIDs[1])) WaferManager.Instance.ClearWaferLotTrackPath(ModuleName.Loader1, 1);
  774. return waferIDs;
  775. }
  776. /// <summary>
  777. /// 清除信息
  778. /// </summary>
  779. private void LotTrackDataClear()
  780. {
  781. _headerdata = null;
  782. _loadLotTrackDatas.Clear();
  783. _unloadLotTrackDatas.Clear();
  784. _flowLotTrackdatas.Clear();
  785. _loadTimeList.Clear();
  786. _unloadTimeList.Clear();
  787. _loaderOperatingWaferInfosList["load"].Clear();
  788. _loaderOperatingWaferInfosList["unload"].Clear();
  789. }
  790. /// <summary>
  791. /// 设置Load LotTrackDatas记录状态
  792. /// </summary>
  793. /// <param name="stepIndex"></param>
  794. private void SetLotTrackDatasStatus(int stepIndex)
  795. {
  796. if (stepIndex == 0 || stepIndex == -1)
  797. {
  798. _loadDatasStatus = LotTrackDatasStatus.Half;
  799. _flowTestDatasStatus = LotTrackDatasStatus.None;
  800. }
  801. else if (stepIndex == 1)
  802. {
  803. _loadDatasStatus = LotTrackDatasStatus.Complete;
  804. _flowTestDatasStatus = LotTrackDatasStatus.None;
  805. }
  806. else
  807. {
  808. _loadDatasStatus = LotTrackDatasStatus.Complete;
  809. _flowTestDatasStatus = LotTrackDatasStatus.Complete;
  810. }
  811. }
  812. #endregion
  813. #region LoaderRetry
  814. /// <summary>
  815. /// Retry
  816. /// </summary>
  817. /// <param name="param"></param>
  818. /// <returns></returns>
  819. private bool LoaderRetry(object[] param)
  820. {
  821. AlarmList alarmList = AlarmListManager.Instance.GetAlarmListByModule(Module.ToString());
  822. if (alarmList != null)
  823. {
  824. CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), alarmList.ModuleCmd,
  825. alarmList.ModuleStep);
  826. }
  827. return false;
  828. }
  829. #endregion
  830. #region ConfirmComplete
  831. /// <summary>
  832. /// 确认是否完成
  833. /// </summary>
  834. /// <param name="param"></param>
  835. /// <returns></returns>
  836. private bool ConfirmComplete(object[] param)
  837. {
  838. AlarmList alarmList = AlarmListManager.Instance.GetAlarmListByModule(Module.ToString());
  839. if (alarmList != null)
  840. {
  841. if(alarmList.ModuleState==LOADERSTATE.Unloading.ToString())
  842. {
  843. CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(),(int)LoaderMSG.UnloadSide,alarmList.ModuleStep);
  844. }
  845. else if(alarmList.ModuleState==LOADERSTATE.Loading.ToString())
  846. {
  847. CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.LoadSide,alarmList.ModuleStep);
  848. }
  849. else if (alarmList.ModuleState == LOADERSTATE.PrepreForPlacing.ToString())
  850. {
  851. CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.PrepareForPlace, alarmList.ModuleStep);
  852. }
  853. else
  854. {
  855. PostMsg(LoaderMSG.Error);
  856. }
  857. }
  858. return false;
  859. }
  860. /// <summary>
  861. /// 清除报警
  862. /// </summary>
  863. /// <param name="param"></param>
  864. /// <returns></returns>
  865. private bool ClearModuleAlarm(object[] param)
  866. {
  867. AlarmList alarmList = AlarmListManager.Instance.GetAlarmListByModule(Module.ToString());
  868. if (alarmList != null)
  869. {
  870. AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(), "");
  871. }
  872. return true;
  873. }
  874. #endregion
  875. public bool Check(int msg, out string reason, params object[] args)
  876. {
  877. reason = "";
  878. return false;
  879. }
  880. public bool CheckAcked(int msg)
  881. {
  882. return false;
  883. }
  884. public int Invoke(string function, params object[] args)
  885. {
  886. switch (function)
  887. {
  888. case "HomeAll":
  889. if(IsIdle)
  890. {
  891. return (int)FSM_MSG.NONE;
  892. }
  893. if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.HomeAll))
  894. {
  895. return (int)FSM_MSG.NONE;
  896. }
  897. else
  898. {
  899. return (int)FSM_MSG.ALARM;
  900. }
  901. case "Abort":
  902. CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.Abort);
  903. return (int)FSM_MSG.NONE;
  904. case "PrepareForPlace":
  905. if (State == (int)LOADERSTATE.WaitForUnload||State==(int)LOADERSTATE.PrepreForPlacing)
  906. {
  907. return (int)LoaderMSG.PrepareForPlace;
  908. }
  909. if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.WARN_LOADER, Module.ToString(), (int)LoaderMSG.PrepareForPlace,args))
  910. {
  911. return (int)LoaderMSG.PrepareForPlace;
  912. }
  913. else
  914. {
  915. return (int)FSM_MSG.NONE;
  916. }
  917. case "Retry":
  918. if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.Retry,args))
  919. {
  920. return (int)LoaderMSG.Retry;
  921. }
  922. else
  923. {
  924. return (int)FSM_MSG.NONE;
  925. }
  926. case "ConfirmComplete":
  927. if (CheckToPostMessage<LOADERSTATE, LoaderMSG>(eEvent.ERR_LOADER, Module.ToString(), (int)LoaderMSG.ConfirmComplete, args))
  928. {
  929. return (int)LoaderMSG.ConfirmComplete;
  930. }
  931. else
  932. {
  933. return (int)FSM_MSG.NONE;
  934. }
  935. }
  936. return (int)FSM_MSG.NONE;
  937. }
  938. }
  939. public enum LoaderMSG
  940. {
  941. ReturnInit,
  942. ReturnIdle,
  943. Abort,
  944. HomeAll,
  945. GoToSavedPosition,
  946. StopFlow,
  947. SwitchOnAll,
  948. SwitchOffAll,
  949. Error,
  950. ClearError,
  951. PrepareForPlace,
  952. ReadyForPuf,
  953. UnloadSide,
  954. LoadSide,
  955. Retry,
  956. ConfirmComplete,
  957. WaitFlip,
  958. }
  959. }