12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using Aitex.Core.RT.Routine;
- using Venus_RT.Devices;
- using MECF.Framework.Common.Routine;
- using Venus_Core;
- namespace Venus_RT.Modules.PMs
- {
- class PMHomeRoutine : PMRoutineBase, IRoutine
- {
- enum RoutineStep
- {
- Home,
- End,
- }
- public PMHomeRoutine(JetPM chamber) : base(chamber)
- {
- Name = "PM Home";
- }
- public RState Init()
- {
- return RState.End;
- }
- public RState Start(params object[] objs)
- {
- return Runner.Start(Module, Name);
- }
- public RState Monitor()
- {
- Runner.Run((int)RoutineStep.Home, HOFs.WrapAction(_chamber.Home), IsHomed, 50000)
- .End((int)RoutineStep.End, () => { return true; });
- return Runner.Status;
- }
- public void Abort()
- {
- }
- private bool IsHomed()
- {
- return _chamber.IsSlitDoorClosed && _chamber.LiftPinPosition == Venus_Core.MovementPosition.Down;
- }
- }
- }
|