123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- using System.Diagnostics;
- using Venus_RT.Devices;
- using Aitex.Core.RT.Log;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.Routine;
- namespace Venus_RT.Modules.PMs
- {
- class PMRoutineBase
- {
- public ModuleName Module { get; set; }
- public string Name { get; set; }
- protected readonly JetPM _chamber;
- protected Stopwatch _timer = new Stopwatch();
- protected RoutineRunner Runner = new RoutineRunner();
- public PMRoutineBase(JetPM chamber)
- {
- Module = chamber.Module;
- _chamber = chamber;
- Runner.Reset();
- }
- protected void Notify(string message)
- {
- LOG.Write(eEvent.RoutineNotify, Module, Name, message);
- }
- protected void Stop(string failReason)
- {
- LOG.Write(eEvent.RoutineFailed, Module, Name, failReason);
- }
- public bool CheckLid()
- {
- if (!_chamber.IsLidClosed)
- {
- this.Stop("Chamber 盖子必须关");
- return false;
- }
- return true;
- }
- public bool CheckLidLoadLock()
- {
- if (!_chamber.IsLidLoadlockClosed)
- {
- this.Stop("LoadLock 盖子必须关");
- return false;
- }
- return true;
- }
- protected bool CheckSlitDoor()
- {
- if (!_chamber.IsSlitDoorClosed)
- {
- Stop("传送门必须关");
- return false;
- }
- return true;
- }
- protected bool CheckDryPump()
- {
- if (!_chamber.IsPumpRunning)
- {
- Stop("泵没有启动");
- return false;
- }
- if (_chamber.HasPumpError)
- {
- Stop("泵状态有错误");
- return false;
- }
- return true;
- }
- protected bool CheckCDA()
- {
- if (!_chamber.IsCDA_OK)
- {
- Stop("CDA 压力信号不正确");
- return false;
- }
- return true;
- }
- protected bool CloseAllValve()
- {
- Notify("关闭所有的阀门");
- _chamber.CloseValves();
- return true;
- }
- protected bool TurnValve(ValveType vlv, bool bOpen)
- {
- _chamber.OpenValve(vlv, bOpen);
- Notify($"{(bOpen ? "打开" : "关闭")} {vlv} 阀");
- return true;
- }
- protected bool CheckValve(ValveType vlv, bool bOpen)
- {
- return true;
- }
- }
- }
|