using Aitex.Core.RT.Routine; using Aitex.RT.Properties; using Aitex.Triton160.RT.Device; namespace Aitex.Triton160.RT.Routine.PM { public class StopPumpRoutine : CommonRoutine { private enum RoutineStep { CheckRF, CheckGasFlow, ClosePumpValve1, ClosePumpValve2, End, }; public StopPumpRoutine(string module, string name) { Module = module; Name = name; Display = Resources.StopPumpRoutine_StopPumpRoutine_StopPump; bUINotify = true; } public bool Initialize() { InitCommon(); return true; } public void Terminate() { } public Result Start(params object[] objs) { Reset(); UpdateSCValue(); return Result.RUN; } public Result Monitor() { try { CheckRfOff((int)RoutineStep.CheckRF, Resources.StopPumpRoutine_Monitor_CheckIfTheRfIsOn); CheckGasFlowStopped((int)RoutineStep.CheckGasFlow, Resources.StopPumpRoutine_Monitor_CheckIfTheGasStoppedFlowing); CloseValve((int)RoutineStep.ClosePumpValve2, Resources.StopPumpRoutine_Monitor_ClosePumpValve, DeviceModel.ValveChamberPumping, valveOpenCloseTimeout, Notify, Stop); End((int)RoutineStep.End, Resources.StopPumpRoutine_Monitor_StopPumpingCompleted, Notify, Stop); } catch (RoutineBreakException) { return Result.RUN; } catch (RoutineFaildException) { return Result.FAIL; } return Result.DONE; } } }