using Aitex.Core.RT.Device; using Aitex.Core.RT.Log; using Aitex.Core.RT.Routine; using Aitex.Core.RT.SCCore; using Aitex.Core.Util; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.RecipeCenter; using MECF.Framework.Common.Routine; using MECF.Framework.Common.SubstrateTrackings; using PunkHPX8_Core; using PunkHPX8_RT.Devices.AXIS; using PunkHPX8_RT.Devices.VpwCell; using PunkHPX8_RT.Devices.VpwMain; using PunkHPX8_RT.Modules.VpwMain; using PunkHPX8_RT.Schedulers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PunkHPX8_RT.Modules.VpwMain { public class VPWChamberUpRoutine : RoutineBase, IRoutine { private enum PrepareStep { ChamerUp, Delay, End } #region 内部变量 /// /// Main设备 /// private VpwMainDevice _mainDevice; #endregion /// /// 构造函数 /// /// public VPWChamberUpRoutine(string module) : base(module) { } /// /// 中止 /// public void Abort() { Runner.Stop("Manual abort"); } /// /// 监控 /// /// public RState Monitor() { Runner.Run(PrepareStep.ChamerUp, ChamberUp, CheckChamberClosed,_delay_10s) .End(PrepareStep.End,NullFun,_delay_1ms); return Runner.Status; } /// /// 打开 Chamber /// /// private bool ChamberUp() { return _mainDevice.ChamberUp(); } /// /// 检验Chamber是否关闭 /// /// private bool CheckChamberClosed() { return !_mainDevice.CommonData.ChamberOpened && _mainDevice.CommonData.ChamberClosed; } /// /// 启动 /// /// /// public RState Start(params object[] objs) { _mainDevice = DEVICE.GetDevice(Module); return Runner.Start(Module, $"{Module} chamber up"); } } }