Browse Source

1.添加RT关闭同时关闭钟摆阀和RF的功能
2.添加实时RF Interlock关闭功能
3.添加权限管理界面
4.高温Heater添加Rate功能

# Conflicts:
# Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

lixiang 1 year ago
parent
commit
33ba42d9ef
43 changed files with 1654 additions and 679 deletions
  1. 3 0
      Venus/Framework/Common/CommonData/DeviceData/AITHighTemperatureHeaterData.cs
  2. 6 1
      Venus/Framework/Common/Device/Unit/IoGasValve.cs
  3. 1 1
      Venus/Venus_Core/ProcessUnitDefine.cs
  4. 129 7
      Venus/Venus_MainPages/Role/Menus.cs
  5. 8 0
      Venus/Venus_MainPages/Venus_MainPages.csproj
  6. 0 1
      Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs
  7. 23 7
      Venus/Venus_MainPages/ViewModels/OverKepler2200AViewModel.cs
  8. 18 4
      Venus/Venus_MainPages/ViewModels/OverKepler2200BViewModel.cs
  9. 3 17
      Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs
  10. 78 39
      Venus/Venus_MainPages/ViewModels/RoleViewModel.cs
  11. 36 0
      Venus/Venus_MainPages/ViewModels/UserViewModel.cs
  12. 4 4
      Venus/Venus_MainPages/Views/OverKepler2200AView.xaml
  13. 5 5
      Venus/Venus_MainPages/Views/OverKepler2200BView.xaml
  14. 93 92
      Venus/Venus_MainPages/Views/RoleView.xaml
  15. 88 0
      Venus/Venus_MainPages/Views/UserView.xaml
  16. 28 0
      Venus/Venus_MainPages/Views/UserView.xaml.cs
  17. 0 69
      Venus/Venus_RT/Config/Account/Account.xml
  18. BIN
      Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200ADeviceModel.xml
  19. 2 2
      Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200AIoDefine.xml
  20. BIN
      Venus/Venus_RT/Config/PM/Kepler2200B/Kepler2200BDeviceModel.xml
  21. 2 2
      Venus/Venus_RT/Config/PM/Kepler2200B/Kepler2200BIoDefine.xml
  22. 25 5
      Venus/Venus_RT/Devices/AdTecRF.cs
  23. 19 0
      Venus/Venus_RT/Devices/DeviceManager.cs
  24. 27 2
      Venus/Venus_RT/Devices/IODevices/IoHighTemperatureHeater.cs
  25. 252 186
      Venus/Venus_RT/Devices/JetKepler2200APM.cs
  26. 251 182
      Venus/Venus_RT/Devices/JetKepler2200BPM.cs
  27. 78 4
      Venus/Venus_RT/Devices/JetKepler2300PM.cs
  28. 80 31
      Venus/Venus_RT/Devices/JetPMBase.cs
  29. 20 2
      Venus/Venus_RT/Devices/JetVenusPM.cs
  30. 1 1
      Venus/Venus_RT/Devices/JetVenusSEPM.cs
  31. 4 0
      Venus/Venus_RT/Devices/PendulumValve.cs
  32. 6 2
      Venus/Venus_RT/Instances/App.xaml.cs
  33. 3 0
      Venus/Venus_RT/Instances/ToolLoader.cs
  34. 2 2
      Venus/Venus_RT/Modules/PMs/PMRoutineBase.cs
  35. 1 1
      Venus/Venus_RT/Modules/PMs/VentRoutine.cs
  36. 1 1
      Venus/Venus_RT/Modules/TM/MFPumpRoutine.cs
  37. 0 3
      Venus/Venus_RT/Venus_RT.csproj
  38. 2 2
      Venus/Venus_Simulator/Config/_ioDefineKepler2200A.xml
  39. 2 2
      Venus/Venus_Simulator/Config/_ioDefineKepler2200B.xml
  40. 0 1
      Venus/Venus_Simulator/Instances/SimulatorSystem.cs
  41. 7 1
      Venus/Venus_UI/App.xaml.cs
  42. 343 0
      Venus/Venus_UI/Config/UIMenuList.json
  43. 3 0
      Venus/Venus_UI/Venus_UI.csproj

+ 3 - 0
Venus/Framework/Common/CommonData/DeviceData/AITHighTemperatureHeaterData.cs

@@ -27,5 +27,8 @@ namespace MECF.Framework.Common.CommonData.DeviceData
 
         [DataMember]
         public float HighTemperatureHeaterTemperature { get; set; }
+
+        [DataMember]
+        public float HighTemperatureHeaterRate { get; set; }
     }
 }

+ 6 - 1
Venus/Framework/Common/Device/Unit/IoGasValve.cs

@@ -7,6 +7,7 @@ using Aitex.Core.RT.IOCore;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
 using Aitex.Core.Util;
+using DocumentFormat.OpenXml.Wordprocessing;
 
 namespace Aitex.Core.RT.Device.Unit
 {
@@ -30,10 +31,13 @@ namespace Aitex.Core.RT.Device.Unit
                 if (_doOpen != null)
                 {
                     _doOpen.Value = _isNc ? value : !value;
+
+
                 }
                 if (_doClose != null)
                 {
                     _doClose.Value = _isNc ? !value : value;
+
                 }
             }
         }
@@ -244,7 +248,8 @@ namespace Aitex.Core.RT.Device.Unit
 
                 reason = "";
                 SetPoint = bValue;
-                if(Name == "ValveN2")
+
+                if (Name == "ValveN2")
                 {
                     reason = Name;
                 }

+ 1 - 1
Venus/Venus_Core/ProcessUnitDefine.cs

@@ -162,7 +162,7 @@ namespace Venus_Core
         public ToleranceMode ToleranceMode { get; set; }
         [IsTolerance]
         public int ToleranceDelayTime_ms { get; set; }
-        public int RFPower { get; set; }
+        //public int RFPower { get; set; }
         [IsTolerance]
         public int RFPowerWarningRange { get; set; }
         [IsTolerance]

+ 129 - 7
Venus/Venus_MainPages/Role/Menus.cs

@@ -1,21 +1,143 @@
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Venus_Core;
 
-namespace Venus_MainPages.Role
+namespace Venus_MainPages.Roles
 {
-    internal class Menu
+    public class Menu : INotifyPropertyChanged
     {
-        public Menu(int id, string firstmenu, string secondmenu)
+        public Menu(string firstmenu, string secondmenu)
         {
-            Id = id;
             FirstMenu = firstmenu;
             SecondMenu = secondmenu;
         }
-        public int Id { get; set; }
-        public string FirstMenu { get; set; }
-        public string SecondMenu { get; set; }
+
+        private string m_firstMenu;
+        public string FirstMenu
+        {
+            get { return m_firstMenu; }
+            set
+            {
+                m_firstMenu = value;
+                OnPropertyChanged("FirstMenu");
+            }
+        }
+
+        private string m_SecondMenu;
+
+        public string SecondMenu
+        {
+            get { return m_SecondMenu; }
+            set
+            {
+                m_SecondMenu = value;
+                OnPropertyChanged("SecondMenu");
+            }
+        }
+
+        private MenuPermission m_Permission;
+        public MenuPermission Permission
+        {
+            get { return m_Permission; }
+            set
+            {
+                m_Permission = value;
+                OnPropertyChanged("Permission");
+            }
+        }
+
+        #region INotifyPropertyChanged
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private void OnPropertyChanged(string propertyName)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+        #endregion INotifyPropertyChanged
+
+    }
+
+    public enum MenuPermission
+    {
+        None,
+        ReadOnly,
+        ReadWrite
+    }
+    public enum Role
+    {
+        Manager,
+        Engineer,
+        Technician,
+        Operator
+    }
+    public class RoleDefine
+    {
+        public string RoleName { get; set; }
+
+        public bool IsLocked { get; set; }
+
+        public int LockTime { get; set; }
+        public ObservableCollection<Menu> Menus { get; set; }
+
+        public RoleDefine(string roleName, ObservableCollection<Menu> menus)
+        {
+            RoleName = roleName;
+            Menus = menus;
+        }
+    }
+    public class User : INotifyPropertyChanged
+    {
+
+        public User(string name, string password, Role role)
+        {
+            Name = name;
+            Password = password;
+            Role = role;
+        }
+        private string m_Name;
+        public string Name
+        {
+            get { return m_Name; }
+            set
+            {
+                m_Name = value;
+                OnPropertyChanged("Name");
+            }
+        }
+
+        public string m_Password;
+        public string Password
+        {
+            get { return m_Password; }
+            set
+            {
+                m_Password = value;
+                OnPropertyChanged("Password");
+            }
+        }
+        public Role m_Role;
+        public Role Role
+        {
+            get { return m_Role; }
+            set
+            {
+                m_Role = value;
+                OnPropertyChanged("Role");
+            }
+        }
+
+        #region INotifyPropertyChanged
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private void OnPropertyChanged(string propertyName)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+        #endregion INotifyPropertyChanged
     }
 }

+ 8 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -200,6 +200,7 @@
     <Compile Include="ViewModels\TMOperationViewModel.cs" />
     <Compile Include="ViewModels\TMViewModel.cs" />
     <Compile Include="ViewModels\TopViewModel.cs" />
+    <Compile Include="ViewModels\UserViewModel.cs" />
     <Compile Include="ViewModels\VATPerformanceViewModel.cs" />
     <Compile Include="ViewModels\VceViewModel.cs" />
     <Compile Include="ViewModels\VenusSeOperationOverViewModel.cs" />
@@ -308,6 +309,9 @@
     <Compile Include="Views\TopView.xaml.cs">
       <DependentUpon>TopView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\UserView.xaml.cs">
+      <DependentUpon>UserView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\VATPerformanceView.xaml.cs">
       <DependentUpon>VATPerformanceView.xaml</DependentUpon>
     </Compile>
@@ -489,6 +493,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\UserView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\VATPerformanceView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 0 - 1
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -668,7 +668,6 @@ namespace Venus_MainPages.ViewModels
         #region 私有方法
         private void Timer_Tick(object sender, EventArgs e)
         {
-
             LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
             LP2ModuleInfo = ModuleManager.ModuleInfos["LP2"];
             LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];

+ 23 - 7
Venus/Venus_MainPages/ViewModels/OverKepler2200AViewModel.cs

@@ -201,6 +201,9 @@ namespace Venus_MainPages.ViewModels
 
         private int m_HighTemperatureHeaterTemperatureSetpoint;
 
+        private int m_HighTemperatureHeaterRateSetpoint;
+
+
         #endregion
 
         #region  属性
@@ -926,6 +929,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_HighTemperatureHeaterTemperatureSetpoint; }
             set { SetProperty(ref m_HighTemperatureHeaterTemperatureSetpoint, value); }
         }
+        public int HighTemperatureHeaterRateSetpoint
+        {
+            get { return m_HighTemperatureHeaterRateSetpoint; }
+            set { SetProperty(ref m_HighTemperatureHeaterRateSetpoint, value); }
+        }
         public AITHeaterData PendulumHeaterData
         {
             get { return m_PendulumHeaterData; }
@@ -1033,9 +1041,13 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> RunRecipeCommand =>
             _RunRecipeCommand ?? (_RunRecipeCommand = new DelegateCommand<object>(OnRunRecipe));
 
-        //private DelegateCommand _SetChillerTempCommand;
-        //public DelegateCommand SetChillerTempCommand =>
-        //    _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand(OnSetChillerTemp));
+        private DelegateCommand _SetChillerTempCommand;
+        public DelegateCommand SetChillerTempCommand =>
+            _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand(OnSetChillerTemp));
+
+        private DelegateCommand _SetHeaterRateCommand;
+        public DelegateCommand SetHeaterRateCommand =>
+            _SetHeaterRateCommand ?? (_SetHeaterRateCommand = new DelegateCommand(OnSetHeaterRate));
 
 
         //private DelegateCommand _OnOffChillerCommand;
@@ -1474,10 +1486,14 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SwitchHighTemperatureHeater", !HighTemperatureHeaterData.HighTemperatureHeaterIson);
         }
-        //private void OnSetChillerTemp()
-        //{
-        //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterTemperature", HighTemperatureHeaterTemperatureSetpoint);
-        //}
+        private void OnSetChillerTemp()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterTemperature", HighTemperatureHeaterTemperatureSetpoint);
+        }
+        private void OnSetHeaterRate()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterRate", HighTemperatureHeaterRateSetpoint);
+        }
         private DelegateCommand _OnlineCommand;
         public DelegateCommand OnlineCommand =>
             _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));

+ 18 - 4
Venus/Venus_MainPages/ViewModels/OverKepler2200BViewModel.cs

@@ -200,6 +200,8 @@ namespace Venus_MainPages.ViewModels
         private ComboBoxItem m_SelectedPosition;
 
         private int m_HighTemperatureHeaterTemperatureSetpoint;
+        private int m_HighTemperatureHeaterRateSetpoint;
+
 
         #endregion
 
@@ -926,6 +928,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_HighTemperatureHeaterTemperatureSetpoint; }
             set { SetProperty(ref m_HighTemperatureHeaterTemperatureSetpoint, value); }
         }
+        public int HighTemperatureHeaterRateSetpoint
+        {
+            get { return m_HighTemperatureHeaterRateSetpoint; }
+            set { SetProperty(ref m_HighTemperatureHeaterRateSetpoint, value); }
+        }
         public AITHeaterData PendulumHeaterData
         {
             get { return m_PendulumHeaterData; }
@@ -1033,15 +1040,17 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> RunRecipeCommand =>
             _RunRecipeCommand ?? (_RunRecipeCommand = new DelegateCommand<object>(OnRunRecipe));
 
-        //private DelegateCommand _SetChillerTempCommand;
-        //public DelegateCommand SetChillerTempCommand =>
-        //    _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand(OnSetChillerTemp));
+        private DelegateCommand _SetChillerTempCommand;
+        public DelegateCommand SetChillerTempCommand =>
+            _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand(OnSetChillerTemp));
 
 
         //private DelegateCommand _OnOffChillerCommand;
         //public DelegateCommand OnOffChillerCommand =>
         //    _OnOffChillerCommand ?? (_OnOffChillerCommand = new DelegateCommand(OnOffChiller));
-
+        private DelegateCommand _SetHeaterRateCommand;
+        public DelegateCommand SetHeaterRateCommand =>
+            _SetHeaterRateCommand ?? (_SetHeaterRateCommand = new DelegateCommand(OnSetHeaterRate));
 
         private DelegateCommand<object> _HeaterCommand;
         public DelegateCommand<object> HeaterCommand =>
@@ -1478,6 +1487,11 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterTemperature", HighTemperatureHeaterTemperatureSetpoint);
         }
+
+        private void OnSetHeaterRate()
+        { 
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterRate", HighTemperatureHeaterRateSetpoint);
+        }
         private DelegateCommand _OnlineCommand;
         public DelegateCommand OnlineCommand =>
             _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));

+ 3 - 17
Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs

@@ -1629,7 +1629,7 @@ namespace Venus_MainPages.ViewModels
 
                 ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
 
-                HVTemperature = float.Parse(RtDataValues[$"{ModuleName}.{VenusDevice.ESCHV}.Temp"].ToString());
+                //HVTemperature = float.Parse(RtDataValues[$"{ModuleName}.{VenusDevice.ESCHV}.Temp"].ToString());
 
 
 
@@ -1657,18 +1657,7 @@ namespace Venus_MainPages.ViewModels
                 BiasMatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C2");
 
                 BiasMatchWorkMode = CommonFunction.GetValue<string>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.WorkMode");
-                //if (workmode == 0)
-                //{
-                //    BiasMatchWorkMode = "Manual";
-                //}
-                //else if (workmode == 1)
-                //{ 
-                //    BiasMatchWorkMode = "Auto";
-                //}
-                //else
-                //{
-                //    BiasMatchWorkMode = "";
-                //}
+              
 
                 TurboPumpWaterFlowSwitch = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpWaterFlowSwitch.Value");
                 IsTurboPumpAtSpeed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpAtSpeed");
@@ -1677,8 +1666,6 @@ namespace Venus_MainPages.ViewModels
 
                 if (PMCurrentState == PMState.Processing || PMCurrentState == PMState.Clean)
                 {
-
-
                     CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
                     if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber != currentRecipeNumber)
                     {
@@ -1797,7 +1784,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.GetPVPosition");
 
             m_RtDataKeys.Add($"{ModuleName}.Chiller.Temp");
-            m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.ESCHV}.Temp");
+            //m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.ESCHV}.Temp");
 
             //m_RtDataKeys.Add($"{ModuleName}.ESCHV.OutputVoltage");
             //m_RtDataKeys.Add($"{ModuleName}.ESCHV.IsOn");
@@ -1812,7 +1799,6 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.GasBoxDoorSW.Value");
             m_RtDataKeys.Add($"{ModuleName}.GasBoxPressureSW.Value");
 
-            //m_RtDataKeys.Add($"{ModuleName}.WallTempFeedBack");
             m_RtDataKeys.Add($"{ModuleName}.Chiller.IsOn");
 
             m_RtDataKeys.Add($"{ModuleName}.ValveHeater.DeviceData");

+ 78 - 39
Venus/Venus_MainPages/ViewModels/RoleViewModel.cs

@@ -11,7 +11,9 @@ using System.Windows.Controls;
 using System.Windows.Data;
 using Venus_Core;
 using Venus_Unity;
-using Menu = Venus_MainPages.Role.Menu;
+using RoleDefine = Venus_MainPages.Roles.RoleDefine;
+using Menu = Venus_MainPages.Roles.Menu;
+using Venus_MainPages.Views;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -21,6 +23,11 @@ namespace Venus_MainPages.ViewModels
         List<VenusMenu> m_venusMenus = new List<VenusMenu>();
         ObservableCollection<Menu> m_Menus=new ObservableCollection<Menu>();
         ICollectionView vm;
+        ObservableCollection<string> m_Roles = new ObservableCollection<string>();
+
+        ObservableCollection<RoleDefine> m_RoleDefines = new ObservableCollection<RoleDefine>();
+        private bool firstLoad = true;
+        private RoleView roleView;
         #endregion
 
         #region 依赖项属性
@@ -40,6 +47,25 @@ namespace Venus_MainPages.ViewModels
                 SetProperty(ref m_Menus, value);
             }
         }
+        public ObservableCollection<string> Roles 
+        {
+            get
+            {
+                return m_Roles; 
+            }
+            set 
+            {
+                SetProperty(ref m_Roles, value);
+            }
+        }
+        public ObservableCollection<RoleDefine> RoleDefines
+        {
+            get { return m_RoleDefines; }
+            set 
+            {
+                SetProperty(ref m_RoleDefines, value);
+            }
+        }
         #endregion
 
         private DelegateCommand _SaveCommand;
@@ -50,57 +76,70 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> CheckedCommand =>
             _CheckedCommand ?? (_CheckedCommand= new DelegateCommand<object>(OnChecked));
 
+
+        private DelegateCommand _SelectedItemChangedCommand;
+        public DelegateCommand SelectedItemChangedCommand =>
+            _SelectedItemChangedCommand ?? (_SelectedItemChangedCommand = new DelegateCommand(OnSelectedItemChanged));
+
+        private DelegateCommand<Object> _LoadedCommand;
+        public DelegateCommand<Object> LoadedCommand =>
+            _LoadedCommand ?? (_LoadedCommand = new DelegateCommand<Object>(OnLoaded));
+
         public RoleViewModel()
         {
-            VenusMenus = SerializeHelper.Instance.ReadFromJsonFile<List<VenusMenu>>("Config/UIMenu.json");
-            Menus.Add(new Menu(1, "Operation", "OverView"));
-            Menus.Add(new Menu(1, "Operation", "Sequence"));
-            Menus.Add(new Menu(1, "Operation", "FA"));
-
-
-            Menus.Add(new Menu(1, "PMA", "Operation"));
-            Menus.Add(new Menu(1, "PMA", "IO"));
-            Menus.Add(new Menu(1, "PMA", "Recipe"));
-            Menus.Add(new Menu(1, "PMA", "Gas&Leak Check"));
-            Menus.Add(new Menu(1, "PMA", "MFCVerification"));
-            Menus.Add(new Menu(1, "PMA", "PartialPressure"));
-            Menus.Add(new Menu(1, "PMA", "VATPerformance"));
-
-            Menus.Add(new Menu(1, "PMB", "Operation"));
-            Menus.Add(new Menu(1, "PMB", "IO"));
-            Menus.Add(new Menu(1, "PMB", "Recipe"));
-            Menus.Add(new Menu(1, "PMB", "Gas&Leak Check"));
-            Menus.Add(new Menu(1, "PMB", "MFCVerification"));
-            Menus.Add(new Menu(1, "PMB", "PartialPressure"));
-            Menus.Add(new Menu(1, "PMB", "VATPerformance"));
-
-            Menus.Add(new Menu(1, "PMC", "Operation"));
-            Menus.Add(new Menu(1, "PMC", "IO"));
-            Menus.Add(new Menu(1, "PMC", "Recipe"));
-            Menus.Add(new Menu(1, "PMC", "Gas&Leak Check"));
-            Menus.Add(new Menu(1, "PMC", "MFCVerification"));
-            Menus.Add(new Menu(1, "PMC", "PartialPressure"));
-            Menus.Add(new Menu(1, "PMC", "VATPerformance"));
-
-            Menus.Add(new Menu(1, "PMD", "Operation"));
-            Menus.Add(new Menu(1, "PMD", "IO"));
-            Menus.Add(new Menu(1, "PMD", "Recipe"));
-            Menus.Add(new Menu(1, "PMD", "Gas&Leak Check"));
-            Menus.Add(new Menu(1, "PMD", "MFCVerification"));
-            Menus.Add(new Menu(1, "PMD", "PartialPressure"));
-            Menus.Add(new Menu(1, "PMD", "VATPerformance"));
+            VenusMenus = SerializeHelper.Instance.ReadFromJsonFile<List<VenusMenu>>("Config/UIMenuList.json");
 
+            VenusMenus.ForEach(x =>
+            {
+                x.MenuItem.ForEach(k =>
+                {
+                    Menus.Add(new Menu(x.Name, k.Id));
+                });
+            });
+
+
+            RoleDefines.Add(new RoleDefine("Manager", new ObservableCollection<Menu>(Menus)));
+            RoleDefines.Add(new RoleDefine("Engineer", new ObservableCollection<Menu>(Menus)));
+            RoleDefines.Add(new RoleDefine("Technician", new ObservableCollection<Menu>(Menus)));
+            RoleDefines.Add(new RoleDefine("Operator", new ObservableCollection<Menu>(Menus)));
+
+            Roles.Add("Manager");
+            Roles.Add("Engineer");
+            Roles.Add("Technician");
+            Roles.Add("Operator");
+
+            Menus = RoleDefines[0].Menus;
             vm = CollectionViewSource.GetDefaultView(Menus);
             vm.GroupDescriptions.Add(new PropertyGroupDescription("FirstMenu"));
         }
         private void OnSave()
         {
-            SerializeHelper.Instance.WriteToJsonFile<List<VenusMenu>>(VenusMenus, "Config/UIMenu.json");
+            //SerializeHelper.Instance.WriteToJsonFile<List<VenusMenu>>(VenusMenus, "Config/UIMenu.json");
         }
 
         private void OnChecked(object obj)
         { 
         
         }
+        private void OnSelectedItemChanged()
+        {
+
+        }
+        private void OnLoaded(Object myrecipeView)
+        {
+            if (firstLoad == true)
+            {
+                roleView = myrecipeView as RoleView;
+                roleView.roleTreeView.SelectedItemChanged += RoleTreeView_SelectedItemChanged;
+            }
+        }
+
+        private void RoleTreeView_SelectedItemChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
+        {
+            int index = Roles.IndexOf(e.NewValue.ToString());
+            Menus = RoleDefines[index].Menus;
+            //vm = CollectionViewSource.GetDefaultView(Menus);
+            //vm.GroupDescriptions.Add(new PropertyGroupDescription("FirstMenu"));
+        }
     }
 }

+ 36 - 0
Venus/Venus_MainPages/ViewModels/UserViewModel.cs

@@ -0,0 +1,36 @@
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Venus_MainPages.Roles;
+
+namespace Venus_MainPages.ViewModels
+{
+    internal class UserViewModel : BindableBase
+    {
+        #region 私有属性
+        ObservableCollection<User> m_Users = new ObservableCollection<User>();
+        #endregion
+
+        #region 依赖项属性
+        public ObservableCollection<User> Users
+        {
+            get { return m_Users; }
+            set
+            {
+                SetProperty(ref m_Users, value);
+            }
+        }
+        #endregion
+
+        #region 构造函数
+        public UserViewModel() 
+        {
+            Users.Add(new User("admin","admin", Venus_MainPages.Roles.Role.Manager));
+        }
+        #endregion
+    }
+}

+ 4 - 4
Venus/Venus_MainPages/Views/OverKepler2200AView.xaml

@@ -1195,10 +1195,10 @@
             <TextBlock Grid.Row="1" Grid.Column="2" Text="0.0" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
             <Button  Grid.Row="1" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetChillerTempCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
-            <TextBlock Grid.Row="2" Text="Heater Temp Range Rate" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0"/>
-            <TextBox Grid.Row="2" Grid.Column="1" Width="Auto" Height="Auto"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
-            <TextBlock Grid.Row="2" Grid.Column="2" Text="0.0" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
-            <Button  Grid.Row="2" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetChillerTempCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+            <TextBlock Grid.Row="2" Text="Heater Rate(Inner/Outer)" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0"/>
+            <TextBox Grid.Row="2" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding HighTemperatureHeaterRateSetpoint,UpdateSourceTrigger=PropertyChanged}"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
+            <TextBlock Grid.Row="2" Grid.Column="2"  Text="{Binding HighTemperatureHeaterData.HighTemperatureHeaterRate}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
+            <Button  Grid.Row="2" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetHeaterRateCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
 
             <TextBlock Grid.Row="3" Text="Heater Position" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0" FontSize="14"/>

+ 5 - 5
Venus/Venus_MainPages/Views/OverKepler2200BView.xaml

@@ -1192,13 +1192,13 @@
 
             <TextBlock Grid.Row="1" Text="Heater Ratio" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0"/>
             <TextBox Grid.Row="1"  Grid.Column="1"  Width="Auto" Height="Auto"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
-            <TextBlock Grid.Row="1" Grid.Column="2" Text="0.0" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
+            <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding HighTemperatureHeaterData.HighTemperatureHeaterTemperature,StringFormat='F1'}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
             <Button  Grid.Row="1" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetChillerTempCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
-            <TextBlock Grid.Row="2" Text="Heater Temp Range Rate" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0"/>
-            <TextBox Grid.Row="2" Grid.Column="1" Width="Auto" Height="Auto"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
-            <TextBlock Grid.Row="2" Grid.Column="2" Text="0.0" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
-            <Button  Grid.Row="2" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetChillerTempCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+            <TextBlock Grid.Row="2" Text="Heater Rate(Inner/Outer)" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0"/>
+            <TextBox Grid.Row="2" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding HighTemperatureHeaterRateSetpoint,UpdateSourceTrigger=PropertyChanged}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
+            <TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding HighTemperatureHeaterData.HighTemperatureHeaterRate}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
+            <Button  Grid.Row="2" Grid.Column="3" Margin="5,0,5,0" Height="20"   Style="{x:Null}" Content="Set"             Command="{Binding SetHeaterRateCommand}"    IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
 
             <TextBlock Grid.Row="3" Text="Heater Position" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="4,0,0,0" FontSize="14"/>

+ 93 - 92
Venus/Venus_MainPages/Views/RoleView.xaml

@@ -7,107 +7,108 @@
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
              xmlns:prism="http://prismlibrary.com/"
              xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
+             xmlns:unity="clr-namespace:Venus_MainPages.Unity"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
+             d:DesignHeight="450" d:DesignWidth="800" Name="roleView">
+    <i:Interaction.Triggers>
+        <i:EventTrigger EventName="Loaded">
+            <i:InvokeCommandAction Command="{Binding LoadedCommand}" CommandParameter="{Binding ElementName=roleView}"/>
+        </i:EventTrigger>
+    </i:Interaction.Triggers>
+    <Canvas>
+        <TreeView ItemsSource="{Binding Roles}" Canvas.Left="10" x:Name="roleTreeView">
+            <i:Interaction.Triggers>
+                <i:EventTrigger EventName="SelectedItemChanged">
+                    <i:InvokeCommandAction Command="{Binding SelectedItemChangedCommand}"/>
+                </i:EventTrigger>
+            </i:Interaction.Triggers>
+        </TreeView>
 
+        <StackPanel Orientation="Horizontal" Canvas.Left="150" Canvas.Top="30">
+            <TextBlock Text="IsLock" FontSize="20"/>
+            <CheckBox  Canvas.Left="200" Canvas.Top="10" Margin="4"/>
+        </StackPanel>
 
-        <!--<Grid>
-            <Grid.RowDefinitions>
-                <RowDefinition Height="40"/>
-                <RowDefinition/>
-            </Grid.RowDefinitions>
-            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
-                <customControls:PathButton Width="120" Height="30" Content="Add"/>
-                <customControls:PathButton Width="120" Height="30" Content="Delete"/>
-                <customControls:PathButton Width="120" Height="30" Content="Edit"/>
-            </StackPanel>
-            <DataGrid Grid.Row="1"  ItemsSource="{Binding Menus}" AlternationCount="2"
-                      Width="500" FontSize="20"
-                      AutoGenerateColumns="False" HorizontalAlignment="Center"  VerticalAlignment="Top" CanUserAddRows="False" Margin="0">
-                <DataGrid.Columns>
-                    <DataGridTemplateColumn Header="Id"  Width="60">
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding Id}"/>
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
-                    <DataGridTemplateColumn Header="FirstMenu"  Width="200">
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding FirstMenu}"/>
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
-                    <DataGridTemplateColumn Header="SecondMenu"  Width="200" >
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding SecondMenu}"/>
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
+        <StackPanel Orientation="Horizontal" Canvas.Left="150" Canvas.Top="70">
+            <TextBlock Text="LockTime:" FontSize="20"/>
+            <TextBox Width="100" FontSize="20" BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent"/>
+            <TextBlock Text="(s)" FontSize="20"/>
+        </StackPanel>
 
-                </DataGrid.Columns>
-                <DataGrid.GroupStyle>
-                    <GroupStyle >
-                        <GroupStyle.ContainerStyle>
-                            <Style TargetType="{x:Type GroupItem}">
-                                <Setter Property="Template">
-                                    <Setter.Value>
-                                        <ControlTemplate TargetType="{x:Type GroupItem}">
-                                            <Expander IsExpanded="False" Style="{StaticResource ExpanderStyle}" ExpandDirection="Down"  SnapsToDevicePixels="True" VerticalAlignment="Top">
-                                                <Expander.Header>
+        <customControls:PathButton Content="Save" Width="120" Height="33" Canvas.Left="400" Canvas.Top="66" Command="{Binding SaveCommand}"/>
+        <DataGrid   ItemsSource="{Binding Menus}" AlternationCount="2"
+                    SelectionUnit="Cell"
+                    FontSize="20"
+                    Height="700"
+                    Canvas.Top="110"
+                    Canvas.Left="10"
+                    AutoGenerateColumns="False" HorizontalAlignment="Center"  VerticalAlignment="Top" CanUserAddRows="False">
+            <DataGrid.Columns>
+                <DataGridTemplateColumn Header="FirstMenu"  Width="200" >
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <TextBlock Text="{Binding FirstMenu}"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+                <DataGridTemplateColumn Header="SecondMenu"  Width="200" IsReadOnly="True">
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <TextBlock Text="{Binding SecondMenu}"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+                <DataGridTemplateColumn Header="Permission"  Width="200" >
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <ComboBox SelectedItem="{Binding Permission,UpdateSourceTrigger=PropertyChanged}" unity:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+            </DataGrid.Columns>
+            <DataGrid.GroupStyle>
+                <GroupStyle >
+                    <GroupStyle.ContainerStyle>
+                        <Style TargetType="{x:Type GroupItem}">
+                            <Setter Property="Template">
+                                <Setter.Value>
+                                    <ControlTemplate TargetType="{x:Type GroupItem}">
+                                        <Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}" ExpandDirection="Down"  SnapsToDevicePixels="True" VerticalAlignment="Top">
+                                            <Expander.Header>
+                                                <Border BorderBrush="Gray" BorderThickness="0,0,0,1">
                                                     <StackPanel Orientation="Horizontal">
-                                                        <TextBlock Text="{Binding Name}" Width="120"/>
-                                                        <TextBlock Text="    Count:"/>
-                                                        <TextBlock Text="{Binding ItemCount}"/>
+                                                        <TextBlock Text="{Binding Name}" Width="120" Foreground="Red"/>
+                                                        <TextBlock Text="    Count:" Foreground="Red"/>
+                                                        <TextBlock Text="{Binding ItemCount}" Foreground="Red"/>
                                                     </StackPanel>
-                                                </Expander.Header>
-                                                <ItemsPresenter/>
-                                            </Expander>
-                                        </ControlTemplate>
-                                    </Setter.Value>
-                                </Setter>
-                            </Style>
-                        </GroupStyle.ContainerStyle>
-                    </GroupStyle>
-                </DataGrid.GroupStyle>
-                <DataGrid.RowStyle>
-                    <Style TargetType="{x:Type DataGridRow}">
-                        <Style.Triggers>
-                            <Trigger Property="ItemsControl.AlternationIndex"
+                                                </Border>
+
+                                            </Expander.Header>
+                                            <ItemsPresenter/>
+                                        </Expander>
+                                    </ControlTemplate>
+                                </Setter.Value>
+                            </Setter>
+                        </Style>
+                    </GroupStyle.ContainerStyle>
+                </GroupStyle>
+            </DataGrid.GroupStyle>
+            <DataGrid.RowStyle>
+                <Style TargetType="{x:Type DataGridRow}">
+                    <Style.Triggers>
+                        <Trigger Property="ItemsControl.AlternationIndex"
                          Value="0">
-                            <Setter Property="Background" Value="#EAEAEA" />
-                            </Trigger>
-                            <Trigger Property="ItemsControl.AlternationIndex"
+                            <Setter Property="Background" Value="#EEEEEE" />
+                        </Trigger>
+                        <Trigger Property="ItemsControl.AlternationIndex"
                          Value="1">
-                            <Setter Property="Background" Value="#CDCDC1" />
-                            </Trigger>
-                        </Style.Triggers>
-                    </Style>
-                </DataGrid.RowStyle>
-            </DataGrid>
-        </Grid>-->
-    <Canvas>
-        <TreeView Name="checkView" Grid.Column="0" Margin="0,50,0,0" ItemsSource="{Binding VenusMenus}" Width="Auto">
-            <TreeView.ItemTemplate>
-                <HierarchicalDataTemplate ItemsSource="{Binding MenuItem,Mode=OneTime}">
-                    <StackPanel Orientation="Horizontal">
-                        <CheckBox IsChecked="{Binding Path=IsShow}">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Checked">
+                            <Setter Property="Background" Value="#DEDEDE" />
+                        </Trigger>
+                    </Style.Triggers>
+                </Style>
+            </DataGrid.RowStyle>
+        </DataGrid>
 
-                                    <i:InvokeCommandAction Command="{Binding Path=DataContext.MenuItem,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=TreeViewItem}}" CommandParameter="{Binding}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </CheckBox>
-                        <TextBlock Foreground="White" FontSize="15" Text="{Binding Path=Id}" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </HierarchicalDataTemplate>
-            </TreeView.ItemTemplate>
-        </TreeView>
-        <Button Content="Save" Command="{Binding SaveCommand}" Grid.Row="1" Width="100" Height="20" HorizontalAlignment="Left"/>
     </Canvas>
-
 </UserControl>

+ 88 - 0
Venus/Venus_MainPages/Views/UserView.xaml

@@ -0,0 +1,88 @@
+<UserControl x:Class="Venus_MainPages.Views.UserView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Venus_MainPages.Views"
+             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+             xmlns:unity="clr-namespace:Venus_MainPages.Unity"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Canvas>
+        <DataGrid   ItemsSource="{Binding Users}" AlternationCount="2"
+                    SelectionUnit="Cell"
+                    FontSize="20"
+                    MinHeight="200"
+                    Canvas.Top="110"
+                    Canvas.Left="10"
+                    AutoGenerateColumns="False" HorizontalAlignment="Center"  VerticalAlignment="Top" CanUserAddRows="False">
+            <DataGrid.Columns>
+                <DataGridTemplateColumn Header="UserName"  Width="200" >
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <TextBlock Text="{Binding Name}"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+                <DataGridTemplateColumn Header="Password"  Width="200" IsReadOnly="True">
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <TextBlock Text="{Binding Password}"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+                <DataGridTemplateColumn Header="Role"  Width="200" >
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <ComboBox SelectedItem="{Binding Role,UpdateSourceTrigger=PropertyChanged}" unity:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+            </DataGrid.Columns>
+            <DataGrid.GroupStyle>
+                <GroupStyle >
+                    <GroupStyle.ContainerStyle>
+                        <Style TargetType="{x:Type GroupItem}">
+                            <Setter Property="Template">
+                                <Setter.Value>
+                                    <ControlTemplate TargetType="{x:Type GroupItem}">
+                                        <Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}" ExpandDirection="Down"  SnapsToDevicePixels="True" VerticalAlignment="Top">
+                                            <Expander.Header>
+                                                <Border BorderBrush="Gray" BorderThickness="0,0,0,1">
+                                                    <StackPanel Orientation="Horizontal">
+                                                        <TextBlock Text="{Binding Name}" Width="120" Foreground="Red"/>
+                                                        <TextBlock Text="    Count:" Foreground="Red"/>
+                                                        <TextBlock Text="{Binding ItemCount}" Foreground="Red"/>
+                                                    </StackPanel>
+                                                </Border>
+
+                                            </Expander.Header>
+                                            <ItemsPresenter/>
+                                        </Expander>
+                                    </ControlTemplate>
+                                </Setter.Value>
+                            </Setter>
+                        </Style>
+                    </GroupStyle.ContainerStyle>
+                </GroupStyle>
+            </DataGrid.GroupStyle>
+            <DataGrid.RowStyle>
+                <Style TargetType="{x:Type DataGridRow}">
+                    <Style.Triggers>
+                        <Trigger Property="ItemsControl.AlternationIndex"
+                         Value="0">
+                            <Setter Property="Background" Value="#EEEEEE" />
+                        </Trigger>
+                        <Trigger Property="ItemsControl.AlternationIndex"
+                         Value="1">
+                            <Setter Property="Background" Value="#DEDEDE" />
+                        </Trigger>
+                    </Style.Triggers>
+                </Style>
+            </DataGrid.RowStyle>
+        </DataGrid>
+
+    </Canvas>
+</UserControl>

+ 28 - 0
Venus/Venus_MainPages/Views/UserView.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Venus_MainPages.Views
+{
+    /// <summary>
+    /// UserView.xaml 的交互逻辑
+    /// </summary>
+    public partial class UserView : UserControl
+    {
+        public UserView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 0 - 69
Venus/Venus_RT/Config/Account/Account.xml

@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="GB2312"?>
-<root>
-  <roles>
-    <!--2:read and write-->
-    <roleItem id="0" name="Manager" autologout="1" logouttime="20">
-      Header,3;Overview,3;WaferAssociation,3;Sequence,3;DataCharting,3;WaferHistory,3;EventLog,3;DataAnalysis,3;ProcessHistory,3;
-      Alarm,3;
-      Recipe,3;
-      LoadPort,3;EFEM,3;LoadLock,3;TM,3;IO1,3;IO2,3;IO3,3;
-      Config,3;Account,3;Role,3;FA,3;
-      IOPMA,3;calibrationPMA,3;verificationPMA,3;
-      IOPMB,3;calibrationPMB,3;verificationPMB,3;
-      OperationPMA,3;OverviewPMA,3;RecipePMA,3;GasboxPMA,3;ServicePMA,3;ConfigurationPMA,3;
-      OperationPMB,3;OverviewPMB,3;RecipePMB,3;GasboxPMB,3;ServicePMB,3;ConfigurationPMB,3;
-      DataHistory,3;Statistics,3;
-    </roleItem>
-    <roleItem id="1" name="Engineer" autologout="1" logouttime="20">
-      Header,3; Overview,3;WaferAssociation,3;Sequence,3;DataCharting,3;WaferHistory,3;EventLog,3;DataAnalysis,3;ProcessHistory,3;
-      Alarm,3;
-      Recipe,3;
-      LoadPort,3;EFEM,3;LoadLock,3;TM,3;IO1,3;IO2,3;IO3,3;
-      Config,3;Account,3;Role,3;FA,3;
-      IOPMA,3;calibrationPMA,3;verificationPMA,3;
-      IOPMB,3;calibrationPMB,3;verificationPMB,3;
-      OperationPMA,3;OverviewPMA,3;RecipePMA,3;GasboxPMA,3;ServicePMA,3;ConfigurationPMA,3;
-      OperationPMB,3;OverviewPMB,3;RecipePMB,3;GasboxPMB,3;ServicePMB,3;ConfigurationPMB,3;
-      DataHistory,3;Statistics,3;
-    </roleItem>
-    <roleItem id="2" name="Technician" autologout="1" logouttime="20">
-      Header,3; Overview,3;WaferAssociation,3;Sequence,3;DataCharting,3;WaferHistory,3;EventLog,3;DataAnalysis,3;ProcessHistory,3;
-      Alarm,3;
-      Recipe,3;
-      LoadPort,3;EFEM,3;LoadLock,3;TM,3;IO1,3;IO2,3;IO3,3;
-      Config,3;Account,3;Role,3;FA,3;
-      IOPMA,3;calibrationPMA,3;verificationPMA,3;
-      IOPMB,3;calibrationPMB,3;verificationPMB,3;
-      OperationPMA,3;OverviewPMA,3;RecipePMA,3;GasboxPMA,3;ServicePMA,3;ConfigurationPMA,3;
-      OperationPMB,3;OverviewPMB,3;RecipePMB,3;GasboxPMB,3;ServicePMB,3;ConfigurationPMB,3;
-      DataHistory,3;Statistics,3;
-    </roleItem>
-    <roleItem id="3" name="Operator" autologout="1" logouttime="20">
-      Header,3; Overview,3;WaferAssociation,3;Sequence,3;DataCharting,3;WaferHistory,3;EventLog,3;DataAnalysis,3;ProcessHistory,3;
-      Alarm,3;
-      Recipe,3;
-      LoadPort,3;EFEM,3;LoadLock,3;TM,3;IO1,3;IO2,3;IO3,3;
-      Config,3;Account,3;Role,3;FA,3;
-      IOPMA,3;calibrationPMA,3;verificationPMA,3;
-      IOPMB,3;calibrationPMB,3;verificationPMB,3;
-      OperationPMA,3;OverviewPMA,3;RecipePMA,3;GasboxPMA,3;ServicePMA,3;ConfigurationPMA,3;
-      OperationPMB,3;OverviewPMB,3;RecipePMB,3;GasboxPMB,3;ServicePMB,3;ConfigurationPMB,3;
-      DataHistory,3;Statistics,3;
-    </roleItem>
-  </roles>
-
-
-
-
-
-  <users>
-    <userItem id="1" loginname="admin" password="YWRtaW4=" firstname="MAE" lastname="dd" email="">
-      <rolegroup>
-        <role id="0"></role>
-        <role id="1"></role>
-        <role id="2"></role>
-        <role id="3"></role>
-      </rolegroup>
-    </userItem>
-  </users>
-</root>

BIN
Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200ADeviceModel.xml


+ 2 - 2
Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200AIoDefine.xml

@@ -300,8 +300,8 @@
 		<AI_ITEM Index="13" Name="AI_Turbo_Pump_N2_Flow"                 BufferOffset="26" Device="" Addr="d2026" Note="float" />
 		<AI_ITEM Index="14" Name=""            BufferOffset="28" Device="" Addr="d2028" Note="float" />
 		<AI_ITEM Index="15" Name="AI_Penning_Gauge_Pressure1" BufferOffset="30" Device="" Addr="d2030" Note="float"/>
-		<AI_ITEM Index="16" Name="AI_Penning_Gauge_Pressure2" BufferOffset="32" Device="" Addr="d2032" Note="float" />
-		<AI_ITEM Index="17" Name="" />
+		<AI_ITEM Index="16" Name="AI_CHB_M-HT_SCR1_PWR_OUT" BufferOffset="32" Device="" Addr="d2032" Note="float" />
+		<AI_ITEM Index="17" Name="AI_CHB_M-HT_SCR2_PWR_OUT" BufferOffset="34" Device="" Addr="d2034" Note="float" />
 		<AI_ITEM Index="18" Name="AI_CHB_M-HT_Control_TC_Temp"           BufferOffset="36" Device="" Addr="d2036" Note="float" />
 		<AI_ITEM Index="19" Name="" />
 		<AI_ITEM Index="20" Name="AI_Spare_Heater_Control_TC_Temp" />

BIN
Venus/Venus_RT/Config/PM/Kepler2200B/Kepler2200BDeviceModel.xml


+ 2 - 2
Venus/Venus_RT/Config/PM/Kepler2200B/Kepler2200BIoDefine.xml

@@ -300,8 +300,8 @@
 		<AI_ITEM Index="13" Name="AI_Turbo_Pump_N2_Flow"                 BufferOffset="26" Device="" Addr="d2026" Note="float" />
 		<AI_ITEM Index="14" Name=""            BufferOffset="28" Device="" Addr="d2028" Note="float" />
 		<AI_ITEM Index="15" Name="AI_Penning_Gauge_Pressure1" BufferOffset="30" Device="" Addr="d2030" Note="float"/>
-		<AI_ITEM Index="16" Name="AI_Penning_Gauge_Pressure2" BufferOffset="32" Device="" Addr="d2032" Note="float" />
-		<AI_ITEM Index="17" Name="" />
+		<AI_ITEM Index="16" Name="AI_CHB_M-HT_SCR1_PWR_OUT" BufferOffset="32" Device="" Addr="d2032" Note="float" />
+		<AI_ITEM Index="17" Name="AI_CHB_M-HT_SCR2_PWR_OUT" BufferOffset="34" Device="" Addr="d2034" Note="float" />
 		<AI_ITEM Index="18" Name="AI_CHB_M-HT_Control_TC_Temp"           BufferOffset="36" Device="" Addr="d2036" Note="float" />
 		<AI_ITEM Index="19" Name="" />
 		<AI_ITEM Index="20" Name="AI_Spare_Heater_Control_TC_Temp" />

+ 25 - 5
Venus/Venus_RT/Devices/AdTecRF.cs

@@ -18,6 +18,7 @@ using MECF.Framework.Common.Device.Bases;
 using MECF.Framework.Common.Equipment;
 using Venus_Core;
 using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Venus_RT.Devices
 {
@@ -71,8 +72,12 @@ namespace Venus_RT.Devices
         private readonly DIAccessor _diIntlk;
         private StatsDataItemRFAndPump _statRFOnTime;
         private readonly VenusDevice _device;
-        // --------------------------Properties------------------------
-        //
+
+        private Stopwatch monitorStopwatch = new Stopwatch();
+
+        private JetPMBase _chamber;
+
+        private bool _intrtlockFlag = false;
         public bool ConnectedStatus { get; set; }
         public override float ScalePower => (float)_scPowerRange;
 
@@ -223,6 +228,8 @@ namespace Venus_RT.Devices
             sendDataChangedEvent += SkyPump_sendDataChangedEvent;
             baseStopwatch.Start();
             baseTimer.Enabled = true;
+
+            monitorStopwatch.Start();
         }
         private void SkyPump_sendDataChangedEvent(string obj)
         {
@@ -293,6 +300,7 @@ namespace Venus_RT.Devices
             //}
 
             // power on triggered
+
             _rfOnTrigger.CLK = IsPowerOn;
             if (_rfOnTrigger.R)
             {
@@ -435,11 +443,23 @@ namespace Venus_RT.Devices
                 _timerRFTurnOn.Stop();
             }
 
+            if (monitorStopwatch.ElapsedMilliseconds > 500)
+            {
+                if (IsPowerOn == true && _chamber != null && _chamber.RFInterlock(_device) == false)
+                {
+                    SetPowerOnOff(false, out _);
+                }
+                monitorStopwatch.Restart();
+            }
             base.Monitor();
         }
 
         public override void Terminate()
         {
+            if (IsPowerOn)
+            {
+                SetPowerOnOff(false, out _);
+            }
             _serial?.Close();
         }
 
@@ -491,7 +511,7 @@ namespace Venus_RT.Devices
             if (!(this.ControlMode == EnumRfPowerControlMode.RS232Mode)) SetCommunicationMode(1);
             str = "";
 
-            var _chamber = DEVICE.GetDevice<JetPMBase>(Module);
+            _chamber = DEVICE.GetDevice<JetPMBase>(Module);
             if (on && !_chamber.CheckGeneratorAndHVInterlock(_device))
             {
                 return false;
@@ -829,7 +849,7 @@ namespace Venus_RT.Devices
         /// <param name="c1,c2">百分比数字</param>
         /// <param name="c2"></param>
         /// 
-        private  void executeMatchPostion(float c1, float c2)
+        private void executeMatchPostion(float c1, float c2)
         {
             SetWorkMode(EnumRfMatchTuneMode.Manual);
             //await Task.Delay(200);
@@ -839,7 +859,7 @@ namespace Venus_RT.Devices
 
             SetPresetMemory(0);
             //await Task.Delay(200);
-           // SetWorkMode(EnumRfMatchTuneMode.Auto);
+            // SetWorkMode(EnumRfMatchTuneMode.Auto);
         }
         public override void SetMatchPosition(float c1, float c2, out string reason)
         {

+ 19 - 0
Venus/Venus_RT/Devices/DeviceManager.cs

@@ -347,5 +347,24 @@ namespace Venus_RT.Instances
 
             return true;
         }
+        public void RTExitPMEvent()
+        {
+            if (ModuleHelper.IsInstalled(ModuleName.PMA))
+            {
+                DEVICE.GetDevice<JetPMBase>("PMA")?.RTCloseEvent();
+            }
+            if (ModuleHelper.IsInstalled(ModuleName.PMB))
+            {
+                DEVICE.GetDevice<JetPMBase>("PMB")?.RTCloseEvent();
+            }
+            if (ModuleHelper.IsInstalled(ModuleName.PMC))
+            {
+                DEVICE.GetDevice<JetPMBase>("PMC")?.RTCloseEvent();
+            }
+            if (ModuleHelper.IsInstalled(ModuleName.PMD))
+            {
+                DEVICE.GetDevice<JetPMBase>("PMD")?.RTCloseEvent();
+            }
+        }
     }
 }

+ 27 - 2
Venus/Venus_RT/Devices/IODevices/IoHighTemperatureHeater.cs

@@ -52,6 +52,9 @@ namespace Venus_RT.Devices.IODevices
         private readonly AOAccessor _aoSoftDownLimit;
         private readonly AOAccessor _aoSoftUpLimit;
 
+        private readonly AOAccessor _aoRate;
+
+
 
 
 
@@ -79,7 +82,9 @@ namespace Venus_RT.Devices.IODevices
                     DisplayName = Display,
                     HighTemperatureHeaterPosition = CurrentPosition.ToString(),
                     HighTemperatureHeaterIson = HighTemperatureHeaterIsOn,
-                    HighTemperatureHeaterTemperature = HighTemperatureHighHeaterTemperature
+                    HighTemperatureHeaterTemperature = HighTemperatureHighHeaterTemperature,
+                    HighTemperatureHeaterRate = HighTemperatureHeaterRate
+
                 };
             }
         }
@@ -149,6 +154,19 @@ namespace Venus_RT.Devices.IODevices
                 _SetRealFloat(_aoTemperatureSetPoint, value);
             }
         }
+
+        public float HighTemperatureHeaterRate
+        {
+            get
+            {
+                if (_aoRate == null) return -1;
+                return _GetRealFloat(_aoRate);
+            }
+            set
+            {
+                _SetRealFloat(_aoRate, value);
+            }
+        }
         public IoHighTemperatureHeater(string module, XmlElement node, string ioModule = "")
         {
             base.Module = module;
@@ -194,7 +212,7 @@ namespace Venus_RT.Devices.IODevices
             _aoSoftUpLimit = ParseAoNode("aoSoftUpLimit", node, ioModule);
 
 
-
+            _aoRate= ParseAoNode("aoRate", node, ioModule);
 
 
 
@@ -237,6 +255,7 @@ namespace Venus_RT.Devices.IODevices
             }
             return true;
         }
+
         public bool Initialize()
         {
             OP.Subscribe($"{Module}.{Name}.GotoPosition", (cmd, args) =>
@@ -258,6 +277,12 @@ namespace Venus_RT.Devices.IODevices
                 HighTemperatureHighHeaterTemperature = Convert.ToSingle(args[0]);
                 return true;
             });
+            OP.Subscribe($"{Module}.{Name}.SetHighTemperatureHeaterRate", (cmd, args) =>
+            {
+
+                HighTemperatureHeaterRate = Convert.ToSingle(args[0]);
+                return true;
+            });
             DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData,SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
             DATA.Subscribe($"{Module}.{Name}.Temperature", () => DeviceData.HighTemperatureHeaterTemperature);

+ 252 - 186
Venus/Venus_RT/Devices/JetKepler2200APM.cs

@@ -15,17 +15,19 @@ using MECF.Framework.Common.SubstrateTrackings;
 using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
 using System.Threading.Tasks;
 using Venus_RT.Modules;
+using Aitex.Core.RT.DataCenter;
+using System.Diagnostics;
 
 namespace Venus_RT.Devices
 {
     class JetKepler2200APM : JetPMBase
     {
         private readonly IoLid _Lid;
-        private readonly IoLid _LidLoadlock;
+        //private readonly IoLid _LidLoadlock;
 
         private readonly IoCylinder _slitDoor;
         private readonly IoCylinder _LiftPin;
-        private readonly IoCylinder _LoadLockArm;
+        //private readonly IoCylinder _LoadLockArm;
 
         private readonly IoValve _PVN21Valve;
         private readonly IoValve _PVN22Valve;
@@ -48,8 +50,8 @@ namespace Venus_RT.Devices
         private readonly IoValve _Mfc6Valve;
         private readonly IoValve _Mfc7Valve;
         private readonly IoValve _Mfc8Valve;
-        private readonly IoValve _PVHe1Valve;
-        private readonly IoValve _PVHe2Valve;
+        //private readonly IoValve _PVHe1Valve;
+        //private readonly IoValve _PVHe2Valve;
         private readonly IoValve _GasFinalValve;
         private readonly IoValve _SoftPumpValve;
         private readonly IoValve _FastPumpValve;
@@ -78,18 +80,20 @@ namespace Venus_RT.Devices
 
 
         private readonly PumpBase _MainPump;
-        private readonly ESC5HighVoltage _ESCHV;
+        //private readonly ESC5HighVoltage _ESCHV;
         private readonly AdixenTurboPump _TurboPump;
         private readonly PendulumValve _pendulumValve;
 
-        private readonly ChillerBase _Chiller;
+        //private readonly ChillerBase _Chiller;
 
         private readonly RfPowerBase _Generator;//srf=>AdTecGenerator
-        private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
         private readonly RfMatchBase _Match;
-        private readonly RfMatchBase _BiasMatch;
 
-        private readonly IoSignalTower _SignalTower;
+
+        //private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
+        //private readonly RfMatchBase _BiasMatch;
+
+        //private readonly IoSignalTower _SignalTower;
 
         private readonly IoHeater _ForelineTC;
         private readonly IoHeater _WallTC;
@@ -100,15 +104,17 @@ namespace Venus_RT.Devices
         private readonly IoGasStick _gasLineN2;
         private readonly IoBacksideHe _backsideHe;
 
-        private readonly IoMfc _heMfc;
 
 
         private readonly double _foreline_interlock_pressure = 750;
 
+        private Stopwatch _GasRFStopWatch = new Stopwatch();
+        private bool _GasFlag=false;
+
 
         // 盖子的状态
         public override bool IsLidClosed => _Lid.OFFFeedback;
-        public override bool IsLidLoadlockClosed => _LidLoadlock.OFFFeedback;
+        //public override bool IsLidLoadlockClosed => _LidLoadlock.OFFFeedback;
 
         public override bool IsSlitDoorClosed => !_slitDoor.ONFeedback && _slitDoor.OFFFeedback;
 
@@ -177,34 +183,34 @@ namespace Venus_RT.Devices
         public override double LoadlockPressure => 0;
         public override double ESCHePressure => 0;
 
-        public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
-        public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
+        //public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
+        //public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
 
-        public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
-        public override bool IsHVOn => _ESCHV.IsOn;
+        //public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
+        //public override bool IsHVOn => _ESCHV.IsOn;
 
-        public override float CoolantInletTempFB =>0;
+        public override float CoolantInletTempFB => 0;
         public override float CoolantOutletTempFB => 0;
 
         public override bool ChillerIsRunning => false;
 
         //Loadlock_Arm
-        public override bool IsLoadlockArmRetract => _LoadLockArm.OFFFeedback;
-        public override bool IsLoadlockArmExtend => _LoadLockArm.ONFeedback;
-        //Loadlock_Arm DO
-        public override bool LoadlockArmRetract => _LoadLockArm.OFFSetPoint;
-        public override bool LoadlockArmExtend => _LoadLockArm.ONSetPoint;
+        //public override bool IsLoadlockArmRetract => _LoadLockArm.OFFFeedback;
+        //public override bool IsLoadlockArmExtend => _LoadLockArm.ONFeedback;
+        ////Loadlock_Arm DO
+        //public override bool LoadlockArmRetract => _LoadLockArm.OFFSetPoint;
+        //public override bool LoadlockArmExtend => _LoadLockArm.ONSetPoint;
 
         public override float ReflectPower => _Generator.ReflectPower;
-        public override float BiasReflectPower => _GeneratorBias.ReflectPower;
+        //public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override float ForwardPower => _Generator.ForwardPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
         public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
         public override float RFMatchC2 => _Match != null ? _Match.TunePosition2 : 0;
-        public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
-        public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        //public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        //public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
         public override double MFC1FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas1").FeedBack;
         public override double MFC2FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas2").FeedBack;
         public override double MFC3FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas3").FeedBack;
@@ -292,11 +298,11 @@ namespace Venus_RT.Devices
         {
             Module = moduleName;
             _Lid = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.Lid}");
-            _LidLoadlock = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.LidLoadlock}");
+            //_LidLoadlock = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.LidLoadlock}");
 
             _slitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.SlitDoor}");
             _LiftPin = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LiftPin}");
-            _LoadLockArm = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LoadLockArm}");
+            //_LoadLockArm = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LoadLockArm}");
 
             _PVN21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN21}");
             _PVN22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN22}");
@@ -319,8 +325,8 @@ namespace Venus_RT.Devices
             _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
             _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
             _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
-            _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
-            _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
+            //_PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
+            //_PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
             _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
             _SoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSoftPump}");
             _FastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveFastPump}");
@@ -329,7 +335,6 @@ namespace Venus_RT.Devices
             _GuageValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGuage}");
             _LoadlockVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveLoadlockVent}");
             _LoadlockPumpingValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveLoadlockPumping}");
-            _heMfc = DEVICE.GetDevice<IoMfc>($"{Module}.MfcHe");
             _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
             _ATM_Loadlock_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorLoadlockATMSwitch");
             _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
@@ -351,7 +356,7 @@ namespace Venus_RT.Devices
             _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
 
 
-            _SignalTower = DEVICE.GetDevice<IoSignalTower>($"{Module}.SignalTower");
+            //_SignalTower = DEVICE.GetDevice<IoSignalTower>($"{Module}.SignalTower");
 
             _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
             _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VenusDevice.PressureControl}");
@@ -381,22 +386,22 @@ namespace Venus_RT.Devices
                 }
             }
 
-            _ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
+            //_ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
             _TurboPump = DEVICE.GetDevice<AdixenTurboPump>($"{Module}.{VenusDevice.TurboPump}");
             _pendulumValve = DEVICE.GetDevice<PendulumValve>($"{Module}.{VenusDevice.PendulumValve}");
 
-            if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
-                SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
-            {
-                if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
-                {
-                    _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
-                }
-                else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
-                {
-                    _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
-                }
-            }
+            //if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
+            //    SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
+            //{
+            //    if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
+            //    {
+            //        _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
+            //    }
+            //    else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
+            //    {
+            //        _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
+            //    }
+            //}
 
 
             // RS223 AdTec Generator
@@ -407,18 +412,18 @@ namespace Venus_RT.Devices
             }
 
             // Ethernet Comet Generator Bias
-            if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
-            {
-                if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
-                    SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
-                {
-                    _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
-                }
-                else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
-                {
-                    _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
-                }
-            }
+            //if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
+            //{
+            //    if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
+            //        SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
+            //    {
+            //        _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
+            //    }
+            //    else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
+            //    {
+            //        _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
+            //    }
+            //}
 
             if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
                 SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.AdTec)
@@ -432,25 +437,31 @@ namespace Venus_RT.Devices
             }
 
 
-            if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
-                SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
-                SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
-            {
-                _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
-            }
-            else if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
-                SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
-            {
-                _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
-            }
+            //if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
+            //{
+            //    _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
+            //}
+            //else if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
+            //{
+            //    _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
+            //}
 
             _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
 
+            _GasRFStopWatch.Stop();
+
+
+            DATA.Subscribe($"{Name}.SCR1", () => GetAiValue($"{Module}.AI_CHB_M-HT_SCR1_PWR_OUT"));
+            DATA.Subscribe($"{Name}.SCR2", () => GetAiValue($"{Module}.AI_CHB_M-HT_SCR2_PWR_OUT"));
+
         }
 
         #endregion
 
-        public async override void CloseValves()
+        public async override void CloseValves(int? delayTime = null)
         {
             _PVN21Valve.TurnValve(false, out _);
             // _PVN22Valve.TurnValve(false, out _);
@@ -463,8 +474,8 @@ namespace Venus_RT.Devices
             _PV41Valve.TurnValve(false, out _);
             _PV42Valve.TurnValve(false, out _);
 
-            _PVHe1Valve.TurnValve(false, out _);
-            _PVHe2Valve.TurnValve(false, out _);
+            //_PVHe1Valve.TurnValve(false, out _);
+            //_PVHe2Valve.TurnValve(false, out _);
             _SoftPumpValve.TurnValve(false, out _);
             _FastPumpValve.TurnValve(false, out _);
             _TurboPumpPumpingValve.TurnValve(false, out _);
@@ -489,7 +500,10 @@ namespace Venus_RT.Devices
             {
                 stick.Stop();
             }
-            await Task.Delay(1000);
+            if (delayTime != null)
+            {
+                await Task.Delay((int)delayTime);
+            }
             _GasFinalValve.TurnValve(false, out _);
             _PurgeValve.TurnValve(false, out _);
         }
@@ -545,14 +559,9 @@ namespace Venus_RT.Devices
                     _N2Valve.TurnValve(on, out _);
                     break;
                 case ValveType.Purge:
-                   _PurgeValve.TurnValve(on, out _);
-                    break;
-                case ValveType.PVHe1:
-                    _PVHe1Valve.TurnValve(on, out _);
-                    break;
-                case ValveType.PVHe2:
-                    _PVHe2Valve.TurnValve(on, out _);
+                    _PurgeValve.TurnValve(on, out _);
                     break;
+
                 case ValveType.GasFinal:
                     _GasFinalValve.TurnValve(on, out _);
                     break;
@@ -601,8 +610,8 @@ namespace Venus_RT.Devices
                 case ValveType.Mfc8:
                     _Mfc8Valve.TurnValve(on, out _);
                     break;
-                default:
-                    throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
+                    //default:
+                    //    throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
 
             }
         }
@@ -642,15 +651,15 @@ namespace Venus_RT.Devices
             }
         }
 
-        public override void BuzzerBlinking(double time)
-        {
-            _SignalTower.BuzzerBlinking(time);
-        }
+        //public override void BuzzerBlinking(double time)
+        //{
+        //    _SignalTower.BuzzerBlinking(time);
+        //}
 
-        public override void SwitchOnBuzzerAndRed()
-        {
-            _SignalTower.SwitchOnBuzzerAndRed("", null);
-        }
+        //public override void SwitchOnBuzzerAndRed()
+        //{
+        //    _SignalTower.SwitchOnBuzzerAndRed("", null);
+        //}
 
         public override void Home()
         {
@@ -712,15 +721,15 @@ namespace Venus_RT.Devices
             return _slitDoor.SetCylinder(open, out reason);
         }
 
-        public override bool RetractWafer()
-        {
-            return _LoadLockArm.SetCylinder(false, out _);
-        }
+        //public override bool RetractWafer()
+        //{
+        //    return _LoadLockArm.SetCylinder(false, out _);
+        //}
 
-        public override bool ExtendWafer()
-        {
-            return _LoadLockArm.SetCylinder(true, out _);
-        }
+        //public override bool ExtendWafer()
+        //{
+        //    return _LoadLockArm.SetCylinder(true, out _);
+        //}
         public override bool FlowGas(int gasNum, double val)
         {
             if (_gasLines.Length <= gasNum)
@@ -781,22 +790,22 @@ namespace Venus_RT.Devices
             return _pendulumValve.Position;
         }
 
-        public override async void HeatChiller(ChillerType chillerType, double value, double offset)
-        {
-            _Chiller?.SetChillerTemp((float)value, (float)offset);
-            await Task.Delay(1000);
-            _Chiller?.SetChillerOnOff(true);
-        }
+        //public override async void HeatChiller(ChillerType chillerType, double value, double offset)
+        //{
+        //    _Chiller?.SetChillerTemp((float)value, (float)offset);
+        //    await Task.Delay(1000);
+        //    _Chiller?.SetChillerOnOff(true);
+        //}
 
-        public override void OnOffChiller(ChillerType chillerType, bool onoff)
-        {
-            _Chiller?.SetChillerOnOff(onoff);
-        }
+        //public override void OnOffChiller(ChillerType chillerType, bool onoff)
+        //{
+        //    _Chiller?.SetChillerOnOff(onoff);
+        //}
 
-        public override bool CheckChillerStatus()
-        {
-            return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
-        }
+        //public override bool CheckChillerStatus()
+        //{
+        //    return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
+        //}
 
         public override void SetGeneratorCommunicationMode(int mode)
         {
@@ -825,44 +834,44 @@ namespace Venus_RT.Devices
             return true;
         }
 
-        public override bool GeneratorBiasPowerOn(bool on)
-        {
-            if (_GeneratorBias == null) return false;
+        //public override bool GeneratorBiasPowerOn(bool on)
+        //{
+        //    if (_GeneratorBias == null) return false;
 
-            if (on && !IsRFGInterlockOn)
-            {
-                LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
-                return false;
-            }
+        //    if (on && !IsRFGInterlockOn)
+        //    {
+        //        LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
+        //        return false;
+        //    }
 
-            return _GeneratorBias.SetPowerOnOff(on, out _);
-        }
+        //    return _GeneratorBias.SetPowerOnOff(on, out _);
+        //}
 
-        public override bool GeneratorBiasSetpower(float val)
-        {
-            if (_GeneratorBias == null) return false;
+        //public override bool GeneratorBiasSetpower(float val)
+        //{
+        //    if (_GeneratorBias == null) return false;
 
-            if (Math.Abs(val) > 0.01)
-                _GeneratorBias.SetPower((ushort)val);
-            return true;
-        }
+        //    if (Math.Abs(val) > 0.01)
+        //        _GeneratorBias.SetPower((ushort)val);
+        //    return true;
+        //}
 
-        public override bool OnOffSetESCHV(bool val)
-        {
-            return _ESCHV.SetPowerOnOff(val);
-        }
+        //public override bool OnOffSetESCHV(bool val)
+        //{
+        //    return _ESCHV.SetPowerOnOff(val);
+        //}
 
         public override bool SetWallTCTemperature(float value)
         {
             return _WallTC.RampTemp(value);
         }
-        public override bool GeneratorBiasSetMatchMode(bool val)
-        {
-            if (_GeneratorBias == null) return false;
-            string reason = string.Empty;
-            _GeneratorBias.SetMatchingAutoMode(val, out reason);
-            return true;
-        }
+        //public override bool GeneratorBiasSetMatchMode(bool val)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    string reason = string.Empty;
+        //    _GeneratorBias.SetMatchingAutoMode(val, out reason);
+        //    return true;
+        //}
 
         public override bool SetMatchPosition(float c1, float c2)
         {
@@ -884,52 +893,52 @@ namespace Venus_RT.Devices
             }
             return false;
         }
-        public override bool SetBiasMatchPosition(float c1, float c2)
-        {
-            if (_BiasMatch == null) return false;
-            string reason = string.Empty;
-            _BiasMatch.SetMatchPosition(c1, c2, out reason);
-            return true;
-        }
-        public override bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
-        {
-            if (_BiasMatch == null) return false;
-            if (matchWorkMode == MatchWorkMode.Auto)
-            {
-                return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Auto, out _);
-            }
-            else if (matchWorkMode == MatchWorkMode.Manual)
-            {
-                return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Manual, out _);
-            }
-            return false;
-        }
-        public override bool SetBiasPulseMode(bool on)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseMode(on);
-            return true;
-        }
-        public override bool SetBiasPulseRateFreq(int nFreq)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseRateFreq(nFreq);
-            return true;
-        }
-
-        public override bool SetDiasPulseDutyCycle(int percentage)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseDutyCycle(percentage);
-            return true;
-        }
-
-        public override bool SetESCClampVoltage(int nVoltage)
-        {
-            if (_ESCHV == null) return false;
-
-            return _ESCHV.SetOutputVoltage(nVoltage);
-        }
+        //public override bool SetBiasMatchPosition(float c1, float c2)
+        //{
+        //    if (_BiasMatch == null) return false;
+        //    string reason = string.Empty;
+        //    _BiasMatch.SetMatchPosition(c1, c2, out reason);
+        //    return true;
+        //}
+        //public override bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
+        //{
+        //    if (_BiasMatch == null) return false;
+        //    if (matchWorkMode == MatchWorkMode.Auto)
+        //    {
+        //        return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Auto, out _);
+        //    }
+        //    else if (matchWorkMode == MatchWorkMode.Manual)
+        //    {
+        //        return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Manual, out _);
+        //    }
+        //    return false;
+        //}
+        //public override bool SetBiasPulseMode(bool on)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseMode(on);
+        //    return true;
+        //}
+        //public override bool SetBiasPulseRateFreq(int nFreq)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseRateFreq(nFreq);
+        //    return true;
+        //}
+
+        //public override bool SetDiasPulseDutyCycle(int percentage)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseDutyCycle(percentage);
+        //    return true;
+        //}
+
+        //public override bool SetESCClampVoltage(int nVoltage)
+        //{
+        //    if (_ESCHV == null) return false;
+
+        //    return _ESCHV.SetOutputVoltage(nVoltage);
+        //}
 
         public override bool CheckGeneratorAndHVInterlock(VenusDevice device)
         {
@@ -956,7 +965,7 @@ namespace Venus_RT.Devices
             {
                 LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
                 return false;
-            }         
+            }
 
             if (!SlitDoorClosed)
             {
@@ -972,7 +981,7 @@ namespace Venus_RT.Devices
 
             return true;
         }
-     
+
         public override bool SetBacksideHeThreshold(int nMin, int nMax)
         {
             if (_backsideHe == null) return false;
@@ -994,7 +1003,7 @@ namespace Venus_RT.Devices
             return true;
         }
         public async override Task<bool> AbortControlPressure()
-        {           
+        {
             OpenValve(ValveType.N2, false);
             OpenValve(ValveType.PVN22, false);
             await Task.Delay(1000);
@@ -1062,5 +1071,62 @@ namespace Venus_RT.Devices
         {
             return CheckSlitDoorClose();
         }
+        public override void RTCloseEvent()
+        {
+            if (_Generator.IsPowerOn)
+            {
+                GeneratorPowerOn(false);
+            }
+            if (PendulumValveIsOpen())
+            {
+                TurnPendulumValve(false);
+            }
+        }
+        public override bool RFInterlock(VenusDevice device)
+        {
+            eEvent evt = eEvent.ERR_RF;
+
+            if (!IsWaterFlowOk)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
+                return false;
+            }
+
+            if (!IsRFGInterlockOn)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
+                return false;
+            }
+
+
+            if (GasIsOff())
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Gas is OFF.");
+                return false;
+            }
+            return true;
+        }
+        private bool GasIsOff()
+        {
+            if (IsMfc1ValveOpened == false && IsMfc2ValveOpened == false && IsMfc3ValveOpened == false && IsMfc4ValveOpened == false && IsMfc5ValveOpened == false && IsMfc6ValveOpened == false && _GasFlag==false)
+            {
+                if (_GasRFStopWatch.IsRunning == false)
+                {
+                    _GasRFStopWatch.Start();
+                }
+                if (_GasRFStopWatch.ElapsedMilliseconds > 1000)
+                {
+                    _GasRFStopWatch.Reset();
+                    _GasFlag = true;
+                    return true;
+                }
+            }
+            else
+            {
+                _GasRFStopWatch.Reset();
+                _GasFlag = false;
+            }
+            return false;
+        }
     }
 }

+ 251 - 182
Venus/Venus_RT/Devices/JetKepler2200BPM.cs

@@ -15,17 +15,19 @@ using MECF.Framework.Common.SubstrateTrackings;
 using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
 using System.Threading.Tasks;
 using Venus_RT.Modules;
+using Aitex.Core.RT.DataCenter;
+using System.Diagnostics;
 
 namespace Venus_RT.Devices
 {
     class JetKepler2200BPM : JetPMBase
     {
         private readonly IoLid _Lid;
-        private readonly IoLid _LidLoadlock;
+        //private readonly IoLid _LidLoadlock;
 
         private readonly IoCylinder _slitDoor;
         private readonly IoCylinder _LiftPin;
-        private readonly IoCylinder _LoadLockArm;
+        //private readonly IoCylinder _LoadLockArm;
 
         private readonly IoValve _PVN21Valve;
         private readonly IoValve _PVN22Valve;
@@ -48,8 +50,8 @@ namespace Venus_RT.Devices
         private readonly IoValve _Mfc6Valve;
         private readonly IoValve _Mfc7Valve;
         private readonly IoValve _Mfc8Valve;
-        private readonly IoValve _PVHe1Valve;
-        private readonly IoValve _PVHe2Valve;
+        //private readonly IoValve _PVHe1Valve;
+        //private readonly IoValve _PVHe2Valve;
         private readonly IoValve _GasFinalValve;
         private readonly IoValve _SoftPumpValve;
         private readonly IoValve _FastPumpValve;
@@ -78,18 +80,19 @@ namespace Venus_RT.Devices
 
 
         private readonly PumpBase _MainPump;
-        private readonly ESC5HighVoltage _ESCHV;
+        //private readonly ESC5HighVoltage _ESCHV;
         private readonly AdixenTurboPump _TurboPump;
         private readonly PendulumValve _pendulumValve;
 
-        private readonly ChillerBase _Chiller;
+        //private readonly ChillerBase _Chiller;
 
         private readonly RfPowerBase _Generator;//srf=>AdTecGenerator
-        private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
         private readonly RfMatchBase _Match;
-        private readonly RfMatchBase _BiasMatch;
 
-        private readonly IoSignalTower _SignalTower;
+        //private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
+        //private readonly RfMatchBase _BiasMatch;
+
+        //private readonly IoSignalTower _SignalTower;
 
         private readonly IoHeater _ForelineTC;
         private readonly IoHeater _WallTC;
@@ -100,15 +103,17 @@ namespace Venus_RT.Devices
         private readonly IoGasStick _gasLineN2;
         private readonly IoBacksideHe _backsideHe;
 
-        private readonly IoMfc _heMfc;
+        //private readonly IoMfc _heMfc;
 
 
         private readonly double _foreline_interlock_pressure = 750;
+        private Stopwatch _GasRFStopWatch = new Stopwatch();
+        private bool _GasFlag = false;
 
 
         // 盖子的状态
         public override bool IsLidClosed => _Lid.OFFFeedback;
-        public override bool IsLidLoadlockClosed => _LidLoadlock.OFFFeedback;
+        //public override bool IsLidLoadlockClosed => _LidLoadlock.OFFFeedback;
 
         public override bool IsSlitDoorClosed => !_slitDoor.ONFeedback && _slitDoor.OFFFeedback;
 
@@ -177,11 +182,11 @@ namespace Venus_RT.Devices
         public override double LoadlockPressure => 0;
         public override double ESCHePressure => 0;
 
-        public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
-        public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
+        //public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
+        //public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
 
-        public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
-        public override bool IsHVOn => _ESCHV.IsOn;
+        //public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
+        //public override bool IsHVOn => _ESCHV.IsOn;
 
         public override float CoolantInletTempFB => 0;
         public override float CoolantOutletTempFB => 0;
@@ -189,22 +194,22 @@ namespace Venus_RT.Devices
         public override bool ChillerIsRunning => false;
 
         //Loadlock_Arm
-        public override bool IsLoadlockArmRetract => _LoadLockArm.OFFFeedback;
-        public override bool IsLoadlockArmExtend => _LoadLockArm.ONFeedback;
-        //Loadlock_Arm DO
-        public override bool LoadlockArmRetract => _LoadLockArm.OFFSetPoint;
-        public override bool LoadlockArmExtend => _LoadLockArm.ONSetPoint;
+        //public override bool IsLoadlockArmRetract => _LoadLockArm.OFFFeedback;
+        //public override bool IsLoadlockArmExtend => _LoadLockArm.ONFeedback;
+        ////Loadlock_Arm DO
+        //public override bool LoadlockArmRetract => _LoadLockArm.OFFSetPoint;
+        //public override bool LoadlockArmExtend => _LoadLockArm.ONSetPoint;
 
         public override float ReflectPower => _Generator.ReflectPower;
-        public override float BiasReflectPower => _GeneratorBias.ReflectPower;
+        //public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override float ForwardPower => _Generator.ForwardPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
         public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
         public override float RFMatchC2 => _Match != null ? _Match.TunePosition2 : 0;
-        public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
-        public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        //public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        //public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
         public override double MFC1FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas1").FeedBack;
         public override double MFC2FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas2").FeedBack;
         public override double MFC3FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas3").FeedBack;
@@ -292,11 +297,11 @@ namespace Venus_RT.Devices
         {
             Module = moduleName;
             _Lid = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.Lid}");
-            _LidLoadlock = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.LidLoadlock}");
+            //_LidLoadlock = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.LidLoadlock}");
 
             _slitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.SlitDoor}");
             _LiftPin = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LiftPin}");
-            _LoadLockArm = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LoadLockArm}");
+            //_LoadLockArm = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LoadLockArm}");
 
             _PVN21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN21}");
             _PVN22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN22}");
@@ -319,8 +324,8 @@ namespace Venus_RT.Devices
             _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
             _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
             _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
-            _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
-            _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
+            //_PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
+            //_PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
             _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
             _SoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSoftPump}");
             _FastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveFastPump}");
@@ -329,7 +334,7 @@ namespace Venus_RT.Devices
             _GuageValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGuage}");
             _LoadlockVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveLoadlockVent}");
             _LoadlockPumpingValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveLoadlockPumping}");
-            _heMfc = DEVICE.GetDevice<IoMfc>($"{Module}.MfcHe");
+            //_heMfc = DEVICE.GetDevice<IoMfc>($"{Module}.MfcHe");
             _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
             _ATM_Loadlock_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorLoadlockATMSwitch");
             _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
@@ -351,7 +356,7 @@ namespace Venus_RT.Devices
             _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
 
 
-            _SignalTower = DEVICE.GetDevice<IoSignalTower>($"{Module}.SignalTower");
+            //_SignalTower = DEVICE.GetDevice<IoSignalTower>($"{Module}.SignalTower");
 
             _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
             _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VenusDevice.PressureControl}");
@@ -381,22 +386,22 @@ namespace Venus_RT.Devices
                 }
             }
 
-            _ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
+            //_ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
             _TurboPump = DEVICE.GetDevice<AdixenTurboPump>($"{Module}.{VenusDevice.TurboPump}");
             _pendulumValve = DEVICE.GetDevice<PendulumValve>($"{Module}.{VenusDevice.PendulumValve}");
 
-            if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
-                SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
-            {
-                if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
-                {
-                    _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
-                }
-                else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
-                {
-                    _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
-                }
-            }
+            //if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
+            //    SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
+            //{
+            //    if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
+            //    {
+            //        _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
+            //    }
+            //    else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
+            //    {
+            //        _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
+            //    }
+            //}
 
 
             // RS223 AdTec Generator
@@ -407,18 +412,18 @@ namespace Venus_RT.Devices
             }
 
             // Ethernet Comet Generator Bias
-            if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
-            {
-                if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
-                    SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
-                {
-                    _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
-                }
-                else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
-                {
-                    _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
-                }
-            }
+            //if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
+            //{
+            //    if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
+            //        SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
+            //    {
+            //        _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
+            //    }
+            //    else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
+            //    {
+            //        _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
+            //    }
+            //}
 
             if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
                 SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.AdTec)
@@ -431,26 +436,30 @@ namespace Venus_RT.Devices
                 _Match = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
             }
 
-
-            if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
-                SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
-                SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
-            {
-                _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
-            }
-            else if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
-                SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
-            {
-                _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
-            }
+            _GasRFStopWatch.Stop();
+            //if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
+            //{
+            //    _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
+            //}
+            //else if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
+            //    SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
+            //{
+            //    _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
+            //}
 
             _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
 
+            DATA.Subscribe($"{Name}.SCR1", () => GetAiValue($"{Module}.AI_CHB_M-HT_SCR1_PWR_OUT"));
+            DATA.Subscribe($"{Name}.SCR2", () => GetAiValue($"{Module}.AI_CHB_M-HT_SCR2_PWR_OUT"));
+
+
         }
 
         #endregion
 
-        public async override void CloseValves()
+        public async override void CloseValves(int? delayTime = null)
         {
             _PVN21Valve.TurnValve(false, out _);
             // _PVN22Valve.TurnValve(false, out _);
@@ -463,8 +472,8 @@ namespace Venus_RT.Devices
             _PV41Valve.TurnValve(false, out _);
             _PV42Valve.TurnValve(false, out _);
 
-            _PVHe1Valve.TurnValve(false, out _);
-            _PVHe2Valve.TurnValve(false, out _);
+            //_PVHe1Valve.TurnValve(false, out _);
+            //_PVHe2Valve.TurnValve(false, out _);
             _SoftPumpValve.TurnValve(false, out _);
             _FastPumpValve.TurnValve(false, out _);
             _TurboPumpPumpingValve.TurnValve(false, out _);
@@ -487,7 +496,10 @@ namespace Venus_RT.Devices
             {
                 stick.Stop();
             }
-            await Task.Delay(1000);
+            if (delayTime != null)
+            {
+                await Task.Delay((int)delayTime);
+            }
             _GasFinalValve.TurnValve(false, out _);
             _PurgeValve.TurnValve(false, out _);
         }
@@ -545,12 +557,12 @@ namespace Venus_RT.Devices
                 case ValveType.Purge:
                     _PurgeValve.TurnValve(on, out _);
                     break;
-                case ValveType.PVHe1:
-                    _PVHe1Valve.TurnValve(on, out _);
-                    break;
-                case ValveType.PVHe2:
-                    _PVHe2Valve.TurnValve(on, out _);
-                    break;
+                //case ValveType.PVHe1:
+                //    _PVHe1Valve.TurnValve(on, out _);
+                //    break;
+                //case ValveType.PVHe2:
+                //    _PVHe2Valve.TurnValve(on, out _);
+                //    break;
                 case ValveType.GasFinal:
                     _GasFinalValve.TurnValve(on, out _);
                     break;
@@ -599,8 +611,8 @@ namespace Venus_RT.Devices
                 case ValveType.Mfc8:
                     _Mfc8Valve.TurnValve(on, out _);
                     break;
-                default:
-                    throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
+                //default:
+                //    throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
 
             }
         }
@@ -640,15 +652,15 @@ namespace Venus_RT.Devices
             }
         }
 
-        public override void BuzzerBlinking(double time)
-        {
-            _SignalTower.BuzzerBlinking(time);
-        }
+        //public override void BuzzerBlinking(double time)
+        //{
+        //    _SignalTower.BuzzerBlinking(time);
+        //}
 
-        public override void SwitchOnBuzzerAndRed()
-        {
-            _SignalTower.SwitchOnBuzzerAndRed("", null);
-        }
+        //public override void SwitchOnBuzzerAndRed()
+        //{
+        //    _SignalTower.SwitchOnBuzzerAndRed("", null);
+        //}
 
         public override void Home()
         {
@@ -710,15 +722,15 @@ namespace Venus_RT.Devices
             return _slitDoor.SetCylinder(open, out reason);
         }
 
-        public override bool RetractWafer()
-        {
-            return _LoadLockArm.SetCylinder(false, out _);
-        }
+        //public override bool RetractWafer()
+        //{
+        //    return _LoadLockArm.SetCylinder(false, out _);
+        //}
 
-        public override bool ExtendWafer()
-        {
-            return _LoadLockArm.SetCylinder(true, out _);
-        }
+        //public override bool ExtendWafer()
+        //{
+        //    return _LoadLockArm.SetCylinder(true, out _);
+        //}
         public override bool FlowGas(int gasNum, double val)
         {
             if (_gasLines.Length <= gasNum)
@@ -779,22 +791,22 @@ namespace Venus_RT.Devices
             return _pendulumValve.Position;
         }
 
-        public override async void HeatChiller(ChillerType chillerType, double value, double offset)
-        {
-            _Chiller?.SetChillerTemp((float)value, (float)offset);
-            await Task.Delay(1000);
-            _Chiller?.SetChillerOnOff(true);
-        }
+        //public override async void HeatChiller(ChillerType chillerType, double value, double offset)
+        //{
+        //    _Chiller?.SetChillerTemp((float)value, (float)offset);
+        //    await Task.Delay(1000);
+        //    _Chiller?.SetChillerOnOff(true);
+        //}
 
-        public override void OnOffChiller(ChillerType chillerType, bool onoff)
-        {
-            _Chiller?.SetChillerOnOff(onoff);
-        }
+        //public override void OnOffChiller(ChillerType chillerType, bool onoff)
+        //{
+        //    _Chiller?.SetChillerOnOff(onoff);
+        //}
 
-        public override bool CheckChillerStatus()
-        {
-            return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
-        }
+        //public override bool CheckChillerStatus()
+        //{
+        //    return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
+        //}
 
         public override void SetGeneratorCommunicationMode(int mode)
         {
@@ -823,44 +835,44 @@ namespace Venus_RT.Devices
             return true;
         }
 
-        public override bool GeneratorBiasPowerOn(bool on)
-        {
-            if (_GeneratorBias == null) return false;
+        //public override bool GeneratorBiasPowerOn(bool on)
+        //{
+        //    if (_GeneratorBias == null) return false;
 
-            if (on && !IsRFGInterlockOn)
-            {
-                LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
-                return false;
-            }
+        //    if (on && !IsRFGInterlockOn)
+        //    {
+        //        LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
+        //        return false;
+        //    }
 
-            return _GeneratorBias.SetPowerOnOff(on, out _);
-        }
+        //    return _GeneratorBias.SetPowerOnOff(on, out _);
+        //}
 
-        public override bool GeneratorBiasSetpower(float val)
-        {
-            if (_GeneratorBias == null) return false;
+        //public override bool GeneratorBiasSetpower(float val)
+        //{
+        //    if (_GeneratorBias == null) return false;
 
-            if (Math.Abs(val) > 0.01)
-                _GeneratorBias.SetPower((ushort)val);
-            return true;
-        }
+        //    if (Math.Abs(val) > 0.01)
+        //        _GeneratorBias.SetPower((ushort)val);
+        //    return true;
+        //}
 
-        public override bool OnOffSetESCHV(bool val)
-        {
-            return _ESCHV.SetPowerOnOff(val);
-        }
+        //public override bool OnOffSetESCHV(bool val)
+        //{
+        //    return _ESCHV.SetPowerOnOff(val);
+        //}
 
         public override bool SetWallTCTemperature(float value)
         {
             return _WallTC.RampTemp(value);
         }
-        public override bool GeneratorBiasSetMatchMode(bool val)
-        {
-            if (_GeneratorBias == null) return false;
-            string reason = string.Empty;
-            _GeneratorBias.SetMatchingAutoMode(val, out reason);
-            return true;
-        }
+        //public override bool GeneratorBiasSetMatchMode(bool val)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    string reason = string.Empty;
+        //    _GeneratorBias.SetMatchingAutoMode(val, out reason);
+        //    return true;
+        //}
 
         public override bool SetMatchPosition(float c1, float c2)
         {
@@ -882,52 +894,52 @@ namespace Venus_RT.Devices
             }
             return false;
         }
-        public override bool SetBiasMatchPosition(float c1, float c2)
-        {
-            if (_BiasMatch == null) return false;
-            string reason = string.Empty;
-            _BiasMatch.SetMatchPosition(c1, c2, out reason);
-            return true;
-        }
-        public override bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
-        {
-            if (_BiasMatch == null) return false;
-            if (matchWorkMode == MatchWorkMode.Auto)
-            {
-                return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Auto, out _);
-            }
-            else if (matchWorkMode == MatchWorkMode.Manual)
-            {
-                return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Manual, out _);
-            }
-            return false;
-        }
-        public override bool SetBiasPulseMode(bool on)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseMode(on);
-            return true;
-        }
-        public override bool SetBiasPulseRateFreq(int nFreq)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseRateFreq(nFreq);
-            return true;
-        }
-
-        public override bool SetDiasPulseDutyCycle(int percentage)
-        {
-            if (_GeneratorBias == null) return false;
-            _GeneratorBias.SetPulseDutyCycle(percentage);
-            return true;
-        }
-
-        public override bool SetESCClampVoltage(int nVoltage)
-        {
-            if (_ESCHV == null) return false;
-
-            return _ESCHV.SetOutputVoltage(nVoltage);
-        }
+        //public override bool SetBiasMatchPosition(float c1, float c2)
+        //{
+        //    if (_BiasMatch == null) return false;
+        //    string reason = string.Empty;
+        //    _BiasMatch.SetMatchPosition(c1, c2, out reason);
+        //    return true;
+        //}
+        //public override bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
+        //{
+        //    if (_BiasMatch == null) return false;
+        //    if (matchWorkMode == MatchWorkMode.Auto)
+        //    {
+        //        return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Auto, out _);
+        //    }
+        //    else if (matchWorkMode == MatchWorkMode.Manual)
+        //    {
+        //        return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Manual, out _);
+        //    }
+        //    return false;
+        //}
+        //public override bool SetBiasPulseMode(bool on)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseMode(on);
+        //    return true;
+        //}
+        //public override bool SetBiasPulseRateFreq(int nFreq)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseRateFreq(nFreq);
+        //    return true;
+        //}
+
+        //public override bool SetDiasPulseDutyCycle(int percentage)
+        //{
+        //    if (_GeneratorBias == null) return false;
+        //    _GeneratorBias.SetPulseDutyCycle(percentage);
+        //    return true;
+        //}
+
+        //public override bool SetESCClampVoltage(int nVoltage)
+        //{
+        //    if (_ESCHV == null) return false;
+
+        //    return _ESCHV.SetOutputVoltage(nVoltage);
+        //}
 
         public override bool CheckGeneratorAndHVInterlock(VenusDevice device)
         {
@@ -1060,5 +1072,62 @@ namespace Venus_RT.Devices
         {
             return CheckSlitDoorClose();
         }
+        public override void RTCloseEvent()
+        {
+            if (_Generator.IsPowerOn)
+            {
+                GeneratorPowerOn(false);
+            }
+            if (PendulumValveIsOpen())
+            {
+                TurnPendulumValve(false);
+            }
+        }
+        public override bool RFInterlock(VenusDevice device)
+        {
+            eEvent evt = eEvent.ERR_RF;
+
+            if (!IsWaterFlowOk)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
+                return false;
+            }
+
+            if (!IsRFGInterlockOn)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
+                return false;
+            }
+
+          
+            if (GasIsOff())
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Gas is OFF.");
+                return false;
+            }
+            return true;
+        }
+        private bool GasIsOff()
+        {
+            if (IsMfc1ValveOpened == false && IsMfc2ValveOpened == false && IsMfc3ValveOpened == false && IsMfc4ValveOpened == false && IsMfc5ValveOpened == false && IsMfc6ValveOpened == false && _GasFlag == false)
+            {
+                if (_GasRFStopWatch.IsRunning == false)
+                {
+                    _GasRFStopWatch.Start();
+                }
+                if (_GasRFStopWatch.ElapsedMilliseconds > 1000)
+                {
+                    _GasRFStopWatch.Reset();
+                    _GasFlag = true;
+                    return true;
+                }
+            }
+            else
+            {
+                _GasRFStopWatch.Reset();
+                _GasFlag = false;
+            }
+            return false;
+        }
     }
 }

+ 78 - 4
Venus/Venus_RT/Devices/JetKepler2300PM.cs

@@ -18,6 +18,8 @@ using System.Threading.Tasks;
 using Aitex.Core.RT.DataCenter;
 using Aitex.Core.Backend;
 using Aitex.Core.RT.OperationCenter;
+using Aitex.Core.RT.Event;
+using System.Diagnostics;
 
 namespace Venus_RT.Devices
 {
@@ -108,6 +110,9 @@ namespace Venus_RT.Devices
 
         private readonly double _foreline_interlock_pressure = 750;
 
+        private Stopwatch _GasRFStopWatch = new Stopwatch();
+        private bool _GasFlag = false;
+
 
         private float _chillerInnerTemp => GetAiValue($"{Module}.AI_ESC_inner_coolant_outlet_TC_Temp");
         private float _chillerOuterTemp => GetAiValue($"{Module}.AI_ESC_outer_coolant_outlet_TC_Temp");
@@ -482,7 +487,7 @@ namespace Venus_RT.Devices
 
             _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
 
-
+            _GasRFStopWatch.Stop();
             DATA.Subscribe($"{Module}.ChillerInnerTemp", () => _chillerInnerTemp);
             DATA.Subscribe($"{Module}.ChillerOuterTemp", () => _chillerOuterTemp);
             DATA.Subscribe($"{Module}.ChillerTopTemp",   () => _chillerTopTemp);
@@ -506,7 +511,7 @@ namespace Venus_RT.Devices
 
         #endregion
 
-        public async override void CloseValves()
+        public async override void CloseValves(int? delayTime = null)
         {
             _PVN21Valve.TurnValve(false, out _);
             // _PVN22Valve.TurnValve(false, out _);
@@ -544,7 +549,10 @@ namespace Venus_RT.Devices
             {
                 stick.Stop();
             }
-            await Task.Delay(1000);
+            if (delayTime != null)
+            {
+                await Task.Delay((int)delayTime);
+            }
             _GasFinalValve.TurnValve(false, out _);
         }
 
@@ -1137,7 +1145,7 @@ namespace Venus_RT.Devices
         public async override Task<bool> AbortControlPressure()
         {
             FlowGas(5, 0);
-            await Task.Delay(1000);
+            await Task.Delay(500);
             OpenValve(ValveType.GasFinal, false);
             return true;
         }
@@ -1210,5 +1218,71 @@ namespace Venus_RT.Devices
         {
             return CheckSlitDoorClose();
         }
+        public override void RTCloseEvent()
+        {
+            if (_Generator.IsPowerOn)
+            {
+                GeneratorPowerOn(false);
+            }
+            if (_GeneratorBias.IsPowerOn)
+            {
+                GeneratorBiasPowerOn(false);
+            }
+            if (PendulumValveIsOpen())
+            {
+                TurnPendulumValve(false);
+            }
+        }
+        public override bool RFInterlock(VenusDevice device)
+        {
+            eEvent evt =  eEvent.ERR_RF;
+
+            if (!IsWaterFlowOk)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
+                return false;
+            }
+
+            if (!IsRFGInterlockOn)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
+                return false;
+            }
+
+            if (!SourceRFFanInterlock)
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
+                return false;
+            }
+            if (GasIsOff())
+            {
+                LOG.Write(evt, Module, $"Cannot Power ON {device} as Gas is OFF.");
+                return false;
+            }
+            return true;
+        }
+        private bool GasIsOff()
+        {
+            if (IsMfc1ValveOpened == false && IsMfc2ValveOpened == false && IsMfc3ValveOpened == false && IsMfc4ValveOpened == false && IsMfc5ValveOpened == false && IsMfc6ValveOpened == false && IsMfc7ValveOpened == false && IsMfc8ValveOpened == false)
+            {
+                if (_GasRFStopWatch.IsRunning == false)
+                {
+                    _GasRFStopWatch.Start();
+                }
+                if (_GasRFStopWatch.ElapsedMilliseconds > 1000)
+                {
+                    _GasRFStopWatch.Reset();
+                    _GasFlag = true;
+                    return true;
+                }
+            }
+            else
+            {
+                _GasRFStopWatch.Reset();
+                _GasFlag = false;
+            }
+            return false;
+        }
+        
     }
 }

+ 80 - 31
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -17,7 +17,7 @@ namespace Venus_RT.Devices
     {
         // 盖子的状态
         public abstract bool IsLidClosed { get; }
-        public abstract bool IsLidLoadlockClosed { get; }
+        public virtual bool IsLidLoadlockClosed { get; }
 
         public abstract bool IsSlitDoorClosed { get; }
 
@@ -63,7 +63,6 @@ namespace Venus_RT.Devices
 
         public abstract bool SlitDoorClosed { get; }
 
-
         public abstract double ProcessLowPressure { get; }
         public abstract double ProcessHighPressure { get; }
         public abstract double ProcessPressure { get; }
@@ -71,26 +70,26 @@ namespace Venus_RT.Devices
         public virtual double CalculationPressure { get; }
         public abstract double ForelinePressure { get; }
         public abstract double TargetPressure { get; }
-        public abstract double ESCHePressure { get; }
+        public virtual double ESCHePressure { get; }
 
-        public abstract int ESCOutputVoltage { get; }
-        public abstract double ESCPositiveOutputCurrent { get; }//R+
-        public abstract double ESCNegativeOutputCurrent { get; }//R-
+        public virtual int ESCOutputVoltage { get; }
+        public virtual double ESCPositiveOutputCurrent { get; }//R+
+        public virtual double ESCNegativeOutputCurrent { get; }//R-
 
-        public abstract bool IsHVOn { get; }
+        public virtual 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; }
+        public virtual bool IsLoadlockArmRetract { get; }
+        public virtual bool IsLoadlockArmExtend { get; }
         //Loadlock_Arm DO
-        public abstract bool LoadlockArmRetract { get; }
-        public abstract bool LoadlockArmExtend { get; }
+        public virtual bool LoadlockArmRetract { get; }
+        public virtual bool LoadlockArmExtend { get; }
 
         public abstract float ReflectPower { get; }
-        public abstract float BiasReflectPower { get; }
+        public virtual float BiasReflectPower { get; }
 
         public virtual float ForwardPower { get; }
         public virtual float BiasForwardPower { get; }
@@ -99,8 +98,8 @@ namespace Venus_RT.Devices
 
         public abstract float RFMatchC1 { get; }
         public abstract float RFMatchC2 { get; }
-        public abstract float BiasRFMatchC1 { get; }
-        public abstract float BiasRFMatchC2 { get; }
+        public virtual float BiasRFMatchC1 { get; }
+        public virtual float BiasRFMatchC2 { get; }
 
         public new ModuleName Module;
 
@@ -371,7 +370,7 @@ namespace Venus_RT.Devices
             });
         }
 
-        public abstract void CloseValves();
+        public abstract void CloseValves(int? delayTime=null);
 
 
         public abstract void TurnDryPump(bool on);
@@ -398,16 +397,25 @@ namespace Venus_RT.Devices
 
         }
 
-        public abstract bool OnOffSetESCHV(bool on);
+        public virtual bool OnOffSetESCHV(bool on)
+        {
+            return false;
+        }
 
         public abstract bool SetWallTCTemperature(float value);
         protected abstract void CheckPermanentInterlock();
 
         public abstract void CheckIdleInterlock();
 
-        public abstract void BuzzerBlinking(double time);
+        public virtual void BuzzerBlinking(double time)
+        { 
+        
+        }
 
-        public abstract void SwitchOnBuzzerAndRed();
+        public virtual void SwitchOnBuzzerAndRed()
+        { 
+        
+        }
 
         public abstract void Home();
 
@@ -419,9 +427,15 @@ namespace Venus_RT.Devices
 
         public abstract bool SetSlitDoor(bool open, out string reason);
 
-        public abstract bool RetractWafer();
+        public virtual bool RetractWafer()
+        {
+            return false;
+        }
 
-        public abstract bool ExtendWafer();
+        public virtual bool ExtendWafer()
+        { 
+            return false;
+        }
         public abstract bool FlowGas(int gasNum, double val);
 
         public abstract bool StopGas(int gasNum);
@@ -440,11 +454,20 @@ namespace Venus_RT.Devices
 
         public abstract int GetPVPosition();
 
-        public abstract void HeatChiller(ChillerType chillerType, double value, double offset);
+        public virtual void HeatChiller(ChillerType chillerType, double value, double offset)
+        {
+            
+        }
 
-        public abstract void OnOffChiller(ChillerType chillerType, bool onoff);
+        public virtual void OnOffChiller(ChillerType chillerType, bool onoff)
+        {
 
-        public abstract bool CheckChillerStatus();
+        }
+
+        public virtual bool CheckChillerStatus()
+        {
+            return false;
+        }
 
 
         public abstract void SetGeneratorCommunicationMode(int mode);
@@ -453,15 +476,19 @@ namespace Venus_RT.Devices
 
         public abstract bool GeneratorSetpower(float val);
 
-        public abstract bool GeneratorBiasPowerOn(bool on);
+        public virtual bool GeneratorBiasPowerOn(bool on)
+        { return false; }
 
-        public abstract bool GeneratorBiasSetpower(float val);
+        public virtual bool GeneratorBiasSetpower(float val)
+        { return false; }
 
-        public abstract bool GeneratorBiasSetMatchMode(bool val);
+        public virtual bool GeneratorBiasSetMatchMode(bool val)
+        { return false; }
 
         public abstract bool SetMatchPosition(float c1, float c2);
 
-        public abstract bool SetBiasMatchPosition(float c1, float c2);
+        public virtual bool SetBiasMatchPosition(float c1, float c2)
+        { return false; }
 
         public virtual bool SetMatchWorkMode(MatchWorkMode matchWorkMode)
         {
@@ -472,12 +499,22 @@ namespace Venus_RT.Devices
             return false;
         }
 
-        public abstract bool SetBiasPulseMode(bool on);
-        public abstract bool SetBiasPulseRateFreq(int nFreq);
+        public virtual bool SetBiasPulseMode(bool on)
+        { return false; }
+        public virtual bool SetBiasPulseRateFreq(int nFreq)
+        {
+            return false;
+        }
 
-        public abstract bool SetDiasPulseDutyCycle(int percentage);
+        public virtual bool SetDiasPulseDutyCycle(int percentage)
+        {
+            return false;
+        }
 
-        public abstract bool SetESCClampVoltage(int nVoltage);
+        public virtual bool SetESCClampVoltage(int nVoltage)
+        {
+            return false;
+        }
 
         public abstract bool CheckGeneratorAndHVInterlock(VenusDevice device);
 
@@ -545,6 +582,10 @@ namespace Venus_RT.Devices
         {
             return false;
         }
+        public virtual bool SetHighTemperatureHeaterRate(int rate)
+        {
+            return false;
+        }
         public virtual bool StartControlPressure(int pressureSetpoint, int flowSetpoint)
         {
             return false;
@@ -586,5 +627,13 @@ namespace Venus_RT.Devices
         {
             return false;
         }
+        public virtual void RTCloseEvent()
+        { 
+        
+        }
+        public virtual bool RFInterlock(VenusDevice device)
+        {
+            return true;
+        }
     }
 }

+ 20 - 2
Venus/Venus_RT/Devices/JetVenusPM.cs

@@ -453,7 +453,7 @@ namespace Venus_RT.Devices
 
         #endregion
 
-        public async override void CloseValves()
+        public async override void CloseValves(int? delayTime = null)
         {
             _PVN21Valve.TurnValve(false, out _);
             // _PVN22Valve.TurnValve(false, out _);
@@ -494,7 +494,10 @@ namespace Venus_RT.Devices
                 stick.Stop();
             }
 
-            await Task.Delay(1000);
+            if (delayTime != null)
+            {
+                await Task.Delay((int)delayTime);
+            }
             _GasFinalValve.TurnValve(false, out _);
 
            
@@ -1105,5 +1108,20 @@ namespace Venus_RT.Devices
         {
             return CheckSlitDoorClose();
         }
+        public override void RTCloseEvent()
+        {
+            if (_Generator.IsPowerOn)
+            {
+                GeneratorPowerOn(false);
+            }
+            if (_GeneratorBias.IsPowerOn)
+            {
+                GeneratorBiasPowerOn(false);
+            }
+            if (PendulumValveIsOpen())
+            {
+                TurnPendulumValve(false);
+            }
+        }
     }
 }

+ 1 - 1
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -699,7 +699,7 @@ namespace Venus_RT.Devices
         public override bool CheckSlitDoorOpen()
         => !IsSlitDoorClosed;
 
-        public override void CloseValves()
+        public override void CloseValves(int? delayTime = null)
         {
             _PVN21Valve.TurnValve(false, out _);
             //_PVN22Valve.TurnValve(false, out _);

+ 4 - 0
Venus/Venus_RT/Devices/PendulumValve.cs

@@ -249,6 +249,10 @@ namespace Venus_RT.Devices
 
         public void Terminate()
         {
+            if (IsOpen)
+            {
+                TurnValve(false);
+            }
             _serial?.Close();
         }
 

+ 6 - 2
Venus/Venus_RT/Instances/App.xaml.cs

@@ -7,6 +7,11 @@ using System.Threading.Tasks;
 using System.Windows;
 using Venus_RT.Modules;
 using MECF.Framework.RT.Core.Applications;
+using Aitex.Core.RT.Device;
+using System.Reflection;
+using Venus_RT.Devices;
+using Aitex.Core.Util;
+using Venus_RT.Instances;
 
 namespace Venus_RT
 {
@@ -16,7 +21,7 @@ namespace Venus_RT
     public partial class App : Application
     {
         protected override void OnStartup(StartupEventArgs e)
-    {
+        {
             base.OnStartup(e);
 
             RtApplication.Instance.Initialize(new RtInstance());
@@ -25,7 +30,6 @@ namespace Venus_RT
         protected override void OnExit(ExitEventArgs e)
         {
             RtApplication.Instance.Terminate();
-
             base.OnExit(e);
         }
     }

+ 3 - 0
Venus/Venus_RT/Instances/ToolLoader.cs

@@ -108,10 +108,13 @@ namespace Venus_RT.Instances
 
         public void Terminate()
         {
+            Singleton<DeviceManager>.Instance.RTExitPMEvent();
+
             Singleton<DeviceEntity>.Instance.Terminate();
 
             Singleton<DeviceManager>.Instance.Terminate();
 
+
             IoProviderManager.Instance.Terminate();
 
             Singleton<SystemConfigManager>.Instance.Terminate();

+ 2 - 2
Venus/Venus_RT/Modules/PMs/PMRoutineBase.cs

@@ -101,10 +101,10 @@ namespace Venus_RT.Modules.PMs
             return true;
         }
 
-        protected bool CloseAllValves()
+        protected bool CloseAllValves(int? delayTime = null)
         {
             Notify("关闭所有的阀门");
-            _chamber.CloseValves();
+            _chamber.CloseValves(delayTime);
             return true;
         }
 

+ 1 - 1
Venus/Venus_RT/Modules/PMs/VentRoutine.cs

@@ -32,7 +32,7 @@ namespace Venus_RT.Modules.PMs
             
         }
 
-        public RState Start(params object[] objs)
+        public  RState Start(params object[] objs)
         {
             if (CheckLid() &&
                 CheckSlitDoor() &&

+ 1 - 1
Venus/Venus_RT/Modules/TM/MFPumpRoutine.cs

@@ -95,7 +95,7 @@ namespace Venus_RT.Modules.TM
 
         private bool SwitchFastPump()
         {
-            if (!IsPressureReady())
+            if (_JetTM.GetModulePressure(Module) > (_pumpBasePressure-5))
             {
                 _JetTM.TurnSoftPumpValve(Module, false);
                 _JetTM.TurnFastPumpValve(Module, true);

+ 0 - 3
Venus/Venus_RT/Venus_RT.csproj

@@ -434,9 +434,6 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
-    <Content Include="Config\Account\Account.xml">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
     <Content Include="Config\ClusterGemModel.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

+ 2 - 2
Venus/Venus_Simulator/Config/_ioDefineKepler2200A.xml

@@ -300,8 +300,8 @@
 		<AI_ITEM Index="13" Name="AI_Turbo_Pump_N2_Flow"                 BufferOffset="26" Device="" Addr="d2026" Note="float" />
 		<AI_ITEM Index="14" Name=""            BufferOffset="28" Device="" Addr="d2028" Note="float" />
 		<AI_ITEM Index="15" Name="AI_Penning_Gauge_Pressure1" BufferOffset="30" Device="" Addr="d2030" Note="float"/>
-		<AI_ITEM Index="16" Name="AI_Penning_Gauge_Pressure2" BufferOffset="32" Device="" Addr="d2032" Note="float" />
-		<AI_ITEM Index="17" Name="" />
+		<AI_ITEM Index="16" Name="AI_CHB_M-HT_SCR1_PWR_OUT" BufferOffset="32" Device="" Addr="d2032" Note="float" />
+		<AI_ITEM Index="17" Name="AI_CHB_M-HT_SCR2_PWR_OUT" BufferOffset="34" Device="" Addr="d2034" Note="float" />
 		<AI_ITEM Index="18" Name="AI_CHB_M-HT_Control_TC_Temp"           BufferOffset="36" Device="" Addr="d2036" Note="float" />
 		<AI_ITEM Index="19" Name="" />
 		<AI_ITEM Index="20" Name="AI_Spare_Heater_Control_TC_Temp" />

+ 2 - 2
Venus/Venus_Simulator/Config/_ioDefineKepler2200B.xml

@@ -300,8 +300,8 @@
 		<AI_ITEM Index="13" Name="AI_Turbo_Pump_N2_Flow"                 BufferOffset="26" Device="" Addr="d2026" Note="float" />
 		<AI_ITEM Index="14" Name=""            BufferOffset="28" Device="" Addr="d2028" Note="float" />
 		<AI_ITEM Index="15" Name="AI_Penning_Gauge_Pressure1" BufferOffset="30" Device="" Addr="d2030" Note="float"/>
-		<AI_ITEM Index="16" Name="AI_Penning_Gauge_Pressure2" BufferOffset="32" Device="" Addr="d2032" Note="float" />
-		<AI_ITEM Index="17" Name="" />
+		<AI_ITEM Index="16" Name="AI_CHB_M-HT_SCR1_PWR_OUT" BufferOffset="32" Device="" Addr="d2032" Note="float" />
+		<AI_ITEM Index="17" Name="AI_CHB_M-HT_SCR2_PWR_OUT" BufferOffset="34" Device="" Addr="d2034" Note="float" />
 		<AI_ITEM Index="18" Name="AI_CHB_M-HT_Control_TC_Temp"           BufferOffset="36" Device="" Addr="d2036" Note="float" />
 		<AI_ITEM Index="19" Name="" />
 		<AI_ITEM Index="20" Name="AI_Spare_Heater_Control_TC_Temp" />

+ 0 - 1
Venus/Venus_Simulator/Instances/SimulatorSystem.cs

@@ -1833,7 +1833,6 @@ namespace Venus_Simulator.Instances
 
 
 
-
             if (vent_vlv.Value && gas_final_vlv.Value)
             {
                 float getAiValue_ChamberPressure = GetAiValue($"{mod}.{sAI_ChamberPressure}");

+ 7 - 1
Venus/Venus_UI/App.xaml.cs

@@ -29,7 +29,13 @@ namespace Venus_UI
 
             
 
-            base.OnStartup(e);           
+            base.OnStartup(e);
+            DispatcherUnhandledException += App_DispatcherUnhandledException;
+        }
+        void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+        {
+            //MessageBox.Show("程序异常." + Environment.NewLine + e.Exception.Message);
+            e.Handled = true;
         }
         protected override Window CreateShell()
         {

+ 343 - 0
Venus/Venus_UI/Config/UIMenuList.json

@@ -0,0 +1,343 @@
+[
+
+  {
+    "Id": "Operation",
+    "Name": "Operation",
+    "IsShow": "true",
+
+    "MenuItem": [
+      {
+        "Id": "OperationOverView",
+        "IsShow": "true",
+        "Name": "OverView",
+        "View": "OperationOverView"
+      },
+      {
+        "Id": "Platform",
+        "IsShow": "false",
+        "Name": "Platform",
+        "View": "PlatformView"
+      },
+      {
+        "Id": "Sequence",
+        "IsShow": "true",
+        "Name": "Sequence",
+        "View": "SequenceView"
+      },
+      {
+        "Id": "Fa",
+        "IsShow": "true",
+        "Name": "FA",
+        "View": "FAView"
+      }
+    ]
+  },
+  {
+    "Id": "PMA",
+    "Name": "PMA",
+
+    "IsShow": "true",
+    "MenuItem": [
+      {
+        "Id": "Operation",
+        "Name": "Operation",
+        "View": "OverView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "IO",
+        "Name": "IO",
+        "View": "IOView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "Recipe",
+        "Name": "Recipe",
+        "View": "RecipeView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "GasLeakCheck",
+        "Name": "Gas&Leak Check",
+        "View": "GasLeakCheckView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "MFCVerification",
+        "Name": "MFCVerification",
+        "View": "MFCVerificationView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "PartialPressure",
+        "Name": "Partial Pressure",
+        "View": "PartialPressureView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "VATPerformance",
+        "Name": "VAT Performance",
+        "View": "VATPerformanceView",
+        "IsShow": "true"
+      }
+
+    ]
+  },
+  {
+    "Id": "PMB",
+    "Name": "PMB",
+    "IsShow": "true",
+
+    "MenuItem": [
+      {
+        "Id": "Operation",
+        "Name": "Operation",
+        "View": "OverView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "IO",
+        "Name": "IO",
+        "View": "IOView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "Recipe",
+        "Name": "Recipe",
+        "View": "RecipeView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "GasLeakCheck",
+        "Name": "Gas&Leak Check",
+        "View": "GasLeakCheckView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "MFCVerification",
+        "Name": "MFCVerification",
+        "View": "MFCVerificationView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "PartialPressure",
+        "Name": "Partial Pressure",
+        "View": "PartialPressureView",
+        "IsShow": "true"
+
+      },
+      {
+        "Id": "VATPerformance",
+        "Name": "VAT Performance",
+        "View": "VATPerformanceView",
+        "IsShow": "true"
+      }
+
+    ]
+  },
+  {
+    "Id": "PMC",
+    "Name": "PMC",
+    "IsShow": "true",
+    "MenuItem": [
+      {
+        "Id": "Operation",
+        "Name": "Operation",
+        "IsShow": "true",
+        "View": "OverView"
+      },
+      {
+        "Id": "IO",
+        "Name": "IO",
+        "View": "IOView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "Recipe",
+        "Name": "Recipe",
+        "IsShow": "true",
+        "View": "RecipeView"
+      },
+      {
+        "Id": "GasLeakCheck",
+        "IsShow": "true",
+        "Name": "Gas&Leak Check",
+        "View": "GasLeakCheckView"
+      },
+      {
+        "Id": "MFCVerification",
+        "IsShow": "true",
+        "Name": "MFCVerification",
+        "View": "MFCVerificationView"
+      },
+      {
+        "Id": "PartialPressure",
+        "IsShow": "true",
+        "Name": "Partial Pressure",
+        "View": "PartialPressureView"
+      },
+      {
+        "Id": "VATPerformance",
+        "Name": "VAT Performance",
+        "View": "VATPerformanceView",
+        "IsShow": "true"
+      }
+
+    ]
+  },
+  {
+    "Id": "PMD",
+    "Name": "PMD",
+    "IsShow": "true",
+
+    "MenuItem": [
+      {
+        "Id": "Operation",
+        "IsShow": "true",
+        "Name": "Operation",
+        "View": "OverView"
+      },
+      {
+        "Id": "IO",
+        "Name": "IO",
+        "View": "IOView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "Recipe",
+        "IsShow": "true",
+        "Name": "Recipe",
+        "View": "RecipeView"
+      },
+      {
+        "Id": "GasLeakCheck",
+        "IsShow": "true",
+
+        "Name": "Gas&Leak Check",
+        "View": "GasLeakCheckView"
+      },
+      {
+        "Id": "MFCVerification",
+        "IsShow": "true",
+        "Name": "MFCVerification",
+        "View": "MFCVerificationView"
+      },
+      {
+        "Id": "PartialPressure",
+        "IsShow": "true",
+        "Name": "Partial Pressure",
+        "View": "PartialPressureView"
+      },
+      {
+        "Id": "VATPerformance",
+        "Name": "VAT Performance",
+        "View": "VATPerformanceView",
+        "IsShow": "true"
+      }
+
+    ]
+  },
+  {
+    "Id": "TM",
+    "Name": "Transfer",
+    "IsShow": "true",
+    "MenuItem": [
+      {
+        "Id": "Efem",
+        "IsShow": "true",
+        "Name": "EFEM",
+        "View": "EfemView"
+      },
+      {
+        "Id": "TMOperation",
+        "IsShow": "true",
+        "Name": "TM Operation",
+        "View": "TMOperationView"
+      },
+      {
+        "Id": "TMTransfer",
+        "IsShow": "true",
+        "Name": "TM Transfer",
+        "View": "TMView"
+      },
+      {
+        "Id": "IO",
+        "Name": "TM IO",
+        "View": "IOView",
+        "IsShow": "true"
+      },
+      {
+        "Id": "WaferOffset",
+        "IsShow": "true",
+        "Name": "Wafer Offset",
+        "View": "WaferOffsetView"
+      }
+    ]
+
+  },
+  {
+    "Id": "Configuration",
+    "Name": "Configuration",
+    "IsShow": "true",
+    "MenuItem": [
+      {
+        "Id": "SystemConfig",
+        "IsShow": "true",
+        "Name": "SystemConfig",
+        "View": "SystemConfigView"
+      },
+      {
+        "Id": "Role",
+        "IsShow": "true",
+        "Name": "Role",
+        "View": "RoleView"
+      },
+      {
+        "Id": "User",
+        "IsShow": "true",
+        "Name": "User",
+        "View": "UserView"
+      }
+    ]
+  },
+  {
+    "Id": "DataLog",
+    "Name": "DataLog",
+    "IsShow": "true",
+    "MenuItem": [
+      {
+        "Id": "Event",
+        "IsShow": "true",
+        "Name": "Event",
+        "View": "EventView"
+      },
+      {
+        "Id": "WaferHistoryDB",
+        "IsShow": "true",
+        "Name": "WaferHistory",
+        "View": "WaferHistoryDBView"
+      },
+      {
+        "Id": "ProcessHistory",
+        "IsShow": "true",
+        "Name": "Process History",
+        "View": "ProcessHistoryView"
+      },
+      {
+        "Id": "DataHistory",
+        "IsShow": "true",
+        "Name": "Data History",
+        "View": "DataHistoryView"
+      }
+    ]
+  }
+
+]

+ 3 - 0
Venus/Venus_UI/Venus_UI.csproj

@@ -162,6 +162,9 @@
     <Content Include="Config\UIMenu.json">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Content Include="Config\UIMenuList.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>