Browse Source

1.ui与rt联动功能添加
2.添加recipe选择添加删除功能

# Conflicts:
# Venus/Framework/Common/Log/LOG.cs

lixiang 2 years ago
parent
commit
60d08c1285
31 changed files with 1462 additions and 734 deletions
  1. 1 0
      Venus/Framework/Common/Device/Unit/IoGasValve.cs
  2. 52 9
      Venus/Framework/UICore/DeviceControl/AITSignalTower.xaml
  3. 35 164
      Venus/Framework/UICore/DeviceControl/AITSignalTower.xaml.cs
  4. 82 12
      Venus/RecipeEditorControl/ViewModel/RecipeEditorControlViewModel.cs
  5. 2 1
      Venus/Venus_Core/VenusDevice.cs
  6. 72 0
      Venus/Venus_MainPages/RTData.cs
  7. 2 0
      Venus/Venus_MainPages/Venus_MainPages.csproj
  8. 299 158
      Venus/Venus_MainPages/ViewModels/OverViewModel.cs
  9. 137 16
      Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs
  10. 45 0
      Venus/Venus_MainPages/ViewModels/ProcessViewModel.cs
  11. 6 0
      Venus/Venus_MainPages/ViewModels/TopViewModel.cs
  12. 268 191
      Venus/Venus_MainPages/Views/OverView.xaml
  13. 59 13
      Venus/Venus_MainPages/Views/PlatformView.xaml
  14. 96 90
      Venus/Venus_MainPages/Views/ProcessView.xaml
  15. 20 13
      Venus/Venus_MainPages/Views/TopView.xaml
  16. BIN
      Venus/Venus_RT/Config/DeviceModelVenus.xml
  17. 6 1
      Venus/Venus_RT/Devices/IODevices/IoSignalTower.cs
  18. 48 6
      Venus/Venus_RT/Devices/JetPM.cs
  19. 6 1
      Venus/Venus_RT/Modules/PMs/PMEntity.cs
  20. 33 0
      Venus/Venus_Themes/Converters/ToBoolMultiValueConverter4.cs
  21. 32 0
      Venus/Venus_Themes/Converters/VisibilityToReverse.cs
  22. 1 1
      Venus/Venus_Themes/UserControls/ButterflyValve.xaml
  23. 46 18
      Venus/Venus_Themes/UserControls/Chamber.xaml
  24. 41 5
      Venus/Venus_Themes/UserControls/Chamber.xaml.cs
  25. 3 3
      Venus/Venus_Themes/UserControls/Pump.xaml
  26. 29 29
      Venus/Venus_Themes/UserControls/Pump.xaml.cs
  27. 3 1
      Venus/Venus_Themes/UserControls/TextboxWithLabel.xaml
  28. 15 0
      Venus/Venus_Themes/UserControls/TextboxWithLabel.xaml.cs
  29. 4 2
      Venus/Venus_Themes/UserControls/Turbo.xaml
  30. 17 0
      Venus/Venus_Themes/UserControls/Turbo.xaml.cs
  31. 2 0
      Venus/Venus_Themes/Venus_Themes.csproj

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

@@ -123,6 +123,7 @@ namespace Aitex.Core.RT.Device.Unit
         public bool Initialize()
         {
             DATA.Subscribe($"{Module}.{GVName}", () => DeviceData);
+            DATA.Subscribe($"{Module}.{GVName}.IsOpen", () => Status);
             //DATA.Subscribe($"{_uniqueName}.DeviceData", () => DeviceData);
 
             OP.Subscribe($"{_uniqueName}.{AITValveOperation.GVTurnValve}", InvokeOpenCloseValve);

+ 52 - 9
Venus/Framework/UICore/DeviceControl/AITSignalTower.xaml

@@ -4,7 +4,7 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              mc:Ignorable="d" 
-             d:DesignHeight="105" d:DesignWidth="30">
+             d:DesignHeight="105" d:DesignWidth="30" x:Name="signalTower">
     <Grid Height="105" Width="30">
         <Grid.RowDefinitions>
             <RowDefinition Height="20" />
@@ -23,9 +23,18 @@
                                   Opacity="1"  
                         BlurRadius="20"/>
             </Image.Effect>
-
+            <Image.Style>
+                <Style>
+                    <Setter Property="Image.Opacity"  Value="0.4"/>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ElementName=signalTower,Path=IsRedLightOn}"  Value="True">
+                            <Setter Property="Image.Opacity"  Value="1"/>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Image.Style>
         </Image>
-        <Image Grid.Row="1" Canvas.Left="0" Canvas.Top="0" Name="rectangle2" Stretch="Fill" Source="pack://application:,,,/MECF.Framework.Common;component/Resources/yellow.png" Width="30" Height="20" VerticalAlignment="Bottom" PreviewMouseDown="rectangle2_PreviewMouseDown">
+        <Image Grid.Row="1" Canvas.Left="0" Canvas.Top="0" Name="rectangle2" Stretch="Fill" Source="pack://application:,,,/MECF.Framework.Common;component/Resources/yellow.png" Width="30" Height="20" VerticalAlignment="Bottom">
             <Image.Effect>
                 <DropShadowEffect ShadowDepth="0"  
                                   Color="Green"   
@@ -36,6 +45,16 @@
 
                 </BlurEffect>-->
             </Image.Effect>
+            <Image.Style>
+                <Style>
+                    <Setter Property="Image.Opacity"  Value="0.4"/>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ElementName=signalTower,Path=IsYellowLightOn}"  Value="True">
+                            <Setter Property="Image.Opacity"  Value="1"/>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Image.Style>
         </Image>
         <Image Grid.Row="2" Canvas.Left="0" Canvas.Top="0" Name="rectangle3" Stretch="Fill" Source="pack://application:,,,/MECF.Framework.Common;component/Resources/Lime.png" Width="30">
             <Image.Effect>
@@ -48,6 +67,16 @@
 
                 </BlurEffect>-->
             </Image.Effect>
+            <Image.Style>
+                <Style>
+                    <Setter Property="Image.Opacity"  Value="0.4"/>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ElementName=signalTower,Path=IsGreenLightOn}"  Value="True">
+                            <Setter Property="Image.Opacity"  Value="1"/>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Image.Style>
         </Image>
         <Image Grid.Row="3" Canvas.Left="0" Canvas.Top="0" Name="rectangle4" Stretch="Fill" Source="pack://application:,,,/MECF.Framework.Common;component/Resources/Blue.png" Width="30" Height="20" >
             <Image.Effect>
@@ -56,10 +85,17 @@
                                   RenderingBias="Performance"
                                   Opacity="1"  
                                   BlurRadius="20"/>
-                <!--<BlurEffect RenderingBias="Performance" Radius="15" >
-
-                </BlurEffect>-->
             </Image.Effect>
+            <Image.Style>
+                <Style>
+                    <Setter Property="Image.Opacity"  Value="0.4"/>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ElementName=signalTower,Path=IsRedLightOn}"  Value="True">
+                            <Setter Property="Image.Opacity"  Value="1"/>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Image.Style>
         </Image>
         <Image Grid.Row="4" Canvas.Left="0" Canvas.Top="0" Name="rectangle5" Stretch="Fill" Source="pack://application:,,,/MECF.Framework.Common;component/Resources/lights.png" Width="30" Height="25" >
             <Image.Effect>
@@ -68,10 +104,17 @@
                                   RenderingBias="Performance"
                                   Opacity="1"  
                                   BlurRadius="20"/>
-                <!--<BlurEffect RenderingBias="Performance" Radius="15" >
-
-                </BlurEffect>-->
             </Image.Effect>
+            <Image.Style>
+                <Style>
+                    <Setter Property="Image.Opacity"  Value="0.4"/>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ElementName=signalTower,Path=IsBluzzerLightOn}"  Value="True">
+                            <Setter Property="Image.Opacity"  Value="1"/>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Image.Style>
         </Image>
     </Grid>
 </UserControl>

+ 35 - 164
Venus/Framework/UICore/DeviceControl/AITSignalTower.xaml.cs

@@ -1,191 +1,62 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using Aitex.Core.Common.DeviceData;
-using Aitex.Core.UI.ControlDataContext;
 
 namespace Aitex.Core.UI.DeviceControl
 {
     public partial class AITSignalTower : UserControl
     {
-        public static readonly DependencyProperty DeviceDataProperty = DependencyProperty.Register(
-                                     "DeviceData", typeof(AITSignalTowerData), typeof(AITSignalTower),
-                                     new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
 
-        public static readonly DependencyProperty BuzzingWarningConfigCommandProperty = DependencyProperty.Register(
-            "BuzzingWarningConfigCallback", typeof(Action), typeof(AITSignalTower),
-            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.None));
-
-        public Action BuzzingWarningConfigCallback
+        public static readonly DependencyProperty IsRedLightOnProperty = DependencyProperty.Register(
+        "IsRedLightOn", typeof(bool), typeof(AITSignalTower),
+        new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsRedLightOn
         {
-            get
-            {
-                return (Action)GetValue(BuzzingWarningConfigCommandProperty);
-            }
-            set
-            {
-                SetValue(BuzzingWarningConfigCommandProperty, value);
-            }
+            get { return (bool)this.GetValue(IsRedLightOnProperty); }
+            set { this.SetValue(IsRedLightOnProperty, value); }
         }
 
-        public AITSignalTowerData DeviceData
+        public static readonly DependencyProperty IsYellowLightOnProperty = DependencyProperty.Register(
+       "IsYellowLightOn", typeof(bool), typeof(AITSignalTower),
+       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsYellowLightOn
         {
-            get
-            {
-                return (AITSignalTowerData)GetValue(DeviceDataProperty);
-            }
-            set
-            {
-                SetValue(DeviceDataProperty, value);
-            }
+            get { return (bool)this.GetValue(IsYellowLightOnProperty); }
+            set { this.SetValue(IsYellowLightOnProperty, value); }
         }
 
-        DropShadowEffect redLightEffect = new DropShadowEffect();
-        DropShadowEffect yellowLightEffect = new DropShadowEffect();
-        DropShadowEffect greenLightEffect = new DropShadowEffect();
-        DropShadowEffect blueLightEffect = new DropShadowEffect();
-        DropShadowEffect buzzerLightEffect = new DropShadowEffect();
-        public double OutLights = 0.2;
-
-        public AITSignalTower()
+        public static readonly DependencyProperty IsGreenLightOnProperty = DependencyProperty.Register(
+      "IsGreenLightOn", typeof(bool), typeof(AITSignalTower),
+      new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsGreenLightOn
         {
-            InitializeComponent();
-            redLightEffect.BlurRadius = 20;
-            redLightEffect.Opacity = 1;
-            redLightEffect.Color = Colors.Red;
-
-            yellowLightEffect.BlurRadius = 20;
-            yellowLightEffect.Opacity = 1;
-            yellowLightEffect.Color = Colors.Yellow;
-
-            greenLightEffect.BlurRadius = 20;
-            greenLightEffect.Opacity = 1;
-            greenLightEffect.Color = Colors.Green;
-
-            blueLightEffect.BlurRadius = 20;
-            blueLightEffect.Opacity = 1;
-            blueLightEffect.Color = Colors.Blue;
-
-            buzzerLightEffect.BlurRadius = 20;
-            buzzerLightEffect.Opacity = 1;
-            buzzerLightEffect.Color = Colors.White;
+            get { return (bool)this.GetValue(IsGreenLightOnProperty); }
+            set { this.SetValue(IsGreenLightOnProperty, value); }
         }
 
-
-
-
-        protected override void OnRender(DrawingContext drawingContext)
+        public static readonly DependencyProperty IsBlueLightOnProperty = DependencyProperty.Register(
+     "IsBlueLightOn", typeof(bool), typeof(AITSignalTower),
+     new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsBlueLightOn
         {
-            base.OnRender(drawingContext);
-
-            if (DeviceData == null)
-                return;
-
-            if (DeviceData.IsRedLightOn)
-            {
-                if (rectangle1.Opacity != 1)
-                {
-                    rectangle1.Opacity = 1;
-                    rectangle1.Effect = redLightEffect;
-                }
-            }
-            else
-            {
-                if (rectangle1.Opacity != OutLights)
-                {
-                    rectangle1.Opacity = OutLights;
-                    rectangle1.Effect = null;
-                }
-            }
-
-            if (DeviceData.IsYellowLightOn)
-            {
-                if (rectangle2.Opacity != 1)
-                {
-                    rectangle2.Opacity = 1;
-                    rectangle2.Effect = yellowLightEffect;
-                }
-            }
-            else
-            {
-                if (rectangle2.Opacity != OutLights)
-                {
-                    rectangle2.Opacity = OutLights;
-                    rectangle2.Effect = null;
-                }
-            }
-
-            if (DeviceData.IsGreenLightOn)
-            {
-                if (rectangle3.Opacity != 1)
-                {
-                    rectangle3.Opacity = 1;
-                    rectangle3.Effect = greenLightEffect;
-                }
-            }
-            else
-            {
-                if (rectangle3.Opacity != OutLights)
-                {
-                    rectangle3.Opacity = OutLights;
-                    rectangle3.Effect = null;
-                }
-            }
-
-            if (DeviceData.IsBlueLightOn)
-            {
-                if (rectangle4.Opacity != 1)
-                {
-                    rectangle4.Opacity = 1;
-                    rectangle4.Effect = blueLightEffect;
-                }
-            }
-            else
-            {
-                if (rectangle4.Opacity != OutLights)
-                {
-                    rectangle4.Opacity = OutLights;
-                    rectangle4.Effect = null;
-                }
-            }
-
-            if (DeviceData.IsBuzzer1On|| DeviceData.IsBuzzer2On|| DeviceData.IsBuzzer3On|| DeviceData.IsBuzzer4On)
-            {
-                if (rectangle5.Opacity != 1)
-                {
-                    rectangle5.Opacity = 1;
-                    rectangle5.Effect = buzzerLightEffect;
-                }
-            }
-            else
-            {
-                if (rectangle5.Opacity != OutLights)
-                {
-                    rectangle5.Opacity = OutLights;
-                    rectangle5.Effect = null;
-                }
-            }
+            get { return (bool)this.GetValue(IsBlueLightOnProperty); }
+            set { this.SetValue(IsBlueLightOnProperty, value); }
+        }
 
 
+        public static readonly DependencyProperty IsBuzzerOnProperty = DependencyProperty.Register(
+     "IsBuzzerOn", typeof(bool), typeof(AITSignalTower),
+     new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsBuzzerOn
+        {
+            get { return (bool)this.GetValue(IsBuzzerOnProperty); }
+            set { this.SetValue(IsBuzzerOnProperty, value); }
         }
+        
 
-        private void rectangle2_PreviewMouseDown(object sender, MouseButtonEventArgs e)
+        public AITSignalTower()
         {
-            if (BuzzingWarningConfigCallback != null)
-            {
-                BuzzingWarningConfigCallback.Invoke();
-            }
+            InitializeComponent();
         }
     }
 }

+ 82 - 12
Venus/RecipeEditorControl/ViewModel/RecipeEditorControlViewModel.cs

@@ -33,17 +33,7 @@ namespace Aitex.UI.RecipeEditor
 
         public RecipeEditorControlViewModel()
         {           
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Aqua));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Aquamarine));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.LawnGreen));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.LightYellow));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.DarkOrange));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.MistyRose));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.BurlyWood));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Gainsboro));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Beige));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Yellow));
-            //solidColorBrushes.Add(new SolidColorBrush(Colors.Magenta));
+
         }
 
 
@@ -58,7 +48,7 @@ namespace Aitex.UI.RecipeEditor
                 recipeStep.LstUnit.Add(new GasControlUnit());
                 recipeStep.LstUnit.Add(new ESCHVUnit());
                 recipeStep.LstUnit.Add(new ProcessKitUnit());
-                recipeStep.StepNo = GridStackPanel.Children.Count;
+                recipeStep.StepNo = GridStackPanel.Children.Count+1;
 
                 CurrentRecipe.Steps.Add(recipeStep);
                 var item = RecipeStepToGrid(recipeStep);
@@ -178,6 +168,20 @@ namespace Aitex.UI.RecipeEditor
         private ValueTuple<Grid, List<int>> RecipeStepToGrid(RecipeStep recipeStep)
         {
             Grid grid = new Grid();
+            ContextMenu contextmenu = new ContextMenu();
+            contextmenu.Tag = grid;
+            grid.ContextMenu= contextmenu;
+            MenuItem menuItemDelete = new MenuItem();
+            menuItemDelete.Header = "删除";
+            menuItemDelete.Click += MenuItemDelete_Click;
+
+            MenuItem menuItemInsert = new MenuItem();
+            menuItemInsert.Header = "左插入";
+            menuItemInsert.Click += MenuItemInsert_Click;
+
+            contextmenu.Items.Add(menuItemDelete);
+            contextmenu.Items.Add(menuItemInsert);
+
             List<int> ints = new List<int>();
 
             ColumnDefinition col1 = new ColumnDefinition();//Key
@@ -340,8 +344,74 @@ namespace Aitex.UI.RecipeEditor
             return new ValueTuple<Grid, List<int>>(grid, ints);
         }
 
+        private void MenuItemInsert_Click(object sender, RoutedEventArgs e)
+        {
+            MenuItem item = sender as MenuItem;
+            ContextMenu contextMenu = item.Parent as ContextMenu;
+            Grid grid = contextMenu.Tag as Grid;
+            int index = GridStackPanel.Children.IndexOf(grid);
+
+            RecipeStep recipeStep = new RecipeStep();
+            recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
+            recipeStep.LstUnit.Add(new TCPUnit());
+            recipeStep.LstUnit.Add(new BiasUnit());
+            recipeStep.LstUnit.Add(new GasControlUnit());
+            recipeStep.LstUnit.Add(new ESCHVUnit());
+            recipeStep.LstUnit.Add(new ProcessKitUnit());
+
+            
+            
+            CurrentRecipe.Steps.Insert(index , recipeStep);
+            var item2 = RecipeStepToGrid(recipeStep);
+            GridStackPanel.Children.Insert(index, item2.Item1);
+
+            for (int i = 0; i < CurrentRecipe.Steps.Count; i++)
+            {
+                CurrentRecipe.Steps[i].StepNo = i+1;
+            }
 
+           
 
+
+        }
+
+        private void MenuItemDelete_Click(object sender, RoutedEventArgs e)
+        {
+            MenuItem item = sender as MenuItem;
+            ContextMenu contextMenu = item.Parent as ContextMenu;
+            Grid grid = contextMenu.Tag as Grid;
+            int index = GridStackPanel.Children.IndexOf(grid);
+
+
+
+            GridStackPanel.Children.Remove(grid);
+            CurrentRecipe.Steps.RemoveAt(index);
+
+            for (int i = 0; i < CurrentRecipe.Steps.Count; i++)
+            {
+                CurrentRecipe.Steps[i].StepNo = i + 1;
+            }
+        }
+        /// <summary>
+        /// 获取父控件
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="obj"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public T GetParentObject2<T>(DependencyObject obj, string name) where T : FrameworkElement
+        {
+            DependencyObject parent = VisualTreeHelper.GetParent(obj);
+            while (parent != null)
+            {
+                if (parent is T && (((T)parent).Name == name || string.IsNullOrEmpty(name)))
+                {
+                    return (T)parent;
+                }
+                parent = VisualTreeHelper.GetParent(parent);
+            }
+            return null;
+        }
         private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             if (e.RemovedItems.Count > 0)

+ 2 - 1
Venus/Venus_Core/VenusDevice.cs

@@ -174,6 +174,7 @@
         StartPump,
         StartTurboPump,
         Pump,
+        PumpLoadLock,
         StopPump,
 
         GasFlow,
@@ -194,7 +195,7 @@
         Vent,
         VentLoadLock,
         Purge,
-
+        PurgeLoadLock,
         Abort,
 
         Heat,

+ 72 - 0
Venus/Venus_MainPages/RTData.cs

@@ -0,0 +1,72 @@
+using MECF.Framework.Common.DataCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+
+namespace Venus_MainPages
+{
+    internal static class RTData
+    {
+        static DispatcherTimer timer = new DispatcherTimer();
+        static List<string> m_RtDataKeys=new List<string> ();
+        public static Dictionary<string, object> RtDataValues=new Dictionary<string, object> ();
+        static string ModuleName = "PMA";
+         static RTData()
+        {
+           
+        }
+
+       public static void init()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.FsmState");
+
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.SetPoint");
+
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.FeedBack");
+
+            m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
+            m_RtDataKeys.Add($"{ModuleName}.ProcessPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
+
+            m_RtDataKeys.Add($"{ModuleName}.IsATM");
+            m_RtDataKeys.Add($"{ModuleName}.IsVAC");
+
+            m_RtDataKeys.Add($"{ModuleName}.LiftPinIsUp");
+            m_RtDataKeys.Add($"{ModuleName}.LiftPinIsDown");
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
+        }
+
+        static void timer_Tick(object sender, EventArgs e)
+        {
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+        }
+        
+        //private static readonly RTData rtData = new RTData();
+
+        //public static RTData GetRTData()             
+        //{ 
+        //    return rtData;
+        //}
+
+        
+    }
+}

+ 2 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -101,6 +101,7 @@
     <Compile Include="PMS\IUiRecipeManager.cs" />
     <Compile Include="PMS\UiRecipeManager.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RTData.cs" />
     <Compile Include="Unity\FileNode.cs" />
     <Compile Include="Unity\FolderOrFileTemplateSelector.cs" />
     <Compile Include="Unity\GridOptions.cs" />
@@ -112,6 +113,7 @@
     <Compile Include="ViewModels\OperationOverViewModel.cs" />
     <Compile Include="ViewModels\OverViewModel.cs" />
     <Compile Include="ViewModels\PlatformViewModel.cs" />
+    <Compile Include="ViewModels\ProcessViewModel.cs" />
     <Compile Include="ViewModels\RecipeViewModel.cs" />
     <Compile Include="ViewModels\TopViewModel.cs" />
     <Compile Include="Views\DataAnalysisView.xaml.cs">

+ 299 - 158
Venus/Venus_MainPages/ViewModels/OverViewModel.cs

@@ -20,33 +20,48 @@ namespace Venus_MainPages.ViewModels
     internal class OverViewModel : BindableBase
     {
         #region 私有字段
-        private bool m_VN2Valve1IsOpen;
-        private bool m_VN2Valve2IsOpen;
-        private bool m_VN2Valve3IsOpen;
-        private bool m_Gas1Valve1IsOpen;
-        private bool m_Gas1Valve2IsOpen; 
-        private bool m_Gas1Valve3IsOpen;
-        private bool m_Gas2Valve1IsOpen;
-        private bool m_Gas2Valve2IsOpen;
-        private bool m_Gas2Valve3IsOpen;
-        private bool m_Gas3Valve1IsOpen;
-        private bool m_Gas3Valve2IsOpen;
-        private bool m_Gas3Valve3IsOpen;
-        private bool m_Gas4Valve1IsOpen;
-        private bool m_Gas4Valve2IsOpen;
-        private bool m_Gas4Valve3IsOpen;
-        private bool m_Gas5ValveIsOpen;
-        private bool m_Gas6ValveIsOpen;
-        private bool m_Gas7ValveIsOpen;
-        private bool m_Gas8ValveIsOpen;
+        private bool m_PVN21ValveIsOpen;
+        private bool m_PVN22ValveIsOpen;
+        private bool m_N2ValveIsOpen;
+        private bool m_PV11ValveIsOpen;
+        private bool m_PV12ValveIsOpen;        
+        private bool m_PV21ValveIsOpen;
+        private bool m_PV22ValveIsOpen;       
+        private bool m_PV31ValveIsOpen;
+        private bool m_PV32ValveIsOpen;        
+        private bool m_PV41ValveIsOpen;
+        private bool m_PV42ValveIsOpen;        
+        private bool m_MFC1ValveIsOpen;
+        private bool m_MFC2ValveIsOpen;
+        private bool m_MFC3ValveIsOpen;
+        private bool m_MFC4ValveIsOpen;
+        private bool m_MFC5ValveIsOpen;
+        private bool m_MFC6ValveIsOpen;
+        private bool m_MFC7ValveIsOpen;
+        private bool m_MFC8ValveIsOpen;
         private bool m_GasFinalValveIsOpen;
-        private bool m_PurgeValveIsOpen;
+
         private bool m_SoftPumpValveIsOpen;
         private bool m_FastPumpValveIsOpen;
-       
+        private bool m_PVHe1ValveIsOpen;
+        private bool m_PVHe2ValveIsOpen;
+        private bool m_TurboPumpPumpingValveIsOpen;
+        private bool m_TurboPumpPurgeValveIsOpen;
+
+        private bool m_BRFIsOn;
+        private bool m_SRFIsOn;
+
+
+        //ValveTurboPumpPumping
+        //m_RtDataKeys.Add($"{ModuleName}.PVHe1Valve.IsOpen");
+
+
+
+
         private AITPumpData m_MainPumpData=new AITPumpData ();
 
-        private bool m_PumpIsOpen;
+        private bool m_PumpIsOpen; 
+        private bool m_TurboIsOpen;
         private bool m_IsATM;
         private bool m_IsVAC;
 
@@ -58,16 +73,9 @@ namespace Venus_MainPages.ViewModels
         private List<string> m_RtDataKeys;
         private Dictionary<string, object> m_RtDataValues;
 
-        //private ObservableCollection<IOItem<float>> m_RtAiValues;
-        //private ObservableCollection<AOItem> m_RtAOs;
-
-        //private string m_BasePressureSetPoint;
-        //private string m_PumpLimitSetPoint;
         #endregion
 
         #region  属性      
-
-      
         public Dictionary<string, object> RtConfigValues
         {
             get { return m_RtConfigValues; }
@@ -83,105 +91,120 @@ namespace Venus_MainPages.ViewModels
             get { return m_GasFinalValveIsOpen; }
             set { SetProperty(ref m_GasFinalValveIsOpen, value); }
         }
-        public bool VN2Valve1IsOpen
+        public bool PVN21ValveIsOpen
         {
-            get { return m_VN2Valve1IsOpen; }
-            set { SetProperty(ref m_VN2Valve1IsOpen, value); }
+            get { return m_PVN21ValveIsOpen; }
+            set { SetProperty(ref m_PVN21ValveIsOpen, value); }
         }
-        public bool VN2Valve2IsOpen
+        public bool PVN22ValveIsOpen
         {
-            get { return m_VN2Valve2IsOpen; }
-            set { SetProperty(ref m_VN2Valve2IsOpen, value); }
+            get { return m_PVN22ValveIsOpen; }
+            set { SetProperty(ref m_PVN22ValveIsOpen, value); }
         }
-        public bool VN2Valve3IsOpen
+        public bool N2ValveIsOpen
         {
-            get { return m_VN2Valve3IsOpen; }
-            set { SetProperty(ref m_VN2Valve3IsOpen, value); }
+            get { return m_N2ValveIsOpen; }
+            set { SetProperty(ref m_N2ValveIsOpen, value); }
         }
-        public bool Gas1Valve1IsOpen
+        public bool PV11ValveIsOpen
         {
-            get { return m_Gas1Valve1IsOpen; }
-            set { SetProperty(ref m_Gas1Valve1IsOpen, value); }
+            get { return m_PV11ValveIsOpen; }
+            set { SetProperty(ref m_PV11ValveIsOpen, value); }
         }
-        public bool Gas1Valve2IsOpen
+        public bool PV12ValveIsOpen
         {
-            get { return m_Gas1Valve2IsOpen; }
-            set { SetProperty(ref m_Gas1Valve2IsOpen, value); }
+            get { return m_PV12ValveIsOpen; }
+            set { SetProperty(ref m_PV12ValveIsOpen, value); }
         }
-        public bool Gas1Valve3IsOpen
+        public bool MFC1ValveIsOpen
         {
-            get { return m_Gas1Valve3IsOpen; }
-            set { SetProperty(ref m_Gas1Valve3IsOpen, value); }
+            get { return m_MFC1ValveIsOpen; }
+            set { SetProperty(ref m_MFC1ValveIsOpen, value); }
         }
-        public bool Gas2Valve1IsOpen
+        public bool PV21ValveIsOpen
         {
-            get { return m_Gas2Valve1IsOpen; }
-            set { SetProperty(ref m_Gas2Valve1IsOpen, value); }
+            get { return m_PV21ValveIsOpen; }
+            set { SetProperty(ref m_PV21ValveIsOpen, value); }
         }
-        public bool Gas2Valve2IsOpen
+        public bool PV22ValveIsOpen
         {
-            get { return m_Gas2Valve2IsOpen; }
-            set { SetProperty(ref m_Gas2Valve2IsOpen, value); }
+            get { return m_PV22ValveIsOpen; }
+            set { SetProperty(ref m_PV22ValveIsOpen, value); }
         }
-        public bool Gas2Valve3IsOpen
+        public bool MFC2ValveIsOpen
         {
-            get { return m_Gas2Valve3IsOpen; }
-            set { SetProperty(ref m_Gas2Valve3IsOpen, value); }
+            get { return m_MFC2ValveIsOpen; }
+            set { SetProperty(ref m_MFC2ValveIsOpen, value); }
         }
-        public bool Gas3Valve1IsOpen
+        public bool PV31ValveIsOpen
         {
-            get { return m_Gas3Valve1IsOpen; }
-            set { SetProperty(ref m_Gas3Valve1IsOpen, value); }
+            get { return m_PV31ValveIsOpen; }
+            set { SetProperty(ref m_PV31ValveIsOpen, value); }
         }
-        public bool Gas3Valve2IsOpen
+        public bool PV32ValveIsOpen
         {
-            get { return m_Gas3Valve2IsOpen; }
-            set { SetProperty(ref m_Gas3Valve2IsOpen, value); }
+            get { return m_PV32ValveIsOpen; }
+            set { SetProperty(ref m_PV32ValveIsOpen, value); }
         }
-        public bool Gas3Valve3IsOpen
+        public bool MFC3ValveIsOpen
         {
-            get { return m_Gas3Valve3IsOpen; }
-            set { SetProperty(ref m_Gas3Valve3IsOpen, value); }
+            get { return m_MFC3ValveIsOpen; }
+            set { SetProperty(ref m_MFC3ValveIsOpen, value); }
         }
-        public bool Gas4Valve1IsOpen
+        public bool PV41ValveIsOpen
         {
-            get { return m_Gas4Valve1IsOpen; }
-            set { SetProperty(ref m_Gas4Valve1IsOpen, value); }
+            get { return m_PV41ValveIsOpen; }
+            set { SetProperty(ref m_PV41ValveIsOpen, value); }
         }
-        public bool Gas4Valve2IsOpen
+        public bool PV42ValveIsOpen
         {
-            get { return m_Gas4Valve2IsOpen; }
-            set { SetProperty(ref m_Gas4Valve2IsOpen, value); }
+            get { return m_PV42ValveIsOpen; }
+            set { SetProperty(ref m_PV42ValveIsOpen, value); }
         }
-        public bool Gas4Valve3IsOpen
+        public bool MFC4ValveIsOpen
         {
-            get { return m_Gas4Valve3IsOpen; }
-            set { SetProperty(ref m_Gas4Valve3IsOpen, value); }
+            get { return m_MFC4ValveIsOpen; }
+            set { SetProperty(ref m_MFC4ValveIsOpen, value); }
         }
-        public bool Gas5ValveIsOpen
+        public bool MFC5ValveIsOpen
         {
-            get { return m_Gas5ValveIsOpen; }
-            set { SetProperty(ref m_Gas5ValveIsOpen, value); }
+            get { return m_MFC5ValveIsOpen; }
+            set { SetProperty(ref m_MFC5ValveIsOpen, value); }
         }
-        public bool Gas6ValveIsOpen
+        public bool MFC6ValveIsOpen
         {
-            get { return m_Gas6ValveIsOpen; }
-            set { SetProperty(ref m_Gas6ValveIsOpen, value); }
+            get { return m_MFC6ValveIsOpen; }
+            set { SetProperty(ref m_MFC6ValveIsOpen, value); }
         }
-        public bool Gas7ValveIsOpen
+        public bool MFC7ValveIsOpen
         {
-            get { return m_Gas7ValveIsOpen; }
-            set { SetProperty(ref m_Gas7ValveIsOpen, value); }
+            get { return m_MFC7ValveIsOpen; }
+            set { SetProperty(ref m_MFC7ValveIsOpen, value); }
         }
-        public bool Gas8ValveIsOpen
+        public bool MFC8ValveIsOpen
         {
-            get { return m_Gas8ValveIsOpen; }
-            set { SetProperty(ref m_Gas8ValveIsOpen, value); }
+            get { return m_MFC8ValveIsOpen; }
+            set { SetProperty(ref m_MFC8ValveIsOpen, value); }
         }
-        public bool PurgeValveIsOpen
+        public bool PVHe1ValveIsOpen
         {
-            get { return m_PurgeValveIsOpen; }
-            set { SetProperty(ref m_PurgeValveIsOpen, value); }
+            get { return m_PVHe1ValveIsOpen; }
+            set { SetProperty(ref m_PVHe1ValveIsOpen, value); }
+        }
+        public bool PVHe2ValveIsOpen
+        {
+            get { return m_PVHe2ValveIsOpen; }
+            set { SetProperty(ref m_PVHe2ValveIsOpen, value); }
+        }
+        public bool TurboPumpPumpingValveIsOpen
+        {
+            get { return m_TurboPumpPumpingValveIsOpen; }
+            set { SetProperty(ref m_TurboPumpPumpingValveIsOpen, value); }
+        }
+        public bool TurboPumpPurgeValveIsOpen
+        {
+            get { return m_TurboPumpPurgeValveIsOpen; }
+            set { SetProperty(ref m_TurboPumpPurgeValveIsOpen, value); }
         }
         public bool SoftPumpValveIsOpen
         {
@@ -205,6 +228,12 @@ namespace Venus_MainPages.ViewModels
             get { return m_PumpIsOpen; }
             set { SetProperty(ref m_PumpIsOpen, value); }
         }
+
+        public bool TurboIsOpen
+        {
+            get { return m_TurboIsOpen; }
+            set { SetProperty(ref m_TurboIsOpen, value); }
+        }
         public bool IsATM
         {
             get { return m_IsATM; }
@@ -226,6 +255,16 @@ namespace Venus_MainPages.ViewModels
         {
             get { return RtConfigValues[$"{ModuleName}.Pump.PumpTimeLimit"].ToString(); }
         }
+        public bool BRFIsOn
+        {
+            get { return m_BRFIsOn; }
+            set { SetProperty(ref m_BRFIsOn, value); }
+        }
+        public bool SRFIsOn
+        {
+            get { return m_SRFIsOn; }
+            set { SetProperty(ref m_SRFIsOn, value); }
+        }
         #endregion
 
         #region 命令
@@ -234,6 +273,10 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand PMInitCommnad =>
             _PMInitCommnad ?? (_PMInitCommnad = new DelegateCommand(OnPMInit));
 
+        private DelegateCommand _PMAbortCommnad;
+        public DelegateCommand PMAbortCommnad =>
+            _PMAbortCommnad ?? (_PMAbortCommnad = new DelegateCommand(OnPMAbort));
+
         private DelegateCommand _GasCommand;
         public DelegateCommand GasCommand =>
             _GasCommand ?? (_GasCommand = new DelegateCommand(OnGas));
@@ -258,13 +301,37 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand OpenPumpCommand =>
             _OpenPumpCommand ?? (_OpenPumpCommand = new DelegateCommand(OnOpenPump));
 
+        private DelegateCommand _ClosePumpCommand;
+        public DelegateCommand ClosePumpCommand =>
+            _ClosePumpCommand ?? (_ClosePumpCommand = new DelegateCommand(OnClosePump));
+
+        private DelegateCommand _OpenTurboPumpCommand;
+        public DelegateCommand OpenTurboPumpCommand =>
+            _OpenTurboPumpCommand ?? (_OpenTurboPumpCommand = new DelegateCommand(OnOpenTurboPump));
+
+        private DelegateCommand _CloseTurboPumpCommand;
+        public DelegateCommand CloseTurboPumpCommand =>
+            _CloseTurboPumpCommand ?? (_CloseTurboPumpCommand = new DelegateCommand(OnCloseTurboPump));
+
+        private DelegateCommand<object> _PinUpDownCommand;
+        public DelegateCommand<object> PinUpDownCommand =>
+            _PinUpDownCommand ?? (_PinUpDownCommand = new DelegateCommand<object>(OnPinUpDown));
+
 
+        private DelegateCommand _SetSRfCommand;
+        public DelegateCommand SetSRfCommand =>
+            _SetSRfCommand ?? (_SetSRfCommand = new DelegateCommand(OnSetSRf));
+
+        private DelegateCommand _SetBRfCommand;
+        public DelegateCommand SetBRfCommand =>
+            _SetBRfCommand ?? (_SetBRfCommand = new DelegateCommand(OnSetBRf));
         #endregion
 
         #region 构造函数
         public OverViewModel()
         {
-            m_RtConfigKeys=new List<string>();
+            //RTData.init();
+            m_RtConfigKeys =new List<string>();
             m_RtDataKeys = new List<string>();
             
             m_IsATM = true;
@@ -281,12 +348,7 @@ namespace Venus_MainPages.ViewModels
             //GetRtAllData getRtAllData = new GetRtAllData();
 
         }
-        void timer_Tick(object sender, EventArgs e)
-        {
-            RtConfigValues = QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys);
-            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
-
-        }
+       
         #endregion
 
         #region 命令方法
@@ -296,32 +358,7 @@ namespace Venus_MainPages.ViewModels
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Home");            
         }
         private void OnGas()
-        {
-            //closeAllValve();
-            //Task.Run(() =>
-            //{
-            //    //System.Threading.Thread.Sleep(100);
-            //    VN2Valve1IsOpen = true;
-            //    VN2Valve2IsOpen = true;
-            //    VN2Valve3IsOpen = true;
-            //    GasFinalValveIsOpen = true;
-            //    Gas1Valve1IsOpen = true;
-            //    Gas1Valve2IsOpen = true;
-            //    Gas1Valve3IsOpen = true;
-            //    Gas2Valve1IsOpen = true;
-            //    Gas2Valve2IsOpen = true;
-            //    Gas2Valve3IsOpen = true;
-            //    Gas3Valve1IsOpen = true;
-            //    Gas3Valve2IsOpen = true;
-            //    Gas3Valve3IsOpen = true;
-            //    Gas4Valve1IsOpen = true;
-            //    Gas4Valve2IsOpen = true;
-            //    Gas4Valve3IsOpen = true;
-            //    Gas5ValveIsOpen = true;
-            //    Gas6ValveIsOpen = true;
-            //    Gas7ValveIsOpen = true;
-            //    Gas8ValveIsOpen = true;
-            //});
+        {          
             object[] mfc = new object[8];
             //string[] mfcSetPoint = new string[8];
             for (int index = 0; index < mfc.Length; index++)
@@ -356,7 +393,7 @@ namespace Venus_MainPages.ViewModels
             //closeAllValve();
             //Task.Run(() => 
             //{ 
-            //PurgeValveIsOpen = true;
+            //TurboPumpPumpingValveIsOpen = true;
             //});
             if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Purge")
             {
@@ -375,8 +412,8 @@ namespace Venus_MainPages.ViewModels
             //Task.Run(() =>
             //{
             //    //System.Threading.Thread.Sleep(100);
-            //    VN2Valve2IsOpen = true;
-            //    VN2Valve3IsOpen = true;
+            //    PVN22ValveIsOpen = true;
+            //    N2ValveIsOpen = true;
             //    GasFinalValveIsOpen = true;
             //});
             if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Venting")
@@ -445,11 +482,95 @@ namespace Venus_MainPages.ViewModels
                 return;
             }
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartPump");
+        }
+        private void OnClosePump()
+        { 
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+
+        }
+        private void OnOpenTurboPump()
+        {
+            TurboIsOpen = true;
+            if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "LaunchingTurbo")
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+                return;
+            }
+
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartTurboPump");
         }
+
+        private void OnCloseTurboPump()
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+        }
+
+        private void OnPinUpDown(object upDown)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetLiftPin",Convert.ToBoolean( upDown));
+        }
+
+        private void OnSetSRf()
+        { 
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetSRf",!SRFIsOn);
+        }
+        private void OnSetBRf()
+        { 
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBRf",!BRFIsOn);
+        }
+
+        private void OnPMAbort()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
+        }
         #endregion
 
         #region 私有方法
+        void timer_Tick(object sender, EventArgs e)
+        {
+            RtConfigValues = QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys);
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+
+            
+            PVN21ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN21.IsOpen"];
+            GasFinalValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveGasFinal.IsOpen"];
+            PV11ValveIsOpen= (bool)RtDataValues[$"{ModuleName}.ValvePV11.IsOpen"];
+            PV12ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV12.IsOpen"];
+            PV21ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV21.IsOpen"];
+            PV22ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV22.IsOpen"];
+            PV31ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV31.IsOpen"];
+            PV32ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV32.IsOpen"];
+            PV41ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV41.IsOpen"];
+            PV42ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV42.IsOpen"];
+            MFC1ValveIsOpen=  (bool)RtDataValues[$"{ModuleName}.ValveMfc1.IsOpen"]; 
+            MFC2ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc2.IsOpen"];
+            MFC3ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc3.IsOpen"]; 
+            MFC4ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc4.IsOpen"];
+            MFC5ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc5.IsOpen"]; 
+            MFC6ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc6.IsOpen"]; 
+            MFC7ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc7.IsOpen"]; 
+            MFC8ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveMfc8.IsOpen"];
+            N2ValveIsOpen= (bool)RtDataValues[$"{ModuleName}.ValveN2.IsOpen"];
+            SoftPumpValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveSoftPump.IsOpen"];
+            FastPumpValveIsOpen= (bool)RtDataValues[$"{ModuleName}.ValveFastPump.IsOpen"];
+            PVHe1ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVHe1.IsOpen"];
+            PVHe2ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVHe2.IsOpen"];
+            PVN21ValveIsOpen= (bool)RtDataValues[$"{ModuleName}.ValvePVN21.IsOpen"];
+            PVN22ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN22.IsOpen"];
+
+
+            TurboPumpPumpingValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveTurboPumpPumping.IsOpen"];
+            TurboPumpPurgeValveIsOpen= (bool)RtDataValues[$"{ModuleName}.ValveTurboPumpPurge.IsOpen"];
+
+
+            PumpIsOpen = (bool)RtDataValues[$"{ModuleName}.PumpIsRunning"];
+            TurboIsOpen= (bool)RtDataValues[$"{ModuleName}.TurboPumpIsRunning"];
+
+            BRFIsOn = (bool)RtDataValues[$"{ModuleName}.BRfIsOn"];
+            SRFIsOn = (bool)RtDataValues[$"{ModuleName}.SRfIsOn"];
+
+
+        }
 
         private void addConfigKeys()
         {
@@ -469,14 +590,14 @@ namespace Venus_MainPages.ViewModels
         {
             m_RtDataKeys.Add($"{ModuleName}.FsmState");
 
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.FeedBack");
-            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.SetPoint");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.SetPoint");
 
             m_RtDataKeys.Add($"{ModuleName}.MfcGas1.FeedBack");
             m_RtDataKeys.Add($"{ModuleName}.MfcGas2.FeedBack");
@@ -486,10 +607,14 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.MfcGas6.FeedBack");
             m_RtDataKeys.Add($"{ModuleName}.MfcGas7.FeedBack");
             m_RtDataKeys.Add($"{ModuleName}.MfcGas8.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcHe.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcN2.FeedBack");
+
 
             m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
             m_RtDataKeys.Add($"{ModuleName}.ProcessPressure");
             m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ESCHePressure");
 
             m_RtDataKeys.Add($"{ModuleName}.IsATM");
             m_RtDataKeys.Add($"{ModuleName}.IsVAC");
@@ -497,35 +622,51 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.LiftPinIsUp");
             m_RtDataKeys.Add($"{ModuleName}.LiftPinIsDown");
 
-            //m_RtDataKeys.Add($"{ModuleName}.Pump.PumpBasePressure");
-            //m_RtDataKeys.Add($"{ModuleName}.Pump.PumpTimeLimit");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVN21.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVN22.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV11.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV12.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV21.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV22.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV31.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV32.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV41.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePV42.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc1.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc2.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc3.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc4.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc5.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc6.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc7.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveMfc8.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveGasFinal.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveSoftPump.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveFastPump.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveN2.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVHe1.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVHe2.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveTurboPumpPumping.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveTurboPumpPurge.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVN21.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValvePVN22.IsOpen");
+
+
+            m_RtDataKeys.Add($"{ModuleName}.TurboPumpIsRunning");
+            m_RtDataKeys.Add($"{ModuleName}.PumpIsRunning");
+
+            m_RtDataKeys.Add($"{ModuleName}.IsSlitDoorClosed");
+            m_RtDataKeys.Add($"{ModuleName}.IsLidClosed");
+
+            m_RtDataKeys.Add($"{ModuleName}.SRfIsOn");
+            m_RtDataKeys.Add($"{ModuleName}.BRfIsOn");
+
+            m_RtDataKeys.Add($"{ModuleName}.TurboPumpRotationalSpeed");
+
 
 
 
 
-        }
-        private void closeAllValve()
-        {
-            if (VN2Valve1IsOpen == true) VN2Valve1IsOpen = false;
-            if (VN2Valve2IsOpen == true) VN2Valve2IsOpen = false;
-            if (VN2Valve3IsOpen == true) VN2Valve3IsOpen = false;
-            if (GasFinalValveIsOpen == true) GasFinalValveIsOpen = false;
-            if (Gas1Valve1IsOpen == true) Gas1Valve1IsOpen = false;
-            if (Gas1Valve2IsOpen == true) Gas1Valve2IsOpen = false;
-            if (Gas1Valve3IsOpen == true) Gas1Valve3IsOpen = false;
-            if (Gas2Valve1IsOpen == true) Gas2Valve1IsOpen = false;
-            if (Gas2Valve2IsOpen == true) Gas2Valve2IsOpen = false;
-            if (Gas2Valve3IsOpen == true) Gas2Valve3IsOpen = false;
-            if (Gas3Valve1IsOpen == true) Gas3Valve1IsOpen = false;
-            if (Gas3Valve2IsOpen == true) Gas3Valve2IsOpen = false;
-            if (Gas3Valve3IsOpen == true) Gas3Valve3IsOpen = false;
-            if (Gas4Valve1IsOpen == true) Gas4Valve1IsOpen = false;
-            if (Gas4Valve2IsOpen == true) Gas4Valve2IsOpen = false;
-            if (Gas4Valve3IsOpen == true) Gas4Valve3IsOpen = false;
-            if (Gas5ValveIsOpen == true) Gas5ValveIsOpen = false;
-            if (Gas6ValveIsOpen == true) Gas6ValveIsOpen = false;
-            if (Gas7ValveIsOpen == true) Gas7ValveIsOpen = false;
-            if (Gas8ValveIsOpen == true) Gas8ValveIsOpen = false;
         }
         #endregion
     }

+ 137 - 16
Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs

@@ -1,4 +1,5 @@
-using MECF.Framework.Common.OperationCenter;
+using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.OperationCenter;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
@@ -6,6 +7,10 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Threading;
+using Venus_Core;
+using WPF.Themes.UserControls;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -13,10 +18,15 @@ namespace Venus_MainPages.ViewModels
     {
         #region 私有字段
         private bool m_LoadLockDoorIsOpen;
-        private bool m_PumpValveIsOpen;
-        private bool m_VentValveIsOpen;
+        private bool m_LoadLockPumpValveIsOpen;
+        private bool m_LoadLockVentValveIsOpen;
         private bool m_IsATM;
         private string ModuleName="PMA";
+        private List<string> m_RtDataKeys=new List<string> ();
+        private Dictionary<string, object> m_RtDataValues=new Dictionary<string, object> ();
+        private bool m_PumpIsOpen;
+        private int m_PurgeCounter;
+        private Visibility m_WaferIsVisibility;
         #endregion
 
         #region  属性
@@ -26,31 +36,46 @@ namespace Venus_MainPages.ViewModels
             get { return m_LoadLockDoorIsOpen; }
             set {  SetProperty(ref m_LoadLockDoorIsOpen, value); }
         }
-        public bool PumpValveIsOpen
+        public bool LoadLockPumpValveIsOpen
         {
-            get { return m_PumpValveIsOpen; }
-            set { SetProperty(ref m_PumpValveIsOpen, value); }
+            get { return m_LoadLockPumpValveIsOpen; }
+            set { SetProperty(ref m_LoadLockPumpValveIsOpen, value); }
         }
-        public bool VentValveIsOpen
+        public bool LoadLockVentValveIsOpen
         {
-            get { return m_VentValveIsOpen; }
-            set { SetProperty(ref m_VentValveIsOpen, value); }
+            get { return m_LoadLockVentValveIsOpen; }
+            set { SetProperty(ref m_LoadLockVentValveIsOpen, value); }
         }
         public bool IsATM
         {
             get { return m_IsATM; }
             set { SetProperty(ref m_IsATM, value); }
         }
+        public Dictionary<string, object> RtDataValues
+        {
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
+        }
+        public bool PumpIsOpen
+        {
+            get { return m_PumpIsOpen; }
+            set { SetProperty(ref m_PumpIsOpen, value); }
+        }
 
-
+        public int PurgeCounter
+        {
+            get { return m_PurgeCounter; }
+            set { SetProperty(ref m_PurgeCounter, value); }
+        }
+        public Visibility WaferIsVisibility
+        {
+            get { return m_WaferIsVisibility; }
+            set { SetProperty(ref m_WaferIsVisibility, value); }
+        }
         #endregion
 
 
         #region 命令
-
-
-
-
         private DelegateCommand _PurgeCommand;
         public DelegateCommand PurgeCommand =>
             _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
@@ -63,14 +88,43 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand PumpCommand =>
             _PumpCommand ?? (_PumpCommand = new DelegateCommand(OnPump));
 
+        private DelegateCommand _OpenPumpCommand;
+        public DelegateCommand OpenPumpCommand =>
+            _OpenPumpCommand ?? (_OpenPumpCommand = new DelegateCommand(OnOpenPump));
+
+        private DelegateCommand _ClosePumpCommand;
+        public DelegateCommand ClosePumpCommand =>
+            _ClosePumpCommand ?? (_ClosePumpCommand = new DelegateCommand(OnClosePump));
+
+        private DelegateCommand _OpenDoorCommand;
+        public DelegateCommand OpenDoorCommand =>
+            _OpenDoorCommand ?? (_OpenDoorCommand = new DelegateCommand(OnOpenDoor));
+
+        private DelegateCommand _CloseDoorCommand;
+        public DelegateCommand CloseDoorCommand =>
+            _CloseDoorCommand ?? (_CloseDoorCommand = new DelegateCommand(OnCloseDoor));
 
+        private DelegateCommand _NewWaferCommand;
+        public DelegateCommand NewWaferCommand =>
+            _NewWaferCommand ?? (_NewWaferCommand = new DelegateCommand(OnNewWafer));
+
+        private DelegateCommand _DeleteWaferCommand;
+        public DelegateCommand DeleteWaferCommand =>
+            _DeleteWaferCommand ?? (_DeleteWaferCommand = new DelegateCommand(OnDeleteWafer));
 
         #endregion
 
         #region 构造函数
         public PlatformViewModel()
         {
+            m_WaferIsVisibility = Visibility.Collapsed;
             m_IsATM = true;
+            //var test = RTData.GetRTData().RtDataValues;
+            addDataKeys();
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
         }
 
         #endregion
@@ -80,11 +134,12 @@ namespace Venus_MainPages.ViewModels
         private void OnPump()
         {
             //PumpValveIsOpen = true;
-            IsATM = !IsATM;
+            //IsATM = !IsATM;
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.PumpLoadLock");
         }
         private void OnPurge()
         {
-        
+
             //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Purge")
             //{
             //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
@@ -93,6 +148,7 @@ namespace Venus_MainPages.ViewModels
             //{
             //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
             //}
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.PurgeLoadLock");
         }
 
         private void OnVent()
@@ -109,6 +165,71 @@ namespace Venus_MainPages.ViewModels
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VentLoadLock");
 
         }
+        private void OnOpenPump()
+        {
+            if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "LaunchingPump")
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+                return;
+            }
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartPump");
+        }
+        private void OnClosePump()
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+
+        }
+        private void OnOpenDoor()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetSlitDoor",true);
+            
+        }
+        private void OnCloseDoor()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetSlitDoor",false);
+        }
+        private void OnNewWafer()
+        {
+            if (WaferIsVisibility != Visibility.Visible)
+            {
+                WaferIsVisibility = Visibility.Visible;
+            }
+            else
+            {
+                WPFMessageBox.ShowInformation("晶圆已创建");
+            }
+        }
+
+        private void OnDeleteWafer()
+        {
+            WaferIsVisibility = Visibility.Collapsed;
+        }
+        #endregion
+
+        #region 私有方法
+        void timer_Tick(object sender, EventArgs e)
+        {
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+
+            LoadLockPumpValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveLoadlockPumping.IsOpen"];
+            LoadLockVentValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveLoadlockVent.IsOpen"];
+            PumpIsOpen = (bool)RtDataValues[$"{ModuleName}.PumpIsRunning"];
+            PurgeCounter=(int)RtDataValues[$"{ModuleName}.LoadLockPurge.PurgeCounter"];
+        }
+        private void addConfigKeys()
+        {
+        }
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.FsmState");
+            m_RtDataKeys.Add($"{ModuleName}.ValveLoadlockPumping.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.ValveLoadlockVent.IsOpen");
+            m_RtDataKeys.Add($"{ModuleName}.PumpIsRunning");
+            m_RtDataKeys.Add($"{ModuleName}.LoadLockPurge.PurgeCounter");
+            m_RtDataKeys.Add($"{ModuleName}.IsSlitDoorClosed");
+            m_RtDataKeys.Add($"{ModuleName}.LoadlockPressure");
+        }
+
         #endregion
     }
 }

+ 45 - 0
Venus/Venus_MainPages/ViewModels/ProcessViewModel.cs

@@ -0,0 +1,45 @@
+using Aitex.Core.UI.MVVM;
+using Prism.Mvvm;
+using Prism.Commands;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Win32;
+
+namespace Venus_MainPages.ViewModels
+{
+    public class ProcessViewModel : BindableBase
+    {
+        #region 私有字段
+        private string m_SelectedRecipe;
+        #endregion
+
+        #region 属性
+        public string SelectedRecipe
+        {
+            get { return m_SelectedRecipe; }
+            set { SetProperty(ref m_SelectedRecipe, value); }
+        }
+        #endregion
+
+
+        #region 命令
+        private DelegateCommand _LoadRecipeCommand;
+        public DelegateCommand LoadRecipeCommand =>
+            _LoadRecipeCommand ?? (_LoadRecipeCommand = new DelegateCommand(OnLoadRecipe));
+        #endregion
+
+        #region 命令方法   
+        private void OnLoadRecipe()
+        {
+            OpenFileDialog dialog = new OpenFileDialog();
+            dialog.Filter = ".rcp|*.rcp";
+            dialog.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
+            if (dialog.ShowDialog() == false) return;
+            SelectedRecipe = dialog.SafeFileName.Split('.')[0];
+        }
+        #endregion
+    }
+}

+ 6 - 0
Venus/Venus_MainPages/ViewModels/TopViewModel.cs

@@ -104,6 +104,12 @@ namespace Venus_MainPages.ViewModels
         {
             m_RtDataKeys.Add($"{ModuleName}.FsmState");
 
+            m_RtDataKeys.Add($"{ModuleName}.SignalTower.IsRedLightOn");
+            m_RtDataKeys.Add($"{ModuleName}.SignalTower.IsYellowLightOn");
+            m_RtDataKeys.Add($"{ModuleName}.SignalTower.IsGreenLightOn");
+            m_RtDataKeys.Add($"{ModuleName}.SignalTower.IsBlueLightOn");
+            m_RtDataKeys.Add($"{ModuleName}.SignalTower.IsBuzzerOn");
+
 
 
         }

+ 268 - 191
Venus/Venus_MainPages/Views/OverView.xaml

@@ -24,42 +24,44 @@
         <converters:ToBoolMultiValueConverter  x:Key="toBoolMultiValueConverter"/>
         <converters:ToBoolMultiValueConverter2 x:Key="toBoolMultiValueConverter2"/>
         <converters:ToBoolMultiValueConverter3 x:Key="toBoolMultiValueConverter3"/>
+        <converters:ToBoolMultiValueConverter4 x:Key="toBoolMultiValueConverter4"/>
         <converters:BoolToColor x:Key="boolToColor"/>
         <converters:BoolToColor2 x:Key="boolToColor2"/>
+        <converters:BoolToBool x:Key="BoolToBool"/>
     </UserControl.Resources>
     <Canvas >
 
-        
+
 
         <!--N2-->
         <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="230" Canvas.Left="255" Canvas.Top="120">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
-                    <Binding Path="VN2Valve2IsOpen"/>
-                    <Binding Path="VN2Valve3IsOpen"/>
+                    <Binding Path="PVN22ValveIsOpen"/>
+                    <Binding Path="N2ValveIsOpen"/>
                     <Binding Path="GasFinalValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <!--<ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" IsOpen="{Binding VN2Valve3IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding VN2Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114"/>
+        <!--<ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" IsOpen="{Binding N2ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="477.5" Canvas.Top="120" RotateTransformValue="-90" />-->
 
         <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="193" Canvas.Left="64"  Canvas.Top="120">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter3}">
-                    <Binding Path="VN2Valve1IsOpen"/>
-                    <Binding Path="VN2Valve2IsOpen"/>
-                    <Binding Path="VN2Valve3IsOpen"/>
+                    <Binding Path="PVN21ValveIsOpen"/>
+                    <Binding Path="PVN22ValveIsOpen"/>
+                    <Binding Path="N2ValveIsOpen"/>
                     <Binding Path="GasFinalValveIsOpen"/>
                 </MultiBinding>
 
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <!--<ctrls:Pipe3 Canvas.Left="245" Canvas.Top="120" RotateTransformValue="-90"/>-->
-        <!--<ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  IsOpen="{Binding VN2Valve2IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding VN2Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114"/>
+        <!--<ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  IsOpen="{Binding PVN22Valve,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PVN22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114"/>
 
 
         <!--To pump-->
@@ -70,69 +72,69 @@
 
 
         <!--Cl2-->
-        <ctrls:FlowPipe Name="f9"  Height="8"  Width="308" Canvas.Left="176" Canvas.Top="230" IsFlowing="{Binding Gas1Valve3IsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5" IsOpen="{Binding Gas1Valve3IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas1Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224"/>
+        <ctrls:FlowPipe Name="f9"  Height="8"  Width="308" Canvas.Left="176" Canvas.Top="230" IsFlowing="{Binding MFC1ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5" IsOpen="{Binding MFC1ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC1ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="226"/>-->
 
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="262" />-->
-        <ctrls:FlowPipe  Name="Gas1Pipe1" Height="8"  Width="114" Canvas.Left="64"  Canvas.Top="230" IsFlowing="{Binding Gas1Valve1IsOpen}"/>
+        <ctrls:FlowPipe  Name="Gas1Pipe1" Height="8"  Width="114" Canvas.Left="64"  Canvas.Top="230" IsFlowing="{Binding PV11ValveIsOpen}"/>
         <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="230" RotateTransformValue="-90"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="266" IsFlowing="{Binding Gas1Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="266" IsFlowing="{Binding PV12ValveIsOpen}"/>
         <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="274" RotateTransformValue="-180"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="178"  Canvas.Top="236" RotateTransformValue="90" IsFlowing="{Binding Gas1Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="178"  Canvas.Top="236" RotateTransformValue="90" IsFlowing="{Binding PV12ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="145" Canvas.Left="257"  Canvas.Top="126" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas1Valve2IsOpen"/>
-                    <Binding Path="Gas2Valve2IsOpen"/>
-                    <Binding Path="Gas3Valve2IsOpen"/>
-                    <Binding Path="Gas4Valve2IsOpen"/>
+                    <Binding Path="PV12ValveIsOpen"/>
+                    <Binding Path="PV22ValveIsOpen"/>
+                    <Binding Path="PV32ValveIsOpen"/>
+                    <Binding Path="PV42ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
 
         <!--SF6-->
-        <ctrls:FlowPipe Name="f2"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding Gas2Valve3IsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8" IsOpen="{Binding Gas2Valve3IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas2Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280"/>
+        <ctrls:FlowPipe Name="f2"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding MFC2ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8" IsOpen="{Binding MFC2ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="282" />-->
 
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="318" />-->
-        <ctrls:FlowPipe x:Name="Gas2Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="286" IsFlowing="{Binding Gas2Valve1IsOpen}"/>
+        <ctrls:FlowPipe x:Name="Gas2Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="286" IsFlowing="{Binding PV21ValveIsOpen}"/>
         <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="286" RotateTransformValue="-90"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="322" IsFlowing="{Binding Gas2Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="322" IsFlowing="{Binding PV22ValveIsOpen}"/>
         <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="330" RotateTransformValue="-180"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="36" Canvas.Left="178"  Canvas.Top="290" RotateTransformValue="90" IsFlowing="{Binding Gas2Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="36" Canvas.Left="178"  Canvas.Top="290" RotateTransformValue="90" IsFlowing="{Binding PV22ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="55" Canvas.Left="257"  Canvas.Top="270" RotateTransformValue="90" IsReverse="True" >
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas2Valve2IsOpen"/>
-                    <Binding Path="Gas3Valve2IsOpen"/>
-                    <Binding Path="Gas4Valve2IsOpen"/>
+                    <Binding Path="PV22ValveIsOpen"/>
+                    <Binding Path="PV32ValveIsOpen"/>
+                    <Binding Path="PV42ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
 
         <!--Gas3-->
-        <ctrls:FlowPipe Name="f3"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding Gas3Valve3IsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333" IsOpen="{Binding Gas3Valve3IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas3Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336"/>
+        <ctrls:FlowPipe Name="f3"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding MFC3ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333" IsOpen="{Binding MFC3ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC3ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="338" />-->
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="374" />-->
-        <ctrls:FlowPipe x:Name="Gas3Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding Gas3Valve1IsOpen}"/>
+        <ctrls:FlowPipe x:Name="Gas3Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding PV31ValveIsOpen}"/>
         <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="342" RotateTransformValue="-90"/>-->
         <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="386" RotateTransformValue="-180"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="378" IsFlowing="{Binding Gas3Valve2IsOpen}"/>
-        <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="178"  Canvas.Top="348" RotateTransformValue="90" IsFlowing="{Binding Gas3Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="378" IsFlowing="{Binding PV32ValveIsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="178"  Canvas.Top="348" RotateTransformValue="90" IsFlowing="{Binding PV32ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="57" Canvas.Left="257"  Canvas.Top="324" RotateTransformValue="90" IsReverse="True" >
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas3Valve2IsOpen"/>
-                    <Binding Path="Gas4Valve2IsOpen"/>
+                    <Binding Path="PV32ValveIsOpen"/>
+                    <Binding Path="PV42ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
@@ -141,65 +143,74 @@
 
 
         <!--Gas4-->
-        <ctrls:FlowPipe x:Name="Gas4Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="396" IsFlowing="{Binding Gas4Valve1IsOpen}"/>
+        <ctrls:FlowPipe x:Name="Gas4Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="396" IsFlowing="{Binding PV41ValveIsOpen}"/>
         <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="396" RotateTransformValue="-90"/>-->
         <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="436" RotateTransformValue="-180"/>-->
-        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="428" IsFlowing="{Binding Gas4Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="428" IsFlowing="{Binding PV42ValveIsOpen}"/>
         <!--<ctrls:Pipe2 Canvas.Left="257" Canvas.Top="423" RotateTransformValue="90"/>-->
-        <ctrls:FlowPipe Name="f4"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding Gas4Valve3IsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386" IsOpen="{Binding Gas4Valve3IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas4Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390"/>
+        <ctrls:FlowPipe Name="f4"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding MFC4ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386" IsOpen="{Binding MFC4ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC4ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="392" />-->
         <ctrls:FlowPipe   Height="8"  Width="54" Canvas.Left="257"  Canvas.Top="380" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas4Valve2IsOpen"/>
+                    <Binding Path="PV42ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <ctrls:FlowPipe   Height="8"  Width="32" Canvas.Left="178"  Canvas.Top="401" RotateTransformValue="90" IsFlowing="{Binding Gas4Valve2IsOpen}"/>
+        <ctrls:FlowPipe   Height="8"  Width="32" Canvas.Left="178"  Canvas.Top="401" RotateTransformValue="90" IsFlowing="{Binding PV42ValveIsOpen}"/>
 
 
         <!--Gas5-->
-        <ctrls:FlowPipe Name="f5"  Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding Gas5ValveIsOpen}">
-            
+        <ctrls:FlowPipe Name="f5"  Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding MFC5ValveIsOpen}">
+
         </ctrls:FlowPipe>
-        <!--<ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443" IsOpen="{Binding Gas5ValveIsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443" IsOpen="{Binding MFC5ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="447.5" />-->
 
 
         <!--O2-->
-        <ctrls:FlowPipe Name="f6"  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding Gas6ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498" IsOpen="{Binding Gas6ValveIsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501"/>
+        <ctrls:FlowPipe Name="f6"  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding MFC6ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498" IsOpen="{Binding MFC6ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="503" />-->
 
         <!--Gas7-->
-        <ctrls:FlowPipe Name="f7"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding Gas7ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554" IsOpen="{Binding Gas7ValveIsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557"/>
+        <ctrls:FlowPipe Name="f7"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding MFC7ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554" IsOpen="{Binding MFC7ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="559" />-->
 
         <!--Gas8-->
-        <ctrls:FlowPipe Name="f8"  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding Gas8ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611" IsOpen="{Binding Gas8ValveIsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614"/>
+        <ctrls:FlowPipe Name="f8"  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding MFC8ValveIsOpen}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611" IsOpen="{Binding MFC8ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding MFC8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614"/>
 
         <!--<ctrls:Pipe2 RotateTransformValue="90"   Canvas.Left="490" Canvas.Top="615"  />-->
-        
+
 
 
 
         <!--与chamber上方连接的管道-->
         <ctrls:FlowPipe Name="finalPipe1" Height="8"  Width="664" Canvas.Left="482" Canvas.Top="120">
             <ctrls:FlowPipe.IsFlowing>
-                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
+                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter4}">
                     <Binding Path="GasFinalValveIsOpen"/>
+                    <Binding Path="N2ValveIsOpen"/>
+                    <Binding Path="PV11ValveIsOpen"/>
+                    <Binding Path="PV21ValveIsOpen"/>
+                    <Binding Path="PV31ValveIsOpen"/>
+                    <Binding Path="PV41ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
@@ -208,16 +219,23 @@
 
         <ctrls:Pipe2    Canvas.Left="1144" Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Top"  />
 
-        
 
-        <ctrls:CustomSwitch    Height="20" Value="  SRF ON/OFF  " Canvas.Left="500" Canvas.Top="325" />
-        <ctrls:CustomSwitch   Height="20" Value="  BRF ON/OFF  " Canvas.Left="671" Canvas.Top="325" />
 
+        <!--<ctrls:CustomSwitch    Height="20" Value="  SRF ON/OFF  " Canvas.Left="500" Canvas.Top="325" />-->
+        <Ellipse Width="20" Height="20" Fill="{Binding SRFIsOn,Converter={StaticResource boolToColor}}"  Canvas.Left="500" Canvas.Top="325"/>
+        <Button Height="20" Width="100" Content="SRF ON/OFF" Canvas.Left="530" Canvas.Top="325" Command="{Binding SetSRfCommand}"  Background="Gray"/>
+        <!--<ctrls:CustomSwitch   Height="20" Value="  BRF ON/OFF  " Canvas.Left="671" Canvas.Top="325" />-->
+        <Ellipse Width="20" Height="20" Fill="{Binding BRFIsOn,Converter={StaticResource boolToColor}}"  Canvas.Left="650" Canvas.Top="325"/>
+        <Button Height="20" Width="100" Content="BRF ON/OFF" Canvas.Left="680" Canvas.Top="325" Command="{Binding SetBRfCommand}"  Background="Gray"/>
         <ctrls:CustomSwitch   Height="20" Value="  Gas ON/OFF  " Canvas.Left="500" Canvas.Top="590" />
         <ctrls:CustomSwitch   Height="20" Value="   HV ON/OFF   " Canvas.Left="1280" Canvas.Top="316" />
 
-        <ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsUp]}"  Height="20" Value="    Pin Up     " Canvas.Left="1080" Canvas.Top="466"  />
-        <ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsDown]}"  Height="20" Value="  Pin Down  " Canvas.Left="1080" Canvas.Top="490" />
+        <!--<ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsUp]}"  Height="20" Value="    Pin Up     " Canvas.Left="1080" Canvas.Top="466"  />-->
+        <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.LiftPinIsUp],Converter={StaticResource boolToColor}}"  Canvas.Left="1065" Canvas.Top="466"/>
+        <Button Height="20" Width="100" Content="Pin Up" Canvas.Left="1100" Canvas.Top="466" Command="{Binding PinUpDownCommand}" CommandParameter="True" Background="Gray"/>
+        <!--<ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsDown]}"  Height="20" Value="  Pin Down  " Canvas.Left="1080" Canvas.Top="490" />-->
+        <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.LiftPinIsDown],Converter={StaticResource boolToColor}}" Canvas.Left="1065" Canvas.Top="490"/>
+        <Button Height="20" Width="100" Content="Pin Down" Canvas.Left="1100" Canvas.Top="490" Command="{Binding PinUpDownCommand}" CommandParameter="False" Background="Gray"/>
 
 
 
@@ -229,156 +247,173 @@
         <ctrls:FlowPipe Name="l8" Height="8"  Width="56" Canvas.Left="490" Canvas.Top="126"  RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas1Valve3IsOpen"/>
-                    <Binding Path="Gas2Valve3IsOpen"/>
-                    <Binding Path="Gas3Valve3IsOpen"/>
-                    <Binding Path="Gas4Valve3IsOpen"/>
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC1ValveIsOpen"/>
+                    <Binding Path="MFC2ValveIsOpen"/>
+                    <Binding Path="MFC3ValveIsOpen"/>
+                    <Binding Path="MFC4ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l1" Height="8"  Width="56" Canvas.Left="490" Canvas.Top="180"  RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas1Valve3IsOpen"/>
-                    <Binding Path="Gas2Valve3IsOpen"/>
-                    <Binding Path="Gas3Valve3IsOpen"/>
-                    <Binding Path="Gas4Valve3IsOpen"/>
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC1ValveIsOpen"/>
+                    <Binding Path="MFC2ValveIsOpen"/>
+                    <Binding Path="MFC3ValveIsOpen"/>
+                    <Binding Path="MFC4ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l9" Height="8"  Width="58" Canvas.Left="490" Canvas.Top="234"  RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas2Valve3IsOpen"/>
-                    <Binding Path="Gas3Valve3IsOpen"/>
-                    <Binding Path="Gas4Valve3IsOpen"/>
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC2ValveIsOpen"/>
+                    <Binding Path="MFC3ValveIsOpen"/>
+                    <Binding Path="MFC4ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l2" Height="8"  Width="56" Canvas.Left="490" Canvas.Top="290"  RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas3Valve3IsOpen"/>
-                    <Binding Path="Gas4Valve3IsOpen"/>
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC3ValveIsOpen"/>
+                    <Binding Path="MFC4ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l3" Height="8"  Width="58" Canvas.Left="490" Canvas.Top="344" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas4Valve3IsOpen"/>
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC4ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l4" Height="8"  Width="58" Canvas.Left="490" Canvas.Top="400" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas5ValveIsOpen"/>
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l5" Height="8"  Width="58" Canvas.Left="490" Canvas.Top="456" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas6ValveIsOpen"/>
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l6" Height="8"  Width="58" Canvas.Left="490" Canvas.Top="512" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas7ValveIsOpen"/>
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="l7" Height="8"  Width="48" Canvas.Left="490" Canvas.Top="568" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                    <Binding Path="Gas8ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <ctrls:FlowPipe Name="finalPipe2" Height="8"  Width="70" Canvas.Left="1157" Canvas.Top="129" RotateTransformValue="90">
             <ctrls:FlowPipe.IsFlowing>
-                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
+                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter4}">
                     <Binding Path="GasFinalValveIsOpen"/>
+                    <Binding Path="N2ValveIsOpen"/>
+                    <Binding Path="PV11ValveIsOpen"/>
+                    <Binding Path="PV21ValveIsOpen"/>
+                    <Binding Path="PV31ValveIsOpen"/>
+                    <Binding Path="PV41ValveIsOpen"/>
+                    <Binding Path="MFC5ValveIsOpen"/>
+                    <Binding Path="MFC6ValveIsOpen"/>
+                    <Binding Path="MFC7ValveIsOpen"/>
+                    <Binding Path="MFC8ValveIsOpen"/>
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
 
         <!--pump-->
         <!--<deviceControl:AITPump Canvas.Top="698" DeviceData="{Binding MainPumpData}" EnableControl="True" IsShowSensor="False" Canvas.Left="1054" />-->
-        <ctrls:Pump Canvas.Top="700"  Canvas.Left="1244" Width="35" Height="35" IsOpen="{Binding PumpIsOpen,Mode=TwoWay}"/>
+        <ctrls:Pump Canvas.Top="700"  Canvas.Left="1244" Width="35" Height="35" IsOpen="{Binding PumpIsOpen,Mode=TwoWay}">
+            <ctrls:Pump.ContextMenu>
+                <ContextMenu>
+                    <RadioButton Content="Open" Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen}"/>
+                    <RadioButton Content="Close" Command="{Binding ClosePumpCommand}"   IsChecked="{Binding PumpIsOpen,Converter={StaticResource BoolToBool}}"/>
+                </ContextMenu>
+            </ctrls:Pump.ContextMenu>
+        </ctrls:Pump>
+        <TextBlock Text="Rough Pump" Canvas.Top="750"  Canvas.Left="1220" FontSize="15"/>
 
         <!--阀-->
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="386"  IsOpen="{Binding Gas4Valve1IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas4Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390"/>
+        <!--<ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="386"  IsOpen="{Binding PV41ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV41ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="127" Canvas.Top="333" IsOpen="{Binding Gas3Valve1IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas3Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336"/>
+        <!--<ctrls:FlowPipeValve  x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="127" Canvas.Top="333" IsOpen="{Binding PV31ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV31ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="276"  IsOpen="{Binding Gas2Valve1IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas2Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280"/>
+        <!--<ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="276"  IsOpen="{Binding PV21ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="127" Canvas.Top="220" IsOpen="{Binding Gas1Valve1IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas1Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224"/>
+        <!--<ctrls:FlowPipeValve  x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="127" Canvas.Top="220" IsOpen="{Binding PV11ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV11ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224"/>
 
         <ctrls:FlowPipeValve  x:Name="pumpValve1"  Height="20" Width="24" Canvas.Left="127" Canvas.Top="163" Visibility="Hidden" />
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="256" IsOpen="{Binding Gas1Valve2IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas1Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259"/>
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="256" IsOpen="{Binding PV12ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="312" IsOpen="{Binding Gas2Valve2IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas2Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315"/>
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="312" IsOpen="{Binding PV22ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="368" IsOpen="{Binding Gas3Valve2IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas3Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371"/>
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="368" IsOpen="{Binding PV32ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV32ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="418" IsOpen="{Binding Gas4Valve2IsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding Gas4Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421"/>
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="418" IsOpen="{Binding PV42ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PV42ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421"/>
 
-        <!--<ctrls:FlowPipeValve     x:Name="VN21"  Height="20" Width="24" Canvas.Left="267" Canvas.Top="148"  IsOpen="{Binding VN2Valve1IsOpen,Mode=TwoWay}" >
+        <!--<ctrls:FlowPipeValve     x:Name="VN21"  Height="20" Width="24" Canvas.Left="267" Canvas.Top="148"  IsOpen="{Binding PVN21Valve,Mode=TwoWay}" >
             <ctrls:FlowPipeValve.RenderTransform>
                 <TransformGroup>
                     <RotateTransform Angle="90"/>
                 </TransformGroup>
             </ctrls:FlowPipeValve.RenderTransform>
         </ctrls:FlowPipeValve>-->
-        <customControls:CommonValveControl Status="{Binding VN2Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="243" Canvas.Top="148"/>
+        <customControls:CommonValveControl Status="{Binding PVN21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="243" Canvas.Top="148"/>
 
 
         <!--与chamber左上角连接的管道-->
         <ctrls:FlowPipe  Height="8"  Width="40" Canvas.Left="1262" Canvas.Top="275"  RotateTransformValue="90" />
         <ctrls:FlowPipe  Height="8"  Width="126" Canvas.Left="1250" Canvas.Top="192"  RotateTransformValue="90" />
         <ctrls:Pipe2     Canvas.Left="1254" Canvas.Top="285" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
-       
+
         <ctrls:FlowPipe  Height="8"  Width="80" Canvas.Left="1252" Canvas.Top="182"   />
         <ctrls:FlowPipe  Height="8"  Width="70" Canvas.Left="1264" Canvas.Top="272"   />
         <!--<ctrls:FlowPipeValve    Height="20" Width="24" Canvas.Left="1280" Canvas.Top="262"  />-->
@@ -415,8 +450,8 @@
         <ctrls:Pipe2     Canvas.Left="1242" Canvas.Top="195" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
         <!--<ctrls:Pipe2    Canvas.Left="1035" Canvas.Top="213" HorizontalAlignment="Left" VerticalAlignment="Top"  />
         <ctrls:Pipe2    Canvas.Left="1260" Canvas.Top="277" HorizontalAlignment="Left" VerticalAlignment="Top" />-->
-        
-        
+
+
         <!--与chamber底部连接的管道-->
         <ctrls:FlowPipe   Height="8"  Width="283" Canvas.Left="772"  Canvas.Top="658" />
         <ctrls:FlowPipe   Height="8"  Width="198" Canvas.Left="1055"  Canvas.Top="463" RotateTransformValue="90"/>
@@ -467,24 +502,24 @@
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
 
-        <TextBlock Canvas.Left="1130"  Canvas.Top="584" Text="Soft"/>
-        <TextBlock Canvas.Left="1225"  Canvas.Top="584" Text="Fast"/>
+        <TextBlock Canvas.Left="1130"  Canvas.Top="558" Text="Soft"/>
+        <TextBlock Canvas.Left="1178"  Canvas.Top="558" Text="Fast"/>
+
+        <ctrls:FlowPipe  x:Name="purgeFlow1" Height="8"  Width="194" Canvas.Left="1246"  Canvas.Top="535" IsReverse="True" IsFlowing="{Binding TurboPumpPurgeValveIsOpen,Mode=TwoWay}" >
 
-        <ctrls:FlowPipe  x:Name="purgeFlow1" Height="8"  Width="194" Canvas.Left="1246"  Canvas.Top="535" IsReverse="True" IsFlowing="{Binding PurgeValveIsOpen,Mode=TwoWay}" >
-            
         </ctrls:FlowPipe>
-        <ctrls:FlowPipe  x:Name="purgeFlow2" ToolTip="123"   Height="8"  Width="142" Canvas.Left="1448"  Canvas.Top="542" RotateTransformValue="90" IsReverse="True" IsFlowing="{Binding PurgeValveIsOpen}"/>
+        <ctrls:FlowPipe  x:Name="purgeFlow2" ToolTip="123"   Height="8"  Width="142" Canvas.Left="1448"  Canvas.Top="542" RotateTransformValue="90" IsReverse="True" IsFlowing="{Binding TurboPumpPurgeValveIsOpen}"/>
         <ctrls:Pipe2    Canvas.Left="1435"  Canvas.Top="535" HorizontalAlignment="Left" VerticalAlignment="Top"  />
-        <!--<ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="1458"  Canvas.Top="610" RotateTransformValue="90" IsOpen="{Binding PurgeValveIsOpen,Mode=TwoWay}"/>-->
-        <customControls:CommonValveControl Status="{Binding PurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610"/>
-
+        <!--<ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="1458"  Canvas.Top="610" RotateTransformValue="90" IsOpen="{Binding TurboPumpPumpingValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding TurboPumpPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610"/>
+        <TextBlock Text="Turbo N2&#10;   Purge" Canvas.Left="1460"  Canvas.Top="610" FontSize="15"/>
 
         <!--<ctrls:FlowPipeValve x:Name="HeValve1" Canvas.Top="649" Canvas.Left="1000"  Height="20" Width="24"  />-->
-        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="980" />
+        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="980" Status="{Binding PVHe1ValveIsOpen,Mode=TwoWay}"/>
 
 
         <!--<ctrls:FlowPipeValve x:Name="HeValve2" Canvas.Top="671" Canvas.Left="1100"  Height="20" Width="24"  />-->
-        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100"/>
+        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100" Status="{Binding PVHe2ValveIsOpen,Mode=TwoWay}"/>
 
 
         <!--<ctrls:FlowPipeValve x:Name="SoftPumpValve" ToolTip="Soft"  Canvas.Top="555" Canvas.Left="1178"  Height="20" Width="20" RotateTransformValue="90" IsOpen="{Binding SoftPumpValveIsOpen,Mode=TwoWay}" />-->
@@ -493,18 +528,27 @@
 
         <!--<ctrls:FlowPipeValve x:Name="FastPumpValve" ToolTip="Fast"   Canvas.Top="555" Canvas.Left="1229"  Height="20" Width="24"  RotateTransformValue="90" IsOpen="{Binding FastPumpValveIsOpen,Mode=TwoWay}"/>-->
         <customControls:CommonValveControl Status="{Binding FastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20" Canvas.Top="555" Canvas.Left="1205"/>
-        
+
         <!--<ctrls:purge Name="purge" Canvas.Left="1410"  Canvas.Top="620" />-->
 
 
         <!--<ctrls:FlowPipeValve     Canvas.Top="596" Canvas.Left="1276"  Height="20" Width="24"  RotateTransformValue="90"/>-->
-        <customControls:CommonValveControl  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="596" Canvas.Left="1252"/>
+        <customControls:CommonValveControl  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="596" Canvas.Left="1252" Status="{Binding TurboPumpPumpingValveIsOpen,Mode=TwoWay}"/>
 
 
         <ctrls:Pipe2    Canvas.Left="490"  Canvas.Top="615" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
 
         <!--turbo-->
-        <ctrls:Turbo Width="40" Height="40"  Canvas.Top="520" Canvas.Left="1242" />
+        <ctrls:Turbo Width="40" Height="40"  Canvas.Top="521" Canvas.Left="1242" IsOpen="{Binding TurboIsOpen}">
+            <ctrls:Turbo.ContextMenu>
+                <ContextMenu>
+                    <!--<MenuItem Header="打开" Command="{Binding TurboOpenCommand}"></MenuItem>
+                    <MenuItem Header="关闭" Command="{Binding TurboCloseCommand}"></MenuItem>-->
+                    <RadioButton Content="Open" Command="{Binding OpenTurboPumpCommand}" IsChecked="{Binding TurboIsOpen}"/>
+                    <RadioButton Content="Close" Command="{Binding CloseTurboPumpCommand}" IsChecked="{Binding TurboIsOpen,Converter={StaticResource BoolToBool}}"/>
+                </ContextMenu>
+            </ctrls:Turbo.ContextMenu>
+        </ctrls:Turbo>
 
         <!--蝶阀-->
         <ctrls:ButterflyValve Canvas.Top="475" Canvas.Left="1245" />
@@ -522,38 +566,38 @@
         <TextBlock Text="Helium" Canvas.Top="653" Canvas.Left="680" FontSize="15"/>
 
         <!--左侧管道标签-->
-        <ctrls:TextboxWithLabel  Canvas.Top="205" Canvas.Left="285" LabelValue="MFC1" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False"  Canvas.Top="205" Canvas.Left="275" LabelValue="MFC1" TextBoxValue="{Binding RtDataValues[PMA.MfcGas1.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="205" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas1.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="285" LabelValue="MFC2" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="260" Canvas.Left="275" LabelValue="MFC2" TextBoxValue="{Binding RtDataValues[PMA.MfcGas2.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas2.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="285" LabelValue="MFC3" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="318" Canvas.Left="275" LabelValue="MFC3" TextBoxValue="{Binding RtDataValues[PMA.MfcGas3.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas3.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="285" LabelValue="MFC4" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="370" Canvas.Left="275" LabelValue="MFC4" TextBoxValue="{Binding RtDataValues[PMA.MfcGas4.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas4.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="285" LabelValue="MFC5" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="426" Canvas.Left="275" LabelValue="MFC5" TextBoxValue="{Binding RtDataValues[PMA.MfcGas5.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas5.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="285" LabelValue="MFC6" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="482" Canvas.Left="275" LabelValue="MFC6" TextBoxValue="{Binding RtDataValues[PMA.MfcGas6.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas6.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="285" LabelValue="MFC7" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="538" Canvas.Left="275" LabelValue="MFC7" TextBoxValue="{Binding RtDataValues[PMA.MfcGas7.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas7.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="285" LabelValue="MFC8" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel IsReadOnly="False" Canvas.Top="595" Canvas.Left="275" LabelValue="MFC8" TextBoxValue="{Binding RtDataValues[PMA.MfcGas8.SetPoint],StringFormat='F1'}" TextBoxColor="White" />
         <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas8.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
 
         <!--chamber管道标签-->
         <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ProcessPressure],StringFormat='F3'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ChamberPressure],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <!--<ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="800" LabelValue="Set(Torr)" TextBoxValue="0.0" TextBoxColor="White" />-->
-        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="870" LabelValue="Flow(sccm)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="870" LabelValue="Flow(sccm)" TextBoxValue="{Binding RtDataValues[PMA.MfcHe.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD" />
         <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1300" LabelValue="CM3(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ForelinePressure],StringFormat='F2'}" TextBoxColor="#D7E4BD" />
         <ctrls:TextboxWithLabel  Canvas.Top="464" Canvas.Left="1290" LabelValue="Position" TextBoxValue="1000" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="511" Canvas.Left="1320" LabelValue="Flow(sccm)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="581" Canvas.Left="1022" LabelValue="Pressure(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD">
+        <ctrls:TextboxWithLabel  Canvas.Top="511" Canvas.Left="1320" LabelValue="Flow(sccm)" TextBoxValue="{Binding RtDataValues[PMA.MfcN2.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="581" Canvas.Left="1022" LabelValue="Pressure(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ESCHePressure],StringFormat='F1'}" TextBoxColor="#D7E4BD">
             <ctrls:TextboxWithLabel.RenderTransform>
                 <RotateTransform Angle="-90"/>
             </ctrls:TextboxWithLabel.RenderTransform>
         </ctrls:TextboxWithLabel>
-        <ctrls:TextboxWithLabel  Canvas.Top="580" Canvas.Left="1280" LabelValue="Speed(rpm)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
-
+        <ctrls:TextboxWithLabel  Canvas.Top="550" Canvas.Left="1280" LabelValue="Speed(rpm)" TextBoxValue="{Binding RtDataValues[PMA.TurboPumpRotationalSpeed],StringFormat='F0'}" TextBoxColor="#D7E4BD" />
+        <TextBlock Canvas.Top="600" Canvas.Left="1280" Text="ISO"/>
 
 
 
@@ -579,7 +623,11 @@
             <TextBlock Grid.Row="2" Text="Step Name" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
             <TextBlock Grid.Row="3" Text="Elpased Time" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
             <TextBlock Grid.Row="4" Text="End Model" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
-
+            <TextBlock Grid.Row="0" Grid.Column="1" Text="" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
+            <TextBlock Grid.Row="1" Grid.Column="1" Text="" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
+            <TextBlock Grid.Row="2" Grid.Column="1" Text="" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
+            <TextBlock Grid.Row="3" Grid.Column="1" Text="" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
+            <TextBlock Grid.Row="4" Grid.Column="1" Text="" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
 
         </Grid>
 
@@ -620,6 +668,17 @@
             <TextBox Grid.Row="6" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"    BorderThickness="0" />
             <TextBox Grid.Row="7" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"    BorderThickness="0" />
             <TextBox Grid.Row="8" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"    BorderThickness="0" />
+
+            <TextBlock Grid.Row="0" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="1" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="2" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="3" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="4" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="5" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="6" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="7" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="8" Grid.Column="2" Width="Auto" Height="Auto" Text="0.0"  Background="#E8E8E8" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+
         </Grid>
 
         <Grid Width="350" Height="120" Canvas.Left="1280" Canvas.Top="340" Background="#E8E8E8"  unity:GridOptions.ShowBorder="True">
@@ -643,10 +702,16 @@
 
 
             <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
-            <TextBox Grid.Row="1" Grid.Column="1" Width="Auto" Height="Auto" Text="0.1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.ColumnSpan="2" Background="#E8E8E8"   BorderThickness="0" />
-            <TextBox Grid.Row="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.2" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.ColumnSpan="2" Background="#E8E8E8"   BorderThickness="0" />
+            <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.1"  TextBlock.TextAlignment="Center" VerticalAlignment="Bottom" Block.TextAlignment="Center" Margin="0,0,0,4"/>
+            <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.2" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
             <TextBox Grid.Row="3" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
             <TextBox Grid.Row="4" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
+
+            <TextBlock Grid.Row="0" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <!--<TextBlock Grid.Row="1" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="2" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>-->
+            <TextBlock Grid.Row="3" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="4" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
         </Grid>
 
         <Grid  Height="40" Width="1100"  Canvas.Left="20" Canvas.Top="20" Background="#E8E8E8"  unity:GridOptions.ShowBorder="True">
@@ -692,7 +757,11 @@
         <Button  Background="{StaticResource buttonBrush}"  FontSize="15"  Foreground="Black" FontWeight="Bold"  BorderThickness="0" Content="{DynamicResource LeakCheck}"  Width="150" Height="30" Canvas.Right="20" Canvas.Top="250" />-->
 
         <!--Chamber-->
-        <ctrls:Chamber Canvas.Left="1030" Canvas.Top="224"/>
+        <ctrls:Chamber Canvas.Left="1030" Canvas.Top="224" 
+                       IsLiftPinUp="{Binding RtDataValues[PMA.LiftPinIsUp]}" 
+                       IsOpenSlitDoor="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" 
+                       IsLidOpen="{Binding RtDataValues[PMA.IsLidClosed],Converter={StaticResource BoolToBool}}"                       
+                        />
 
         <!--LoadLock-->
         <!--<ctrls:LoadLock Canvas.Left="1270" Canvas.Top="224"/>-->
@@ -700,15 +769,21 @@
 
         <!--<TextBlock Text="LoadLock Manual Operation" Canvas.Right="10" Canvas.Top="480"   Foreground="White"/>-->
         <!--<StackPanel   Orientation="Vertical" Canvas.Right="80" Canvas.Top="500">
-                --><!--流气--><!--
+                -->
+        <!--流气-->
+        <!--
                 <Button Content="抽气" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
                 
                 </Button>
-                --><!--放片--><!--
+                -->
+        <!--放片-->
+        <!--
                 <Button Content="放片" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
                    
                 </Button>
-                --><!--检测漏率--><!--
+                -->
+        <!--检测漏率-->
+        <!--
                 <Button Content="检测漏率" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
                
                 </Button>
@@ -719,12 +794,16 @@
 
                 <Button Content="取片" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}"/>
             </StackPanel>-->
-            <!--<StackPanel Margin="10,0,10,0"  Orientation="Vertical">
-                --><!--充气--><!--
+        <!--<StackPanel Margin="10,0,10,0"  Orientation="Vertical">
+                -->
+        <!--充气-->
+        <!--
                 <Button Content="充气" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}">
                
                 </Button>
-                --><!--取片--><!--
+                -->
+        <!--取片-->
+        <!--
                 <Button Content="取片" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
 
                 </Button>
@@ -760,8 +839,8 @@
                 <StackPanel Orientation="Vertical">
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                         <Button Width="80" Height="25" Margin="10,0" Content="初始化" Command="{Binding PMInitCommnad}"/>
-                        <Button Width="80" Height="25" Margin="10,0" Content="终止">
-                            
+                        <Button Width="80" Height="25" Margin="10,0" Content="终止"   Command="{Binding PMAbortCommnad}">
+
                         </Button>
                     </StackPanel>
                     <Grid Margin="5,5,5,0">
@@ -778,10 +857,10 @@
                     </Grid>
                     <StackPanel Margin="0,5,0,10" Orientation="Horizontal" HorizontalAlignment="Center">
                         <Button Width="80" Height="25" Margin="10,0" Content="手动" IsEnabled="{Binding IsManualButtonEnabled}" >
-                           
+
                         </Button>
                         <Button Width="80" Height="25" Margin="10,0" Content="自动" IsEnabled="{Binding IsAutoButtonEnabled}">
-                         
+
                         </Button>
                     </StackPanel>
 
@@ -800,10 +879,10 @@
 
                     <StackPanel Margin="0,5,0,10" Orientation="Horizontal" HorizontalAlignment="Center">
                         <Button Width="80" Height="25" Margin="10,0" Content="离线" IsEnabled="{Binding IsOfflineButtonEnabled}">
-                        
+
                         </Button>
                         <Button Width="80" Height="25" Margin="10,0" Content="在线" IsEnabled="{Binding IsOnlineButtonEnabled}" >
-                    
+
                         </Button>
                     </StackPanel>
                 </StackPanel>
@@ -862,14 +941,11 @@
                         <Grid.RowDefinitions>
                             <RowDefinition Height="50"/>
                         </Grid.RowDefinitions>
-                        <Button Content="抽真空" Width="80" Height="25" Margin="0,10,0,0" IsEnabled="{Binding Path=IsManualMode}" Grid.Column="1" 
-                            Background="{Binding Path=PumpButtonBackground}" Command="{Binding PumpCommand}">
-                       
-                        </Button>
-                        <Button Content="启动泵" Width="85" Height="25" Margin="0,10,0,0" IsEnabled="{Binding Path=IsManualMode}" Grid.Column="0" 
+                        <Button Content="抽真空" Width="80" Height="25" Margin="20,10,0,0" IsEnabled="{Binding Path=IsManualMode}" Grid.Column="0" 
+                         Command="{Binding PumpCommand}"/>
+                        <!--<Button Content="启动泵" Width="85" Height="25" Margin="0,10,0,0" IsEnabled="{Binding Path=IsManualMode}" Grid.Column="0" 
                             Background="{Binding Path=PumpButtonBackground}" Command="{Binding OpenPumpCommand}">
-                          
-                        </Button>
+                        </Button>-->
                     </Grid>
                 </StackPanel>
             </Border>
@@ -878,13 +954,14 @@
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
                         <!--流气-->
                         <Button Content="流气" Width="80" Height="25" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding GasCommand}">
-                       
+
                         </Button>
                         <!--射频-->
                         <Button Content="射频" Width="80" Height="25" Margin="0,10" IsEnabled="{Binding Path=IsRfManualMode}" Command="{Binding RfCommand}">
-                       
+
                         </Button>
-                        <!--加热基座--><!--
+                        <!--加热基座-->
+                        <!--
                         <Button Content="底座加热" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
                     
                         </Button>-->
@@ -892,9 +969,9 @@
 
                     </StackPanel>
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
-                        
+
                         <Button Content="吹扫" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding PurgeCommand}">
-                          
+
                         </Button>
 
                         <!--<Button Content="检测漏率" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
@@ -902,7 +979,7 @@
                         </Button>-->
 
                         <Button Content="充气" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding VentCommand}">
-                       
+
                         </Button>
 
                     </StackPanel>
@@ -928,26 +1005,26 @@
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
                         <!--流气-->
                         <Button Content="抽气" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
-        
+
                         </Button>
                         <!--放片-->
                         <Button Content="放片" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
-                     
+
                         </Button>
                         <!--检测漏率-->
                         <Button Content="检测漏率" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
-                      
+
                         </Button>
 
                     </StackPanel>
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
                         <!--充气-->
                         <Button Content="充气" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}">
-                     
+
                         </Button>
                         <!--取片-->
                         <Button Content="取片" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
-                     
+
                         </Button>
 
                     </StackPanel>

+ 59 - 13
Venus/Venus_MainPages/Views/PlatformView.xaml

@@ -5,7 +5,9 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Venus_MainPages.Views"
              xmlns:ctrls="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
+             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
              xmlns:converters="clr-namespace:Venus_Themes.Converters;assembly=Venus_Themes"
+             xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              mc:Ignorable="d" 
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
@@ -14,15 +16,36 @@
         <converters:BoolToBool  x:Key="boolToBool"/>
         <converters:BoolToColor x:Key="boolToColor"/>
         <converters:BoolToColor2 x:Key="boolToColor2"/>
+        <converters:VisibilityToReverse x:Key="VisibilityToReverse"/>
     </UserControl.Resources>
     <Canvas>
-        <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="120" Canvas.Left="90"  Canvas.Top="120" IsFlowing="{Binding VentValveIsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipe  x:Name="purgeFlow2"    Height="8"  Width="142" Canvas.Left="276"  Canvas.Top="220" RotateTransformValue="90"  IsFlowing="{Binding PumpValveIsOpen,Mode=TwoWay}"/>
-        <ctrls:Pump Canvas.Top="360"  Canvas.Left="254" Width="35" Height="35"/>
-        <ctrls:FlowPipeValve  Height="20" Width="24" Canvas.Left="130" Canvas.Top="110" IsOpen="{Binding VentValveIsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="285.5"  Canvas.Top="310" RotateTransformValue="90" IsOpen="{Binding PumpValveIsOpen,Mode=TwoWay}"/>
-        <ctrls:CustomSwitch    Height="20" Value="   Slit Door Open   " Canvas.Left="100" Canvas.Top="300" IsOpen="{Binding LoadLockDoorIsOpen,Mode=TwoWay}" />
-        <ctrls:CustomSwitch   Height="20"  Value="   Slit Door Close  "  Canvas.Left="100" Canvas.Top="340" IsOpen="{Binding LoadLockDoorIsOpen,Mode=TwoWay,Converter={StaticResource boolToBool}}" />
+        <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="120" Canvas.Left="90"  Canvas.Top="120" IsFlowing="{Binding LoadLockVentValveIsOpen,Mode=TwoWay}">
+            
+        </ctrls:FlowPipe>
+        <ctrls:FlowPipe  x:Name="purgeFlow2"    Height="8"  Width="142" Canvas.Left="276"  Canvas.Top="220" RotateTransformValue="90"  IsFlowing="{Binding LoadLockPumpValveIsOpen,Mode=TwoWay}"/>
+        <ctrls:Pump Canvas.Top="360"  Canvas.Left="254" Width="35" Height="35" IsOpen="{Binding PumpIsOpen,Mode=TwoWay}">
+            <ctrls:Pump.ContextMenu>
+                <ContextMenu>
+                    <RadioButton Content="Open" Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen}"/>
+                    <RadioButton Content="Close" Command="{Binding ClosePumpCommand}"   IsChecked="{Binding PumpIsOpen,Converter={StaticResource boolToBool}}"/>
+                </ContextMenu>
+            </ctrls:Pump.ContextMenu>
+        </ctrls:Pump>
+        <TextBlock Canvas.Top="320"  Canvas.Left="300" Text="吹扫计数:" FontSize="15"/>
+        <TextBlock Canvas.Top="320"  Canvas.Left="380" Text="{Binding PurgeCounter}"  FontSize="15"/>
+        <!--<ctrls:FlowPipeValve  Height="20" Width="24" Canvas.Left="130" Canvas.Top="110" IsOpen="{Binding VentValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding LoadLockVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="130" Canvas.Top="113"/>
+        <!--<ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="285.5"  Canvas.Top="310" RotateTransformValue="90" IsOpen="{Binding PumpValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding LoadLockPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="262"  Canvas.Top="310"/>
+
+        <!--<ctrls:CustomSwitch   Height="20" Value="   Slit Door Open   " Canvas.Left="100" Canvas.Top="300" IsOpen="{Binding LoadLockDoorIsOpen,Mode=TwoWay}">
+       
+        </ctrls:CustomSwitch>-->
+        <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource boolToColor2}}"  Canvas.Left="70" Canvas.Top="300"/>
+        <Button Height="20" Content="   Slit Door Open   " Canvas.Left="100" Canvas.Top="300" Command="{Binding OpenDoorCommand}"/>
+        <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource boolToColor}}" Canvas.Left="70" Canvas.Top="340"/>
+        <Button Height="20" Content="   Slit Door Close  " Canvas.Left="100" Canvas.Top="340" Command="{Binding CloseDoorCommand}"/>
+        <!--<ctrls:CustomSwitch   Height="20"  Value="   Slit Door Close  "  Canvas.Left="100" Canvas.Top="340" IsOpen="{Binding LoadLockDoorIsOpen,Mode=TwoWay,Converter={StaticResource boolToBool}}"/>-->
         <Border    BorderBrush="Gray"  BorderThickness="0"  Width="180" Height="6" Canvas.Left="330" Canvas.Top="120">
             <Border.Background>
                 <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
@@ -42,7 +65,7 @@
             </Border.Background>
         </Border>
         <ctrls:TextboxWithLabel  Canvas.Left="310" Canvas.Top="254" LabelValue="CM3(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Left="500" Canvas.Top="94" LabelValue="CM(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Left="500" Canvas.Top="94" LabelValue="CM(Torr)" TextBoxValue="{Binding RtDataValues[PMA.LoadlockPressure],StringFormat='F2'}" TextBoxColor="#D7E4BD"/>
         <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Left="400" Canvas.Top="124" >
             <Border.RenderTransform>
                 <RotateTransform Angle="90"/>
@@ -73,7 +96,30 @@
         <TextBlock Text="VAC" Canvas.Left="387" Canvas.Top="185"/>
         <TextBlock Text="N2" Canvas.Left="30" Canvas.Top="116"/>
         <Image  Canvas.Left="50"  Canvas.Top="110"  Width="40" Height="25"  Source="Pack://application:,,,/Venus_Themes;Component/Resources/Arrow.png" Stretch="Uniform" />
-        <Image Canvas.Left="200" Canvas.Top="100" Width="141" Height="141" Source="Pack://application:,,,/Venus_Themes;Component/Resources/LoadLock.png"></Image>
+        <Image Canvas.Left="200" Canvas.Top="100" Width="141" Height="141" Source="Pack://application:,,,/Venus_Themes;Component/Resources/LoadLock.png">
+            <Image.ContextMenu>
+                <ContextMenu Visibility="{Binding WaferIsVisibility,Converter={StaticResource VisibilityToReverse}}">
+                    <MenuItem Header="新建晶圆" Command="{Binding NewWaferCommand}"/>
+                </ContextMenu>
+            </Image.ContextMenu>
+        </Image>
+        <Ellipse Stroke="Black" Width="80" Height="80" Canvas.Left="231" Canvas.Top="130" Visibility="{Binding WaferIsVisibility}">
+            <Ellipse.ContextMenu>
+                <ContextMenu >
+                    <MenuItem Header="删除晶圆" Command="{Binding DeleteWaferCommand}" />
+                </ContextMenu>
+            </Ellipse.ContextMenu>
+            <Ellipse.Fill>
+                <RadialGradientBrush>
+                    <GradientStop Color="Transparent"  Offset="0"/>
+                    <!--<GradientStop Color="Silver"  Offset="0.5"/>-->
+                    <GradientStop Color="White"  Offset="0.7"/>
+                    <GradientStop Color="White"  Offset="1"/>
+
+                </RadialGradientBrush>
+            </Ellipse.Fill>
+        </Ellipse>
+        
 
         <Grid Canvas.Left="600" Canvas.Top="120" >
             <Grid.RowDefinitions>
@@ -107,9 +153,9 @@
                 <StackPanel Margin="10,10,10,0" Orientation="Horizontal" HorizontalAlignment="Center">
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
 
-                        <Button Content="初始化" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding LLInitCommnad}">
+                        <!--<Button Content="初始化" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding LLInitCommnad}">
 
-                        </Button>
+                        </Button>-->
                         <!--放片-->
                         <Button Content="抽气" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding PumpCommand}">
 
@@ -126,9 +172,9 @@
 
                         </Button>
                         <!--取片-->
-                        <Button Content="漏气检测" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
+                        <!--<Button Content="漏气检测" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
 
-                        </Button>
+                        </Button>-->
 
                     </StackPanel>
                 </StackPanel>

+ 96 - 90
Venus/Venus_MainPages/Views/ProcessView.xaml

@@ -5,14 +5,16 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Venus_MainPages.Views"
              mc:Ignorable="d" 
-              xmlns:unity="clr-namespace:Venus_MainPages.Unity"
+             xmlns:unity="clr-namespace:Venus_MainPages.Unity"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
              d:DesignHeight="450" d:DesignWidth="800">
     <Canvas>
-        <Image Canvas.Left="200" Canvas.Top="200" Width="200" Height="200" Source="Pack://application:,,,/Venus_Themes;Component/Resources/Chamber.png"></Image>
-        <Image Canvas.Left="220" Canvas.Top="385" Width="160" Height="160" Source="Pack://application:,,,/Venus_Themes;Component/Resources/LoadLock.png"></Image>
+        <Image Canvas.Left="200" Canvas.Top="206" Width="180" Height="180" Source="Pack://application:,,,/Venus_Themes;Component/Resources/Chamber.png"></Image>
+        <Image Canvas.Left="220" Canvas.Top="380" Width="140" Height="140" Source="Pack://application:,,,/Venus_Themes;Component/Resources/LoadLock.png"></Image>
 
-        <Button Width="120" Height="30" Content="Load Recipr"  Canvas.Left="700" Canvas.Top="100"/>
-        <TextBox Background="Silver"  Height="30" Width="250" Canvas.Left="820" Canvas.Top="100"/>
+        <Button Width="120" Height="30" Content="Load Recipe"  Canvas.Left="700" Canvas.Top="100" Command="{Binding LoadRecipeCommand}"/>
+        <TextBlock Background="Silver"  Height="30" Width="250" Canvas.Left="820" Canvas.Top="100" Text="{Binding SelectedRecipe}" TextBlock.TextAlignment="Center"    Block.TextAlignment="Center" Padding="0,7,0,0"/>
         <Button Width="120" Height="30" Content="Start"  Canvas.Left="1100" Canvas.Top="100"/>
         <Button Width="120" Height="30" Content="PMA"  Canvas.Left="700" Canvas.Top="170"/>
         <Grid  Width="800" Height="580" Canvas.Left="700" Canvas.Top="200"  unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="White"  unity:GridOptions.LineThickness="2">
@@ -53,94 +55,98 @@
             <TextBlock   Text="单位"   Grid.Column="3" FontWeight="Bold" FontSize="15"   VerticalAlignment="Center"  HorizontalAlignment="Center" Foreground="White"/>
             
             
-            <!--<TextBlock Grid.Row="1"  Text="Recipe Name" FontSize="15"   VerticalAlignment="Center" Padding="10" />-->
-            <TextBox Grid.Row="1"   Text="Top RF Forward Power"      Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="2"   Text="Top RF Reflected Power"         Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="3"   Text="Bias RF Forward Power"        Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="4"   Text="Bias RF Reflected Power"  Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="5"   Text="Bias RF Match C1%"    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="6"   Text="Bias RF Match C2%"      Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="7"   Text="Bias Voltage"         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="8"   Text="Pressure"        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="9"   Text="Pressure Control Valve Position"  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="10"   Text="Gas1"    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="11"   Text="Gas2"     Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="12"   Text="Gas3"          Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="13"   Text="Gas4"         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="14"   Text="Gas5"   Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="15"   Text="Gas6"    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="16"   Text="Gas7"       Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="17"   Text="Gas8"         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="18"   Text="ESC Clamp Voltage"        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="19"   Text="Esc Temperature"  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="20"   Text="Helium Pressure"    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="21"   Text="Helium Flow"    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
+           
 
-            <TextBox Grid.Row="1" Grid.Column="1"  Text=""      Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="2"  Grid.Column="1" Text=""         Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="3"  Grid.Column="1" Text=""        Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="4"  Grid.Column="1" Text=""  Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="5"  Grid.Column="1" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="6"  Grid.Column="1" Text=""      Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="7"  Grid.Column="1" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="8"  Grid.Column="1" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="9"  Grid.Column="1" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="10"  Grid.Column="1" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="11"  Grid.Column="1" Text=""     Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="12"  Grid.Column="1" Text=""          Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="13"  Grid.Column="1" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="14"  Grid.Column="1" Text=""   Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="15"  Grid.Column="1" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="16"  Grid.Column="1" Text=""       Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="17"  Grid.Column="1" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="18"  Grid.Column="1" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="19"  Grid.Column="1" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="20"  Grid.Column="1" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="21"  Grid.Column="1" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
+            <TextBlock Grid.Row="1"   Text="Top RF Forward Power"           Background="#D0D8E8"    Padding="10,6,0,0"/>
+            <TextBlock Grid.Row="2"   Text="Top RF Reflected Power"           Background="#E9EDF4"   Padding="10,6,0,0" />
+            <TextBlock Grid.Row="3"  Text="Bias RF Forward Power"           Background="#D0D8E8"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="4"   Text="Bias RF Reflected Power"           Background="#E9EDF4"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="5"   Text="Bias RF Match C1%"           Background="#D0D8E8"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="6"  Text="Bias RF Match C2%"           Background="#E9EDF4"   Padding="10,6,0,0" />
+            <TextBlock Grid.Row="7"   Text="Bias Voltage"           Background="#D0D8E8"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="8"   Text="Pressure"       Background="#E9EDF4"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="9"   Text="Pressure Control Valve Position"       Background="#D0D8E8"    Padding="10,6,0,0"/>
+            <TextBlock Grid.Row="10"   Text="Gas1"       Background="#E9EDF4"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="11"   Text="Gas2"       Background="#D0D8E8"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="12"  Text="Gas3"       Background="#E9EDF4"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="13"  Text="Gas4"       Background="#D0D8E8"   Padding="10,6,0,0" />
+            <TextBlock Grid.Row="14"  Text="Gas5"       Background="#E9EDF4"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="15"   Text="Gas6"       Background="#D0D8E8"   Padding="10,6,0,0"/>
+            <TextBlock Grid.Row="16"   Text="Gas7"       Background="#E9EDF4"  Padding="10,6,0,0"/>
+            <TextBlock Grid.Row="17"   Text="Gas8"       Background="#D0D8E8"    Padding="10,6,0,0" />
+            <TextBlock Grid.Row="18"   Text="ESC Clamp Voltage"          Background="#E9EDF4"  Padding="10,6,0,0"  />
+            <TextBlock Grid.Row="19"   Text="Esc Temperature"        Background="#D0D8E8"  Padding="10,6,0,0" />
+            <TextBlock Grid.Row="20"  Text="Helium Pressure"       Background="#E9EDF4"    Padding="10,6,0,0"/>
+            <TextBlock Grid.Row="21"   Text="Helium Flow"       Background="#D0D8E8"    Padding="10,6,0,0" />
+            
+            <TextBlock Grid.Row="1" Grid.Column="1"  Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center"    Block.TextAlignment="Center" Padding="0,6,0,0"/>
+            <TextBlock Grid.Row="2"  Grid.Column="1" Text=""           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="3"  Grid.Column="1" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="4"  Grid.Column="1" Text=""           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="5"  Grid.Column="1" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="6"  Grid.Column="1" Text=""           Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="7"  Grid.Column="1" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="8"  Grid.Column="1" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="9"  Grid.Column="1" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="10"  Grid.Column="1" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="11"  Grid.Column="1" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="12"  Grid.Column="1" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="13"  Grid.Column="1" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="14"  Grid.Column="1" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="15"  Grid.Column="1" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="16"  Grid.Column="1" Text="sccm"       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="17"  Grid.Column="1" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="18"  Grid.Column="1" Text=""          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center" />
+            <TextBlock Grid.Row="19"  Grid.Column="1" Text=""        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="20"  Grid.Column="1" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="21"  Grid.Column="1" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
 
-            <TextBox Grid.Row="1" Grid.Column="2"  Text=""      Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="2"  Grid.Column="2" Text=""         Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="3"  Grid.Column="2" Text=""        Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="4"  Grid.Column="2" Text=""  Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="5"  Grid.Column="2" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="6"  Grid.Column="2" Text=""      Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="7"  Grid.Column="2" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="8"  Grid.Column="2" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="9"  Grid.Column="2" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="10"  Grid.Column="2" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="11"  Grid.Column="2" Text=""     Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="12"  Grid.Column="2" Text=""          Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="13"  Grid.Column="2" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="14"  Grid.Column="2" Text=""   Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="15"  Grid.Column="2" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="16"  Grid.Column="2" Text=""       Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="17"  Grid.Column="2" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="18"  Grid.Column="2" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="19"  Grid.Column="2" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="20"  Grid.Column="2" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="21"  Grid.Column="2" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
+            <TextBlock Grid.Row="1" Grid.Column="2"  Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center"    Block.TextAlignment="Center" Padding="0,6,0,0"/>
+            <TextBlock Grid.Row="2"  Grid.Column="2" Text=""           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="3"  Grid.Column="2" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="4"  Grid.Column="2" Text=""           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="5"  Grid.Column="2" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="6"  Grid.Column="2" Text=""           Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="7"  Grid.Column="2" Text=""           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="8"  Grid.Column="2" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="9"  Grid.Column="2" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="10"  Grid.Column="2" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="11"  Grid.Column="2" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="12"  Grid.Column="2" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="13"  Grid.Column="2" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="14"  Grid.Column="2" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="15"  Grid.Column="2" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="16"  Grid.Column="2" Text="sccm"       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="17"  Grid.Column="2" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="18"  Grid.Column="2" Text=""          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center" />
+            <TextBlock Grid.Row="19"  Grid.Column="2" Text=""        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="20"  Grid.Column="2" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="21"  Grid.Column="2" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
 
-            <TextBox Grid.Row="1" Grid.Column="3"  Text=""      Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="2"  Grid.Column="3" Text=""         Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="3"  Grid.Column="3" Text=""        Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="4"  Grid.Column="3" Text=""  Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="5"  Grid.Column="3" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="6"  Grid.Column="3" Text=""      Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="7"  Grid.Column="3" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="8"  Grid.Column="3" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="9"  Grid.Column="3" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="10"  Grid.Column="3" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="11"  Grid.Column="3" Text=""     Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="12"  Grid.Column="3" Text=""          Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="13"  Grid.Column="3" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="14"  Grid.Column="3" Text=""   Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="15"  Grid.Column="3" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="16"  Grid.Column="3" Text=""       Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="17"  Grid.Column="3" Text=""         Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="18"  Grid.Column="3" Text=""        Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="19"  Grid.Column="3" Text=""  Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="20"  Grid.Column="3" Text=""    Background="#E9EDF4"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
-            <TextBox Grid.Row="21"  Grid.Column="3" Text=""    Background="#D0D8E8"   BorderThickness="0" VerticalContentAlignment="Center" Padding="5" IsReadOnly="True"/>
+            <TextBlock Grid.Row="1" Grid.Column="3"  Text="W"           Background="#D0D8E8"   TextBlock.TextAlignment="Center"    Block.TextAlignment="Center" Padding="0,6,0,0"/>
+            <TextBlock Grid.Row="2"  Grid.Column="3" Text="W"           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="3"  Grid.Column="3" Text="W"           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="4"  Grid.Column="3" Text="W"           Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="5"  Grid.Column="3" Text="%"           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="6"  Grid.Column="3" Text="%"           Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="7"  Grid.Column="3" Text="V"           Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="8"  Grid.Column="3" Text="mToor"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="9"  Grid.Column="3" Text="Count"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="10"  Grid.Column="3" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="11"  Grid.Column="3" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="12"  Grid.Column="3" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="13"  Grid.Column="3" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="14"  Grid.Column="3" Text="sccm"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="15"  Grid.Column="3" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="16"  Grid.Column="3" Text="sccm"       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="17"  Grid.Column="3" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="18"  Grid.Column="3" Text="V"          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center" />
+            <TextBlock Grid.Row="19"  Grid.Column="3" Text="°C"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="20"  Grid.Column="3" Text="Torr"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="21"  Grid.Column="3" Text="sccm"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
         </Grid>
+        <Button Width="120" Height="30" Content="Manual Endpoint"  Canvas.Left="700" Canvas.Top="790"/>
+        <Button Width="120" Height="30" Content="Abort"            Canvas.Left="850" Canvas.Top="790"/>
+        <Button Width="120" Height="30" Content="Chamber Offline"  Canvas.Left="1000" Canvas.Top="790"/>
     </Canvas>
 </UserControl>

+ 20 - 13
Venus/Venus_MainPages/Views/TopView.xaml

@@ -14,7 +14,7 @@
     <StackPanel Background="{DynamicResource BottomFrame_BG}" Orientation="Horizontal">
         <TextBlock Style="{StaticResource textBlockStyle}" Text="{Binding Title}" FontSize="60"   VerticalAlignment="Center" Margin="10,0,0,0" />
 
-        <Grid Width="1300"  unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="White" Margin="100,1,0,0"  >
+        <Grid Width="1500"  unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="White" Margin="100,1,0,0"  >
             <Grid.RowDefinitions>
                 <RowDefinition/>
                 <RowDefinition/>
@@ -28,19 +28,19 @@
                 <ColumnDefinition/>
                 <ColumnDefinition/>
                 <ColumnDefinition/>
-                <ColumnDefinition/>
-                <ColumnDefinition/>
+                <ColumnDefinition Width="60"/>
+                <!--<ColumnDefinition/>-->
             </Grid.ColumnDefinitions>
             <TextBlock Text="PMA" Foreground="White"   HorizontalAlignment="Center" VerticalAlignment="Center"/>
-            <TextBox Text="{Binding RtDataValues[PMA.FsmState]}" Background="Yellow" Grid.Column="1"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderThickness="0" Margin="2"/>
+            <TextBox Text="{Binding RtDataValues[PMA.FsmState]}" Background="Yellow" Grid.Column="1" Grid.ColumnSpan="3" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderThickness="0" Margin="2"/>
             <TextBlock Text="Log" Grid.Row="1" Foreground="White"  TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
             <ComboBox Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="5" 
                                        
                                       VerticalContentAlignment="Center" FontSize="14" Height="Auto">
               
             </ComboBox>
-            <TextBlock Text="版本号:" Grid.Column="2" Foreground="White" FontSize="20" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-            <TextBlock Text="{Binding SoftwareVersion}" Foreground="Black"  Grid.Column="3"  FontSize="20" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+            <TextBlock Text="版本号:" Grid.Column="4" Foreground="White" FontSize="20" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+            <TextBlock Text="{Binding SoftwareVersion}" Foreground="Black"  Grid.Column="5"  FontSize="20" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
             <!--<Button Content="FA Enable"   Grid.Column="6" Grid.Row="0" BorderThickness="0" />
             <Button Content="FA Disable"  Grid.Column="7" Grid.Row="0" BorderThickness="0"/>-->
@@ -56,9 +56,9 @@
                     </i:EventTrigger>
                 </i:Interaction.Triggers>
             </ToggleButton>-->
-            <TextBlock Grid.Column="4" Text="语言" Foreground="White"   HorizontalAlignment="Center" VerticalAlignment="Center"/>
+            <TextBlock Grid.Column="6" Text="语言" Foreground="White"   HorizontalAlignment="Center" VerticalAlignment="Center"/>
           
-            <ToggleButton  Grid.Column="5"  Style="{StaticResource ToggleButtonStyle1}">
+            <ToggleButton  Grid.Column="7"  Style="{StaticResource ToggleButtonStyle1}">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Checked">
                             <i:InvokeCommandAction Command="{Binding SwichLanguageCommand}"/>
@@ -72,12 +72,19 @@
 
             <Button Content="Reset"       Grid.Column="6" Grid.Row="1" BorderThickness="0" />
             <Button Content="Buzzer Off"  Grid.Column="7" Grid.Row="1" BorderThickness="0"/>
-        </Grid>
-        <Border   BorderBrush="#FF0A1624"  CornerRadius="6" Margin="20,0,0,0">
-            <Viewbox Width="50" Height="80"  >
-                <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
+            <!--<Border   BorderBrush="#FF0A1624"  CornerRadius="6"  Grid.Column="8"  Grid.RowSpan="2">
+               
+            </Border>-->
+            <Viewbox Width="50" Height="80"  Grid.Column="8"  Grid.RowSpan="2">
+                <deviceControl:AITSignalTower  
+                                              IsRedLightOn="{Binding RtDataValues[PMA.SignalTower.IsRedLightOn]}"
+                                              IsYellowLightOn="{Binding RtDataValues[PMA.SignalTower.IsYellowLightOn]}"
+                                              IsGreenLightOn="{Binding RtDataValues[PMA.SignalTower.IsGreenLightOn]}"
+                                              IsBlueLightOn="{Binding RtDataValues[PMA.SignalTower.IsBlueLightOn]}"
+                                              IsBuzzerOn="{Binding RtDataValues[PMA.SignalTower.IsBuzzerOn]}"/>
             </Viewbox>
-        </Border>
+        </Grid>
+       
         <!--<Grid Width="200"  unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="White" Margin="20,1,0,0">
             <Grid.RowDefinitions>
                 <RowDefinition/>

BIN
Venus/Venus_RT/Config/DeviceModelVenus.xml


+ 6 - 1
Venus/Venus_RT/Devices/IODevices/IoSignalTower.cs

@@ -176,8 +176,13 @@ namespace Venus_RT.Devices
 
             OP.Subscribe($"{Module}.{Name}.{AITSignalTowerOperation.SwitchOnBuzzerAndRed}", SwitchOnBuzzerAndRed);
 
-            DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData);
+            //DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData);
 
+            DATA.Subscribe($"{Module}.{Name}.IsRedLightOn", () => _red != null && _red.Value);
+            DATA.Subscribe($"{Module}.{Name}.IsYellowLightOn", () => _yellow != null && _yellow.Value);
+            DATA.Subscribe($"{Module}.{Name}.IsGreenLightOn", () => _green != null && _green.Value);
+            DATA.Subscribe($"{Module}.{Name}.IsBlueLightOn", () => _blue != null && _blue.Value);
+            DATA.Subscribe($"{Module}.{Name}.IsBuzzerOn", () => (_buzzer1 != null && _buzzer1.Value) || (_buzzer2 != null && _buzzer2.Value));
             return true;
         }
 

+ 48 - 6
Venus/Venus_RT/Devices/JetPM.cs

@@ -13,6 +13,7 @@ using Venus_Core;
 using Venus_RT.Devices.IODevices;
 using Venus_RT.Devices.EPD;
 using Aitex.Core.RT.DataCenter;
+using Aitex.Core.RT.OperationCenter;
 
 namespace Venus_RT.Devices
 {
@@ -108,8 +109,8 @@ namespace Venus_RT.Devices
 
         private readonly ChillerBase _Chiller;
 
-        private readonly RfPowerBase _Generator;
-        private readonly RfPowerBase _GeneratorBias;
+        private readonly RfPowerBase _Generator;//srf=>AdTecGenerator
+        private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
         private readonly RfMatchBase _Match;
 
         private readonly IoSignalTower _SignalTower;
@@ -393,14 +394,55 @@ namespace Venus_RT.Devices
 
             DATA.Subscribe($"{Name}.ForelinePressure", () => ForelinePressure);
             DATA.Subscribe($"{Name}.ProcessPressure", () => ProcessPressure);
+            DATA.Subscribe($"{Name}.ESCHePressure", () => ESCHePressure);
+            DATA.Subscribe($"{Name}.LoadlockPressure", () => LoadlockPressure);
+
             DATA.Subscribe($"{Name}.IsATM", () => IsATM);
             DATA.Subscribe($"{Name}.IsVAC", () => IsVAC);
             DATA.Subscribe($"{Name}.LiftPinIsUp", () => LiftPinIsUp);
             DATA.Subscribe($"{Name}.LiftPinIsDown", () => LiftPinIsDown);
-            //for (int i = 0; i < 8; i++)
-            //{
-            //    DATA.Subscribe($"{Name}.ForelinePressure", () => _gasLines[i].FlowSP);
-            //}
+            DATA.Subscribe($"{Name}.PumpIsRunning", () => IsPumpRunning);
+            DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => IsTurboPumpRunning);
+            DATA.Subscribe($"{Name}.IsSlitDoorClosed", () => IsSlitDoorClosed);
+            DATA.Subscribe($"{Name}.IsLidClosed", () => IsLidClosed);
+            DATA.Subscribe($"{Name}.SRfIsOn", () => _Generator.IsPowerOn);
+            DATA.Subscribe($"{Name}.BRfIsOn", () => _GeneratorBias.IsPowerOn);
+            DATA.Subscribe($"{Name}.TurboPumpRotationalSpeed", () => _TurboPump.RotationalSpeed);
+            
+            //DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => _);
+
+            OP.Subscribe($"{Module}.SetLiftPin", (cmd, args) => {
+                if ((bool)args[0] == true)
+                {
+                    SetLiftPin(MovementPosition.Up, out _);
+                }
+                else
+                { 
+                    SetLiftPin(MovementPosition.Down, out _);
+                }
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.SetSRf", (cmd, args) => {
+                GeneratorPowerOn((bool)args[0]);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.SetBRf", (cmd, args) => {
+                GeneratorBiasPowerOn((bool)args[0]);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) => {
+                SetSlitDoor((bool)args[0], out _);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.SetESCHV", (cmd, args) => {
+                _ESCHV.SetPowerOnOff((bool)args[0]);
+                return true;
+            });
+
         }
 
 

+ 6 - 1
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -330,6 +330,8 @@ namespace Venus_RT.Modules.PMs
         protected override bool Init()
         {
             DATA.Subscribe($"{Module}.FsmState", () => ((PMState)fsm.State).ToString());
+            DATA.Subscribe($"{Module}.LoadLockPurge.PurgeCounter", () => _purgeLoadLockRoutine.PurgeCounter);
+
 
             OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck, args));
             OP.Subscribe($"{Module}.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
@@ -340,7 +342,10 @@ namespace Venus_RT.Modules.PMs
             OP.Subscribe($"{Module}.{RtOperation.RfPower}", (cmd, args) => CheckToPostMessage((int)MSG.RfPower));
             OP.Subscribe($"{Module}.{RtOperation.Vent}", (cmd, args) => CheckToPostMessage((int)MSG.Vent));
             OP.Subscribe($"{Module}.{RtOperation.VentLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.VentLoadLock));
-            //OP.Subscribe($"{Module}.{RtOperation.VentLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.VentLoadLock));
+            OP.Subscribe($"{Module}.{RtOperation.PurgeLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.PurgeLoadLock));
+            OP.Subscribe($"{Module}.{RtOperation.PumpLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.PumpLoadLock));
+            OP.Subscribe($"{Module}.{RtOperation.Reset}", (cmd, args) => CheckToPostMessage((int)MSG.Reset));
+            OP.Subscribe($"{Module}.{RtOperation.Abort}", (cmd, args) => CheckToPostMessage((int)MSG.Abort));
             return true;
         }
         private bool FnIdle(object[] objs)

+ 33 - 0
Venus/Venus_Themes/Converters/ToBoolMultiValueConverter4.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Venus_Themes.Converters
+{
+    public class ToBoolMultiValueConverter4 : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            if ((bool)values[0] == false)
+            {
+                return false;
+            }
+            for (int i = 1; i < values.Length; i++)
+            {
+                if ((bool)values[i] == true)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 32 - 0
Venus/Venus_Themes/Converters/VisibilityToReverse.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Venus_Themes.Converters
+{
+    public class VisibilityToReverse : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+
+            if ((Visibility)value == Visibility.Visible)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+            {
+                return Visibility.Visible;
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+
+        }
+    }
+}

+ 1 - 1
Venus/Venus_Themes/UserControls/ButterflyValve.xaml

@@ -5,7 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800" x:Name="valve">
+             d:DesignHeight="450" d:DesignWidth="800" x:Name="valve" Cursor="Hand">
     <UserControl.RenderTransform>
         <TransformGroup>
             <RotateTransform CenterX="17" CenterY="17" Angle="{Binding ElementName=valve,Path=RotateTransformValue}"/>

+ 46 - 18
Venus/Venus_Themes/UserControls/Chamber.xaml

@@ -6,16 +6,33 @@
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800" x:Name="chamber">
-
+    <UserControl.Resources>
+        <Storyboard x:Key="SlitValve_Open">
+            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" >
+                <EasingDoubleKeyFrame KeyTime="0" Value="75"/>
+                <EasingDoubleKeyFrame KeyTime="0:0:3" Value="42"/>
+            </DoubleAnimationUsingKeyFrames>
+        </Storyboard>
+        <Storyboard x:Key="SlitValve_Close">
+            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" >
+                <EasingDoubleKeyFrame KeyTime="0" Value="42"/>
+                <EasingDoubleKeyFrame KeyTime="0:0:3" Value="75"/>
+            </DoubleAnimationUsingKeyFrames>
+        </Storyboard>
+        <Style TargetType="{x:Type Rectangle}" x:Key="SlitValve_Animation" >
+            <Style.Triggers>
+                <DataTrigger Binding="{Binding ElementName=chamber,Path=IsOpenSlitDoor}" Value="true">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard Storyboard="{StaticResource SlitValve_Open}"/>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <BeginStoryboard Storyboard="{StaticResource SlitValve_Close}"/>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+    </UserControl.Resources>
     <Canvas >
-        <!--slit valve-->
-        <!--<Grid Width="280" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Left="-245" Canvas.Top="330">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="24"/>
-                <RowDefinition Height="30"/>
-                <RowDefinition />
-            </Grid.RowDefinitions>
-        </Grid>-->
 
         <Grid Width="240" Height="190" Canvas.Top="80">
             <Grid.RowDefinitions>
@@ -46,12 +63,12 @@
                     </LinearGradientBrush>
                 </Rectangle.Fill>
             </Rectangle>
-            <Rectangle x:Name="BG_Status" Margin="9,19" Visibility="{Binding BiasRfPowerOnChamberVisibility}">
+            <Rectangle x:Name="BG_Status" Margin="9,19" Visibility="{Binding BiasRfPowerOnChamberVisibility}" >
                 <Rectangle.Style>
                     <Style>
                         <Setter Property="Rectangle.Fill" Value="WhiteSmoke"/>
                         <Style.Triggers>
-                            <DataTrigger Binding="{Binding ShowTitle,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False">
+                            <DataTrigger Binding="{Binding ElementName=chamber,Path=IsBRFOn}"  Value="True">
                                 <Setter Property="Rectangle.Fill" Value="#FFFF9292"/>
                             </DataTrigger>
                         </Style.Triggers>
@@ -82,12 +99,12 @@
                     <Storyboard x:Key="CoverOpen">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                             <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
-                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="45"/>
+                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="20"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
                     <Storyboard x:Key="CoverClose">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
-                            <EasingDoubleKeyFrame KeyTime="0" Value="45"/>
+                            <EasingDoubleKeyFrame KeyTime="0" Value="20"/>
                             <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
@@ -95,7 +112,7 @@
                 <Grid.Style>
                     <Style>
                         <Style.Triggers>
-                            <DataTrigger Binding="{Binding IsLidOpen}" Value="true">
+                            <DataTrigger Binding="{Binding ElementName=chamber,Path=IsLidOpen}" Value="true">
                                 <DataTrigger.EnterActions>
                                     <BeginStoryboard Storyboard="{StaticResource CoverOpen}"/>
                                 </DataTrigger.EnterActions>
@@ -116,7 +133,18 @@
                 <Rectangle  Stroke="DimGray" Fill="WhiteSmoke" Margin="42,-101,130,0" Width="8" VerticalAlignment="Top" Height="102" />
                 <Rectangle  Fill="DimGray" Margin="42,-108,42,0" VerticalAlignment="Top" Height="8" />
                 <Rectangle  Fill="White" Margin="50,-101,50,0" Width="80" Height="118" />
-                <Rectangle  x:Name="BG_Status1" Fill="WhiteSmoke"  Margin="50,-101,50,0" Width="80" Height="118" Visibility="{Binding RfPowerOnChamberVisibility}" />
+                <Rectangle  x:Name="BG_Status1"  Margin="50,-101,50,0" Width="80" Height="118" Visibility="{Binding RfPowerOnChamberVisibility}" >
+                    <Rectangle.Style>
+                        <Style>
+                            <Setter Property="Rectangle.Fill" Value="WhiteSmoke"/>
+                            <Style.Triggers>
+                                <DataTrigger Binding="{Binding ElementName=chamber,Path=IsSRFOn}"  Value="True">
+                                    <Setter Property="Rectangle.Fill" Value="#FFFF9292"/>
+                                </DataTrigger>
+                            </Style.Triggers>
+                        </Style>
+                    </Rectangle.Style>
+                </Rectangle>
                 <Rectangle  Stroke="#FF000000" Width="80" Height="10" Margin="0,8,0,0" StrokeThickness="1" StrokeDashArray="4 2" SnapsToDevicePixels="True"/>
                 <Rectangle  Stroke="#FF000000" Width="80" Height="9" Margin="0,-10,0,0" StrokeThickness="1" StrokeDashArray="4 2" SnapsToDevicePixels="True"/>
                 <Line X1="35" Y1="-40" X2="145" Y2="-30" Stroke="#B87333" StrokeThickness="5"/>
@@ -232,7 +260,7 @@
                     <Grid.Style>
                         <Style>
                             <Style.Triggers>
-                                <DataTrigger Binding="{Binding IsLiftPinUp}" Value="true">
+                                <DataTrigger Binding="{Binding ElementName=chamber,Path=IsLiftPinUp}"  Value="true">
                                     <DataTrigger.EnterActions>
                                         <BeginStoryboard Storyboard="{StaticResource TopPinUp}"/>
                                     </DataTrigger.EnterActions>
@@ -260,8 +288,8 @@
 
                 <!--slit door右边-->
                 <Grid Margin="190,-10,-40,29" >
-                    <Rectangle  Fill="DimGray" Width="8" VerticalAlignment="Top" Height="75" />
-                    <Rectangle  Fill="DimGray" Width="8" VerticalAlignment="Bottom" Height="75" />
+                    <Rectangle  Fill="DimGray" Style="{StaticResource SlitValve_Animation}" Width="8" VerticalAlignment="Top" Height="75" />
+                    <Rectangle  Fill="DimGray" Style="{StaticResource SlitValve_Animation}" Width="8" VerticalAlignment="Bottom" Height="75" />
                 </Grid>
             </Grid>
         </Grid>

+ 41 - 5
Venus/Venus_Themes/UserControls/Chamber.xaml.cs

@@ -24,15 +24,51 @@ namespace Venus_Themes.UserControls
         {
             InitializeComponent();
         }
-        public static readonly DependencyProperty IsOpenLidProperty = DependencyProperty.Register(
-           "IsOpenLid", typeof(bool), typeof(Chamber),
+        public static readonly DependencyProperty IsOpenSlitDoorProperty = DependencyProperty.Register(
+           "IsOpenSlitDoor", typeof(bool), typeof(Chamber),
            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
 
 
-        public bool IsOpenLid
+        public bool IsOpenSlitDoor
         {
-            get { return (bool)this.GetValue(IsOpenLidProperty); }
-            set { this.SetValue(IsOpenLidProperty, value); }
+            get { return (bool)this.GetValue(IsOpenSlitDoorProperty); }
+            set { this.SetValue(IsOpenSlitDoorProperty, value); }
+        }
+
+        public static readonly DependencyProperty IsLiftPinUpProperty = DependencyProperty.Register(
+           "IsLiftPinUp", typeof(bool), typeof(Chamber),
+           new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsLiftPinUp
+        {
+            get { return (bool)this.GetValue(IsLiftPinUpProperty); }
+            set { this.SetValue(IsLiftPinUpProperty, value); }
+        }
+
+        public static readonly DependencyProperty IsLidOpenProperty = DependencyProperty.Register(
+         "IsLidOpen", typeof(bool), typeof(Chamber),
+         new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsLidOpen
+        {
+            get { return (bool)this.GetValue(IsLidOpenProperty); }
+            set { this.SetValue(IsLidOpenProperty, value); }
+        }
+
+        public static readonly DependencyProperty IsSRFOnProperty = DependencyProperty.Register(
+        "IsSRFOn", typeof(bool), typeof(Chamber),
+        new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsSRFOn
+        {
+            get { return (bool)this.GetValue(IsSRFOnProperty); }
+            set { this.SetValue(IsSRFOnProperty, value); }
+        }
+
+        public static readonly DependencyProperty IsBRFOnProperty = DependencyProperty.Register(
+       "IsBRFOn", typeof(bool), typeof(Chamber),
+       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsBRFOn
+        {
+            get { return (bool)this.GetValue(IsBRFOnProperty); }
+            set { this.SetValue(IsBRFOnProperty, value); }
         }
     }
 }

+ 3 - 3
Venus/Venus_Themes/UserControls/Pump.xaml

@@ -6,18 +6,18 @@
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
              xmlns:converters="clr-namespace:Venus_Themes.Converters"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800" x:Name="mypump">
+             d:DesignHeight="450" d:DesignWidth="800" x:Name="mypump" Cursor="Hand">
     <UserControl.Resources>
         <converters:BoolToPath x:Key="boolToPath"/>
     </UserControl.Resources>
 
     <Grid>
-        <Grid.ContextMenu >
+        <!--<Grid.ContextMenu >
             <ContextMenu>
                 <RadioButton Content="Open"  Checked="RadioButton_Checked" Unchecked="RadioButton_Unchecked" x:Name="check1"/>
                 <RadioButton Content="Close" IsChecked="True" x:Name="check2"/>
             </ContextMenu>
-        </Grid.ContextMenu>
+        </Grid.ContextMenu>-->
         <Image  Stretch="Uniform" Source="{Binding ElementName=mypump,Path=IsOpen,Converter={StaticResource boolToPath}}" x:Name="image1">
         </Image>
     </Grid>

+ 29 - 29
Venus/Venus_Themes/UserControls/Pump.xaml.cs

@@ -25,7 +25,7 @@ namespace Venus_Themes.UserControls
             InitializeComponent();
         }
         public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register(
-         "IsOpen", typeof(bool), typeof(Pump),new PropertyMetadata(false, propertyChangedCallback));
+         "IsOpen", typeof(bool), typeof(Pump));
 
 
         public bool IsOpen
@@ -42,35 +42,35 @@ namespace Venus_Themes.UserControls
             }
         }
 
-        private  bool m_Test;
-        public  bool Test
-        {
-            set {
-                check1.IsChecked = true;
-                m_Test = value;
-            }
-        }
+        //private  bool m_Test;
+        //public  bool Test
+        //{
+        //    set {
+        //        check1.IsChecked = true;
+        //        m_Test = value;
+        //    }
+        //}
 
-        private void RadioButton_Checked(object sender, RoutedEventArgs e)
-        {
-            IsOpen = true;
-        }
+        //private void RadioButton_Checked(object sender, RoutedEventArgs e)
+        //{
+        //    IsOpen = true;
+        //}
 
-        private void RadioButton_Unchecked(object sender, RoutedEventArgs e)
-        {
-            IsOpen = false;
-        }
-        private static void propertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            Pump pump = d as Pump;
-            if ((bool)e.NewValue == true)
-            {
-                pump.check1.IsChecked = true;
-            }
-            else
-            { 
-                pump.check2.IsChecked = true;
-            }
-        }
+        //private void RadioButton_Unchecked(object sender, RoutedEventArgs e)
+        //{
+        //    IsOpen = false;
+        //}
+        //private static void propertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        //{
+        //    Pump pump = d as Pump;
+        //    if ((bool)e.NewValue == true)
+        //    {
+        //        pump.check1.IsChecked = true;
+        //    }
+        //    else
+        //    { 
+        //        pump.check2.IsChecked = true;
+        //    }
+        //}
     }
 }

+ 3 - 1
Venus/Venus_Themes/UserControls/TextboxWithLabel.xaml

@@ -6,8 +6,10 @@
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
              mc:Ignorable="d" 
               x:Name="tblabel">
+
     <StackPanel>
         <TextBlock Text="{Binding ElementName=tblabel,Path=LabelValue}"      TextWrapping="Wrap" Block.TextAlignment="Center"/>
-        <TextBox Text="{Binding ElementName=tblabel,Path=TextBoxValue}"   Margin="0,5,0,0" Width="70" HorizontalContentAlignment="Center" IsReadOnly="True" Background="{Binding ElementName=tblabel,Path=TextBoxColor}"/>
+        <TextBox   Text="{Binding ElementName=tblabel,Path=TextBoxValue}"     Margin="0,5,0,0" Width="70" HorizontalContentAlignment="Center" IsReadOnly="{Binding ElementName=tblabel,Path=IsReadOnly}"  Background="{Binding ElementName=tblabel,Path=TextBoxColor}"/>
     </StackPanel>
+
 </UserControl>

+ 15 - 0
Venus/Venus_Themes/UserControls/TextboxWithLabel.xaml.cs

@@ -48,5 +48,20 @@ namespace Venus_Themes.UserControls
             get { return (SolidColorBrush)this.GetValue(TextBoxColorProperty); }
             set { this.SetValue(LabelValueProperty, value); }
         }
+
+        public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
+          "IsReadOnly", typeof(bool), typeof(TextboxWithLabel),new PropertyMetadata (true));
+
+        public bool IsReadOnly
+        {
+            get
+            {
+                return (bool)this.GetValue(IsReadOnlyProperty);
+            }
+            set
+            {
+                this.SetValue(IsReadOnlyProperty, value);
+            }
+        }
     }
 }

+ 4 - 2
Venus/Venus_Themes/UserControls/Turbo.xaml

@@ -4,16 +4,18 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
+              xmlns:converters="clr-namespace:Venus_Themes.Converters"
              mc:Ignorable="d" 
-             d:DesignHeight="40" d:DesignWidth="40" x:Name="turbo" >
+             d:DesignHeight="40" d:DesignWidth="40" x:Name="turbo" Cursor="Hand">
     <UserControl.Resources>
         <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1" x:Key="back">
             <GradientStop Color="Silver" Offset="0"/>
             <GradientStop Color="White" Offset="0.5"/>
             <GradientStop Color="Silver" Offset="1"/>
         </LinearGradientBrush>
+        <converters:BoolToColor x:Key="BoolToColor2"/>
     </UserControl.Resources>
-    <Border  CornerRadius="20" Background="#4F6226" >
+    <Border  CornerRadius="20" Background="{Binding ElementName=turbo,Path=IsOpen,Converter={StaticResource BoolToColor2}}" >
         
         <Canvas >
             <Border Canvas.Left="22.5" Background="{StaticResource back}" Width="40" Height="5" >

+ 17 - 0
Venus/Venus_Themes/UserControls/Turbo.xaml.cs

@@ -24,5 +24,22 @@ namespace Venus_Themes.UserControls
         {
             InitializeComponent();
         }
+        public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register(
+         "IsOpen", typeof(bool), typeof(Turbo));
+
+
+        public bool IsOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(IsOpenProperty);
+            }
+            set
+            {
+
+                this.SetValue(IsOpenProperty, value);
+
+            }
+        }
     }
 }

+ 2 - 0
Venus/Venus_Themes/Venus_Themes.csproj

@@ -74,6 +74,8 @@
     <Compile Include="Converters\ToBoolMultiValueConverter.cs" />
     <Compile Include="Converters\ToBoolMultiValueConverter2.cs" />
     <Compile Include="Converters\ToBoolMultiValueConverter3.cs" />
+    <Compile Include="Converters\ToBoolMultiValueConverter4.cs" />
+    <Compile Include="Converters\VisibilityToReverse.cs" />
     <Compile Include="CustomControls\AduRadioButtonIcon.cs" />
     <Compile Include="CustomControls\CommonValveControl.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />