瀏覽代碼

1.添加Ethercat 励兆 Match DeviceData
2.添加Ethercat 霍廷格 RF
3.TM Leak Check添加UI 显示

lixiang 1 年之前
父節點
當前提交
ee26035034
共有 30 個文件被更改,包括 6785 次插入195 次删除
  1. 15 2
      Venus/Framework/Common/DBCore/LeakCheckDataRecorder.cs
  2. 二進制
      Venus/ThirdParty/APS Library_x64/APS168x64.dll
  3. 二進制
      Venus/ThirdParty/APS Library_x64/APS168x64.lib
  4. 1565 0
      Venus/ThirdParty/APS Library_x64/Include/APS168x64.cs
  5. 1447 0
      Venus/ThirdParty/APS Library_x64/Include/APS168x64.vb
  6. 1 5
      Venus/Venus_Core/HighTemperatureHeaterPosition.cs
  7. 3 6
      Venus/Venus_Core/PMLeakCheckResult.cs
  8. 0 5
      Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs
  9. 12 12
      Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs
  10. 78 77
      Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs
  11. 4 34
      Venus/Venus_MainPages/Views/DataHistoryView.xaml
  12. 6 6
      Venus/Venus_MainPages/Views/GasLeakCheckView.xaml
  13. 1 1
      Venus/Venus_MainPages/Views/PartialPressureView.xaml
  14. 2 2
      Venus/Venus_MainPages/Views/PlatformView.xaml
  15. 5 5
      Venus/Venus_MainPages/Views/TMOperationView.xaml
  16. 1 1
      Venus/Venus_MainPages/Views/VATPerformanceView.xaml
  17. 1 1
      Venus/Venus_RT/App.config
  18. 4 4
      Venus/Venus_RT/Config/System.sccfg
  19. 3 3
      Venus/Venus_RT/Config/System_Kepler2200.sccfg
  20. 1574 0
      Venus/Venus_RT/Devices/AdLinkEthercat/APS168x64.cs
  21. 1401 0
      Venus/Venus_RT/Devices/AdLinkEthercat/APS_Define.cs
  22. 4 2
      Venus/Venus_RT/Devices/DataDefine.cs
  23. 99 18
      Venus/Venus_RT/Devices/DeviceManager.cs
  24. 2 0
      Venus/Venus_RT/Devices/IODevices/IoHighTemperatureHeater.cs
  25. 9 1
      Venus/Venus_RT/Devices/JetVenusPM.cs
  26. 238 0
      Venus/Venus_RT/Devices/LzMatch_Ethercat.cs
  27. 280 0
      Venus/Venus_RT/Devices/TruPlasmaRF_Ethercat.cs
  28. 9 4
      Venus/Venus_RT/Modules/PMs/GasBoxLeakCheckRoutine.cs
  29. 15 5
      Venus/Venus_RT/Modules/TM/MFLeakCheckRoutine.cs
  30. 6 1
      Venus/Venus_RT/Venus_RT.csproj

+ 15 - 2
Venus/Framework/Common/DBCore/LeakCheckDataRecorder.cs

@@ -28,8 +28,20 @@ namespace MECF.Framework.Common.DBCore
         public static List<PMLeakCheckResult> GetAllLeakCheckData(string moduleName)
         {
             List<PMLeakCheckResult> result = new List<PMLeakCheckResult>();
-
-            string sql = $"SELECT * FROM \"leak_check_data\" where \"module_name\"='{moduleName}' order by operate_time desc LIMIT 15";
+            string tmValue = "";
+            if (moduleName == "TM")
+            {
+                tmValue = $" or \"module_name\"='LLA' or \"module_name\"='LLB'";
+            }
+            else if (moduleName == "LLA")
+            { 
+                tmValue = $" or \"module_name\"='TM' or \"module_name\"='LLB'";
+            }
+            else  if(moduleName == "LLB") 
+            {
+                tmValue = $" or \"module_name\"='LLA' or \"module_name\"='TM'";
+            }
+            string sql = $"SELECT * FROM \"leak_check_data\" where \"module_name\"='{moduleName}'{tmValue} order by operate_time desc LIMIT 50";
 
             DataSet ds = DB.ExecuteDataset(sql);
             if (ds == null)
@@ -41,6 +53,7 @@ namespace MECF.Framework.Common.DBCore
             {
                 PMLeakCheckResult checkresult = new PMLeakCheckResult();
 
+                checkresult.ModuleName= ds.Tables[0].Rows[i]["module_name"].ToString();
                 checkresult.CheckDate= ds.Tables[0].Rows[i]["operate_time"].ToString();
                 checkresult.StartPressure =Convert.ToDouble( ds.Tables[0].Rows[i]["start_pressure"].ToString());
                 checkresult.EndPressure = Convert.ToDouble(ds.Tables[0].Rows[i]["stop_pressure"].ToString());

二進制
Venus/ThirdParty/APS Library_x64/APS168x64.dll


二進制
Venus/ThirdParty/APS Library_x64/APS168x64.lib


文件差異過大導致無法顯示
+ 1565 - 0
Venus/ThirdParty/APS Library_x64/Include/APS168x64.cs


文件差異過大導致無法顯示
+ 1447 - 0
Venus/ThirdParty/APS Library_x64/Include/APS168x64.vb


+ 1 - 5
Venus/Venus_Core/HighTemperatureHeaterPosition.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+
 
 namespace Venus_Core
 {

+ 3 - 6
Venus/Venus_Core/PMLeakCheckResult.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
+using System.Runtime.Serialization;
 
 namespace Venus_Core
 {
@@ -11,6 +6,8 @@ namespace Venus_Core
     public class PMLeakCheckResult
     {
         [DataMember]
+        public string ModuleName { get; set; }
+        [DataMember]
         public string CheckDate { get; set; }
 
         [DataMember]

+ 0 - 5
Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs

@@ -1,22 +1,17 @@
 using Aitex.Core.Common.DeviceData;
 using MECF.Framework.Common.DataCenter;
-using MECF.Framework.Common.DBCore;
 using MECF.Framework.Common.OperationCenter;
-using Microsoft.Win32;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using System.IO;
-using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_Themes.CustomControls;
-using Venus_Unity;
 
 namespace Venus_MainPages.ViewModels
 {

+ 12 - 12
Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs

@@ -51,8 +51,8 @@ namespace Venus_MainPages.ViewModels
         private bool m_TurboIsOpen;
         private int m_PositionValue;
         private float m_PendulumValvePosition;
-        private float m_ProcessHighPressure;
-        private float m_ProcessLowPressure;
+        private float m_ChamberPressure;
+        private float m_ProcessPressure;
         private float m_ForelinePressurePressure;
         private int m_TurboPumpRotationalSpeed;
         private AITMfcData m_MFCN2Data;
@@ -201,20 +201,20 @@ namespace Venus_MainPages.ViewModels
             get { return m_PendulumValvePosition; }
             set { SetProperty(ref m_PendulumValvePosition, value); }
         }
-        public float ProcessHighPressure
+        public float ChamberPressure
         {
-            get { return m_ProcessHighPressure; }
+            get { return m_ChamberPressure; }
             set
             {
-                SetProperty(ref m_ProcessHighPressure, value);
+                SetProperty(ref m_ChamberPressure, value);
             }
         }
-        public float ProcessLowPressure
+        public float ProcessPressure
         {
-            get { return m_ProcessLowPressure; }
+            get { return m_ProcessPressure; }
             set
             {
-                SetProperty(ref m_ProcessLowPressure, value);
+                SetProperty(ref m_ProcessPressure, value);
             }
         }
         public float ForelinePressure
@@ -492,8 +492,8 @@ namespace Venus_MainPages.ViewModels
             PendulumValvePosition = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.GetPVPosition");
             PositionValue = -((int)((PendulumValvePosition) * 0.09));
 
-            ProcessHighPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessHighPressure");
-            ProcessLowPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessLowPressure");
+            ChamberPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ChamberPressure");
+            ProcessPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessPressure");
             ForelinePressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ForelinePressure");
             TurboPumpRotationalSpeed = Convert.ToInt32(RtDataValues[$"{ModuleName}.TurboPumpRotationalSpeed"].ToString());
             MFCN2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcN2");
@@ -534,8 +534,8 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.TurboPumpRotationalSpeed");
             m_RtDataKeys.Add($"{ModuleName}.MfcN2");
             m_RtDataKeys.Add($"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
-            m_RtDataKeys.Add($"{ModuleName}.ProcessHighPressure");
-            m_RtDataKeys.Add($"{ModuleName}.ProcessLowPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ProcessPressure");
 
         }
 

+ 78 - 77
Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs

@@ -1,5 +1,4 @@
 using Aitex.Core.Common.DeviceData;
-using Aitex.Core.UI.Control;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.OperationCenter;
@@ -14,7 +13,6 @@ using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_MainPages.Views;
 using Venus_Themes.CustomControls;
-using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -27,15 +25,6 @@ namespace Venus_MainPages.ViewModels
         private bool m_TMIsOFFline = true;
 
 
-
-
-        //private bool m_PMADoorIsOpen;
-        //private bool m_PMBDoorIsOpen;
-        //private bool m_PMCDoorIsOpen;
-        //private bool m_PMDDoorIsOpen;
-        //private bool m_LLADoorIsOpen;
-
-
         private bool m_PMAIsInstalled;
         private bool m_PMBIsInstalled;
         private bool m_PMCIsInstalled;
@@ -72,6 +61,10 @@ namespace Venus_MainPages.ViewModels
         private int m_StepProcess;
         private bool m_TMIsHoming;
         private PressureType m_PressureType;
+        private TMState m_TMCurrentState;
+        private LLState m_LLACurrentState;
+        private LLState m_LLBCurrentState;
+        private ObservableCollection<PMLeakCheckResult> m_LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>();
 
 
         #endregion
@@ -174,45 +167,11 @@ namespace Venus_MainPages.ViewModels
         {
             get { return m_TMIsOFFline; }
             set 
-            {
-                if (m_TMIsOFFline == true && value == false)
-                {
-                    //InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.ControlPressure}");
-
-                }
-                if (m_TMIsOFFline == false && value == true)
-                {
-                    //InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.AbortControlPressure}");
-                }
+            {               
                 SetProperty(ref m_TMIsOFFline, value);
             }
         }
       
-        //public bool PMADoorIsOpen
-        //{
-        //    get { return m_PMADoorIsOpen; }
-        //    set { SetProperty(ref m_PMADoorIsOpen, value); }
-        //}
-        //public bool PMBDoorIsOpen
-        //{
-        //    get { return m_PMBDoorIsOpen; }
-        //    set { SetProperty(ref m_PMBDoorIsOpen, value); }
-        //}
-        //public bool PMCDoorIsOpen
-        //{
-        //    get { return m_PMCDoorIsOpen; }
-        //    set { SetProperty(ref m_PMCDoorIsOpen, value); }
-        //}
-        //public bool PMDDoorIsOpen
-        //{
-        //    get { return m_PMDDoorIsOpen; }
-        //    set { SetProperty(ref m_PMDDoorIsOpen, value); }
-        //}
-        //public bool LLADoorIsOpen
-        //{
-        //    get { return m_LLADoorIsOpen; }
-        //    set { SetProperty(ref m_LLADoorIsOpen, value); }
-        //}
         public Dictionary<string, object> RtDataValues
         {
             get { return m_RtDataValues; }
@@ -266,10 +225,6 @@ namespace Venus_MainPages.ViewModels
             get { return m_TMOutChamberPressure; }
             set 
             {
-                //if (value != m_TMOutChamberPressure)
-                //{
-                //    InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure",value);
-                //}
                 SetProperty(ref m_TMOutChamberPressure, value);
             }
         }
@@ -288,6 +243,59 @@ namespace Venus_MainPages.ViewModels
             get { return m_TMIsHoming; }
             set { SetProperty(ref m_TMIsHoming, value); }
         }
+        public TMState TMCurrentState
+        {
+            get { return m_TMCurrentState; }
+            set
+            {
+                if (( m_TMCurrentState == TMState.Leakchecking) && value == TMState.Idle)
+                {
+                    var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
+                    if (AllLeakCheckDa != null)
+                    {
+                        LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
+                    }
+                }
+                SetProperty(ref m_TMCurrentState, value);
+            }
+        }
+        public LLState LLACurrentState
+        {
+            get { return m_LLACurrentState; }
+            set
+            {
+                if ((m_LLACurrentState == LLState.LeakCheck) && value == LLState.Idle)
+                {
+                    var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
+                    if (AllLeakCheckDa != null)
+                    {
+                        LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
+                    }
+                }
+                SetProperty(ref m_LLACurrentState, value);
+            }
+        }
+        public LLState LLBCurrentState
+        {
+            get { return m_LLBCurrentState; }
+            set
+            {
+                if ((m_LLBCurrentState == LLState.LeakCheck) && value == LLState.Idle)
+                {
+                    var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
+                    if (AllLeakCheckDa != null)
+                    {
+                        LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
+                    }
+                }
+                SetProperty(ref m_LLBCurrentState, value);
+            }
+        }
+        public ObservableCollection<PMLeakCheckResult> LeakCheckResultList
+        {
+            get { return m_LeakCheckResultList; }
+            set { SetProperty(ref m_LeakCheckResultList, value); }
+        }
         #endregion
 
         #region 命令
@@ -357,9 +365,9 @@ namespace Venus_MainPages.ViewModels
             _ChamberDoorCloseCommand ?? (_ChamberDoorCloseCommand = new DelegateCommand<object>(OnChamberDoorClose));
 
 
-        private DelegateCommand _SetTMChamberPressureCommand;
-        public DelegateCommand SetTMChamberPressureCommand =>
-            _SetTMChamberPressureCommand ?? (_SetTMChamberPressureCommand = new DelegateCommand(OnSetTMChamberPressure));
+        //private DelegateCommand _SetTMChamberPressureCommand;
+        //public DelegateCommand SetTMChamberPressureCommand =>
+        //    _SetTMChamberPressureCommand ?? (_SetTMChamberPressureCommand = new DelegateCommand(OnSetTMChamberPressure));
 
         private DelegateCommand _OnlineCommand;
         public DelegateCommand OnlineCommand =>
@@ -411,10 +419,10 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.Home");
         }
-        private void OnRobotHome()
-        {
-            InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.RobotHome");
-        }
+        //private void OnRobotHome()
+        //{
+        //    InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.RobotHome");
+        //}
         private void OnVent()
         {
             InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Vent}");
@@ -467,7 +475,6 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnDoorUpDown(object obj)
         {
-            //string[] value=obj.ToString().Split('.');
             InvokeClient.Instance.Service.DoOperation(obj.ToString());
         }
         private void OnChamberDoorOpen(object obj)
@@ -478,12 +485,12 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{obj?.ToString()}.SlitDoor.Close");
         }
-        private void OnSetTMChamberPressure()
-        {
-            //InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure", TMChamberPressureSetPoint);
-            //TMOutChamberPressure = TMChamberPressureSetPoint;
-            ////InvokeClient.Instance.Service.DoOperation("System.SetConfig", "TM.ControlPressureSetPoint", TMChamberPressureSetPoint.ToString());
-        }
+        //private void OnSetTMChamberPressure()
+        //{
+        //    //InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure", TMChamberPressureSetPoint);
+        //    //TMOutChamberPressure = TMChamberPressureSetPoint;
+        //    ////InvokeClient.Instance.Service.DoOperation("System.SetConfig", "TM.ControlPressureSetPoint", TMChamberPressureSetPoint.ToString());
+        //}
         private void OnOnline()
         {
             InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Online}");
@@ -524,7 +531,10 @@ namespace Venus_MainPages.ViewModels
             LLBVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentValve.IsOpen");
             IsOFFline= !CommonFunction.GetValue<bool>(RtDataValues, $"{m_ModuleCheckedName}.IsOnline");
             TMIsOFFline= !CommonFunction.GetValue<bool>(RtDataValues, $"TM.IsOnline");
-            TMIsHoming= (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString()))== TMState.Initializing || (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString())) == TMState.InitializingRB;
+            TMCurrentState = (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString()));
+            LLACurrentState = (LLState)(Enum.Parse(typeof(LLState), RtDataValues[$"LLA.FsmState"].ToString())); 
+            LLBCurrentState = (LLState)(Enum.Parse(typeof(LLState), RtDataValues[$"LLB.FsmState"].ToString()));
+            TMIsHoming = TMCurrentState == TMState.Initializing || (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString())) == TMState.InitializingRB;
             if (m_TMOperationView != null)
             {
                 m_TMOperationView.stepBar.Progress= CommonFunction.GetValue<int>(RtDataValues, "TM.Home.StepNo");
@@ -579,22 +589,13 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("LLB.IsOnline");
             m_RtDataKeys.Add("TM.IsOnline");
             m_RtDataKeys.Add("TM.FsmState");
+            m_RtDataKeys.Add("LLA.FsmState");
+            m_RtDataKeys.Add("LLB.FsmState");
+
             m_RtDataKeys.Add("TM.Home.StepNo");
 
             
         }
-        //private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
-        //{
-        //    InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
-        //}
-        //private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
-        //{
-        //    InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
-        //}
-        //private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
-        //{
-        //    InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
-        //}
         #endregion
     }
 }

+ 4 - 34
Venus/Venus_MainPages/Views/DataHistoryView.xaml

@@ -74,35 +74,6 @@
                         </DataTemplate>
                     </ListBox.ItemTemplate>
                 </ListBox>
-                <!--<DataGrid Style="{x:Null}" Grid.Row="1" x:Name="dataGrid_DataList" AutoGenerateColumns="False" Background="#FFD6D6D6"
-                            ItemsSource="{Binding KeyDataObservableCollection, Mode=TwoWay}"  SelectionUnit="FullRow" CanUserResizeRows="False" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserDeleteRows="True" CanUserAddRows="False" Focusable="False" HorizontalGridLinesBrush="Gray" VerticalGridLinesBrush="Gray" HeadersVisibility="Column" Margin="0,5,0,0" Height="200">
-                    <DataGrid.Columns>
-                        <DataGridTextColumn Width="Auto" Binding="{Binding Key,Mode=TwoWay}"  CanUserSort="False" IsReadOnly="True">
-                            <DataGridTextColumn.CellStyle>
-                                <Style TargetType="DataGridCell">
-                                    <Setter Property="ToolTip" Value="{Binding Key}" />
-                                </Style>
-                            </DataGridTextColumn.CellStyle>
-                            <DataGridTextColumn.HeaderTemplate >
-                                <DataTemplate>
-                                    <TextBlock Text="Name"/>
-                                </DataTemplate>
-                            </DataGridTextColumn.HeaderTemplate>
-                        </DataGridTextColumn>
-                        <DataGridTemplateColumn Width="Auto" CanUserSort="True">
-                            <DataGridTemplateColumn.CellTemplate>
-                                <DataTemplate>
-                                    <Button Focusable="False" Width="42" FontSize="11"  Height="20" Tag="{Binding UniqueId}" Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor"/>
-                                </DataTemplate>
-                            </DataGridTemplateColumn.CellTemplate>
-                            <DataGridTemplateColumn.HeaderTemplate >
-                                <DataTemplate>
-                                    <TextBlock Text="Color" />
-                                </DataTemplate>
-                            </DataGridTemplateColumn.HeaderTemplate>
-                        </DataGridTemplateColumn>
-                    </DataGrid.Columns>
-                </DataGrid>-->
             </StackPanel>
 
         </Expander>
@@ -115,11 +86,10 @@
             <!--<Border BorderThickness="1" BorderBrush="Black"  Margin="50,5,20,5">-->
                 <StackPanel Orientation="Horizontal">
 
-                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="AutoX Zoom"     x:Name="AutoXCheckBox"/>
-
-                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="AutoY Zoom"     x:Name="AutoYCheckBox"/>
-                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="Show Step" IsChecked="{Binding IsShowStep}"/>
-                <CheckBox   HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="查看实时数据"     x:Name="TimeDataCheckBox">
+                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="4,-4,0,0" Margin="100,25,0,0" Content="AutoX Zoom"     x:Name="AutoXCheckBox"/>
+                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="4,-4,0,0" Margin="100,25,0,0" Content="AutoY Zoom"     x:Name="AutoYCheckBox"/>
+                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="4,-4,0,0" Margin="100,25,0,0" Content="Show Step"      IsChecked="{Binding IsShowStep}"/>
+                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="4,-4,0,0" Margin="100,25,0,0" Content="Real-time Data" x:Name="TimeDataCheckBox">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Checked">
                             <i:InvokeCommandAction  Command="{Binding StartRealTimeCommand}" CommandParameter="{Binding ElementName=TimeDataCheckBox}"/>

+ 6 - 6
Venus/Venus_MainPages/Views/GasLeakCheckView.xaml

@@ -509,7 +509,7 @@
                     <RowDefinition  Height="{Binding MFC8IsEnable,Converter={StaticResource BoolToHeightConverter}}"/>
                     <RowDefinition/>
                     <RowDefinition/>
-                    <RowDefinition Height="0"/>
+                    <!--<RowDefinition Height="0"/>-->
                 </Grid.RowDefinitions>
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="3*"/>
@@ -518,7 +518,7 @@
                 <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="Leak Check Setting" FontSize="22"   Padding="90,5,0,0" Background="#6A82AD"/>
                 <TextBlock Grid.Row="1"  Text="Pumping Time(s)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="2"  Text="Leak Check Time(s)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="3"  Text="{Binding PressureType, StringFormat=漏率上限({0}/min)}" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="3"  Text="{Binding PressureType, StringFormat=Leak Rate Limit({0}/min)}" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="4"  Text="Leak Check Mode" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="5"  Text="Select  All" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="6"  Text="Vent N2" FontSize="15"   VerticalAlignment="Center" Padding="10" />
@@ -530,9 +530,9 @@
                 <TextBlock Grid.Row="12" Text="MfcGas6" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="13"  Text="MfcGas7" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="14" Text="MfcGas8" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="15" Text="状态"     FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="16" Text="检漏时间" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="17" Text="当前压力" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="15" Text="State"     FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="16" Text="Time(s)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <!--<TextBlock Grid.Row="17" Text="当前压力" FontSize="15"   VerticalAlignment="Center" Padding="10" />-->
 
                 <TextBox   Grid.Row="1"  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding VentTime,UpdateSourceTrigger=PropertyChanged}"/>
                 <TextBox   Grid.Row="2"  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding CheckTime,UpdateSourceTrigger=PropertyChanged}"/>
@@ -567,7 +567,7 @@
 
                 <TextBlock Grid.Row="15" Grid.Column="1" Text="{Binding CurrentStep}" Padding="2,5,0,0"/>
                 <TextBlock Grid.Row="16" Grid.Column="1" Text="{Binding StepTime, StringFormat=hh\\:mm\\:ss}" Padding="2,5,0,0"/>
-                <TextBlock Grid.Row="17" Grid.Column="1"/>
+                <!--<TextBlock Grid.Row="17" Grid.Column="1"/>-->
                 
             </Grid>
             <customControls:PathButton    Foreground="White"      Content="Leak Check"   Width="130"  Height="30" Canvas.Left="400"   Canvas.Top="20"   Command="{Binding CheckCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>

+ 1 - 1
Venus/Venus_MainPages/Views/PartialPressureView.xaml

@@ -196,7 +196,7 @@
                 <TextBlock Text="{Binding ReferenceLineSeries[9]}" Grid.Row="11" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
             </Grid>
             <customControls:PathButton Content="Save"   Canvas.Left="10"  Canvas.Top="700"  Width="100"  Height="26" Command="{Binding SaveCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
-            <customControls:PathButton Content="Load Ref"   Canvas.Left="310" Canvas.Top="700"  Width="100"  Height="26" Command="{Binding LoadReferenceCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
+            <customControls:PathButton Content="Compare"   Canvas.Left="310" Canvas.Top="700"  Width="100"  Height="26" Command="{Binding LoadReferenceCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
 
         </Canvas>
         <Grid Grid.Column="2">

+ 2 - 2
Venus/Venus_MainPages/Views/PlatformView.xaml

@@ -351,8 +351,8 @@
 
 
             <!--chamber管道标签-->
-            <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(mTorr)" TextBoxValue="{Binding ProcessHighPressure,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="{Binding ProcessLowPressure,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(mTorr)" TextBoxValue="{Binding ChamberPressure,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="{Binding ProcessPressure,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
            
             <!--<Ellipse Width="20" Height="20"  Canvas.Top="651.5" Canvas.Left="775" Fill="{Binding MFCHeData.IsWarning,Converter={StaticResource boolToColor4}}"  Stroke="Silver" StrokeThickness="2" ToolTip="Pressure Alarm"></Ellipse>-->
 

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

@@ -660,7 +660,7 @@
                         SelectionMode="Single" SelectionUnit="FullRow" Background="#05000000" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
                         ItemsSource="{Binding LeakCheckResultList}" SelectedItem="{Binding CurrentLeakCheckResultItem}" FontFamily="Arial,SimSun" Margin="1">
                         <DataGrid.Columns>
-                            <DataGridTextColumn Width="120" Binding="{Binding Date, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                            <DataGridTextColumn Width="160" Binding="{Binding CheckDate}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                                 <DataGridTextColumn.HeaderTemplate >
                                     <DataTemplate>
                                         <TextBlock Text="CheckDate" />
@@ -674,17 +674,17 @@
                                     </DataTemplate>
                                 </DataGridTextColumn.HeaderTemplate>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding StopPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                            <DataGridTextColumn Width="100" Binding="{Binding EndPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                                 <DataGridTextColumn.HeaderTemplate >
                                     <DataTemplate>
                                         <TextBlock Text="StopPressure" />
                                     </DataTemplate>
                                 </DataGridTextColumn.HeaderTemplate>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding PumpTime}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                            <DataGridTextColumn Width="60" Binding="{Binding ModuleName}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                                 <DataGridTextColumn.HeaderTemplate >
                                     <DataTemplate>
-                                        <TextBlock Text="Pump Time(s)" />
+                                        <TextBlock Text="Module" />
                                     </DataTemplate>
                                 </DataGridTextColumn.HeaderTemplate>
                             </DataGridTextColumn>
@@ -695,7 +695,7 @@
                                     </DataTemplate>
                                 </DataGridTextColumn.HeaderTemplate>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding LeakRate, StringFormat={}{0:F5}}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                            <DataGridTextColumn Width="80" Binding="{Binding LeakRate, StringFormat={}{0:F5}}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                                 <DataGridTextColumn.HeaderTemplate >
                                     <DataTemplate>
                                         <TextBlock Text="LeakRate" />

+ 1 - 1
Venus/Venus_MainPages/Views/VATPerformanceView.xaml

@@ -187,7 +187,7 @@
                 <!--<TextBlock Text="{Binding ReferenceLineSeries[20]}"  Grid.Row="22" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
             </Grid>
             <customControls:PathButton Content="Save"              Canvas.Left="10"  Canvas.Top="740" Width="120"  Height="26" Command="{Binding SaveCommand}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
-            <customControls:PathButton Content="Load Ref"          Canvas.Left="290" Canvas.Top="740" Width="120" Height="26" Command="{Binding LoadReferenceCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
+            <customControls:PathButton Content="Compare"          Canvas.Left="290" Canvas.Top="740" Width="120" Height="26" Command="{Binding LoadReferenceCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
 
         </Canvas>
         <lvc:CartesianChart  LegendLocation="Right" Hoverable="False" Grid.Column="2" Height="700" DataTooltip="{x:Null}">

+ 1 - 1
Venus/Venus_RT/App.config

@@ -28,7 +28,7 @@
 	<connectionStrings>
 		<add name="PostgreSQL"   connectionString="Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=postgres;Enlist=true;Preload Reader=true;" />
 		<!--0是mTorr,1是Pa-->
-		<add name="PressureType" connectionString="1"/>
+		<add name="PressureType" connectionString="0"/>
 	</connectionStrings>
 	<system.serviceModel>
 		<!--<diagnostics>

+ 4 - 4
Venus/Venus_RT/Config/System.sccfg

@@ -458,7 +458,7 @@
 			<config default="20" name="ChamberForelinePressureTimeout" nameView="Chamber Foreline Pressure Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 		</configs>
 		<configs name="Rf" nameView="Source RF" >
-			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet;3:Truplasma" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM38" name="Port" nameView="Port" description="serial port name of RFG" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="192.168.10.21:502" name="IPAddress" nameView="IP Address" description="RF IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -490,7 +490,7 @@
 		</configs>
 		<configs name="Match" nameView="Source Match" >
 			<config default="false" name="EnableMatch" nameView="Enable Source Match" description="enable match or not" max="1" min="0" tag="" unit="" type="Bool" />
-			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech;4:Lz" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM40" name="Port" nameView="Port" description="serial port name of match" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="192.168.10.21:502" name="IPAddress" nameView="IP Address" description="Match IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -501,7 +501,7 @@
 		</configs>
 		<configs name="BiasRf" nameView="Bias RF" >
 			<config default="true" name="EnableBiasRF" nameView="Enable Bias RF" description="enable bias RF or not" max="1" min="0" tag="" unit="" type="Bool" />
-			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet;3:Truplasma" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="2" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM14" name="Port" nameView="Port" description="serial port name of RFG" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="127.0.0.1:502" name="IPAddress" nameView="IP Address" description="Bias RF IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -532,7 +532,7 @@
 		</configs>
 		<configs name="BiasMatch" nameView="Bias Match" >
 			<config default="false" name="EnableBiasMatch" nameView="Enable Bias Match" description="enable bias match or not" max="1" min="0" tag="" unit="" type="Bool" />
-			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech;4:Lz" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="2" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM15" name="Port" nameView="Port" description="serial port name of match" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="127.0.0.1:502" name="IPAddress" nameView="IP Address" description="Bias Match IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />

+ 3 - 3
Venus/Venus_RT/Config/System_Kepler2200.sccfg

@@ -144,7 +144,7 @@
 		<config default="120" name="PurgePumpTime" description="Purge Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="180" name="LeakCheckPumpTime" description="Leak Check Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="300" name="LeakCheckWaitTime" description="Leak Check Wait Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
-		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="PaPerMin" type="Double" />
+		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="Pa/min" type="Double" />
 
 		<config default="120" name="PickTimeout" nameView="Pick Timeout" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="120" name="PlaceTimeout" nameView="Place Timeout" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
@@ -207,7 +207,7 @@
 		<config default="120" name="PurgePumpTime" description="Purge Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="180" name="LeakCheckPumpTime" description="Leak Check Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="300" name="LeakCheckWaitTime" description="Leak Check Wait Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
-		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="PaPerMin" type="Double" />
+		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="Pa/min" type="Double" />
 		<config default="2" name="SlotNumber" nameView="Slot number"  description="槽位个数" max="60" min="1" paramter="" tag="" unit="" type="Integer" />
 		<config default="2000" name="OverVentTime" nameView="Over Vent Time Delay" description="" max="60000" min="0" paramter="" tag="" unit="ms" type="Integer"/>
 		<config default="0" name="MFCWriteMode" nameView="MFCWriteMode" description=" 0:Flow; 1:Percent" max="1" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -235,7 +235,7 @@
 		<config default="120" name="PurgePumpTime" description="Purge Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="180" name="LeakCheckPumpTime" description="Leak Check Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="300" name="LeakCheckWaitTime" description="Leak Check Wait Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
-		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="PaPerMin" type="Double" />
+		<config default="30" name="LeakRate" description="Leak Rate" max="100000" min="0" paramter="" tag="" unit="Pa/min" type="Double" />
 		<config default="2" name="SlotNumber" nameView="Slot number"  description="槽位个数" max="60" min="1" paramter="" tag="" unit="" type="Integer" />
 		<config default="2000" name="OverVentTime" nameView="Over Vent Time Delay" description="" max="60000" min="0" paramter="" tag="" unit="ms" type="Integer"/>
 		<config default="0" name="MFCWriteMode" nameView="MFCWriteMode" description=" 0:Flow; 1:Percent" max="1" min="0" paramter="" tag="" unit="" type="Integer" />

文件差異過大導致無法顯示
+ 1574 - 0
Venus/Venus_RT/Devices/AdLinkEthercat/APS168x64.cs


文件差異過大導致無法顯示
+ 1401 - 0
Venus/Venus_RT/Devices/AdLinkEthercat/APS_Define.cs


+ 4 - 2
Venus/Venus_RT/Devices/DataDefine.cs

@@ -149,14 +149,16 @@ namespace Venus_RT
     public enum GeneratorMFG
     {
         AdTec = 1,
-        Comet = 2
+        Comet = 2,
+        Truplasma_Ethercat= 3
     }
 
     public enum MatchMFG
     {
         AdTec =1,
         Comet = 2,
-        Revtech=3
+        Revtech=3,
+        Lz_Ethercat = 4
     }
 
     public enum ChillerMFG

+ 99 - 18
Venus/Venus_RT/Devices/DeviceManager.cs

@@ -13,6 +13,9 @@ using Venus_RT.Devices.EPD;
 using Venus_Core;
 using Aitex.Common.Util;
 using System.Reflection;
+using Venus_RT.Devices.AdLinkEthercat;
+using System.Windows;
+using Aitex.Core.RT.Log;
 
 namespace Venus_RT.Instances
 {
@@ -28,27 +31,99 @@ namespace Venus_RT.Instances
         private  string device_model_file;
         private readonly string device_model_file_MF;
         private readonly string device_model_file_SEMF;
+
+        Int32 v_board_id = -1;
+        Int32 v_StartAxisID = 0;
+        Int32 BUS_No = 0;
+
+        private bool startEthercatOK;
         public DeviceManager()
-        {
-            //switch (RtInstance.CurrentChamber)
-            //{
-            //    case JetChamber.Venus:
-            //        device_model_file= PathManager.GetCfgDir() + RtInstance.CurrentChamber.ToString() + "\\" + "DeviceModelVenus.xml.xml";
-            //        break;
-
-            //    case JetChamber.Kepler2300:
-            //    case JetChamber.Kepler2200A:
-            //    case JetChamber.Kepler2200B:
-            //        device_model_file = PathManager.GetCfgDir() + RtInstance.CurrentChamber.ToString() + "\\" + "DeviceModelKepler.xml.xml";
-            //        break;
-            //}
+        {           
 
             device_model_file_MF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config\\","TM", RtInstance.DeviceModelFileName_MF);
             device_model_file_SEMF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config\\", "TM", RtInstance.DeviceModelFileName_SE);
         }
+        public bool InitEthercat()
+        {
+            Int32 boardID_InBits = 0;
+            Int32 mode = 0;
+            Int32 ret = 0;
+            Int32 card_name = 0;
+            Int32 tamp = 0;
+            Int32 StartAxisID = 0;
+            Int32 TotalAxisNum = 0;
+
+            // Card(Board) initial
+            ret = APS168.APS_initial(ref boardID_InBits, mode);
+
+            if (ret == 0)
+            {
+                for (int i = 0; i < 16; i++)
+                {
+                    tamp = (boardID_InBits >> i) & 1;
+
+                    if (tamp == 1)
+                    {
+                        ret = APS168.APS_get_card_name(i, ref card_name);
+
+                        if ((card_name >= (Int32)APS_Define.DEVICE_NAME_EM_2P00)
+                            && (card_name <= (Int32)APS_Define.DEVICE_NAME_EM_FA00))
+                        {
+                            ret = APS168.APS_get_first_axisId(i, ref StartAxisID, ref TotalAxisNum);
+                            //v_card_name = card_name;
+                            v_board_id = i;
+                            v_StartAxisID = StartAxisID;
+
+                            LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, "Ethercat Initial Success!");
+                            break;
+                        }
+                    }
+                }
+                if (v_board_id == -1)
+                {
+                    LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Board Id search Fail!");
+                }
+                else
+                {
+                    LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, "Ethercat Board Id search Success!");
+                    return true;
+                }
+            }
+            else
+            {
+                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Initial Fail!");
+
+            }
+            return false;
+        }
+
+        public bool StarteEthercat()
+        {
+            Int32 ret = 0;
+            Int32 Board_ID = v_board_id;
+            ret = APS168.APS_start_field_bus(Board_ID, BUS_No, v_StartAxisID);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Start field bus Fail");
+                return false;
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, $"Ethercat Start field bus Success");
+                return true;
+            }
+        }
 
         public override bool Initialize()
         {
+            if (InitEthercat())
+            {
+                if (StarteEthercat())
+                {
+                    startEthercatOK = true;
+                }
+            }
+
             if (ModuleHelper.IsInstalled(ModuleName.PMA))
             {
                 JetChamber jetChamber = (JetChamber)SC.GetValue<int>("PMA.ChamberType");
@@ -80,7 +155,7 @@ namespace Venus_RT.Instances
 
             AddCustomModuleDevice(new VenusSignalTower("System", "SignalTower"));
 
-
+            
             OP.Subscribe("DeviceOperation", this.Invoke);
 
             return true;
@@ -97,10 +172,7 @@ namespace Venus_RT.Instances
                 AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.Rf));
             }
 
-            
-                
-
-         
+                             
 
             if (jetChamber == JetChamber.Kepler2300)
             {
@@ -182,6 +254,11 @@ namespace Venus_RT.Instances
                 {
                     AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.BiasMatch, MatchCommunicationType.Ethernet));
                 }
+                else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
+                    SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Lz_Ethercat && startEthercatOK)
+                {
+                    AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.BiasMatch, v_board_id));
+                }
 
                 if (SC.GetValue<bool>($"{mod}.BiasRf.EnableBiasRF"))
                 {
@@ -194,6 +271,10 @@ namespace Venus_RT.Instances
                     {
                         AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.BiasRf));
                     }
+                    else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat && startEthercatOK)
+                    {
+                        AddCustomModuleDevice(new TruPlasmaRF_Ethercat(mod, Venus_Core.VenusDevice.BiasRf, v_board_id));
+                    }
                 }
 
                 AddCustomModuleDevice(new ESC5HighVoltage(mod));

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

@@ -285,6 +285,8 @@ namespace Venus_RT.Devices.IODevices
 
             DATA.Subscribe($"{Module}.{Name}.Temperature", () => DeviceData.HighTemperatureHeaterTemperature);
 
+            DATA.Subscribe($"{Module}.{Name}.Position", () => (int)CurrentPosition-1);
+
 
             _SetRealFloat(_aoLiftServoPosition1, 20);
             _SetRealFloat(_aoLiftServoPosition2, -30);

+ 9 - 1
Venus/Venus_RT/Devices/JetVenusPM.cs

@@ -423,6 +423,10 @@ namespace Venus_RT.Devices
                 {
                     _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
                 }
+                else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat)
+                {
+                    _GeneratorBias = DEVICE.GetDevice<TruPlasmaRF_Ethercat>($"{Module}.{VenusDevice.BiasRf}");
+                }
             }
 
 
@@ -449,7 +453,11 @@ namespace Venus_RT.Devices
             {
                 _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
             }
-
+            else if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
+               SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Lz_Ethercat)
+            {
+                _BiasMatch = DEVICE.GetDevice<LzMatch_Ethercat>($"{Module}.{VenusDevice.BiasMatch}");
+            }
 
             _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
 

+ 238 - 0
Venus/Venus_RT/Devices/LzMatch_Ethercat.cs

@@ -0,0 +1,238 @@
+using Aitex.Core.Backend;
+using Aitex.Core.Common.DeviceData;
+using Aitex.Core.RT.DataCenter;
+using Aitex.Core.RT.Log;
+using Aitex.Core.RT.OperationCenter;
+using MECF.Framework.Common.Device.Bases;
+using MECF.Framework.Common.Equipment;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using Venus_Core;
+using Venus_RT.Devices.AdLinkEthercat;
+
+namespace Venus_RT.Devices
+{
+    public class LzMatch_Ethercat : RfMatchBase
+    {
+        //Int32 v_card_name = 0;
+        Int32 v_board_id = -1;
+        Int32 v_StartAxisID = 0;
+        Int32 BUS_No = 0;
+        Int32 Mod_ID = 1;
+        private readonly VenusDevice _device;
+        private Stopwatch _stopWatch = new Stopwatch();
+        private string WorkMode { get; set; } = "";
+
+        public LzMatch_Ethercat(ModuleName mod, VenusDevice venusDevice, Int32 board_id) : base(mod.ToString(), venusDevice.ToString())
+        {
+            _device = venusDevice;
+            v_board_id = board_id;
+            _stopWatch.Start();
+
+        }
+        public override bool Initialize()
+        {
+            base.Initialize();
+            DATA.Subscribe($"{Module}.{Name}.C1", () => TunePosition1);
+            DATA.Subscribe($"{Module}.{Name}.C2", () => TunePosition2);
+            DATA.Subscribe($"{Module}.{Name}.WorkMode", () => WorkMode);
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchPosition}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchPosition((float)Convert.ToDouble(param[0]), (float)Convert.ToDouble(param[1]), out reason);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchProcessMode}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchMode((string)param[0] == "Auto" ? EnumRfMatchTuneMode.Auto : EnumRfMatchTuneMode.Manual, out reason);
+                return true;
+            });
+            return true;
+        }
+        public override void Monitor()
+        {
+            if (_stopWatch.ElapsedMilliseconds > 500)
+            {
+                TunePosition1 = GetPositionC1();
+                TunePosition2 = GetPositionC2();
+                WorkMode = GetWorkMode();   
+
+                _stopWatch.Restart();
+            }
+        }
+        public override void SetMatchPosition(float c1, float c2, out string reason)
+        {
+            base.SetMatchPosition(c1, c2, out reason);
+            executeMatchPostion(c1, c2);
+            reason = "";
+        }
+        private void executeMatchPostion(float c1, float c2)
+        {
+            SetWorkMode(EnumRfMatchTuneMode.Manual);
+            SetPosition(c1, c2);
+        }
+        private void SetPosition(float c1val, float c2val)
+        {
+            SetPositionC1(c1val);
+            SetPositionC2(c2val);
+        }
+        private void SetPositionC1(float c1val)
+        {
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x8000;
+            UInt16 OD_Subindex = 3;
+            UInt32 DataLength = 32;
+            UInt32 TimeOut = 10000;
+            UInt32 Flags = 0;
+            Data = BitConverter.GetBytes(c1val);
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set C1 {c1val} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set C1 {c1val} Success!");
+            }
+        }
+        private void SetPositionC2(float c1va2)
+        {
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x8000;
+            UInt16 OD_Subindex = 2;
+            UInt32 DataLength = 32;
+            UInt32 TimeOut = 10000;
+            UInt32 Flags = 0;
+            Data = BitConverter.GetBytes(c1va2);
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set C2 {c1va2} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set C2 {c1va2} Success!");
+            }
+        }
+        private float GetPositionC1()
+        {
+            Int32 ret;
+            Int32 BUS_No = 0;
+            UInt16 ByteOffset = 22;
+            UInt16 Size = 4;
+            uint value = 0;
+            ret = APS168.APS_get_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, ref value);
+            float f;
+
+            if (ret != 0)
+            {
+                f = -1;
+                LOG.Write(eEvent.ERR_MATCH, Module, $"{_device} Get C1 Value Fail");
+            }
+            else
+            {
+                f = BitConverter.ToSingle(BitConverter.GetBytes(value), 0);
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Get C1 Value Success");
+            }
+            return f;
+        }
+        private float GetPositionC2()
+        {
+            Int32 ret;
+            Int32 BUS_No = 0;
+            UInt16 ByteOffset = 18;
+            UInt16 Size = 4;
+            uint value = 0;
+            ret = APS168.APS_get_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, ref value);
+            float f;
+
+            if (ret != 0)
+            {
+                f = -1;
+                LOG.Write(eEvent.ERR_MATCH, Module, $"{_device} Get C2 Value Fail");
+            }
+            else
+            {
+                f = BitConverter.ToSingle(BitConverter.GetBytes(value), 0);
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Get C2 Value Success");
+            }
+            return f;
+        }
+        public override bool SetMatchMode(EnumRfMatchTuneMode enumRfMatchTuneMode, out string reason)
+        {
+            reason = string.Empty;
+            SetWorkMode(enumRfMatchTuneMode);
+            return true;
+        }
+        private void SetWorkMode(EnumRfMatchTuneMode mode)
+        {
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x8000;
+            UInt16 OD_Subindex = 1;
+            UInt32 DataLength = 1;
+            UInt32 TimeOut = 10000;
+            Int32 Datatemp;
+            UInt32 Flags = 0;
+
+            if (mode == EnumRfMatchTuneMode.Auto)
+            {
+                Datatemp = 0;
+            }
+            else
+            {
+                Datatemp = 1;
+            }
+
+            for (Int32 i = 0; i < 8; i++)
+            {
+                Data[i] = (Byte)((Datatemp >> (i * 8)) & 0xFF);
+            }
+
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_MATCH, Module, $"{_device} set work mode {mode} Fail!");
+            }
+            else
+            {
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} set work mode {mode} Success!");
+            }
+        }
+        private string GetWorkMode()
+        {
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x8000;
+            UInt16 OD_Subindex = 1;
+            UInt32 DataLength = 1;
+            UInt32 TimeOut = 10000;
+            UInt32 OutDataLength = 0;
+            UInt32 Flags = 0;
+
+            ret = APS168.APS_get_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, ref OutDataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_MATCH, Module, $"{_device} Get Work Mode Fail");
+            }
+            else
+            {
+                if (Data[0] == 0)
+                {
+                    return "Auto";
+
+                }
+                else if (Data[0] == 1)
+                {
+                    return "Manual";
+                }
+
+            }
+            return "";
+        }
+    }
+}

+ 280 - 0
Venus/Venus_RT/Devices/TruPlasmaRF_Ethercat.cs

@@ -0,0 +1,280 @@
+using Aitex.Core.Common.DeviceData;
+using Aitex.Core.RT.DataCenter;
+using Aitex.Core.RT.Log;
+using Aitex.Core.RT.OperationCenter;
+using MECF.Framework.Common.Device.Bases;
+using MECF.Framework.Common.Equipment;
+using System;
+using System.Diagnostics;
+using Venus_Core;
+using Venus_RT.Devices.AdLinkEthercat;
+
+namespace Venus_RT.Devices
+{
+    public class TruPlasmaRF_Ethercat : RfPowerBase
+    {
+        //Int32 v_card_name = 0;
+        Int32 v_board_id = -1;
+        Int32 v_StartAxisID = 0;
+        Int32 BUS_No = 0;
+        Int32 Mod_ID = 0;
+
+        private readonly VenusDevice _device;
+        private Stopwatch _stopWatch = new Stopwatch();
+
+
+
+        public new AITRfData DeviceData =>
+            new AITRfData
+            {
+                Module = Module,
+                DeviceName = Name,
+                ScalePower = ScalePower,
+                ForwardPower = ForwardPower,
+                ReflectPower = ReflectPower,
+                IsRfOn = IsPowerOn,
+                PowerSetPoint = PowerSetPoint,
+            };
+
+        public TruPlasmaRF_Ethercat(ModuleName mod, VenusDevice device, Int32 board_id) : base(mod.ToString(), device.ToString())
+        {
+            _device = device;
+            v_board_id = board_id;
+            _stopWatch.Start();
+        }
+
+        public override bool Initialize()
+        {
+            base.Initialize();
+
+            DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData);
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetPowerOnOff}", (out string reason, int time, object[] param) =>
+            {
+                SetPowerOnOff(Convert.ToBoolean((string)param[0]), out reason);
+                return true;
+            });
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetPower}", (out string reason, int time, object[] param) =>
+            {
+                reason = "";
+                ushort val = Convert.ToUInt16(param[0]);
+                SetPower(val);
+                return true;
+            });
+
+            return true;
+        }
+        public override void Monitor()
+        {
+            if (_stopWatch.ElapsedMilliseconds > 500)
+            {
+                IsPowerOn = GetPowerOnOff();
+                ForwardPower = GetPower();
+                ReflectPower=GetReflectPower();
+                _stopWatch.Restart();
+            }
+        }
+
+        public override bool SetPowerOnOff(bool on, out string str)
+        {
+            str = "";
+            Int32 ret;
+            UInt16 ByteOffset = 0;
+            UInt16 Size = 1;
+            uint Value = 0;
+            string operation;
+            if (on)
+            {
+                operation = "ON";
+                Value = 1;
+                ret = APS168.APS_set_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, Value);
+            }
+            else
+            {
+                operation = "OFF";
+                ret = APS168.APS_set_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, Value);
+            }
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set Power {operation} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set Power {operation} Success!");
+            }
+            return true;
+        }
+        public  bool GetPowerOnOff()
+        {
+            Int32 ret;
+            UInt16 ByteOffset = 0;
+            UInt16 Size = 1;
+            uint Value = 0;
+            ret = APS168.APS_get_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, ref Value);
+
+
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Get Power ON/OFF Fail!");
+            }
+            else
+            {
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Get Power ON/OFF Success!");
+
+                if (Value == 3)
+                {
+                    return true;
+                }
+
+            }
+            return false;
+        }
+        public override void SetPower(float val)
+        {
+            Int32 ret;
+            UInt16 ByteOffset = 2;
+            UInt16 Size = 4;
+            uint Value = 0;
+            byte[] byteArray = BitConverter.GetBytes(val);
+            Value = BitConverter.ToUInt32(byteArray, 0);
+
+            ret = APS168.APS_set_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, Value);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set Power Setpoint {val} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set Power Setpoint {val} Success!");
+            }
+        }
+        public float GetPower()
+        {
+            Int32 ret;
+            Int32 BUS_No = 0;
+            UInt16 ByteOffset = 6;
+            UInt16 Size = 4;
+            uint Value = 0;
+            ret = APS168.APS_get_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, ref Value);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Get Power Setpoint  Fail!");
+            }
+            else
+            {
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Get Power Setpoint  Success!");
+            }
+            return  BitConverter.ToSingle(BitConverter.GetBytes(Value), 0); 
+        }
+
+        public float GetReflectPower()
+        {
+            Int32 ret;
+            Int32 BUS_No = 0;
+            UInt16 ByteOffset = 10;
+            UInt16 Size = 4;
+            uint Value = 0;
+            ret = APS168.APS_get_field_bus_pdo(v_board_id, BUS_No, ByteOffset, Size, ref Value);
+            if (ret != 0)
+            {
+                //LOG.Write(eEvent.ERR_RF, Module, $"{_device} Get Reflect Power Fail");
+            }
+            else
+            {
+                return BitConverter.ToSingle(BitConverter.GetBytes(Value), 0); ;
+            }
+            return -1;
+        }
+
+        public override void SetPulseMode(bool on)
+        {
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x7001;
+            UInt16 OD_Subindex = 1;
+            UInt32 DataLength = 1;
+            UInt32 TimeOut = 10000;
+            Int32 Datatemp;
+            UInt32 Flags = 0;
+            string operation;
+
+            if (on)
+            {
+                operation = "Enable";
+                Datatemp = 1;
+            }
+            else
+            {
+                operation = "Disable";
+                Datatemp = 0;
+            }
+            for (Int32 i = 0; i < 8; i++)
+            {
+                Data[i] = (Byte)((Datatemp >> (i * 8)) & 0xFF);
+            }
+
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} {operation} Pulsing Mode Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} {operation} Pulsing Mode Success!");
+            }
+        }
+
+        public override void SetPulseRateFreq(int nFreq)
+        {
+            if (nFreq < 0)
+            {
+                return;
+            }
+            float f = Convert.ToSingle(nFreq);
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x7008;
+            UInt16 OD_Subindex = 1;
+            UInt32 DataLength = 32;
+            UInt32 TimeOut = 10000;
+            UInt32 Flags = 0;
+            Data = BitConverter.GetBytes(f);
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set Pulse Rate Freq{nFreq} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set Pulse Rate Freq{nFreq} Success!");
+            }
+        }
+
+        public override void SetPulseDutyCycle(int percentage)
+        {
+            if (percentage <= 10 && percentage >= 90)
+            {
+                return;
+            }
+            float f = Convert.ToSingle(percentage);
+            Int32 ret = 0;
+            Byte[] Data = new Byte[32];
+            UInt16 OD_index = 0x7008;
+            UInt16 OD_Subindex = 2;
+            UInt32 DataLength = 32;
+            UInt32 TimeOut = 10000;
+            UInt32 Flags = 0;
+            Data = BitConverter.GetBytes(f);
+
+            ret = APS168.APS_set_field_bus_sdo(v_board_id, BUS_No, Mod_ID, OD_index, OD_Subindex, Data, DataLength, TimeOut, Flags);
+            if (ret != 0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, $"{_device} Set Pulse Duty Cycle {percentage} Fail!");
+            }
+            else
+            {
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{_device} Set Pulse Duty Cycle {percentage} Success!");
+            }
+        }
+
+    }
+}

+ 9 - 4
Venus/Venus_RT/Modules/PMs/GasBoxLeakCheckRoutine.cs

@@ -40,9 +40,14 @@ namespace Venus_RT.Modules.PMs
         Stopwatch _routineTimer = new Stopwatch();
         StringBuilder  gasLines=new StringBuilder();
         public string CurrentStep;
+        PressureType _pressureType = PressureType.mTorr;
         public GasBoxLeakCheckRoutine(JetPMBase chamber) : base(chamber)
         {
             Name = "GasBox Leakcheck";
+            if (chamber.ChamberType == JetChamber.Kepler2200A || chamber.ChamberType == JetChamber.Kepler2200B)
+            {
+                _pressureType = PressureType.Pa;
+            }
         }
 
         public RState Start(params object[] objs)
@@ -161,7 +166,7 @@ namespace Venus_RT.Modules.PMs
                     return true;
                 else
                 {
-                    Runner.Stop($"GasBox Leakcheck失败, 工艺压力 [{_chamber.ProcessPressure}]mTor, 高于LeakCheck Base Pressure: [{_leakCheckBasePressure}] mTor");
+                    Runner.Stop($"GasBox Leakcheck失败, 工艺压力 [{_chamber.ProcessPressure}]{_pressureType}, 高于LeakCheck Base Pressure: [{_leakCheckBasePressure}] {_pressureType}");
                 }
             }
 
@@ -173,7 +178,7 @@ namespace Venus_RT.Modules.PMs
             CurrentStep = "Leak Check";
             _startPressure = _chamber.ProcessPressure;
             pMLeakCheckResult.StartPressure = _startPressure;
-            Notify($"PM 压力开始值 {_startPressure} mt");
+            Notify($"PM 压力开始值 {_startPressure} {_pressureType}");
 
             _chamber.TurnPendulumValve(false);
             return true;
@@ -187,12 +192,12 @@ namespace Venus_RT.Modules.PMs
             pMLeakCheckResult.LeakRate = LeakRate;
             if (LeakRate < _leakRate)
             {
-                Notify($"GasBox Leakcheck完成, 压力结束值: {_startPressure} mt, 漏率:{LeakRate} mt/min");
+                Notify($"GasBox Leakcheck完成, 压力结束值: {_startPressure} {_pressureType}, 漏率:{LeakRate} {_pressureType}/min");
                 pMLeakCheckResult.Result = "Success";
             }
             else
             {
-                Stop($"GasBox Leakcheck失败, 腔体漏率 [{LeakRate}] mt/min, 高于 [{_leakRate}] mt/min");
+                Stop($"GasBox Leakcheck失败, 腔体漏率 [{LeakRate}] {_pressureType}/min, 高于 [{_leakRate}] {_pressureType}/min");
                 pMLeakCheckResult.Result = "Fail";
             }
             LeakCheckDataRecorder.Add(_leakcheckHoldTime, Math.Round(_startPressure, 1), Math.Round(_endPressure, 1), LeakRate, pMLeakCheckResult.Result, pMLeakCheckResult.CheckMode, _chamber.Name, gasLines.ToString());

+ 15 - 5
Venus/Venus_RT/Modules/TM/MFLeakCheckRoutine.cs

@@ -36,11 +36,18 @@ namespace Venus_RT.Modules.TM
 
         private readonly JetTM _JetTM;
         //public string CurrentStep;
+        private string _result;
+        PressureType _pressureType = PressureType.mTorr;
+
 
         public MFLeakCheckRoutine(JetTM tm, ModuleName mod) : base(mod)
         {
             Name = $"{Module} Leakcheck";
             _JetTM = tm;
+            if (RtInstance.pressureType == PressureType.Pa)
+            {
+                _pressureType=PressureType.Pa;
+            }
         }
 
         public RState Start(params object[] objs)
@@ -59,7 +66,7 @@ namespace Venus_RT.Modules.TM
                 _leakcheckPumpTime = SC.GetValue<int>($"{Module}.LeakCheckPumpTime");
                 _leakcheckWaitTime = SC.GetValue<int>($"{Module}.LeakCheckWaitTime");
                 _leakRate = SC.GetValue<double>($"{Module}.LeakRate");
-
+                _result = "";
                 return Runner.Start(Module, Name);
             }
             return RState.Failed;
@@ -90,7 +97,7 @@ namespace Venus_RT.Modules.TM
             _JetTM.TurnFastPumpValve(Module, false);
             _startPressure = _JetTM.GetModulePressure(Module);
 
-            Notify($"{Module} 压力开始值 {_startPressure} mt");
+            Notify($"{Module} 压力开始值 {_startPressure} {_pressureType}");
             return true;
         }
 
@@ -102,11 +109,14 @@ namespace Venus_RT.Modules.TM
 
             if (LeakRate < _leakRate)
             {
-                Notify($"{Module} Leakcheck完成, 压力结束值: {_startPressure} mt, 漏率:{LeakRate} mt/min");
+                Notify($"{Module} Leakcheck完成, 压力结束值: {_startPressure}{_pressureType}, 漏率:{LeakRate} {_pressureType}/min");
+                _result = "Success";
             }
             else
             {
-                Stop($"{Module} Leakcheck失败, 腔体漏率 [{LeakRate}] mt/min, 高于 [{_leakRate}] mt/min");
+                Stop($"{Module} Leakcheck失败, 腔体漏率 [{LeakRate}] {_pressureType}/min, 高于 [{_leakRate}] {_pressureType}/min");
+                _result = "Fail";
+
             }
 
             return true;
@@ -115,7 +125,7 @@ namespace Venus_RT.Modules.TM
         bool LeakCheckEnd()
         {
             _JetTM.CloseModuleAllValves(Module);
-            //LeakCheckDataRecorder.Add(_leakcheckHoldTime, Math.Round(_startPressure, 1), Math.Round(_endPressure, 1), LeakRate, pMLeakCheckResult.Result, pMLeakCheckResult.CheckMode, _chamber.Name, gasLines.ToString());
+            LeakCheckDataRecorder.Add(_leakcheckPumpTime, Math.Round(_startPressure, 1), Math.Round(_endPressure, 1), LeakRate, _result, "", Module.ToString(), "");
             return true;
         }
 

+ 6 - 1
Venus/Venus_RT/Venus_RT.csproj

@@ -17,6 +17,7 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <TargetFrameworkProfile />
     <PublishUrl>publish\</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Disk</InstallFrom>
@@ -31,7 +32,6 @@
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
-    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -44,6 +44,7 @@
     <WarningLevel>4</WarningLevel>
     <NoWarn>
     </NoWarn>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -159,6 +160,8 @@
       <DependentUpon>IOMonitorView.xaml</DependentUpon>
     </Compile>
     <Compile Include="Devices\AdixenTurboPump.cs" />
+    <Compile Include="Devices\AdLinkEthercat\APS168x64.cs" />
+    <Compile Include="Devices\AdLinkEthercat\APS_Define.cs" />
     <Compile Include="Devices\AdTecRF.cs" />
     <Compile Include="Devices\AIRSYSChiller.cs" />
     <Compile Include="Devices\CometRF.cs" />
@@ -223,6 +226,8 @@
     <Compile Include="Devices\SMCChiller.cs" />
     <Compile Include="Devices\SMIF\FortrendPLUS500.cs" />
     <Compile Include="Devices\SMIF\ISMIF.cs" />
+    <Compile Include="Devices\TruPlasmaRF_Ethercat.cs" />
+    <Compile Include="Devices\LzMatch_Ethercat.cs" />
     <Compile Include="Modules\DVIDName.cs" />
     <Compile Include="Modules\SMIF\SMIFEntity.cs" />
     <Compile Include="Devices\TM\HongHuTM.cs" />