123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using Aitex.Core.RT.Routine;
- using JetVirgoPM.Devices;
- namespace JetVirgoPM.PMs.Routines
- {
- class PMHomeRoutine : PMRoutineBase, IStepRoutine
- {
- enum RoutineStep
- {
- Home,
- End,
- }
- public PMHomeRoutine(JetDualPM chamber) : base(chamber)
- {
- Name = "Homing";
- }
- public Result Init()
- {
- return Result.DONE;
- }
- public RState Start(params object[] objs)
- {
- Reset();
- return Runner.Start(_chamber.Module.ToString(), Name);
- }
- public RState Monitor()
- {
- if (_chamber != null && _chamber.IsInstalled)
- {
- Runner.Run(RoutineStep.Home, Home, NullFun, _delay_10s)
- .End(RoutineStep.End, NullFun, _delay_1s);
- }
- else
- Runner.End(RoutineStep.End, NullFun, _delay_1s);
- return Runner.Status;
- }
- public override void Abort()
- {
- }
- public bool Home()
- {
- Notify($"Run {_chamber.Name} home");
- _chamber.Home();
- return true;
- }
- }
- }
|