Quellcode durchsuchen

现场测试修改MFC Calibration/LeakCheck/VATPerformance功能

lixiang vor 2 Jahren
Ursprung
Commit
796541e5a6

+ 40 - 0
Venus/Venus_Core/PartialPressureResult.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_Core
+{
+    [DataContract]
+    [Serializable]
+    public class PartialPressureResult
+    {
+        [DataMember]
+        public string StartTime { get; set; }
+
+        [DataMember]
+        public string EndTime { get; set; }
+        [DataMember]
+        public int FlowTime { get; set; }
+        [DataMember]
+        public string GasName { get; set; }
+        [DataMember]
+        public List<Value> ValuePairs { get; set; } = new List<Value>();
+
+        [DataMember]
+        public string Result { get; set; } = "Fail";
+    }
+
+
+    [DataContract]
+    [Serializable]
+    public class Value
+    {
+        [DataMember]
+        public string Flow { get; set; }
+        [DataMember]
+        public double Pressure { get; set; }
+    }
+}

+ 6 - 12
Venus/Venus_MainPages/Unity/PartialPressureResult.cs

@@ -5,31 +5,25 @@ using System.Runtime.Serialization;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace Venus_MainPages.Unity
+namespace Venus_Core
 {
     [DataContract]
-    internal class PartialPressureResult
+    public class VATPerformanceResult
     {
         [DataMember(Name = "StartTime")]
         public string StartTime { get; set; }
-
         [DataMember(Name = "EndTime")]
         public string EndTime { get; set; }
         [DataMember(Name = "FlowTime")]
         public int FlowTime { get; set; }
         [DataMember(Name = "GasName")]
+
         public string GasName { get; set; }
         [DataMember(Name = "ValuePairs")]
-        public List<Value> ValuePairs { get; set; } = new List<Value>();
+
+        public List<double> ValuePairs { get; set; } = new List<double>();
         [DataMember(Name = "Result")]
+
         public string Result { get; set; } = "Fail";
     }
-    [DataContract]
-    internal class Value
-    {
-        [DataMember(Name = "Flow")]
-        public string Flow { get; set; }
-        [DataMember(Name = "Pressure")]
-        public double Pressure { get; set; }
-    }
 }

+ 2 - 0
Venus/Venus_Core/Venus_Core.csproj

@@ -53,6 +53,7 @@
     <Compile Include="EventDefine.cs" />
     <Compile Include="FADefine.cs" />
     <Compile Include="InvokeName.cs" />
+    <Compile Include="PartialPressureResult.cs" />
     <Compile Include="PMLeakCheckResult.cs" />
     <Compile Include="PMVATPerformance.cs" />
     <Compile Include="SubItem.cs" />
@@ -64,6 +65,7 @@
     <Compile Include="SCValue.cs" />
     <Compile Include="SerializeHelper.cs" />
     <Compile Include="ValveType.cs" />
+    <Compile Include="VATPerformanceResult.cs" />
     <Compile Include="VenusDevice.cs" />
     <Compile Include="VenusMenu.cs" />
   </ItemGroup>

+ 0 - 1
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -130,7 +130,6 @@
     <Compile Include="Unity\GridOptions.cs" />
     <Compile Include="Unity\IHandler.cs" />
     <Compile Include="Unity\ModuleManager.cs" />
-    <Compile Include="Unity\PartialPressureResult.cs" />
     <Compile Include="Unity\VATPerformanceResult.cs" />
     <Compile Include="Unity\SystemConfig.cs" />
     <Compile Include="Unity\SystemConfigProvider.cs" />

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

@@ -323,6 +323,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _ControlValveCommand;
         public DelegateCommand<object> ControlValveCommand =>
             _ControlValveCommand ?? (_ControlValveCommand = new DelegateCommand<object>(OnControlValve));
+
+        private DelegateCommand _GasPurgeCommand;
+        public DelegateCommand GasPurgeCommand =>
+            _GasPurgeCommand ?? (_GasPurgeCommand = new DelegateCommand(OnGasPurge));
         #endregion
 
         #region 构造函数
@@ -396,6 +400,10 @@ namespace Venus_MainPages.ViewModels
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", Convert.ToInt32(commonValveControl.Tag.ToString()), !commonValveControl.Status);
             }
         }
+        private void OnGasPurge()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.GasLinePurge");
+        }
         #endregion
 
         #region 私有方法

+ 62 - 59
Venus/Venus_MainPages/ViewModels/MFCVerificationViewModel.cs

@@ -26,6 +26,7 @@ namespace Venus_MainPages.ViewModels
         public ObservableCollection<int> m_MFC7VerificationPoints = new ObservableCollection<int>();
         public ObservableCollection<int> m_MFC8VerificationPoints = new ObservableCollection<int>();
 
+        private AITMfcData m_MFCData;
         private AITMfcData m_MFC1Data;
         private AITMfcData m_MFC2Data;
         private AITMfcData m_MFC3Data;
@@ -40,10 +41,22 @@ namespace Venus_MainPages.ViewModels
         private List<string> m_RtDataKeys = new List<string>();
         private Dictionary<string, object> m_RtDataValues;
         private string ModuleName="PMA";
+        private ObservableCollection<int> m_MFCVerificationPoints = new ObservableCollection<int>();
+        private int m_GasSelectedIndex;
+        private int m_PointsSelectedIndex;
         #endregion
 
 
         #region 属性
+        public ObservableCollection<int> MFCVerificationPoints
+        {
+            get { return m_MFCVerificationPoints; }
+            set
+            {
+
+                SetProperty(ref m_MFCVerificationPoints, value);
+            }
+        }
         public ObservableCollection<int> MFC1VerificationPoints
         {
             get { return m_MFC1VerificationPoints; }
@@ -121,6 +134,12 @@ namespace Venus_MainPages.ViewModels
             get { return m_RtDataValues; }
             set { SetProperty(ref m_RtDataValues, value); }
         }
+        public AITMfcData MFCData
+        {
+            get { return m_MFCData; }
+            set { SetProperty(ref m_MFCData, value); }
+        }
+
         public AITMfcData MFC1Data
         {
             get { return m_MFC1Data; }
@@ -161,6 +180,20 @@ namespace Venus_MainPages.ViewModels
             get { return m_MFC8Data; }
             set { SetProperty(ref m_MFC8Data, value); }
         }
+
+        public int GasSelectedIndex
+        {
+            get { return m_GasSelectedIndex; }
+            set { SetProperty(ref m_GasSelectedIndex, value); }
+
+        }
+        public int PointsSelectedIndex
+        {
+            get { return m_PointsSelectedIndex; }
+            set { SetProperty(ref m_PointsSelectedIndex, value); }
+
+        }
+        
         #endregion
 
         #region 命令
@@ -172,6 +205,15 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> StartTenPointVerificationCommand =>
             _StartTenPointVerificationCommand ?? (_StartTenPointVerificationCommand = new DelegateCommand<object>(OnStartTenPointVerification));
 
+        private DelegateCommand _AbortCommand;
+        public DelegateCommand AbortCommand =>
+            _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
+
+
+        private DelegateCommand _SelectGasCommand;
+        public DelegateCommand SelectGasCommand =>
+            _SelectGasCommand ?? (_SelectGasCommand = new DelegateCommand(OnSelectGas));
+
 
         #endregion
         public MFCVerificationViewModel()
@@ -186,87 +228,48 @@ namespace Venus_MainPages.ViewModels
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
 
 
-            var MFC1Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas1"];
-            int delta1 = (int)MFC1Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC1VerificationPoints.Add(delta1 + delta1 * i);
-            }
-
-            var MFC2Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas2"];
-            int delta12 = (int)MFC2Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC2VerificationPoints.Add(delta12 + delta12 * i);
-            }
-
-            var MFC3Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas3"];
-            int delta13 = (int)MFC3Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC3VerificationPoints.Add(delta13 + delta13 * i);
-            }
-
-            var MFC4Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas4"];
-            int delta14 = (int)MFC4Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC4VerificationPoints.Add(delta14 + delta14 * i);
-            }
-
-            var MFC5Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas5"];
-            int delta15 = (int)MFC5Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC5VerificationPoints.Add(delta15 + delta15 * i);
-            }
-
-            var MFC6Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas6"];
-            int delta16 = (int)MFC6Data.Scale / 10;
+            MFCData = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas1"];
+            int delta1 = (int)MFCData.Scale / 10;
             for (int i = 0; i < 10; i++)
             {
-                MFC6VerificationPoints.Add(delta16 + delta16 * i);
+                MFCVerificationPoints.Add(delta1 + delta1 * i);
             }
 
-            var MFC7Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas7"];
-            int delta17 = (int)MFC7Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC7VerificationPoints.Add(delta17 + delta17 * i);
-            }
-
-            var MFC8Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas8"];
-            int delta18 = (int)MFC8Data.Scale / 10;
-            for (int i = 0; i < 10; i++)
-            {
-                MFC8VerificationPoints.Add(delta18 + delta18 * i);
-            }
+          
         }
 
         #region 命令方法
         private void OnStartOnePointVerification(object obj)
         {
-            //string gasName = oj1.ToString();
-            //float.TryParse(oj2.ToString(), out float flow);
-            //int.TryParse(oj3.ToString(), out int flowCount);
             var values = (object[])obj;
             string gasName = values[0].ToString();
             float flow = float.Parse(values[1].ToString());
-            //float.TryParse(oj2.ToString(), out float flow);
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.MFCVerification}", gasName, flow,1);
         }
 
         private void OnStartTenPointVerification(object obj)
         {
-            //string gasName = oj1.ToString();
-            //float.TryParse(oj2.ToString(), out float flow);
-            //int.TryParse(oj3.ToString(), out int flowCount);
             var values = (object[])obj;
             string gasName = values[0].ToString();
             float flow = float.Parse(values[1].ToString());
-            //float.TryParse(oj2.ToString(), out float flow);
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.MFCVerification}", gasName, flow, 10);
         }
+
+        public void OnAbort()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
+        }
+        private void OnSelectGas()
+        {
+            MFCVerificationPoints.Clear();
+            MFCData = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas{(GasSelectedIndex+1).ToString()}"];
+            int delta1 = (int)MFCData.Scale / 10;
+            for (int i = 0; i < 10; i++)
+            {
+                MFCVerificationPoints.Add(delta1 + delta1 * i);
+            }
+            PointsSelectedIndex = 0;
+        }
         #endregion
 
         #region 私有方法

+ 12 - 11
Venus/Venus_MainPages/ViewModels/PartialPressureViewModel.cs

@@ -13,6 +13,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_Core;
+//using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_Unity;
 
@@ -188,20 +189,20 @@ namespace Venus_MainPages.ViewModels
 
         #region 私有方法
         private void Timer_Tick(object sender, EventArgs e)
-        {          
+        {
+            CurrentLineSeries.Clear();
 
-            var counter= (int)QueryDataClient.Instance.Service.GetData($"{ModuleName}.PartialPressureCounter");
-            if (counter >=2 && counter<=11 && counter>CurrentLineSeries.Count+1)
+            var values = QueryDataClient.Instance.Service.GetData($"{ModuleName}.PartialPressureResult").ToString();
+            values.Split(',').ToList().ForEach(x =>
             {
-                var pressureValue = Convert.ToDouble(QueryDataClient.Instance.Service.GetData($"{ModuleName}.ProcessPressureLow.Value"));
-                CurrentLineSeries.Add(pressureValue);
-                //m_partialPressureResult.ValuePairs.Add($"{(counter-1) * 10}%", pressureValue);
-                m_partialPressureResult.ValuePairs.Add(new Value() { Flow = GasFlows[counter - 1].ToString(), Pressure = Math.Round(pressureValue,3) });
-            }
-            if (counter == 11)
+                if (x != "")
+                {
+                    CurrentLineSeries.Add(Math.Round(Convert.ToDouble(x), 3));
+                }
+            });
+
+            if (CurrentLineSeries.Count == 10)
             {
-                m_partialPressureResult.EndTime = DateTime.Now.ToString();
-                //m_partialPressureResult.Result = "Success";
                 timer.Stop();
             }
         }

+ 26 - 16
Venus/Venus_MainPages/ViewModels/VATPerformanceViewModel.cs

@@ -91,7 +91,7 @@ namespace Venus_MainPages.ViewModels
         {
             OnSelectGas();
             GasTime = 60;
-            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Interval = TimeSpan.FromSeconds(2);
             timer.Tick += Timer_Tick;
             
         }
@@ -104,9 +104,15 @@ namespace Venus_MainPages.ViewModels
            var xishu= Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas{(GasSelectedIndex + 1).ToString()}.MfcScaleFactor"));
            GasFlow = (int)(value * xishu) / 2;
         }
-
+        public enum CMPressure
+        {
+            CM1,
+            CM2,
+        }
+        private CMPressure currentCMPressure = CMPressure.CM1;
         private void OnStart()
         {
+            currentCMPressure = CMPressure.CM1;
             m_VATPerformanceResult = new VATPerformanceResult();
             m_VATPerformanceResult.StartTime = DateTime.Now.ToString();
             m_VATPerformanceResult.FlowTime = GasTime;
@@ -125,7 +131,7 @@ namespace Venus_MainPages.ViewModels
             //}
             OpenFileDialog dialog = new OpenFileDialog();
             dialog.Filter = ".json|*.json";
-            dialog.InitialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "VATPerformanceResult");
+            dialog.InitialDirectory = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "VATPerformanceResult");
             if (dialog.ShowDialog() == true)
             {
                 string SelectedPath = dialog.FileName;
@@ -133,15 +139,13 @@ namespace Venus_MainPages.ViewModels
                 ReferenceLineSeries.Clear();
              
                 value.ValuePairs.ForEach(x =>
-                {
-                
+                {              
                     ReferenceLineSeries.Add(x);
                 });
             }
             else
             {
                 ReferenceLineSeries.Clear();
-                //ReferenceLineSeries.Insert(20, 0);
                 ReferenceLineSeries.Add(0);
             }
         }
@@ -157,21 +161,27 @@ namespace Venus_MainPages.ViewModels
         }
         #endregion
 
+
+       
         #region 私有方法
-        private void Timer_Tick(object sender, EventArgs e)
+        private  void Timer_Tick(object sender, EventArgs e)
         {
-            var counter = (int)QueryDataClient.Instance.Service.GetData($"{ModuleName}.VATPerformanceCounter");
-            if (counter > CurrentLineSeries.Count + 1)
+            CurrentLineSeries.Clear();
+
+            var values = QueryDataClient.Instance.Service.GetData($"{ModuleName}.VATPerformanceResult").ToString();
+            values.Split(',').ToList().ForEach(x => 
             {
-                var pressureValue = Convert.ToDouble(QueryDataClient.Instance.Service.GetData($"{ModuleName}.ProcessPressureLow.Value"));
-                var value = Math.Round(GasFlow / pressureValue,3);
-                CurrentLineSeries.Add(value);
-                m_VATPerformanceResult.ValuePairs.Add(value);
-            }
-            if (counter == 21)
+                if (x != "")
+                {
+                    CurrentLineSeries.Add(Math.Round( Convert.ToDouble(x),3));
+                }
+            });
+
+            if (CurrentLineSeries.Count == 20)
             {
-                m_VATPerformanceResult.EndTime= DateTime.Now.ToString();
+                timer.Stop();
             }
+              
         }
         #endregion
     }

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

@@ -503,8 +503,8 @@
                 <TextBlock Grid.Row="17" Grid.Column="1"/>
                 
             </Grid>
-            <Button    Foreground="White"  FontWeight="Bold"   Content="Leak Check"       Width="120" Height="25" Canvas.Left="480" Canvas.Top="40" Command="{Binding CheckCommand}"/>
-            <Button    Foreground="White"  FontWeight="Bold"   Content="Gas Pump Purge"   Width="120" Height="25" Canvas.Left="480" Canvas.Top="90" />
+            <Button    Foreground="White"  FontWeight="Bold"   Content="Leak Check"       Width="120" Height="25" Canvas.Left="480" Canvas.Top="40"   Command="{Binding CheckCommand}"/>
+            <Button    Foreground="White"  FontWeight="Bold"   Content="Gas Pump Purge"   Width="120" Height="25" Canvas.Left="480" Canvas.Top="90"   Command="{Binding GasPurgeCommand}"/>
             <Button    Foreground="White"  FontWeight="Bold"    Content="Abort"            Width="120" Height="25" Canvas.Left="480" Canvas.Top="140" Command="{Binding AbortCommand}"/>
 
             <TextBlock Canvas.Left="80" Canvas.Top="460" Text="Leak Check Result" FontSize="15" FontWeight="Bold"/>

+ 80 - 852
Venus/Venus_MainPages/Views/MFCVerificationView.xaml

@@ -11,7 +11,7 @@
              xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
              mc:Ignorable="d" 
              xmlns:converters="clr-namespace:Venus_MainPages.Converters"
-             d:DesignHeight="1450" d:DesignWidth="800">
+             d:DesignHeight="1450" d:DesignWidth="1400">
     <UserControl.Resources>
         <converters:MultiBindingConverter x:Key="MultiBindingConverter"/>
     </UserControl.Resources>
@@ -23,702 +23,100 @@
                 <RowDefinition Height="Auto"/>
                 <RowDefinition Height="Auto"/>
             </Grid.RowDefinitions>
-            <TabControl Style="{x:Null}">
-                <TabItem Header="MFC1" x:Name="tabMFC1">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC1IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1350" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC1Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC1BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC1Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC1Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC1VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Command="{Binding StartOnePointVerificationCommand}"  Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <Button.CommandParameter>
-                                                <MultiBinding Converter="{StaticResource MultiBindingConverter}">
-                                                    <Binding ElementName="tabMFC1" Path="Header"/>
-                                                    <Binding ElementName="cbMFC1Setpoint" Path="Text"/>
-                                                </MultiBinding>
-                                            </Button.CommandParameter>
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC1, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC1Setpoint, Path=Text}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC1, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC1Setpoint, Path=SelectedItem}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
+            <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC1IsEnable}">
 
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1350" HorizontalAlignment="Left">
+                    <StackPanel Orientation="Horizontal" Height="30">
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
+                            <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC1Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC1VerificationData}" x:Name="verificationDataGridMFC1" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC2" x:Name="tabMFC2">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC2IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC2Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC2BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC2Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC2Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC2VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC2, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC2Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC2, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC2Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC1BackGround}" Padding="5,1">
+                            <ComboBox Width="120" HorizontalAlignment="Left" Name="cb" SelectedIndex="{Binding GasSelectedIndex}">
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="SelectionChanged">
+                                        <i:InvokeCommandAction Command="{Binding SelectGasCommand}"
+                                   CommandParameter="4"/>
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
+                                <ComboBoxItem>MFC1</ComboBoxItem>
+                                <ComboBoxItem>MFC2</ComboBoxItem>
+                                <ComboBoxItem>MFC3</ComboBoxItem>
+                                <ComboBoxItem>MFC4</ComboBoxItem>
+                                <ComboBoxItem>MFC5</ComboBoxItem>
+                                <ComboBoxItem>MFC6</ComboBoxItem>
+                                <ComboBoxItem>MFC7</ComboBoxItem>
+                                <ComboBoxItem>MFC8</ComboBoxItem>
+                            </ComboBox>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC2VerificationData}" x:Name="verificationDataGridMFC2" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC3" x:Name="tabMFC3">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC3IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC3Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC3BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC3Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC3Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC3VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC3, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC3Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC3, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC3Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
+                            <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC1Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC3VerificationData}" x:Name="verificationDataGridMFC3" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC4" x:Name="tabMFC4">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC4IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC4Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC4BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC4Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC4Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC4VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC4, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC4Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC4, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC4Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC1BackGround}" Padding="5,1">
+                            <TextBlock Text="{Binding MFCData.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC4VerificationData}" x:Name="verificationDataGridMFC4" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC5" x:Name="tabMFC5">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC5IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC5Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC5BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC5Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC5Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC5VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
+                            <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC5VerificationData}" x:Name="verificationDataGridMFC5" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC6" x:Name="tabMFC6">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC5IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC5Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC5BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC6Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC6Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC6VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
+                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
+                            <ComboBox x:Name="cbMFC1Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFCVerificationPoints}"  SelectedIndex="{Binding PointsSelectedIndex}" VerticalAlignment="Center" >
+                                <ComboBox.Resources>
+                                    <Style TargetType="ComboBoxItem">
+                                        <Setter Property="Width" Value="150" />
+                                    </Style>
+                                </ComboBox.Resources>
+                            </ComboBox>
                         </Border>
+                        <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
+                            <StackPanel Orientation="Horizontal">
+                                <Button Command="{Binding StartOnePointVerificationCommand}"  Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
+                                    <Button.CommandParameter>
+                                        <MultiBinding Converter="{StaticResource MultiBindingConverter}">
+                                            <Binding ElementName="cb" Path="Text"/>
+                                            <Binding ElementName="cbMFC1Setpoint" Path="Text"/>
+                                        </MultiBinding>
+                                    </Button.CommandParameter>
+                                </Button>
+                                <Button Command="{Binding StartTenPointVerificationCommand}" Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
+                                    <Button.CommandParameter>
+                                        <MultiBinding Converter="{StaticResource MultiBindingConverter}">
+                                            <Binding ElementName="cb" Path="Text"/>
+                                            <Binding ElementName="cbMFC1Setpoint" Path="Text"/>
+                                        </MultiBinding>
+                                    </Button.CommandParameter>
+                                </Button>
+
+                                <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" Command="{Binding AbortCommand}"/>
 
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC5VerificationData}" x:Name="verificationDataGridMFC6" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC7" x:Name="tabMFC7">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC5IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC5Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC5BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC7Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox x:Name="cbMFC7Setpoint" IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC7VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                    </StackPanel>
-                                </Border>
                             </StackPanel>
                         </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC5VerificationData}" x:Name="verificationDataGridMFC7" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
-
-                            </DataGrid.Columns>
-                        </DataGrid>
                     </StackPanel>
-                </TabItem>
-                <TabItem Header="MFC8" x:Name="tabMFC8">
-                    <StackPanel Height="478" Width="1500" HorizontalAlignment="Left" IsEnabled="{Binding MFC5IsEnable}">
-                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="1200" HorizontalAlignment="Left">
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Gas Name" Width="85" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Background="{Binding MFC5Background}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{Binding MFC5BackGround}" Padding="5,1">
-                                    <TextBlock Text="{Binding MFC8Data.DisplayName}" Width="200" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}"  Padding="5,1">
-                                    <TextBlock Text="Setpoint(sccm)" Width="100" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center"/>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <ComboBox IsEditable="True" Height="25" Width="150" ItemsSource="{Binding MFC8VerificationPoints}"  SelectedIndex="0" VerticalAlignment="Center" >
-                                        <ComboBox.Resources>
-                                            <Style TargetType="ComboBoxItem">
-                                                <Setter Property="Width" Value="150" />
-                                            </Style>
-                                        </ComboBox.Resources>
-                                    </ComboBox>
-                                </Border>
-                                <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Button Content="Start One Point" Width="150" Height="25" FontSize="14" Margin="20,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="1" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-                                        <Button Content="Start Ten Points" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" IsEnabled="{Binding IsVerificationButtonEnable}">
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="StartVerification">
-                                                        <cal:Parameter Value="{Binding ElementName=tabMFC5, Path=Header}" />
-                                                        <cal:Parameter Value="{Binding ElementName=cbMFC5Setpoint, Path=SelectedValue}" />
-                                                        <cal:Parameter Value="10" />
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
-
-                                        <Button Content="Abort" Width="150" Height="25" FontSize="14" Margin="30,0,0,0" >
-                                            <!--<i:Interaction.Triggers>
-                                                <i:EventTrigger EventName="Click">
-                                                    <cal:ActionMessage MethodName="Abort">
-                                                    </cal:ActionMessage>
-                                                </i:EventTrigger>
-                                            </i:Interaction.Triggers>-->
-                                        </Button>
+                </Border>
 
-                                    </StackPanel>
-                                </Border>
-                            </StackPanel>
-                        </Border>
-
-                        <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
-                        <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
+                <Label Content="Verification Data:" Foreground="Black" Height="25" VerticalAlignment="Center"/>
+                <DataGrid Grid.Row="3" AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
                                   VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Center"
-                                  ItemsSource="{Binding MFC5VerificationData}" x:Name="verificationDataGridMFC8" Height="308">
-                            <DataGrid.Columns>
-                                <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
+                                  ItemsSource="{Binding MFC1VerificationData}" x:Name="verificationDataGridMFC1" Height="308">
+                    <DataGrid.Columns>
+                        <DataGridTemplateColumn Header="Setpoint (sccm)" Width="400">
+                            <DataGridTemplateColumn.CellTemplate>
+                                <DataTemplate>
+                                    <TextBlock Text="{Binding Path=Setpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
+                                </DataTemplate>
+                            </DataGridTemplateColumn.CellTemplate>
+                        </DataGridTemplateColumn>
 
-                                <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
-                                    <DataGridTemplateColumn.CellTemplate>
-                                        <DataTemplate>
-                                            <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
-                                        </DataTemplate>
-                                    </DataGridTemplateColumn.CellTemplate>
-                                </DataGridTemplateColumn>
+                        <DataGridTemplateColumn Header="Calculate Flow (sccm)" Width="400">
+                            <DataGridTemplateColumn.CellTemplate>
+                                <DataTemplate>
+                                    <TextBlock Text="{Binding Path=CalculateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:F1}}" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
+                                </DataTemplate>
+                            </DataGridTemplateColumn.CellTemplate>
+                        </DataGridTemplateColumn>
+
+                    </DataGrid.Columns>
+                </DataGrid>
+            </StackPanel>
 
-                            </DataGrid.Columns>
-                        </DataGrid>
-                    </StackPanel>
-                </TabItem>
-            </TabControl>
             <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Content}" Width="800" HorizontalAlignment="Left">
                 <StackPanel Orientation="Horizontal">
                     <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
@@ -1103,175 +501,5 @@
                 </DataGrid>
             </ScrollViewer>
         </Grid>
-
-        <Grid Visibility="{Binding MFCQueryVisibility}" Margin="0,10,0,0">
-            <Grid.RowDefinitions>
-                <RowDefinition></RowDefinition>
-                <RowDefinition Height="30"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition></ColumnDefinition>
-                <ColumnDefinition></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-
-            <Grid Width="1545" Grid.Column="0">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="86*"/>
-                    <ColumnDefinition Width="7*"/>
-                    <ColumnDefinition Width="216*"/>
-                </Grid.ColumnDefinitions>
-                <!--<sciChart:SciChartSurface Name="sciChart" RenderableSeries="{Binding SelectedData}" 
-                                      sciChart:ThemeManager.Theme="ExpressionLight"
-                                      Padding="0,0,0,0" 
-                                      DebugWhyDoesntSciChartRender="False" BorderBrush="Gray" Focusable="False" IsTabStop="False" Margin="5,0,0,0" Visibility="Hidden" Grid.ColumnSpan="3">
-                    <sciChart:SciChartSurface.Resources>
-                        --><!-- This is the style for the control that hosts the Axis Label --><!--
-                        <Style x:Key="CursorModAxisLabelStyle" TargetType="sciChart:AxisLabelControl">
-                            <Setter Property="Background" Value="#AAFF6600" />
-                            <Setter Property="BorderBrush" Value="#FFFF6600" />
-                            <Setter Property="BorderThickness" Value="1" />
-                            <Setter Property="Foreground" Value="White" />
-                            <Setter Property="FontSize" Value="25" />
-                        </Style>
-
-                        <Style x:Key="CursorTooltipStyle" TargetType="sciChart:CursorLabelControl">
-                            <Setter Property="Template">
-                                <Setter.Value>
-                                    <ControlTemplate TargetType="sciChart:CursorLabelControl">
-                                        <Border Background="#AAFF6600"
-                                            BorderBrush="#FFFF6600"
-                                            BorderThickness="2"
-                                            Opacity="0.7"
-                                            Padding="2.5">
-                                            --><!--<ItemsControl ItemsSource="{Binding DataContext.SeriesData.SeriesInfo, RelativeSource={RelativeSource TemplatedParent}}">
-                                            <ItemsControl.ItemTemplate>
-                                                <DataTemplate DataType="s:SeriesInfo">
-                                                    <ContentControl Content="{Binding}" ContentTemplate="{Binding Path=RenderableSeries.(s:CursorModifier.TooltipTemplate)}" />
-                                                </DataTemplate>
-                                            </ItemsControl.ItemTemplate>
-                                        </ItemsControl>--><!--
-                                        </Border>
-                                    </ControlTemplate>
-                                </Setter.Value>
-                            </Setter>
-                        </Style>
-                    </sciChart:SciChartSurface.Resources>
-
-                    <sciChart:SciChartSurface.XAxis>
-                        <sciChart:NumericAxis DrawMinorTicks="True" 
-                                          DrawMinorGridLines="True"
-                                          sciChart:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}" 
-                                          AxisAlignment="Bottom"
-                                              AutoRange="{Binding AutoRangeX}"
-                                              VisibleRange="{Binding XValueRange, Mode=TwoWay}"
-                                          Id="DefaultAxisId">
-                            <sciChart:NumericAxis.GrowBy>
-                                <sciChart:DoubleRange Min="0.1" Max="0.1"/>
-                            </sciChart:NumericAxis.GrowBy>
-                        </sciChart:NumericAxis>
-                    </sciChart:SciChartSurface.XAxis>
-
-                    --><!-- Create a Y Axis --><!--
-                    <sciChart:SciChartSurface.YAxis>
-                        <sciChart:NumericAxis DrawMinorTicks="True" 
-                                          DrawMinorGridLines="True" 
-                                          AxisAlignment="Left"
-                                              AutoRange="{Binding AutoRangeY}"
-                                              VisibleRange="{Binding YValueRange, Mode=TwoWay}"
-                                          Id="DefaultAxisId">
-                            <sciChart:NumericAxis.GrowBy>
-                                <sciChart:DoubleRange Min="0.1" Max="0.1"/>
-                            </sciChart:NumericAxis.GrowBy>
-                        </sciChart:NumericAxis>
-                    </sciChart:SciChartSurface.YAxis>
-
-                    <sciChart:SciChartSurface.ChartModifier>
-                        <sciChart:ModifierGroup ExecuteOn="MouseDoubleClick">
-                            <sciChart:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" 
-                                                           IsXAxisOnly="False" 
-                                                           ZoomExtentsY="False" 
-                                                           IsAnimated="True" ExecuteOn="MouseLeftButton" ReceiveHandledEvents="True" />
-                            <sciChart:SeriesSelectionModifier ExecuteOn="MouseLeftButton" ReceiveHandledEvents="True">
-                                <sciChart:SeriesSelectionModifier.SelectedSeriesStyle>
-                                    <Style TargetType="sciChart:BaseRenderableSeries">
-                                        <Setter Property="Stroke" Value="Red"/>
-                                        <Setter Property="StrokeThickness" Value="3"/>
-                                        <Setter Property="PointMarkerTemplate">
-                                            <Setter.Value>
-                                                <ControlTemplate>
-                                                    <sciChart:EllipsePointMarker Width="7" Height="7" Fill="#FF00DC" Stroke="White"/>
-                                                </ControlTemplate>
-                                            </Setter.Value>
-                                        </Setter>
-                                    </Style>
-
-                                </sciChart:SeriesSelectionModifier.SelectedSeriesStyle>
-                            </sciChart:SeriesSelectionModifier>
-
-                            <sciChart:ZoomExtentsModifier x:Name="zoomExtentsModifier"  XyDirection="XYDirection" ReceiveHandledEvents="True" ExecuteOn="MouseDoubleClick"/>
-
-                            <sciChart:CursorModifier IsEnabled="True"  ShowTooltipOn="MouseOver"  
-                                                 ShowAxisLabels="True"  SourceMode="AllSeries"
-                                                 ShowTooltip="False" />
-
-                            --><!--自由平移--><!--
-                            <sciChart:ZoomPanModifier x:Name="zoomPanModifier" ReceiveHandledEvents="True" IsEnabled="True"  ClipModeX="None" XyDirection="XYDirection" ExecuteOn="MouseRightButton" ZoomExtentsY="False" />
-
-                            <sciChart:LegendModifier ShowLegend="False" Orientation="Horizontal" Margin="10" HorizontalAlignment="Right" 
-                                      LegendPlacement="Inside"  GetLegendDataFor="AllSeries"
-                                      ShowVisibilityCheckboxes="False"/>
-
-                            <sciChart:RolloverModifier x:Name="rolloverModifier" 
-                                                   UseInterpolation="False" FontSize="9" IsEnabled="True" 
-                                                   DrawVerticalLine="False" FontFamily="Arial,SimSun" 
-                                                   SnapsToDevicePixels="False"                                             
-                                                  ShowAxisLabels="False" />
-
-                            <sciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" XyDirection="XDirection"/>
-
-                        </sciChart:ModifierGroup>
-
-                    </sciChart:SciChartSurface.ChartModifier>
-                </sciChart:SciChartSurface>-->
-            </Grid>
-
-            <DataGrid  Grid.Column="1" Margin="1,0,0,0" Visibility="Collapsed" Width="1000"
-                  AlternationCount="2" ColumnHeaderHeight="30" 
-                  ItemsSource="{Binding CalibrationErrorRate}" AutoGenerateColumns="False" 
-                  CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="12">
-                <DataGrid.Columns>
-                    <DataGridTemplateColumn Header="Setpoint(sccm)" MinWidth="120">
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding Setpoint}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" />
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
-                    <DataGridTemplateColumn Header="Calc Flow(sccm)" MinWidth="120">
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding CalculateValue}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" />
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
-                    <DataGridTemplateColumn Header="Error Rate(%)" MinWidth="120">
-                        <DataGridTemplateColumn.CellTemplate>
-                            <DataTemplate>
-                                <TextBlock Text="{Binding ErrorRate}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" />
-                            </DataTemplate>
-                        </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
-
-                </DataGrid.Columns>
-            </DataGrid>
-
-            <Button Content="Back" Grid.Row="1" Width="50" Margin="477,5,214,3" Visibility="Hidden">
-                <!--<i:Interaction.Triggers>
-                    <i:EventTrigger EventName="Click">
-                        <cal:ActionMessage MethodName="Back"/>
-                    </i:EventTrigger>
-                </i:Interaction.Triggers>-->
-            </Button>
-        </Grid>
     </Grid>
 </UserControl>

+ 45 - 0
Venus/Venus_RT/Config/DBModel.sql

@@ -231,6 +231,51 @@ begin
     end if; 
  ------------------------------------------------------------------------------------------------
  --
+ if not exists(select * from information_schema.tables  
+				where  
+				table_catalog = CURRENT_CATALOG and table_schema = CURRENT_SCHEMA 
+				and table_name = 'mfc_verification_data') then 
+ 
+					CREATE TABLE mfc_verification_data
+					(
+					    "module" text,
+						"name" text,
+						"operate_time" timestamp without time zone,
+						"percent10_setpoint" real,
+						"percent10_calculate" real,
+						"percent20_setpoint" real,
+						"percent20_calculate" real,
+						"percent30_setpoint" real,
+						"percent30_calculate" real,
+						"percent40_setpoint" real,
+						"percent40_calculate" real,
+						"percent50_setpoint" real,
+						"percent50_calculate" real,
+						"percent60_setpoint" real,
+						"percent60_calculate" real,
+						"percent70_setpoint" real,
+						"percent70_calculate" real,
+						"percent80_setpoint" real,
+						"percent80_calculate" real,
+						"percent90_setpoint" real,
+						"percent90_calculate" real,
+						"percent100_setpoint" real,
+						"percent100_calculate" real,
+						"setpoint" real,
+						"calculate" real,
+
+					  CONSTRAINT "mfc_verification_data_pkey" PRIMARY KEY ("operate_time" )
+					)
+					WITH (
+					  OIDS=FALSE
+					);
+					ALTER TABLE "mfc_verification_data"
+					OWNER TO postgres;
+					GRANT SELECT ON TABLE "mfc_verification_data" TO postgres;
+ 
+    end if; 
+ ------------------------------------------------------------------------------------------------
+ --
     if not exists(select * from information_schema.tables  
         where  
             table_catalog = CURRENT_CATALOG and table_schema = CURRENT_SCHEMA 

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

@@ -139,6 +139,9 @@ namespace Venus_RT.Devices
         public bool IsMfc6ValveOpened => _Mfc6Valve.Status;
         public bool IsMfc7ValveOpened => _Mfc7Valve.Status;
         public bool IsMfc8ValveOpened => _Mfc8Valve.Status;
+
+        public bool IsGuageValveOpened => _GuageValve.Status;
+
         // 压力信号
         public bool IsATM => _ATM_sw.Value;
 
@@ -159,6 +162,7 @@ namespace Venus_RT.Devices
         public bool SlitDoorClosed => _PM_SlitDoor_Closed.Value;
 
         public double ProcessLowPressure => _pressureController.ProcessLow.Value;
+        public double ProcessHighPressure => _pressureController.ProcessHigh.Value;
         public double ProcessPressure => _pressureController.ProcessGauge.Value;
         public override double ChamberPressure => _pressureController.PressureGauge.Value;
         public double ForelinePressure => _pressureController.ForelineGauge.Value;

+ 9 - 2
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -376,7 +376,7 @@ namespace Venus_RT.Modules.PMs
             _processRoutine         = new PMProcessRoutine(_chamber, _pumpRoutine);
             _gasFlowRoutine         = new GasFlowRoutine(_chamber);
             _rfPowerRoutine         = new RFPowerSwitchRoutine(_chamber, true);
-            _gasVerificationRoutine = new PMGasVerificationRoutine(_chamber);
+            _gasVerificationRoutine = new PMGasVerificationRoutine(_chamber, _pumpRoutine);
             _pmPartialPressureRoutine=new PMPartialPressureRoutine(_chamber);
             _pmVATPerformanceRoutine = new PMVATPerformanceRoutine(_chamber);
 
@@ -588,6 +588,11 @@ namespace Venus_RT.Modules.PMs
             DATA.Subscribe($"{Module}.LoadLockPurge.PurgeCounter", () => _purgeLoadLockRoutine.PurgeCounter);
             DATA.Subscribe($"{Module}.PartialPressureCounter", () => _pmPartialPressureRoutine.counter);
             DATA.Subscribe($"{Module}.VATPerformanceCounter",  () => _pmVATPerformanceRoutine.counter);
+            DATA.Subscribe($"{Module}.VATPerformanceResult", () => _pmVATPerformanceRoutine?.m_sb.ToString());
+
+            DATA.Subscribe($"{Module}.PartialPressureResult", () => _pmPartialPressureRoutine?.m_sb.ToString());
+
+
 
             DATA.Subscribe($"{Module}.IsIdle", () => IsIdle);
             DATA.Subscribe($"{Module}.IsAlarm", () => IsError);
@@ -595,7 +600,6 @@ namespace Venus_RT.Modules.PMs
             DATA.Subscribe($"{Module}.IsInit", () => IsInit);
 
 
-
             OP.Subscribe($"{Module}.{RtOperation.GasFlow}", (cmd, args) => CheckToPostMessage((int)MSG.GasFlow, args));
             OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck, args));
             OP.Subscribe($"{Module}.{RtOperation.GasLeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.GasLeakCheck, args));
@@ -623,6 +627,9 @@ namespace Venus_RT.Modules.PMs
             OP.Subscribe($"{Module}.PartialPressureTest", (cmd, args) => CheckToPostMessage((int)MSG.PartialPressure, args[0], args[1]));
             OP.Subscribe($"{Module}.VATPerformanceTest", (cmd, args) => CheckToPostMessage((int)MSG.VATPerformance, args[0], args[1], args[2]));
 
+            OP.Subscribe($"{Module}.GasLinePurge", (cmd, args) => CheckToPostMessage((int)MSG.GasLinePurge));
+
+
 
 
 

+ 40 - 8
Venus/Venus_RT/Modules/PMs/PMGasVerificationRoutine.cs

@@ -58,9 +58,12 @@ namespace Venus_RT.Modules.PMs
 
         private double _maxDeviation;
 
-        public PMGasVerificationRoutine(JetPM chamber) : base(chamber)
+        private readonly PumpDownRoutine _pumpDownRoutine;
+
+        public PMGasVerificationRoutine(JetPM chamber,PumpDownRoutine pdRoutine) : base(chamber)
         {
             Name = "Gas Verification";
+            _pumpDownRoutine = pdRoutine;
         }
 
         internal void Init(string mfc, double flow, int flowCount)
@@ -154,7 +157,7 @@ namespace Venus_RT.Modules.PMs
                 .LoopRun((int)GasStep.kGasFlow,         FlowGas,            CheckGasStable)
                 .LoopDelay((int)GasStep.kDelay_1,       _holdTime * 1000)
                 .LoopRun((int)GasStep.kGasVerification, CalcMfcCalibration, _delay_2s)
-                .LoopEnd((int)GasStep.kStopGasFlow,     StopGasFlow,        _delay_50ms)
+                .LoopEnd((int)GasStep.kStopGasFlow,     StopGasFlow,    IsPumpDownOK)
                 .End((int)GasStep.kEnd,                 NullFun,            _delay_2s);
 
             return Runner.Status;
@@ -228,10 +231,11 @@ namespace Venus_RT.Modules.PMs
         {
             if (_verificationDeviceTimer.GetElapseTime() > _flowTime * 1000)
             {
+                GetBeginPressure();
+                System.Threading.Thread.Sleep(1000);
                 if (!_chamber.SetPVPostion(0))
                     Runner.Stop("Stop Pendulum Valve failed.");
 
-                GetBeginPressure();
                 return true;
             }
 
@@ -241,12 +245,15 @@ namespace Venus_RT.Modules.PMs
             //    Runner.Stop($"");
             //    return true;
             //}
-
-            if(Math.Abs(_mfcDevice.SetPoint - _mfcDevice.FeedBack) / _mfcDevice.SetPoint > _flowStableTolerance)
+            if (_verificationDeviceTimer.GetElapseTime() > 3000)
             {
-                Runner.Stop($"Gas is not Stable");
-                return true;
+                if (Math.Abs(_mfcDevice.SetPoint - _mfcDevice.FeedBack) / _mfcDevice.SetPoint > _flowStableTolerance)
+                {
+                    Runner.Stop($"Gas is not Stable");
+                    return true;
+                }
             }
+           
   
             return false;
         }
@@ -305,8 +312,33 @@ namespace Venus_RT.Modules.PMs
             }
 
             OpenPVNVlv(_mfcIndex, false);
+            //_chamber.SetPVPostion(1000);
+            //_chamber.OpenValve(ValveType.Guage, true);
+            //_chamber.OpenValve(ValveType.TurboPumpPurge, true);
 
-            return true;
+            _chamber.OpenValve(ValveType.TurboPumpPumping, false);
+            _chamber.OpenValve(ValveType.FastPump, true);
+
+
+           return _pumpDownRoutine.Start(_basePressure) == RState.Running;
+
+           // return true;
+        }
+
+        private bool IsPumpDownOK()
+        {
+            var status = _pumpDownRoutine.Monitor();
+            if (status == RState.End)
+            {
+                return true;
+            }
+            else if (status == RState.Failed || status == RState.Timeout)
+            {
+                Runner.Stop($"Pump down to {_basePressure} failed.");
+                return true;
+            }
+
+            return false;
         }
     }
 }

+ 16 - 1
Venus/Venus_RT/Modules/PMs/PMPartialPressureRoutine.cs

@@ -7,6 +7,7 @@ using System.Text;
 using System.Threading.Tasks;
 using Venus_Core;
 using Venus_RT.Devices;
+using Venus_Unity;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -17,6 +18,9 @@ namespace Venus_RT.Modules.PMs
         public int counter;
         int gasTime;
         ValveType[] valveTypes = new ValveType[4] { ValveType.PV11, ValveType.PV21, ValveType.PV31, ValveType.PV41 };
+        public PartialPressureResult m_PartialPressureResult=new PartialPressureResult ();
+        public StringBuilder m_sb = new StringBuilder();
+
         private enum PartialPressureStep
         {
             kDelay_1s,
@@ -53,6 +57,12 @@ namespace Venus_RT.Modules.PMs
             //_chamber.CloseValves();
             _chamber.SetPVPostion(1000);
 
+            m_PartialPressureResult.StartTime= DateTime.Now.ToString("yyyyMMddHHmm");
+            m_PartialPressureResult.FlowTime = gasTime;
+            m_PartialPressureResult.GasName= $"Gas{gasIndex.ToString()}";
+            m_PartialPressureResult.ValuePairs.Clear();
+            m_sb.Clear();
+
             return Runner.Start(Module, Name);
         }
         public RState Monitor()
@@ -63,6 +73,8 @@ namespace Venus_RT.Modules.PMs
                   .End((int)PartialPressureStep.kEnd, () => 
                   {
                       _chamber.CloseValves();
+                      m_PartialPressureResult.EndTime = DateTime.Now.ToString("yyyyMMddHHmm");
+                      SerializeHelper.Instance.WriteToJsonFile<PartialPressureResult>(m_PartialPressureResult, $"PartialPressureResult/{m_PartialPressureResult.GasName}/{m_PartialPressureResult.StartTime}.json");
                       return true; 
                   }, 500);            
             return Runner.Status;
@@ -81,8 +93,11 @@ namespace Venus_RT.Modules.PMs
 
         private bool ReadChamberPressure()
         {
+            var pressure = Math.Round(_chamber.ProcessLowPressure, 3);
+            m_PartialPressureResult.ValuePairs.Add(new Value() { Flow = (GasMaxScale * 0.1 * counter).ToString(), Pressure = pressure });
+            m_sb.Append(pressure.ToString());
+            m_sb.Append(',');
             counter += 1;
-
             return true;
         }
         public void Abort()

+ 51 - 8
Venus/Venus_RT/Modules/PMs/PMVATPerformanceRoutine.cs

@@ -7,12 +7,18 @@ using System.Text;
 using System.Threading.Tasks;
 using Venus_Core;
 using Venus_RT.Devices;
+using Venus_Unity;
 
 namespace Venus_RT.Modules.PMs
 {
-     class PMVATPerformanceRoutine : PMRoutineBase, IRoutine
+    public enum CMPressure
     {
-
+        CM1,
+        CM2,
+    }
+    class PMVATPerformanceRoutine : PMRoutineBase, IRoutine
+    {
+        public StringBuilder m_sb = new StringBuilder();
         int gasIndex;
         //int GasMaxScale;
         public int counter;
@@ -20,6 +26,8 @@ namespace Venus_RT.Modules.PMs
         int gasSetPoint;
         ValveType[] valveTypes = new ValveType[4] { ValveType.PV11, ValveType.PV21, ValveType.PV31, ValveType.PV41 };
         List<int> Positions = new List<int>() {50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000};
+        public VATPerformanceResult m_VATPerformanceResult;
+        private CMPressure currentCMPressure = CMPressure.CM1;
 
         private enum VATPerformanceStep
         {
@@ -54,25 +62,30 @@ namespace Venus_RT.Modules.PMs
             gasIndex = (int)objs[0];
             gasTime = (int)objs[1];
             gasSetPoint = (int)objs[2];
-            //_chamber.CloseValves();
-            //_chamber.SetPVPostion(25);
-
+            m_VATPerformanceResult = new VATPerformanceResult();
+            m_VATPerformanceResult.StartTime = DateTime.Now.ToString("yyyyMMddHHmm");
+            m_VATPerformanceResult.FlowTime = gasTime;
+            m_VATPerformanceResult.GasName = $"Gas{gasIndex.ToString()}";
+            currentCMPressure = CMPressure.CM1;
+            m_sb.Clear();
             return Runner.Start(Module, Name);
         }
         public RState Monitor()
         {
             Runner.Delay((int)VATPerformanceStep.kDelay_1s, 1000 * 1)
                   .LoopStart((int)VATPerformanceStep.kStartGas, "VAT Performance Test", Positions.Count, () => SetPositionGas(), gasTime)
-                  .LoopEnd((int)VATPerformanceStep.kReadChamberPressure, ReadChamberPressure, _delay_1s)
+                  .LoopEnd((int)VATPerformanceStep.kReadChamberPressure, ReadChamberPressure, 2000)
                   .End((int)VATPerformanceStep.kEnd, () =>
                   {
+                      m_VATPerformanceResult.EndTime=DateTime.Now.ToString("yyyyMMddHHmm");
                       _chamber.CloseValves();
+                      SerializeHelper.Instance.WriteToJsonFile<VATPerformanceResult>(m_VATPerformanceResult, $"VATPerformanceResult/{m_VATPerformanceResult.GasName}/{m_VATPerformanceResult.StartTime}.json");
                       return true;
                   }, 500);
             return Runner.Status;
         }
 
-        private bool SetPositionGas()
+        private  bool SetPositionGas()
         {
             if (!_chamber.SetPVPostion(Positions[counter - 1]))
             { 
@@ -87,9 +100,39 @@ namespace Venus_RT.Modules.PMs
             return true;
         }
 
-        private bool ReadChamberPressure()
+        private  bool ReadChamberPressure()
         {
+            double pressureValue;
+            if (currentCMPressure == CMPressure.CM1)
+            {
+                pressureValue = _chamber.ProcessLowPressure;
+                if (Math.Abs(pressureValue - 100) < 3)
+                {
+                    pressureValue = _chamber.ProcessHighPressure;
+                    currentCMPressure = CMPressure.CM2;
+                }
+            }
+            else
+            {
+                pressureValue = _chamber.ProcessHighPressure;
+                if (pressureValue < 100)
+                {
+                    if (_chamber.IsGuageValveOpened == false)
+                    {
+                        _chamber.OpenValve(ValveType.Guage, true);
+                        System.Threading.Thread.Sleep(3000);
+
+                    }
+                    pressureValue = _chamber.ProcessLowPressure;
+                    currentCMPressure = CMPressure.CM1;
+                }
+            }
+            var value =Math.Round(gasSetPoint / pressureValue,3);
+            m_VATPerformanceResult.ValuePairs.Add(value);
+            m_sb.Append(value.ToString());
+            m_sb.Append(',');
             counter += 1;
+
             return true;
         }
         public void Abort()