123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using Aitex.Core.RT.Routine;
- using Aitex.Core.RT.SCCore;
- using Venus_RT.Devices;
- using MECF.Framework.Common.Routine;
- using Venus_Core;
- namespace Venus_RT.Modules.PMs
- {
- class StartDryPumpRoutine : PMRoutineBase, IRoutine
- {
- private enum DryPumpStep
- {
- kCheckForeLine,
- kEnd,
- }
- private double _chamberForelinePressureThreshold;
- private int _chamberForelinePressureTimeout;
- public StartDryPumpRoutine(JetPMBase chamber) : base(chamber)
- {
- Name = "Start DryPump";
- }
- public RState Start(params object[] objs)
- {
- if (_chamber.IsPumpRunning)
- {
- Stop("泵已经运行");
- return RState.Failed;
- }
- Reset();
- _chamber.OpenValve(ValveType.FastPump, false);
- _chamber.OpenValve(ValveType.SoftPump, false);
- _chamberForelinePressureThreshold = SC.GetValue<double>($"{Module}.DryPump.ChamberForelinePressureThreshold");
- _chamberForelinePressureTimeout = SC.GetValue<int>($"{Module}.DryPump.ChamberForelinePressureTimeout");
- _chamber.TurnDryPump(true);
-
- return Runner.Start(Module, Name);
- }
- public RState Monitor()
- {
- Runner.Wait(DryPumpStep.kCheckForeLine, () => { return _chamber.ForelinePressure < _chamberForelinePressureThreshold; }, _chamberForelinePressureTimeout*1000)
- .End(DryPumpStep.kEnd, NullFun, _delay_50ms);
- return Runner.Status;
- }
- public void Abort()
- {
- _chamber.CloseValves();
- _chamber.TurnDryPump(false);
- }
- }
- }
|