12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using Aitex.Core.RT.Routine;
- using Aitex.Core.Util;
- using MECF.Framework.Common.Equipment;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Venus_Core;
- using Venus_RT.Devices.VCE;
- namespace Venus_RT.Modules.VCE
- {
- public class VCEHomeRoutine : ModuleRoutineBase, IRoutine
- {
- private enum homestep
- {
- VCEHOME,
- VCEGotoLP
- }
- VCEModuleBase _vce;
- //2024-06-05 09:12:23 支伟星 执行home动作后下降到LP位置 原因vent空间的压缩
- public VCEHomeRoutine(ModuleName module, VCEModuleBase vce) : base(module)
- {
- _vce = vce;
- }
- public RState Start(params object[] objs)
- {
- Reset();
- return Runner.Start(Module, "Vce Load Routine");
- }
- public RState Monitor()
- {
- Runner.Run(homestep.VCEHOME, HomeAll, VceIsIdle)
- .End(homestep.VCEGotoLP, GotoLP, VceIsIdle);
- return Runner.Status;
- }
- public bool HomeAll()
- {
- return _vce.HomeALL();
- }
- public bool GotoLP()
- {
- return _vce.GotoLP();
- }
- public bool VceIsIdle()
- {
- if (_vce.Status == RState.Timeout || _vce.Status == RState.Failed)
- {
- Singleton<RouteManager>.Instance.GetVCE(Module).PostMsg(VceMSG.Error);
- return false;
- }
- return _vce.Status == RState.End;
- }
- public void Abort()
- {
- }
- }
- }
|