| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574 | 
							- using Aitex.Core.RT.DataCenter;
 
- using Aitex.Core.RT.Device;
 
- using Aitex.Core.RT.OperationCenter;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.Equipment;
 
- using System.Collections.Generic;
 
- using Venus_Core;
 
- using Aitex.Core.RT.Device.Unit;
 
- using Venus_RT.Modules;
 
- using System;
 
- using FabConnect.SecsGemInterface.Application.Objects.ProcessManagement;
 
- using Aitex.Core.RT.SCCore;
 
- namespace Venus_RT.Devices
 
- {
 
-     abstract class JetPMBase : BaseDevice, IDevice
 
-     {
 
-         // 盖子的状态
 
-         public abstract bool IsLidClosed { get; }
 
-         public abstract bool IsLidLoadlockClosed { get; }
 
-         public abstract bool IsSlitDoorClosed { get; }
 
-         public abstract bool IsPumpRunning { get; }
 
-         public abstract bool IsTurboPumpRunning { get; }
 
-         public abstract bool IsTurboPumpAtSpeed { get; }
 
-         public abstract float TurboPumpSpeed { get; }
 
-         public abstract bool HasPumpError { get; }
 
-         public abstract bool HasTurboPumpError { get; }
 
-         public abstract bool IsCDA_OK { get; }
 
-         public abstract bool IsFastPumpOpened { get; }
 
-         public abstract bool IsSoftPumpOpened { get; }
 
-         public abstract bool IsMfc1ValveOpened { get; }
 
-         public abstract bool IsMfc2ValveOpened { get; }
 
-         public abstract bool IsMfc3ValveOpened { get; }
 
-         public abstract bool IsMfc4ValveOpened { get; }
 
-         public abstract bool IsMfc5ValveOpened { get; }
 
-         public abstract bool IsMfc6ValveOpened { get; }
 
-         public abstract bool IsMfc7ValveOpened { get; }
 
-         public abstract bool IsMfc8ValveOpened { get; }
 
-         public abstract bool IsGuageValveOpened { get; }
 
-         public abstract bool IsATM { get; }
 
-         public abstract bool PVN22ValveIsOpen { get; }
 
-         public abstract bool LiftPinIsDown { get; }
 
-         public abstract bool LiftPinIsUp { get; }
 
-         public abstract bool IsATMLoadlock { get; }
 
-         public abstract bool IsVACLoadLock { get; }
 
-         public abstract bool IsVAC { get; }
 
-         public abstract bool IsWaterFlowOk { get; }
 
-         public abstract bool IsWLK { get; }
 
-         public abstract bool IsRFGInterlockOn { get; }
 
-         public abstract bool PMLidClosed { get; }
 
-         public abstract bool TurboPumpInterlock { get; }
 
-         public abstract bool SourceRFFanInterlock { get; }
 
-         public abstract bool SlitDoorClosed { get; }
 
-         public abstract double ProcessLowPressure { get; }
 
-         public abstract double ProcessHighPressure { get; }
 
-         public abstract double ProcessPressure { get; }
 
-         public abstract double ChamberPressure { get; }
 
-         public virtual double CalculationPressure { get; }
 
-         public abstract double ForelinePressure { get; }
 
-         public abstract double TargetPressure { get; }
 
-         public abstract double ESCHePressure { get; }
 
-         public abstract int ESCOutputVoltage { get; }
 
-         public abstract double ESCPositiveOutputCurrent { get; }//R+
 
-         public abstract double ESCNegativeOutputCurrent { get; }//R-
 
-         public abstract bool IsHVOn { get; }
 
-         public abstract float CoolantInletTempFB { get; }
 
-         public abstract float CoolantOutletTempFB { get; }
 
-         public abstract bool ChillerIsRunning { get; }
 
-         //Loadlock_Arm
 
-         public abstract bool IsLoadlockArmRetract { get; }
 
-         public abstract bool IsLoadlockArmExtend { get; }
 
-         //Loadlock_Arm DO
 
-         public abstract bool LoadlockArmRetract { get; }
 
-         public abstract bool LoadlockArmExtend { get; }
 
-         public abstract float ReflectPower { get; }
 
-         public abstract float BiasReflectPower { get; }
 
-         public abstract bool BackSideHeOutOfRange { get; }
 
-         public abstract float RFMatchC1 { get; }
 
-         public abstract float RFMatchC2 { get; }
 
-         public abstract float BiasRFMatchC1 { get; }
 
-         public abstract float BiasRFMatchC2 { get; }
 
-         public new ModuleName Module;
 
-         public abstract MovementPosition LiftPinPosition { get; }
 
-         public abstract bool CheckAtm();
 
-         public abstract bool CheckSlitDoorOpen();
 
-         public abstract bool CheckSlitDoorClose();
 
-         public abstract bool CheckLiftUp();
 
-         public abstract bool CheckLiftDown();
 
-         public abstract double TotalGasSetpoint { get; }
 
-         public abstract bool HasGasOutOfRange { get; }
 
-         public abstract bool PendulumValveIsOpen();
 
-         public abstract double LoadlockPressure { get; }
 
-         public double TMPressure { get { return Singleton<RouteManager>.Instance.TM.TMPressure; } }
 
-         public bool IsTMATM
 
-         {
 
-             get
 
-             {
 
-                 if (Singleton<RouteManager>.Instance.TM != null)
 
-                 {
 
-                     return Singleton<RouteManager>.Instance.TM.IsTMATM;
 
-                 }
 
-                 else
 
-                 {
 
-                     return Singleton<RouteManager>.Instance.seTM.TMIsATM;
 
-                 }
 
-             }
 
-         }
 
-         public bool IsTMVAC
 
-         {
 
-             get
 
-             {
 
-                 if (Singleton<RouteManager>.Instance.TM != null)
 
-                 {
 
-                     return Singleton<RouteManager>.Instance.TM.IsTMVac;
 
-                 }
 
-                 else
 
-                 {
 
-                     return Singleton<RouteManager>.Instance.seTM.TMIsVAC;
 
-                 }
 
-             }
 
-         }
 
-         // EndPoint 
 
-         private readonly JetEPDBase _epdClient;
 
-         public List<string> EPDCfgList => _epdClient?.CFGFileList;
 
-         //public List<string> EPDCfgList=new List<string>() { "1","2"};
 
-         public bool EPDCaptured => _epdClient.Captured;
 
-         public bool EPDConnected => _epdClient.IsEPDConnected;
 
-         public JetChamber ChamberType = JetChamber.None;
 
-         public JetPMBase(ModuleName module) : base(module.ToString(), module.ToString(), module.ToString(), module.ToString())
 
-         {
 
-             Module = module;
 
-             _epdClient = DEVICE.GetDevice<JetEPDBase>($"{Module}.{VenusDevice.EndPoint}");
 
-             ChamberType = (JetChamber)SC.GetValue<int>($"{Module}.ChamberType");
 
-             DATA.Subscribe($"{Name}.ForelinePressure", () => ForelinePressure);
 
-             DATA.Subscribe($"{Name}.ProcessHighPressure", () => ProcessHighPressure);
 
-             DATA.Subscribe($"{Name}.ProcessLowPressure", () => ProcessLowPressure);
 
-             DATA.Subscribe($"{Name}.CalculationPressure", () => CalculationPressure);
 
-             DATA.Subscribe($"{Name}.ESCHePressure", () => ESCHePressure);
 
-             DATA.Subscribe($"{Name}.LoadlockPressure", () => LoadlockPressure);
 
-             DATA.Subscribe($"{Name}.IsATM", () => IsATM, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsVAC", () => IsVAC, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.LiftPinIsUp", () => LiftPinIsUp, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.LiftPinIsDown", () => LiftPinIsDown, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.PumpIsRunning", () => IsPumpRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => IsTurboPumpRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsSlitDoorClosed", () => IsSlitDoorClosed, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsLidClosed", () => IsLidClosed, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.TurboPumpRotationalSpeed", () => TurboPumpSpeed);
 
-             DATA.Subscribe($"{Name}.IsWaterFlowOk", () => IsWaterFlowOk, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsWLK", () => IsWLK, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsCDA_OK", () => IsCDA_OK, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.SourceRFFanInterlock", () => SourceRFFanInterlock, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsTurboPumpInterlock", () => TurboPumpInterlock, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsATMLoadlock", () => IsATMLoadlock, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsVACLoadlock", () => IsVACLoadLock, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.GetPVPosition", () => GetPVPosition());
 
-             DATA.Subscribe($"{Name}.ESCHV.Temp", () => CoolantOutletTempFB);
 
-             DATA.Subscribe($"{Name}.Chiller.Temp", () => CoolantInletTempFB);
 
-             //DATA.Subscribe($"{Name}.Chiller.IsOn", () => ChillerIsRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             DATA.Subscribe($"{Name}.IsTurboPumpAtSpeed", () => IsTurboPumpAtSpeed);
 
-             DATA.Subscribe($"{Name}.EPDCfgList", () => EPDCfgList, SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-             OP.Subscribe($"{Module}.SetLiftPin", (cmd, args) =>
 
-             {
 
-                 if ((bool)args[0] == true)
 
-                 {
 
-                     return SetLiftPin(MovementPosition.Up, out _);
 
-                 }
 
-                 else
 
-                 {
 
-                     return SetLiftPin(MovementPosition.Down, out _);
 
-                 }
 
-             });
 
-             OP.Subscribe($"{Module}.SetSRf", (cmd, args) =>
 
-             {
 
-                 var ison = (bool)args[1];
 
-                 if (ison == true)
 
-                 {
 
-                     GeneratorPowerOn(true);
 
-                     GeneratorSetpower((float)args[0]);
 
-                 }
 
-                 else
 
-                 {
 
-                     GeneratorPowerOn(false);
 
-                 }
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetBRf", (cmd, args) =>
 
-             {
 
-                 var ison = (bool)args[1];
 
-                 if (ison == true)
 
-                 {
 
-                     GeneratorBiasPowerOn(true);
 
-                     GeneratorBiasSetpower((float)args[0]);
 
-                 }
 
-                 else
 
-                 {
 
-                     GeneratorBiasPowerOn(false);
 
-                 }
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) =>
 
-             {
 
-                 SetSlitDoor((bool)args[0], out _);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetESCHVIsOn", (cmd, args) =>
 
-             {
 
-                 OnOffSetESCHV((bool)args[0]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetESCHV", (cmd, args) =>
 
-             {
 
-                 SetESCClampVoltage((int)args[0]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetPVPostion", (cmd, args) =>
 
-             {
 
-                 SetPVPostion((int)args[0]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetPVPressure", (cmd, args) =>
 
-             {
 
-                 SetPVPressure((int)args[0]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.ClosePump", (cmd, args) =>
 
-             {
 
-                 TurnDryPump(false);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.CloseTurboPump", (cmd, args) =>
 
-             {
 
-                 TurnTurboPump(false);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.ControlValve", (cmd, args) =>
 
-             {
 
-                 if (ChamberType == JetChamber.VenusSE)
 
-                 {
 
-                     if (Enum.TryParse(args[0].ToString(), out ValveType targetvalve))
 
-                     {
 
-                         OpenValve(targetvalve, (bool)args[1]);
 
-                     }
 
-                 }
 
-                 else
 
-                 {
 
-                     OpenValve((ValveType)((int)args[0]), (bool)args[1]);
 
-                 }
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.TurnPendulumValve", (cmd, args) =>
 
-             {
 
-                 TurnPendulumValve((bool)args[0]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.HeatChiller", (cmd, args) =>
 
-             {
 
-                 var chillerType = (ChillerType)Enum.Parse(typeof(ChillerType), args[0].ToString());
 
-                 HeatChiller(chillerType, (float)args[1], (float)args[2]);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.OnOffChiller", (cmd, args) =>
 
-             {
 
-                 var chillerType = (ChillerType)Enum.Parse(typeof(ChillerType), args[0].ToString());
 
-                 var ison = Convert.ToBoolean(args[1]);
 
-                 OnOffChiller(chillerType, ison);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.WallChiller", (cmd, args) =>
 
-             {
 
-                 float value;
 
-                 float.TryParse(args[0].ToString(), out value);
 
-                 SetWallTCTemperature(value);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetBacksideHeFlow", (cmd, args) =>
 
-             {
 
-                 double value;
 
-                 double.TryParse(args[0].ToString(), out value);
 
-                 SetBacksideHeFlow(value);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.SetBacksideHePressure", (cmd, args) =>
 
-             {
 
-                 float value;
 
-                 float.TryParse(args[0].ToString(), out value);
 
-                 SetBacksideHePressure(value);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.EndPoint.SearchCfg", (cmd, args) =>
 
-             {
 
-                 _epdClient?.QueryConfigList();
 
-                 return true;
 
-             });
 
-         }
 
-         public abstract void CloseValves();
 
-         public abstract void TurnDryPump(bool on);
 
-         public abstract void TurnTurboPump(bool on);
 
-         public abstract void OpenValve(ValveType vlvType, bool on);
 
-         public virtual void Monitor()
 
-         {
 
-         }
 
-         public virtual bool Initialize()
 
-         {
 
-             return true;
 
-         }
 
-         public virtual void Terminate()
 
-         {
 
-         }
 
-         public virtual void Reset()
 
-         {
 
-         }
 
-         public abstract bool OnOffSetESCHV(bool on);
 
-         public abstract bool SetWallTCTemperature(float value);
 
-         protected abstract void CheckPermanentInterlock();
 
-         public abstract void CheckIdleInterlock();
 
-         public abstract void BuzzerBlinking(double time);
 
-         public abstract void SwitchOnBuzzerAndRed();
 
-         public abstract void Home();
 
-         public virtual bool SetLiftPin(MovementPosition dirt, out string reason)
 
-         {
 
-             reason = "";
 
-             return false;
 
-         }
 
-         public abstract bool SetSlitDoor(bool open, out string reason);
 
-         public abstract bool RetractWafer();
 
-         public abstract bool ExtendWafer();
 
-         public abstract bool FlowGas(int gasNum, double val);
 
-         public abstract bool StopGas(int gasNum);
 
-         public abstract bool FlowN2(double val);
 
-         public abstract bool StopN2();
 
-         public abstract void StopAllGases();
 
-         public abstract bool TurnPendulumValve(bool on);
 
-         public abstract bool SetPVPressure(int pressure);
 
-         public abstract bool SetPVPostion(int position);
 
-         public abstract int GetPVPosition();
 
-         public abstract void HeatChiller(ChillerType chillerType, double value, double offset);
 
-         public abstract void OnOffChiller(ChillerType chillerType, bool onoff);
 
-         public abstract bool CheckChillerStatus();
 
-         public abstract void SetGeneratorCommunicationMode(int mode);
 
-         public abstract bool GeneratorPowerOn(bool on);
 
-         public abstract bool GeneratorSetpower(float val);
 
-         public abstract bool GeneratorBiasPowerOn(bool on);
 
-         public abstract bool GeneratorBiasSetpower(float val);
 
-         public abstract bool GeneratorBiasSetMatchMode(bool val);
 
-         public abstract bool SetMatchPosition(float c1, float c2);
 
-         public abstract bool SetBiasMatchPosition(float c1, float c2);
 
-         public virtual bool SetMatchWorkMode(MatchWorkMode matchWorkMode)
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
 
-         {
 
-             return false;
 
-         }
 
-         public abstract bool SetBiasPulseMode(bool on);
 
-         public abstract bool SetBiasPulseRateFreq(int nFreq);
 
-         public abstract bool SetDiasPulseDutyCycle(int percentage);
 
-         public abstract bool SetESCClampVoltage(int nVoltage);
 
-         public abstract bool CheckGeneratorAndHVInterlock(VenusDevice device);
 
-         #region EndPoint
 
-         public void EPDRecipeStart(string recipe)
 
-         {
 
-             try
 
-             {
 
-                 _epdClient?.RecipeStart(recipe);
 
-             }
 
-             catch
 
-             {
 
-             }
 
-         }
 
-         public void EPDRecipeStop()
 
-         {
 
-             try
 
-             {
 
-                 _epdClient?.RecipeStop();
 
-             }
 
-             catch
 
-             {
 
-             }
 
-         }
 
-         public void EPDStepStart(string cfgName, int step)
 
-         {
 
-             try
 
-             {
 
-                 _epdClient?.StepStart(cfgName, step);
 
-             }
 
-             catch
 
-             {
 
-             }
 
-         }
 
-         public void EPDStepStop()
 
-         {
 
-             try
 
-             {
 
-                 _epdClient?.StepStop();
 
-             }
 
-             catch
 
-             {
 
-             }
 
-         }
 
-         #endregion
 
-         public virtual void SetBacksideHeFlow(double flow)
 
-         {
 
-         }
 
-         public virtual bool SetBacksideHePressure(float mTorr)
 
-         {
 
-             return false;
 
-         }
 
-         public abstract bool SetBacksideHeThreshold(int nMin, int nMax);
 
-         public virtual bool HighTemperatureHeaterGotoPosition(HighTemperatureHeaterPosition highTemperatureHeaterPosition)
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool StartControlPressure(int pressureSetpoint, int flowSetpoint)
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool AbortControlPressure()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool PreparePlace()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool PreparePlaceIsOK()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool PreparePick()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool PreparePickIsOK()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool EndPlace()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool EndPlaceIsOK()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool EndPick()
 
-         {
 
-             return false;
 
-         }
 
-         public virtual bool EndPickIsOK()
 
-         {
 
-             return false;
 
-         }
 
-     }
 
- }
 
 
  |