Browse Source

1.TM传片动画制作,UI界面优化
2.完善PartialPressure/VATPerformance/漏气检测/MFCVerification等功能

lixiang 1 year ago
parent
commit
280432bb82
48 changed files with 2077 additions and 739 deletions
  1. 17 0
      Venus/Framework/Common/CommonData/RobotMoveInfo.cs
  2. 1 0
      Venus/Framework/Common/Communications/AsyncSerialPort.cs
  3. 34 0
      Venus/Venus_Core/PMLeakCheckResult.cs
  4. 12 0
      Venus/Venus_Core/PMVATPerformance.cs
  5. 26 13
      Venus/Venus_Core/RtState.cs
  6. 2 1
      Venus/Venus_Core/SerializeHelper.cs
  7. 5 1
      Venus/Venus_Core/VenusDevice.cs
  8. 2 0
      Venus/Venus_Core/Venus_Core.csproj
  9. 36 0
      Venus/Venus_MainPages/Converters/AllNoneCheckboxConverter.cs
  10. 40 0
      Venus/Venus_MainPages/Converters/HeaterToStringConverter.cs
  11. 1 1
      Venus/Venus_MainPages/Unity/ModuleManager.cs
  12. 2 2
      Venus/Venus_MainPages/Unity/PartialPressureResult.cs
  13. 36 0
      Venus/Venus_MainPages/Unity/VATPerformanceResult.cs
  14. 3 0
      Venus/Venus_MainPages/Venus_MainPages.csproj
  15. 2 2
      Venus/Venus_MainPages/ViewModels/EventViewModel.cs
  16. 397 22
      Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs
  17. 22 1
      Venus/Venus_MainPages/ViewModels/OverViewModel.cs
  18. 45 10
      Venus/Venus_MainPages/ViewModels/PartialPressureViewModel.cs
  19. 15 1
      Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs
  20. 258 60
      Venus/Venus_MainPages/ViewModels/TMViewModel.cs
  21. 2 2
      Venus/Venus_MainPages/ViewModels/TopViewModel.cs
  22. 50 7
      Venus/Venus_MainPages/ViewModels/VATPerformanceViewModel.cs
  23. 408 164
      Venus/Venus_MainPages/Views/GasLeakCheckView.xaml
  24. 3 5
      Venus/Venus_MainPages/Views/MFCVerificationView.xaml
  25. 59 57
      Venus/Venus_MainPages/Views/OverView.xaml
  26. 10 0
      Venus/Venus_MainPages/Views/PartialPressureView.xaml
  27. 5 9
      Venus/Venus_MainPages/Views/PlatformView.xaml
  28. 206 205
      Venus/Venus_MainPages/Views/TMView.xaml
  29. 50 50
      Venus/Venus_MainPages/Views/VATPerformanceView.xaml
  30. 11 7
      Venus/Venus_RT/Devices/JetPM.cs
  31. 161 78
      Venus/Venus_RT/Devices/SkyPump.cs
  32. 37 10
      Venus/Venus_RT/Modules/PMs/GasBoxLeakCheckRoutine.cs
  33. 8 4
      Venus/Venus_RT/Modules/PMs/PMEntity.cs
  34. 1 1
      Venus/Venus_RT/Modules/PMs/PMHomeRoutine.cs
  35. 28 9
      Venus/Venus_RT/Modules/PMs/PMLeakCheckRoutine.cs
  36. 5 1
      Venus/Venus_RT/Modules/PMs/PMPartialPressureRoutine.cs
  37. 5 2
      Venus/Venus_RT/Modules/PMs/PMVATPerformanceRoutine.cs
  38. 18 9
      Venus/Venus_RT/Modules/PMs/PumpDownRoutine.cs
  39. 3 0
      Venus/Venus_RT/Modules/TM/MFPickRoutine.cs
  40. 1 0
      Venus/Venus_RT/Modules/TM/MFPlaceRoutine.cs
  41. 12 1
      Venus/Venus_RT/Modules/TM/TMEntity.cs
  42. 5 0
      Venus/Venus_Simulator/Instances/SimulatorSystem.cs
  43. 17 0
      Venus/Venus_Themes/UserControls/Chamber.xaml
  44. 11 0
      Venus/Venus_Themes/UserControls/Chamber.xaml.cs
  45. 1 1
      Venus/Venus_Themes/UserControls/LoadLockLeft.xaml
  46. 1 1
      Venus/Venus_Themes/UserControls/LoadLockRight.xaml
  47. 2 1
      Venus/Venus_Themes/UserControls/TMChamber.xaml
  48. 1 1
      Venus/Venus_UI/Config/VenusMenu.json

+ 17 - 0
Venus/Framework/Common/CommonData/RobotMoveInfo.cs

@@ -8,22 +8,39 @@ using System.Threading.Tasks;
 namespace MECF.Framework.Common.CommonData
 {
     [Serializable]
+    [DataContract]
     public enum RobotArm
     {
+        [EnumMember]
         ArmA,
+        [EnumMember]
         ArmB,
+        [EnumMember]
         Both
     }
 
     [Serializable]
+    [DataContract]
     public enum RobotAction
     {
+        [EnumMember]
+
         None,
+        [EnumMember]
+
         Picking,
+        [EnumMember]
+
         Placing,
+        [EnumMember]
+
         Moving,
+        [EnumMember]
+
 
         Extending,
+        [EnumMember]
+
         Retracting,
     }
 

+ 1 - 0
Venus/Framework/Common/Communications/AsyncSerialPort.cs

@@ -187,6 +187,7 @@ namespace MECF.Framework.Common.Communications
         private void AsciiDataReceived()
         {
             string str = _port.ReadExisting(); //字符串方式读
+
             _buff += str;
 
                 int index = _buff.LastIndexOf(_port.NewLine, StringComparison.Ordinal);

+ 34 - 0
Venus/Venus_Core/PMLeakCheckResult.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_Core
+{
+    [DataContract]
+    public class PMLeakCheckResult
+    {
+        [DataMember]
+        public string CheckDate { get; set; }
+
+        [DataMember]
+        public double StartPressure { get; set; }
+
+        [DataMember]
+        public double EndPressure { get; set; }
+
+        [DataMember]
+        public int LeakCheckTime { get; set; }
+
+        [DataMember]
+        public double LeakRate { get; set; }
+
+        [DataMember]
+        public string CheckMode { get; set; }
+
+        [DataMember]
+        public string Result { get; set; }
+    }
+}

+ 12 - 0
Venus/Venus_Core/PMVATPerformance.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_Core
+{
+    internal class PMVATPerformance
+    {
+    }
+}

+ 26 - 13
Venus/Venus_Core/RtState.cs

@@ -126,6 +126,27 @@ namespace Venus_Core
     }
     public enum LLState
     {
+        //Unknown,
+        //Init,
+        //Initializing,
+        //Idle,
+        //Error,
+        //Pumping,
+        //Venting,
+        //Purging,
+        //Leakchecking,
+        //Picking,
+        //Placing,
+        //Swaping,
+        //PMPicking,
+        //PMPlacing,
+        //PMSwaping,
+        //Aligning,
+        //Mapping,
+        //Extending,
+        //Retracting,
+        //Swapping,
+        //Gotoing,
         Unknown,
         Init,
         Initializing,
@@ -134,18 +155,10 @@ namespace Venus_Core
         Pumping,
         Venting,
         Purging,
-        Leakchecking,
-        Picking,
-        Placing,
-        Swaping,
-        PMPicking,
-        PMPlacing,
-        PMSwaping,
-        Aligning,
-        Mapping,
-        Extending,
-        Retracting,
-        Swapping,
-        Gotoing,
+        LeakCheck,
+        Prepare_For_TM,
+        Prepare_For_EFEM,
+        Ready_For_TM,
+        Ready_For_EFEM,
     }
 }

+ 2 - 1
Venus/Venus_Core/SerializeHelper.cs

@@ -410,7 +410,8 @@ namespace Venus_Unity
             try
             {
                 string strJson = ObjectToJsonString(obj);
-                File.WriteAllText(strFilePath, strJson, Encoding.UTF8);
+                //File.WriteAllText(strFilePath, strJson, Encoding.UTF8);
+                WriteToJsonFile(strJson, strFilePath);
                 bRes = true;
             }
             catch (Exception ex)

+ 5 - 1
Venus/Venus_Core/VenusDevice.cs

@@ -253,6 +253,10 @@
 
         LLPlace,
         LLPick,
+        PMPick,
+        PMPlace,
+        Extend,
+        Retract,
 
         RunRecipe,
 
@@ -265,7 +269,7 @@
         Reset,
 
         LeakCheck,
-
+        GasLeakCheck,
         DeleteLeakCheck,
         MFCVerification,
         AllMFCVerification,

+ 2 - 0
Venus/Venus_Core/Venus_Core.csproj

@@ -53,6 +53,8 @@
     <Compile Include="EventDefine.cs" />
     <Compile Include="FADefine.cs" />
     <Compile Include="InvokeName.cs" />
+    <Compile Include="PMLeakCheckResult.cs" />
+    <Compile Include="PMVATPerformance.cs" />
     <Compile Include="SubItem.cs" />
     <Compile Include="ModuleName.cs" />
     <Compile Include="ProcessUnitDefine.cs" />

+ 36 - 0
Venus/Venus_MainPages/Converters/AllNoneCheckboxConverter.cs

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

+ 40 - 0
Venus/Venus_MainPages/Converters/HeaterToStringConverter.cs

@@ -0,0 +1,40 @@
+using Aitex.Core.Common.DeviceData;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Venus_MainPages.Converters
+{
+    internal class HeaterToStringConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            var item = (AITHeaterData)value;
+            StringBuilder stringBuilder = new StringBuilder();
+
+            if (item == null) return null;
+            
+            stringBuilder.Append("DeviceName:");
+            stringBuilder.Append(item.DeviceName);
+            stringBuilder.Append("\r\n");
+            stringBuilder.Append("Unit:");
+            stringBuilder.Append(item.Unit);
+            stringBuilder.Append("\r\n");
+            stringBuilder.Append("Max:");
+            stringBuilder.Append(item.Scale);
+            stringBuilder.Append("\r\n");
+            stringBuilder.Append("SetPoint:");
+            stringBuilder.Append(item.SetPoint);
+            return stringBuilder.ToString();
+
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 1 - 1
Venus/Venus_MainPages/Unity/ModuleManager.cs

@@ -13,7 +13,7 @@ namespace Venus_MainPages.Unity
         /// </summary>
         public static readonly List<string> ModulesID = new List<string>()
         {
-             "LLA","LLB","TMRobot","LP1","LP2"
+             "LLA","LLB","TM","LP1","LP2"
         };
 
         public static Dictionary<string, ModuleInfo> ModuleInfos { get; private set; } = new Dictionary<string, ModuleInfo>();

+ 2 - 2
Venus/Venus_MainPages/Unity/PartialPressureResult.cs

@@ -11,10 +11,10 @@ namespace Venus_MainPages.Unity
     internal class PartialPressureResult
     {
         [DataMember(Name = "StartTime")]
-        public DateTime StartTime { get; set; }
+        public string StartTime { get; set; }
 
         [DataMember(Name = "EndTime")]
-        public DateTime EndTime { get; set; }
+        public string EndTime { get; set; }
         [DataMember(Name = "FlowTime")]
         public int FlowTime { get; set; }
         [DataMember(Name = "GasName")]

+ 36 - 0
Venus/Venus_MainPages/Unity/VATPerformanceResult.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_MainPages.Unity
+{
+    [DataContract]
+    internal class VATPerformanceResult
+    {
+        [DataMember(Name = "StartTime")]
+        public string StartTime { get; set; }
+        [DataMember(Name = "EndTime")]
+        public string EndTime { get; set; }
+        [DataMember(Name = "FlowTime")]
+        public int FlowTime { get; set; }
+        [DataMember(Name = "GasName")]
+
+        public string GasName { get; set; }
+        [DataMember(Name = "ValuePairs")]
+
+        public List<double> ValuePairs { get; set; } = new List<double>();
+        [DataMember(Name = "Result")]
+
+        public string Result { get; set; } = "Fail";
+    }
+
+    //[DataContract]
+    //public class VATPerformanceValue
+    //{
+    //    public string Position { get; set; }
+    //    public double Value { get; set; }
+    //}
+}

+ 3 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -111,7 +111,9 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Converters\AllNoneCheckboxConverter.cs" />
     <Compile Include="Converters\EventItemToStringConverter.cs" />
+    <Compile Include="Converters\HeaterToStringConverter.cs" />
     <Compile Include="Converters\LLStateConverter.cs" />
     <Compile Include="Converters\MultiBindingConverter.cs" />
     <Compile Include="Converters\PMStateConverter.cs" />
@@ -129,6 +131,7 @@
     <Compile Include="Unity\IHandler.cs" />
     <Compile Include="Unity\ModuleManager.cs" />
     <Compile Include="Unity\PartialPressureResult.cs" />
+    <Compile Include="Unity\VATPerformanceResult.cs" />
     <Compile Include="Unity\SystemConfig.cs" />
     <Compile Include="Unity\SystemConfigProvider.cs" />
     <Compile Include="Unity\WaferAssociationInfo.cs" />

+ 2 - 2
Venus/Venus_MainPages/ViewModels/EventViewModel.cs

@@ -70,7 +70,7 @@ namespace Venus_MainPages.ViewModels
         public ObservableCollection<string> UserList { get; set; }
         public string SelectedUser { get; set; }
 
-        public ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem> SearchedResult { get; set; }
+        public ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem> SearchedResult { get; set; } = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
 
         public Func<string, List<EventItem>> QueryDBEventFunc { get; set; }
         public Func<List<string>> QueryEventList { get; set; }
@@ -344,7 +344,7 @@ namespace Venus_MainPages.ViewModels
 
                         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                         {
-                            SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
+                            
 
                             string logTypeStr;
 

+ 397 - 22
Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs

@@ -1,11 +1,20 @@
-using MECF.Framework.Common.OperationCenter;
+using Aitex.Core.Common.DeviceData;
+using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.OperationCenter;
+using Microsoft.Win32;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Threading;
+using Venus_Core;
+using Venus_Themes.CustomControls;
+using Venus_Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -16,12 +25,63 @@ namespace Venus_MainPages.ViewModels
         private int m_LeakCheckModeSelectedIndex;
         private int m_VentTime;
         private int m_CheckTime;
-        private int m_LeakRateUpperLimit;
-        private bool[] m_GasIsCheck=new bool[8];
+        private double m_LeakRateUpperLimit;
+        private int m_BasePressure;
+
+        private bool[] m_GasIsCheck=new bool[9];
         private string ModuleName="PMA";
+
+        private AITMfcData m_MFC1Data;
+        private AITMfcData m_MFC2Data;
+        private AITMfcData m_MFC3Data;
+        private AITMfcData m_MFC4Data;
+        private AITMfcData m_MFC5Data;
+        private AITMfcData m_MFC6Data;
+        private AITMfcData m_MFC7Data;
+        private AITMfcData m_MFC8Data;
+        private ObservableCollection<PMLeakCheckResult> m_LeakCheckResultList=new ObservableCollection<PMLeakCheckResult>();    
+
+        #region
+        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_SoftPumpValveIsOpen;
+        private bool m_FastPumpValveIsOpen;
+        private bool m_PVHe1ValveIsOpen;
+        private bool m_PVHe2ValveIsOpen;
+        private bool m_TurboPumpPumpingValveIsOpen;
+        private bool m_TurboPumpPurgeValveIsOpen;
+        private bool m_GuageValveIsOpen;
+        #endregion
+
+
+        private List<string> m_RtDataKeys=new List<string> ();
+        private Dictionary<string, object> m_RtDataValues=new Dictionary<string, object> ();
         #endregion
 
         #region  属性
+        public ObservableCollection<PMLeakCheckResult> LeakCheckResultList
+        {
+            get { return m_LeakCheckResultList; }
+            set { SetProperty(ref m_LeakCheckResultList, value); }
+        }
         public List<string> LeakCheckMode
         {
             get { return m_LeakCheckMode; }
@@ -45,7 +105,12 @@ namespace Venus_MainPages.ViewModels
             get { return m_CheckTime; }
             set { SetProperty(ref m_CheckTime, value); }
         }
-        public int LeakRateUpperLimit
+        public int BasePressure
+        {
+            get { return m_BasePressure; }
+            set { SetProperty(ref m_BasePressure, value); }
+        }
+        public double LeakRateUpperLimit
         {
             get { return m_LeakRateUpperLimit; }
             set { SetProperty(ref m_LeakRateUpperLimit, value); }
@@ -55,12 +120,209 @@ namespace Venus_MainPages.ViewModels
             get { return m_GasIsCheck; }
             set { SetProperty(ref m_GasIsCheck, value); }
         }
+        public AITMfcData MFC1Data
+        {
+            get { return m_MFC1Data; }
+            set { SetProperty(ref m_MFC1Data, value); }
+        }
+        public AITMfcData MFC2Data
+        {
+            get { return m_MFC2Data; }
+            set { SetProperty(ref m_MFC2Data, value); }
+        }
+        public AITMfcData MFC3Data
+        {
+            get { return m_MFC3Data; }
+            set { SetProperty(ref m_MFC3Data, value); }
+        }
+        public AITMfcData MFC4Data
+        {
+            get { return m_MFC4Data; }
+            set { SetProperty(ref m_MFC4Data, value); }
+        }
+        public AITMfcData MFC5Data
+        {
+            get { return m_MFC5Data; }
+            set { SetProperty(ref m_MFC5Data, value); }
+        }
+        public AITMfcData MFC6Data
+        {
+            get { return m_MFC6Data; }
+            set { SetProperty(ref m_MFC6Data, value); }
+        }
+        public AITMfcData MFC7Data
+        {
+            get { return m_MFC7Data; }
+            set { SetProperty(ref m_MFC7Data, value); }
+        }
+        public AITMfcData MFC8Data
+        {
+            get { return m_MFC8Data; }
+            set { SetProperty(ref m_MFC8Data, value); }
+        }
+       
+        #region
+        public bool GasFinalValveIsOpen
+        {
+            get { return m_GasFinalValveIsOpen; }
+            set { SetProperty(ref m_GasFinalValveIsOpen, value); }
+        }
+        public bool PVN21ValveIsOpen
+        {
+            get { return m_PVN21ValveIsOpen; }
+            set { SetProperty(ref m_PVN21ValveIsOpen, value); }
+        }
+        public bool PVN22ValveIsOpen
+        {
+            get { return m_PVN22ValveIsOpen; }
+            set { SetProperty(ref m_PVN22ValveIsOpen, value); }
+        }
+        public bool N2ValveIsOpen
+        {
+            get { return m_N2ValveIsOpen; }
+            set { SetProperty(ref m_N2ValveIsOpen, value); }
+        }
+        public bool PV11ValveIsOpen
+        {
+            get { return m_PV11ValveIsOpen; }
+            set { SetProperty(ref m_PV11ValveIsOpen, value); }
+        }
+        public bool PV12ValveIsOpen
+        {
+            get { return m_PV12ValveIsOpen; }
+            set { SetProperty(ref m_PV12ValveIsOpen, value); }
+        }
+        public bool MFC1ValveIsOpen
+        {
+            get { return m_MFC1ValveIsOpen; }
+            set { SetProperty(ref m_MFC1ValveIsOpen, value); }
+        }
+        public bool PV21ValveIsOpen
+        {
+            get { return m_PV21ValveIsOpen; }
+            set { SetProperty(ref m_PV21ValveIsOpen, value); }
+        }
+        public bool PV22ValveIsOpen
+        {
+            get { return m_PV22ValveIsOpen; }
+            set { SetProperty(ref m_PV22ValveIsOpen, value); }
+        }
+        public bool MFC2ValveIsOpen
+        {
+            get { return m_MFC2ValveIsOpen; }
+            set { SetProperty(ref m_MFC2ValveIsOpen, value); }
+        }
+        public bool PV31ValveIsOpen
+        {
+            get { return m_PV31ValveIsOpen; }
+            set { SetProperty(ref m_PV31ValveIsOpen, value); }
+        }
+        public bool PV32ValveIsOpen
+        {
+            get { return m_PV32ValveIsOpen; }
+            set { SetProperty(ref m_PV32ValveIsOpen, value); }
+        }
+        public bool MFC3ValveIsOpen
+        {
+            get { return m_MFC3ValveIsOpen; }
+            set { SetProperty(ref m_MFC3ValveIsOpen, value); }
+        }
+        public bool PV41ValveIsOpen
+        {
+            get { return m_PV41ValveIsOpen; }
+            set { SetProperty(ref m_PV41ValveIsOpen, value); }
+        }
+        public bool PV42ValveIsOpen
+        {
+            get { return m_PV42ValveIsOpen; }
+            set { SetProperty(ref m_PV42ValveIsOpen, value); }
+        }
+        public bool MFC4ValveIsOpen
+        {
+            get { return m_MFC4ValveIsOpen; }
+            set { SetProperty(ref m_MFC4ValveIsOpen, value); }
+        }
+        public bool MFC5ValveIsOpen
+        {
+            get { return m_MFC5ValveIsOpen; }
+            set { SetProperty(ref m_MFC5ValveIsOpen, value); }
+        }
+        public bool MFC6ValveIsOpen
+        {
+            get { return m_MFC6ValveIsOpen; }
+            set { SetProperty(ref m_MFC6ValveIsOpen, value); }
+        }
+        public bool MFC7ValveIsOpen
+        {
+            get { return m_MFC7ValveIsOpen; }
+            set { SetProperty(ref m_MFC7ValveIsOpen, value); }
+        }
+        public bool MFC8ValveIsOpen
+        {
+            get { return m_MFC8ValveIsOpen; }
+            set { SetProperty(ref m_MFC8ValveIsOpen, value); }
+        }
+        public bool PVHe1ValveIsOpen
+        {
+            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
+        {
+            get { return m_SoftPumpValveIsOpen; }
+            set { SetProperty(ref m_SoftPumpValveIsOpen, value); }
+        }
+        public bool FastPumpValveIsOpen
+        {
+            get { return m_FastPumpValveIsOpen; }
+            set { SetProperty(ref m_FastPumpValveIsOpen, value); }
+        }
+        public bool GuageValveIsOpen
+        {
+            get { return m_GuageValveIsOpen; }
+            set { SetProperty(ref m_GuageValveIsOpen, value); }
+        }
+        public Dictionary<string, object> RtDataValues
+        {
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
+        }
+        #endregion
         #endregion
 
         #region 命令
         private DelegateCommand _CheckCommand;
         public DelegateCommand CheckCommand =>
             _CheckCommand ?? (_CheckCommand = new DelegateCommand(OnCheck));
+
+
+        private DelegateCommand _AbortCommand;
+        public DelegateCommand AbortCommand =>
+            _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
+
+        private DelegateCommand _ExportCommand;
+        public DelegateCommand ExportCommand =>
+            _ExportCommand ?? (_ExportCommand = new DelegateCommand(OnExport));
+
+
+        private DelegateCommand<object> _ControlValveCommand;
+        public DelegateCommand<object> ControlValveCommand =>
+            _ControlValveCommand ?? (_ControlValveCommand = new DelegateCommand<object>(OnControlValve));
         #endregion
 
         #region 构造函数
@@ -71,31 +333,144 @@ namespace Venus_MainPages.ViewModels
             m_VentTime = 120;
             m_CheckTime = 180;
             m_LeakRateUpperLimit = 10;
+            BasePressure = 100;
+
+            addDataKeys();
+
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
         }
         #endregion
 
         #region 命令方法
         private void OnCheck()
         {
+            if (LeakCheckModeSelectedIndex == 0)
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakCheck", VentTime, CheckTime, LeakRateUpperLimit);
 
-            //InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{ModuleName}.Pump.LeakCheckPumpingTime", VentTime.ToString());
-            //InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{ModuleName}.Pump.LeakCheckWaitTime", CheckTime.ToString());
-            //InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{ModuleName}.Pump.LeakRate", LeakRateUpperLimit.ToString());
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakCheck", new[]
-                                                  {
-                                                          VentTime.ToString(),
-                                                          CheckTime.ToString(),
-                                                          LeakCheckMode[LeakCheckModeSelectedIndex],
-                                                          LeakRateUpperLimit.ToString(),
-                                                          GasIsCheck[0].ToString(),
-                                                          GasIsCheck[1].ToString(),
-                                                          GasIsCheck[2].ToString(),
-                                                          GasIsCheck[3].ToString(),
-                                                          GasIsCheck[4].ToString(),
-                                                          GasIsCheck[5].ToString(),
-                                                          GasIsCheck[6].ToString(),
-                                                          GasIsCheck[7].ToString(),                                                         
-                                                      });
+            }
+            else if (LeakCheckModeSelectedIndex == 1 || LeakCheckModeSelectedIndex == 2)
+            {
+                StringBuilder stringBuilder = new StringBuilder();
+                for (int i = 1; i < 9; i++)
+                {
+                    if (GasIsCheck[i] == true)
+                    {
+                        var value = i.ToString();
+                        stringBuilder.Append(value);
+                        stringBuilder.Append(',');
+                    }
+                }
+                if (stringBuilder.Length > 1)
+                {
+                    stringBuilder.Remove(stringBuilder.Length - 1, 1);
+                    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.GasLeakCheck", VentTime, CheckTime, LeakRateUpperLimit, stringBuilder.ToString(), GasIsCheck[0], LeakCheckMode[LeakCheckModeSelectedIndex]);
+                }
+               
+            }
+        }
+        private void OnAbort()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+        }
+        private void OnExport()
+        {
+            OpenFileDialog dialog = new OpenFileDialog();
+            dialog.Filter = ".json|*.json";
+            dialog.InitialDirectory = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "LeakCheck");
+            if (dialog.ShowDialog() == true)
+            {
+                string SelectedPath = dialog.FileName;
+                LeakCheckResultList.Add (SerializeHelper.Instance.ReadFromJsonFile<PMLeakCheckResult>(SelectedPath));
+            }
+        }
+        
+        private void OnControlValve(object obj)
+        {
+            CommonValveControl commonValveControl = (CommonValveControl)obj;
+            if (commonValveControl.IsCanEdit == true)
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", Convert.ToInt32(commonValveControl.Tag.ToString()), !commonValveControl.Status);
+            }
+        }
+        #endregion
+
+        #region 私有方法
+        void timer_Tick(object sender, EventArgs e)
+        {
+            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"];
+            PVN21ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN21.IsOpen"];
+            PVN22ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN22.IsOpen"];
+            MFC1Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas1"];
+            MFC2Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas2"];
+            MFC3Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas3"];
+            MFC4Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas4"];
+            MFC5Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas5"];
+            MFC6Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas6"];
+            MFC7Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas7"];
+            MFC8Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas8"];
+
+        }
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8");
+            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}.ValveGuage.IsOpen");
         }
         #endregion
     }

+ 22 - 1
Venus/Venus_MainPages/ViewModels/OverViewModel.cs

@@ -173,9 +173,25 @@ namespace Venus_MainPages.ViewModels
 
         private bool m_IsTurboPumpAtSpeed; 
         private bool m_TurboPumpWaterFlowSwitch;
+
+        private bool m_IsHasWafer;
+
+        private Recipe m_CurrentRecipe=new Recipe ();
+
         #endregion
 
         #region  属性
+        public Recipe CurrentRecipe
+        {
+            get { return m_CurrentRecipe; }
+            set { SetProperty(ref m_CurrentRecipe, value); }
+
+        }
+        public bool IsHasWafer
+        {
+            get { return m_IsHasWafer; }
+            set { SetProperty(ref m_IsHasWafer, value); }
+        }
         public bool IsTurboPumpAtSpeed
         {
             get { return m_IsTurboPumpAtSpeed; }
@@ -1376,6 +1392,9 @@ namespace Venus_MainPages.ViewModels
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
 
 
+            var N2SetPoint =Convert.ToInt32( QueryDataClient.Instance.Service.GetConfig("System.TurboN2FlowSetPoint"));
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", N2SetPoint);
+
             PVN21ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN21.IsOpen"];
             GasFinalValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveGasFinal.IsOpen"];
             PV11ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePV11.IsOpen"];
@@ -1440,6 +1459,7 @@ namespace Venus_MainPages.ViewModels
             MFC8Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcGas8"];
             MFCHeData= (AITMfcData)RtDataValues[$"{ModuleName}.MfcHe"];
             MFCN2Data = (AITMfcData)RtDataValues[$"{ModuleName}.MfcN2"];
+            
 
             ValveHeaterData= (AITHeaterData)RtDataValues[$"{ModuleName}.ValveHeater.DeviceData"];
             ForelineHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ForelineHeater.DeviceData"];
@@ -1490,7 +1510,7 @@ namespace Venus_MainPages.ViewModels
 
             TurboPumpWaterFlowSwitch= ((AITSensorData)RtDataValues[$"{ModuleName}.TurboPumpWaterFlowSwitch"]).Value;
             IsTurboPumpAtSpeed = (bool)RtDataValues[$"{ModuleName}.IsTurboPumpAtSpeed"];
-
+            IsHasWafer= (bool)RtDataValues[$"{ModuleName}.HasWafer"];
         }
 
 
@@ -1610,6 +1630,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.IsTurboPumpAtSpeed");
             m_RtDataKeys.Add($"{ModuleName}.TurboPumpWaterFlowSwitch");
 
+            m_RtDataKeys.Add($"{ModuleName}.HasWafer");
 
 
 

+ 45 - 10
Venus/Venus_MainPages/ViewModels/PartialPressureViewModel.cs

@@ -1,10 +1,13 @@
 using LiveCharts;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.OperationCenter;
+using Microsoft.Win32;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -32,9 +35,15 @@ namespace Venus_MainPages.ViewModels
         private PartialPressureResult m_partialPressureResult;
         string value;
         int maxScale;
+        ObservableCollection<string> m_ReferenceFlow = new ObservableCollection<string>();
         #endregion
 
         #region 属性
+        public ObservableCollection<string> ReferenceFlow
+        {
+            get { return m_ReferenceFlow; }
+            set { SetProperty(ref m_ReferenceFlow, value); }
+        }
         public Dictionary<string, object> RtConfigValues
         {
             get { return m_RtConfigValues; }
@@ -96,6 +105,7 @@ namespace Venus_MainPages.ViewModels
             addConfigKeys();
             GasTime = 60;
             
+
             foreach (var item in QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys))
             {
                 var newkey = item.Key.Substring(4, item.Key.Length-4);
@@ -115,9 +125,12 @@ namespace Venus_MainPages.ViewModels
             Dictionary<int, object> CurrentGasFlows = new Dictionary<int, object>();
             value = $"MfcGas{obj.ToString()}";
             maxScale = Convert.ToInt32(RtConfigValues[$"{value}.MfcN2Scale"]);
+            var xishu = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.{value}.MfcScaleFactor"));
+
+
             for (int i = 1; i < 11; i++)
             {
-                CurrentGasFlows.Add(i, maxScale / 10 * i);
+                CurrentGasFlows.Add(i, (int)(maxScale *xishu / 10 * i));
             }
             GasFlows = CurrentGasFlows;
             m_GasIndex = Convert.ToInt32(obj);
@@ -125,7 +138,7 @@ namespace Venus_MainPages.ViewModels
         private  void OnStart()
         {
             m_partialPressureResult = new PartialPressureResult();
-            m_partialPressureResult.StartTime = DateTime.Now;
+            m_partialPressureResult.StartTime = DateTime.Now.ToString();
             m_partialPressureResult.FlowTime = GasTime;
             m_partialPressureResult.GasName = value;
             CurrentLineSeries = new ChartValues<double>();
@@ -135,14 +148,35 @@ namespace Venus_MainPages.ViewModels
 
         private void OnSave()
         {
-            SerializeHelper.Instance.WriteToJsonFile<PartialPressureResult>(m_partialPressureResult, $"PartialPressureResult/{DateTime.Now.ToString("yyyyMMddHHmmss")}.json");
+            SerializeHelper.Instance.WriteToJsonFile<PartialPressureResult>(m_partialPressureResult, $"PartialPressureResult/{m_partialPressureResult.GasName}/{DateTime.Now.ToString("yyyyMMddHHmm")}.json");
         }
         private void OnLoadReference()
         {
-            for (int i = 0; i < 10; i++)
+            OpenFileDialog dialog = new OpenFileDialog();
+            dialog.Filter = ".json|*.json";
+            dialog.InitialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "PartialPressureResult") ;
+            if (dialog.ShowDialog() == true)
             {
-                ReferenceLineSeries.Add(100 * (i + 1));
+                string SelectedPath = dialog.FileName;
+                var value = SerializeHelper.Instance.ReadFromJsonFile<PartialPressureResult>(SelectedPath);
+                ReferenceLineSeries.Clear();
+                ReferenceFlow.Clear();
+                value.ValuePairs.ForEach(x =>
+                {
+                    ReferenceFlow.Add(x.Flow);
+                    ReferenceLineSeries.Add(x.Pressure);
+                });
             }
+            else
+            {
+                ReferenceLineSeries.Clear();
+                //ReferenceLineSeries.Insert(20, 0);
+                ReferenceLineSeries.Add(0);
+                ReferenceFlow.Clear();
+            }
+           
+
+
         }
         private void OnAbort()
         {
@@ -154,19 +188,20 @@ namespace Venus_MainPages.ViewModels
 
         #region 私有方法
         private void Timer_Tick(object sender, EventArgs e)
-        {
-           var counter= (int)QueryDataClient.Instance.Service.GetData($"{ModuleName}.PartialPressureCounter");
+        {          
+
+            var counter= (int)QueryDataClient.Instance.Service.GetData($"{ModuleName}.PartialPressureCounter");
             if (counter >=2 && counter<=11 && counter>CurrentLineSeries.Count+1)
             {
                 var pressureValue = Convert.ToDouble(QueryDataClient.Instance.Service.GetData($"{ModuleName}.ProcessPressureLow.Value"));
                 CurrentLineSeries.Add(pressureValue);
                 //m_partialPressureResult.ValuePairs.Add($"{(counter-1) * 10}%", pressureValue);
-                m_partialPressureResult.ValuePairs.Add(new Value() { Flow = GasFlows[counter - 1].ToString(), Pressure = pressureValue });
+                m_partialPressureResult.ValuePairs.Add(new Value() { Flow = GasFlows[counter - 1].ToString(), Pressure = Math.Round(pressureValue,3) });
             }
             if (counter == 11)
             {
-                m_partialPressureResult.EndTime = DateTime.Now;
-                m_partialPressureResult.Result = "Success";
+                m_partialPressureResult.EndTime = DateTime.Now.ToString();
+                //m_partialPressureResult.Result = "Success";
                 timer.Stop();
             }
         }

+ 15 - 1
Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs

@@ -14,6 +14,7 @@ using System.Windows;
 using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
+using Venus_Themes.CustomControls;
 using WPF.Themes.UserControls;
 
 namespace Venus_MainPages.ViewModels
@@ -169,6 +170,10 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand MoveWaferCommand =>
             _MoveWaferCommand ?? (_MoveWaferCommand = new DelegateCommand(OnMoveWafer));
 
+        private DelegateCommand<object> _ControlValveCommand;
+        public DelegateCommand<object> ControlValveCommand =>
+            _ControlValveCommand ?? (_ControlValveCommand = new DelegateCommand<object>(OnControlValve));
+
         #endregion
 
         #region 构造函数
@@ -181,7 +186,7 @@ namespace Venus_MainPages.ViewModels
             //var test = RTData.GetRTData().RtDataValues;
             addDataKeys();
             DispatcherTimer timer = new DispatcherTimer();
-            timer.Interval = TimeSpan.FromSeconds(0.5);
+            timer.Interval = TimeSpan.FromSeconds(0.1);
             timer.Tick += timer_Tick;
             timer.Start();
 
@@ -295,6 +300,14 @@ namespace Venus_MainPages.ViewModels
 
             }
         }
+        private void OnControlValve(object obj)
+        {
+            CommonValveControl commonValveControl = (CommonValveControl)obj;
+            if (commonValveControl.IsCanEdit == true)
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", Convert.ToInt32(commonValveControl.Tag.ToString()), !commonValveControl.Status);
+            }
+        }
         #endregion
 
         #region 私有方法
@@ -333,6 +346,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.LoadLockPurge.PurgeCounter");
             m_RtDataKeys.Add($"{ModuleName}.IsSlitDoorClosed");
             m_RtDataKeys.Add($"{ModuleName}.LoadlockPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
             m_RtDataKeys.Add($"{ModuleName}.IsATMLoadlock");
             m_RtDataKeys.Add($"{ModuleName}.IsVACLoadlock");
             m_RtDataKeys.Add($"PMA.HasWafer");

+ 258 - 60
Venus/Venus_MainPages/ViewModels/TMViewModel.cs

@@ -1,4 +1,5 @@
 using Aitex.Sorter.Common;
+using MECF.Framework.Common.CommonData;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.OperationCenter;
@@ -24,7 +25,7 @@ namespace Venus_MainPages.ViewModels
     }
     public enum TMBlade
     {
-        BladeA, BladeB
+        Blade1, Blade2
     }
    
     internal class TMViewModel : BindableBase
@@ -79,10 +80,205 @@ namespace Venus_MainPages.ViewModels
         private Dictionary<string, object> m_RtDataValues;
 
         private string m_ModuleCheckedName="TM";
+        private string m_RobotAction;
+        private string m_RobotTarget;
+
+        private string m_RobotArm;
+  
 
         #endregion
 
         #region 属性
+        public string RobotAction
+        {
+            get { return m_RobotAction; }
+            set 
+            {
+                RobotActiont(m_RobotAction, value);
+                SetProperty(ref m_RobotAction, value);
+            }
+        }
+        public string RobotTarget
+        {
+            get { return m_RobotTarget; }
+            set
+            {
+                SetProperty(ref m_RobotTarget, value);
+            }
+        }
+        public string RobotArm
+        {
+            get { return m_RobotArm; }
+            set
+            { 
+                SetProperty(ref m_RobotArm, value);
+            }
+        }
+        int arm1oldWaferStatus = 100;
+        int arm2oldWaferStatus = 100;
+
+        private async void RobotActiont(string oldValue,string newValue)
+        {
+            
+            if (oldValue == "None" && newValue == "Placing" && ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus==1)
+            {
+                var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                await Task.Delay(1500);
+                Robot1XAction = WaferRobotXAction.Extend;
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+            }
+            if (oldValue == "None" && newValue == "Placing" && ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus == 1)
+            {
+                var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+                //Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                //await Task.Delay(1500);
+                //Robot2XAction = WaferRobotXAction.Extend;               
+            }
+            if (arm1oldWaferStatus != ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus)
+            {                     
+                Robot1XAction = WaferRobotXAction.Retract;             
+            }
+            if (arm2oldWaferStatus != ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus)
+            {
+                Robot2XAction = WaferRobotXAction.Retract;
+            }
+           
+            if (oldValue == "None" && newValue == "Picking" && ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus == 0)
+            {
+                var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+                      
+            }
+
+
+            #region pick 和 place pm
+            if (oldValue == "None" && newValue == "Extending")
+            {
+                var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+
+            }
+            if (oldValue == "None" && newValue == "Retracting")
+            {
+                var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                if (arm == "ArmA")
+                {
+                    Robot1XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2XAction = WaferRobotXAction.Retract;
+                }
+
+            }
+            #endregion
+
+
+            arm1oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus;
+            arm2oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus;
+
+
+        }
         public WaferInfo LLAWafer
         {
             get { return m_LLAWafer; }
@@ -337,8 +533,8 @@ namespace Venus_MainPages.ViewModels
             PlaceSoltItemsSource.Add(1);
             ExtendSoltItemsSource.Add(1);
             RetractSoltItemsSource.Add(1);
-            Robot1TAction = WaferRobotTAction.PMA;
-            Robot2TAction = WaferRobotTAction.PMD;
+            //Robot1TAction = WaferRobotTAction.PMA;
+            //Robot2TAction = WaferRobotTAction.PMD;
 
 
         }
@@ -348,53 +544,64 @@ namespace Venus_MainPages.ViewModels
             LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
             LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
 
-            LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers[3];
-            LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers[3];
+            //LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers[0];
+            //LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers[3];
+
             PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
-            //BladeAWafer= ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0];
-            //BladeBWafer = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1];
+            BladeAWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0];
+            BladeBWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1];
 
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
 
+
+            var TMRobotMoveActionArmTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.ArmTarget");
+            if (TMRobotMoveActionArmTarget != null)
+            {
+                RobotArm = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus.ToString();
+            }
+
+
+            var TMRobotMoveActionBladeTarget = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.BladeTarget");
+            if (TMRobotMoveActionBladeTarget != null)
+            { 
+                RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+            }
+
+            var TMRobotMoveActionRobotAction = QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction.RobotAction");
+
+            if (TMRobotMoveActionRobotAction != null)
+            {
+                RobotAction = TMRobotMoveActionRobotAction.ToString();
+            }
+
+
         }
         #endregion
 
         #region 命令方法
         private void OnGoto()
         {
-            if (GoToSelectedBlade == TMBlade.BladeA)
+            if (GoToSelectedBlade == TMBlade.Blade1)
             {
                 Robot1TAction = WaferRobotTAction;
             }
-            else if (GoToSelectedBlade == TMBlade.BladeB)
+            else if (GoToSelectedBlade == TMBlade.Blade2)
             { 
                 Robot2TAction = WaferRobotTAction;
             }
            
         }
         private void OnExtend()
-        {
-            //if (ExtendRetractSelectedBlade == TMBlade.BladeA)
-            //{
-            //    Robot1XAction = WaferRobotXAction.Extend;
-            //}
-            //else if (ExtendRetractSelectedBlade == TMBlade.BladeB)
-            //{ 
-            //    Robot2XAction = WaferRobotXAction.Extend;
-
-            //}
+        {          
+            var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
+            var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
+            InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.Extend}", moduleName, 0, selectedHand);
         }
         private void OnRetract()
-        {
-            //if (ExtendRetractSelectedBlade == TMBlade.BladeA)
-            //{
-            //    Robot1XAction = WaferRobotXAction.Retract;
-            //}
-            //else if (ExtendRetractSelectedBlade == TMBlade.BladeB)
-            //{
-            //    Robot2XAction = WaferRobotXAction.Retract;
-
-            //}
+        {          
+            var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
+            var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
+            InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.Retract}", moduleName, 0, selectedHand);
         }
         private void OnModuleChange(object obj)
         {
@@ -426,7 +633,7 @@ namespace Venus_MainPages.ViewModels
 
                 case "Place":
                     PlaceSoltItemsSource.Clear();
-                    if ((int)PickSelectedModule == 4)
+                    if ((int)PlaceSelectedModule == 4)
                     {
                         for (int i = 1; i <= LLAModuleInfo.WaferManager.Wafers.Count; i++)
                         {
@@ -434,7 +641,7 @@ namespace Venus_MainPages.ViewModels
                         }
 
                     }
-                    else if ((int)PickSelectedModule == 5)
+                    else if ((int)PlaceSelectedModule == 5)
                     {
                         for (int i = 1; i <= LLBModuleInfo.WaferManager.Wafers.Count; i++)
                         {
@@ -499,47 +706,35 @@ namespace Venus_MainPages.ViewModels
             }
          
         }
-        private async void OnPick()
+        private  void OnPick()
         {
-            InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPick}", ModuleName.LLA,0, Hand.Blade1);
-
-            if (PickSelectedBlade == TMBlade.BladeA)
+            var moduleName= (ModuleName)Enum.Parse(typeof(ModuleName), PickSelectedModule.ToString(), true);
+            var selectedHand= (Hand)Enum.Parse(typeof(Hand), PickSelectedBlade.ToString(), true);
+            if ((int)PickSelectedModule > 3)
             {
-                Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), PickSelectedModule.ToString(), true);
-                await Task.Delay(1000);
-                Robot1XAction = WaferRobotXAction.Extend;
-                await Task.Delay(2000);
-                Robot1XAction = WaferRobotXAction.Retract;
+                InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPick}", moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
 
             }
-            else if (PickSelectedBlade == TMBlade.BladeB)
-            {
-                Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), PickSelectedModule.ToString(), true);
-                await Task.Delay(1000);
-                Robot2XAction = WaferRobotXAction.Extend;
-                await Task.Delay(2000);
-                Robot2XAction = WaferRobotXAction.Retract;
+            else
+            { 
+            InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPick}", moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
 
             }
         }
-        private async void OnPlace()
+        private  void OnPlace()
         {
-            if (PlaceSelectedBlade == TMBlade.BladeA)
+            var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
+
+            var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
+            if ((int)PlaceSelectedModule > 3)
             {
-                Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), PlaceSelectedModule.ToString(), true);
-                await Task.Delay(1000);
-                Robot1XAction = WaferRobotXAction.Extend;
-                await Task.Delay(2000);
-                Robot1XAction = WaferRobotXAction.Retract;
+                InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPlace}", moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex]-1, selectedHand);
 
             }
-            else if (PlaceSelectedBlade == TMBlade.BladeB)
+            else
             {
-                Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), PlaceSelectedModule.ToString(), true);
-                await Task.Delay(1000);
-                Robot2XAction = WaferRobotXAction.Extend;
-                await Task.Delay(2000);
-                Robot2XAction = WaferRobotXAction.Retract;
+                InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPlace}", moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex] - 1, selectedHand);
+
             }
         }
         private void OnHome()
@@ -579,6 +774,9 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
             m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
 
+            //m_RtDataKeys.Add("TM.RobotMoveAction");
+
+
         }
         #endregion
     }

+ 2 - 2
Venus/Venus_MainPages/ViewModels/TopViewModel.cs

@@ -190,10 +190,10 @@ namespace Venus_MainPages.ViewModels
                 case EventType.EventUI_Notify:
                     Application.Current.Dispatcher.Invoke(delegate
                     {
-                        EventLogList.Add(eventItem);
+                        EventLogList.Insert(0,eventItem);
                         if (EventLogList.Count > logMaxCount)
                         { 
-                            EventLogList.RemoveAt(0);
+                            EventLogList.RemoveAt(EventLogList.Count-1);
                         }
                         
                         if (eventItem.Level == EventLevel.Alarm)

+ 50 - 7
Venus/Venus_MainPages/ViewModels/VATPerformanceViewModel.cs

@@ -1,14 +1,18 @@
 using LiveCharts;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.OperationCenter;
+using Microsoft.Win32;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Threading;
+using Venus_MainPages.Unity;
+using Venus_Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -23,7 +27,7 @@ namespace Venus_MainPages.ViewModels
         ChartValues<double> m_CurrentLineSeries = new ChartValues<double>();
         ChartValues<double> m_ReferenceLineSeries = new ChartValues<double>();
         DispatcherTimer timer = new DispatcherTimer();
-
+        VATPerformanceResult m_VATPerformanceResult; 
         #endregion
 
         #region 属性
@@ -76,6 +80,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand _AbortCommand;
         public DelegateCommand AbortCommand =>
             _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
+
+        private DelegateCommand _SaveCommand;
+        public DelegateCommand SaveCommand =>
+            _SaveCommand ?? (_SaveCommand = new DelegateCommand(OnSave));
         #endregion
 
         #region 构造函数
@@ -93,22 +101,48 @@ namespace Venus_MainPages.ViewModels
         private void OnSelectGas()
         {
            var value=Convert.ToInt32( QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas{(GasSelectedIndex+1).ToString()}.MfcN2Scale"));
-           GasFlow = value / 2;
+           var xishu= Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas{(GasSelectedIndex + 1).ToString()}.MfcScaleFactor"));
+           GasFlow = (int)(value * xishu) / 2;
         }
 
         private void OnStart()
         {
+            m_VATPerformanceResult = new VATPerformanceResult();
+            m_VATPerformanceResult.StartTime = DateTime.Now.ToString();
+            m_VATPerformanceResult.FlowTime = GasTime;
+            m_VATPerformanceResult.GasName = $"Gas{GasSelectedIndex+1}";
             CurrentLineSeries = new ChartValues<double>();
             timer.Start();
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VATPerformanceTest", GasSelectedIndex+1, 1000 * GasTime, GasFlow);
         }
         private void OnLoadReference()
         {
-            ReferenceLineSeries.Clear();
-            for (int i = 0; i < 21; i++)
+            //ReferenceLineSeries.Clear();
+            //for (int i = 0; i < 21; i++)
+            //{
+            //    double value = Math.Round((double)GasFlow / (double)((i + 2) * 50),3);
+            //    ReferenceLineSeries.Add(value);
+            //}
+            OpenFileDialog dialog = new OpenFileDialog();
+            dialog.Filter = ".json|*.json";
+            dialog.InitialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "VATPerformanceResult");
+            if (dialog.ShowDialog() == true)
             {
-                double value = Math.Round((double)GasFlow / (double)((i + 2) * 50),3);
-                ReferenceLineSeries.Add(value);
+                string SelectedPath = dialog.FileName;
+                var value = SerializeHelper.Instance.ReadFromJsonFile<VATPerformanceResult>(SelectedPath);
+                ReferenceLineSeries.Clear();
+             
+                value.ValuePairs.ForEach(x =>
+                {
+                
+                    ReferenceLineSeries.Add(x);
+                });
+            }
+            else
+            {
+                ReferenceLineSeries.Clear();
+                //ReferenceLineSeries.Insert(20, 0);
+                ReferenceLineSeries.Add(0);
             }
         }
         private void OnAbort()
@@ -117,9 +151,13 @@ namespace Venus_MainPages.ViewModels
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
             CurrentLineSeries = new ChartValues<double>();
         }
+        private void OnSave()
+        {
+            SerializeHelper.Instance.WriteToJsonFile<VATPerformanceResult>(m_VATPerformanceResult, $"VATPerformanceResult/{m_VATPerformanceResult.GasName}/{DateTime.Now.ToString("yyyyMMddHHmm")}.json");
+        }
         #endregion
 
-        #region 命令方法
+        #region 私有方法
         private void Timer_Tick(object sender, EventArgs e)
         {
             var counter = (int)QueryDataClient.Instance.Service.GetData($"{ModuleName}.VATPerformanceCounter");
@@ -128,6 +166,11 @@ namespace Venus_MainPages.ViewModels
                 var pressureValue = Convert.ToDouble(QueryDataClient.Instance.Service.GetData($"{ModuleName}.ProcessPressureLow.Value"));
                 var value = Math.Round(GasFlow / pressureValue,3);
                 CurrentLineSeries.Add(value);
+                m_VATPerformanceResult.ValuePairs.Add(value);
+            }
+            if (counter == 21)
+            {
+                m_VATPerformanceResult.EndTime= DateTime.Now.ToString();
             }
         }
         #endregion

+ 408 - 164
Venus/Venus_MainPages/Views/GasLeakCheckView.xaml

@@ -10,6 +10,8 @@
              xmlns:ctrls="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
              xmlns:unity="clr-namespace:Venus_MainPages.Unity"
              xmlns:converters="clr-namespace:Venus_Themes.Converters;assembly=Venus_Themes"
+             xmlns:converters2="clr-namespace:Venus_MainPages.Converters"
+             xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              d:DesignHeight="450" d:DesignWidth="2000">
     <UserControl.Resources>
         <LinearGradientBrush x:Key="buttonBrush" StartPoint="0.5,0" EndPoint="0.5,1">
@@ -18,6 +20,19 @@
             <GradientStop Color="White" Offset="1" />
         </LinearGradientBrush>
         <converters:IntToIsEnableConverter  x:Key="intToIsEnableConverter"/>
+        <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:BoolToColor3 x:Key="boolToColor3"/>
+        <converters:BoolToColor4 x:Key="boolToColor4"/>
+        <converters:BoolToColor5 x:Key="boolToColor5"/>
+        <converters:BoolToBool x:Key="BoolToBool"/>
+        <converters:IntToBoolConverter x:Key="converters:IntToBoolConverter"/>
+        <converters:IntToBoolConverter2 x:Key="converters:IntToBoolConverter2"/>
+        <converters2:AllNoneCheckboxConverter x:Key="AllNoneCheckboxConverter"/>
     </UserControl.Resources>
     <Grid>
         <Grid.ColumnDefinitions>
@@ -26,187 +41,392 @@
             <ColumnDefinition Width="4*"/>
         </Grid.ColumnDefinitions>
 
-
+        <Canvas>
+            <TextBlock Text="Gas1" FontSize="15" Canvas.Top="221" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC1Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="221" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC1Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="221" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas2" Canvas.Top="277" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC2Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="277" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC2Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="277" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas3" Canvas.Top="333" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC3Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="333" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC3Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="333" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas4" Canvas.Top="389" Canvas.Left="20"/>
+            <TextBox  Text="{Binding MFC4Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="389" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC4Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="389" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas5" Canvas.Top="445" Canvas.Left="20"/>
+            <TextBox  Text="{Binding MFC5Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="445" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox  Text="{Binding MFC5Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="445" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas6" Canvas.Top="501" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC6Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="501" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC6Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="501" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas7" Canvas.Top="557" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC7Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="557" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC7Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="557" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBlock Text="Gas8" Canvas.Top="613" Canvas.Left="20"/>
+            <TextBox Text="{Binding MFC8Data.DisplayName}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="613" Canvas.Left="70" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+            <TextBox Text="{Binding MFC8Data.Scale}" IsReadOnly="True" BorderThickness="0,0,0,1" Canvas.Top="613" Canvas.Left="150" Background="Transparent" Width="70" HorizontalContentAlignment="Center"/>
+        </Canvas>
 
         <Canvas Grid.Column="1">
-            <ctrls:FlowPipe Name="finalPipe1" Height="8"  Width="100" Canvas.Left="482" Canvas.Top="120" />
-            
+
+            <ctrls:Pipe2    Canvas.Left="490"  Canvas.Top="615" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
             <!--N2-->
-            <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="230" Canvas.Left="255" Canvas.Top="120"/>
-            <ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" />
-            <!--<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:Pipe3 Canvas.Left="245" Canvas.Top="120" RotateTransformValue="-90"/>-->
-            <ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  />
-
-            <!--To pump-->
-            <ctrls:FlowPipe Name="f1"  Height="8"  Width="422" Canvas.Left="64" Canvas.Top="173" Visibility="Hidden"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="169"/>-->
-            <ctrls:FlowPipeValve x:Name="valve10"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="163" Visibility="Hidden" />
-            <!--<ctrls:Pump Width="40" Height="40" Opacity="0.7" x:Name="pump1" Canvas.Left="80" Canvas.Top="155" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
-
-
-            <!--Cl2-->
-            <ctrls:FlowPipe Name="f9"  Height="8"  Width="278" Canvas.Left="206" Canvas.Top="230"/>
-            <ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="226"/>-->
-
-            <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="262" />-->
-            <ctrls:FlowPipe  Name="Gas1Pipe1" Height="8"  Width="144" Canvas.Left="64"  Canvas.Top="230"/>
-            <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="230" RotateTransformValue="-90"/>-->
-            <ctrls:FlowPipe   Height="8"  Width="56" Canvas.Left="201"  Canvas.Top="266"/>
+            <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="230" Canvas.Left="255" Canvas.Top="120">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
+                        <Binding Path="PVN22ValveIsOpen"/>
+                        <Binding Path="N2ValveIsOpen"/>
+                        <Binding Path="GasFinalValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <TextBlock Text="Vent Valve" Canvas.Left="416" Canvas.Top="90"/>
+
+            <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114" IsCanEdit="True" Tag="10" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+            <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="193" Canvas.Left="64"  Canvas.Top="120">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter3}">
+                        <Binding Path="PVN21ValveIsOpen"/>
+                        <Binding Path="PVN22ValveIsOpen"/>
+                        <Binding Path="N2ValveIsOpen"/>
+                        <Binding Path="GasFinalValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+
+            <TextBlock Text="VN22" Canvas.Left="280" Canvas.Top="90"/>
+            <customControls:CommonValveControl Status="{Binding PVN22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114" IsCanEdit="True" Tag="1" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
+
+
+
+
+
+            <ctrls:FlowPipe   Height="8"  Width="308" Canvas.Left="176" Canvas.Top="230" IsFlowing="{Binding MFC1ValveIsOpen}"/>
+
+            <TextBlock Text="V1" Canvas.Left="438" Canvas.Top="208"/>
+
+            <customControls:CommonValveControl Status="{Binding MFC1ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224" IsCanEdit="True" Tag="11" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
+            <ctrls:FlowPipe   Height="8"  Width="114" Canvas.Left="64"  Canvas.Top="230" IsFlowing="{Binding PV11ValveIsOpen}"/>
+
+            <ctrls:FlowPipe   Height="8"  Width="80" Canvas.Left="177"  Canvas.Top="266" IsFlowing="{Binding PV12ValveIsOpen}"/>
             <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="274" RotateTransformValue="-180"/>-->
-            <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="208"  Canvas.Top="236" RotateTransformValue="90" />
-            <ctrls:FlowPipe   Height="8"  Width="145" Canvas.Left="257"  Canvas.Top="126" RotateTransformValue="90" />
+            <ctrls:FlowPipe   Height="8"  Width="30" Canvas.Left="178"  Canvas.Top="236" RotateTransformValue="90" IsFlowing="{Binding PV12ValveIsOpen}"/>
+            <ctrls:Pipe2     Canvas.Left="183"  Canvas.Top="274" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-180" />
+            <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="PV12ValveIsOpen"/>
+                        <Binding Path="PV22ValveIsOpen"/>
+                        <Binding Path="PV32ValveIsOpen"/>
+                        <Binding Path="PV42ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
 
             <!--SF6-->
-            <ctrls:FlowPipe Name="f2"  Height="8"  Width="278" Canvas.Left="206"  Canvas.Top="286"/>
-            <ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="282" />-->
-
-            <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="318" />-->
-            <ctrls:FlowPipe x:Name="Gas2Pipe1"  Height="8"  Width="142" Canvas.Left="64"  Canvas.Top="286"/>
-            <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="286" RotateTransformValue="-90"/>-->
-            <ctrls:FlowPipe   Height="8"  Width="56" Canvas.Left="201"  Canvas.Top="322"/>
-            <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="330" RotateTransformValue="-180"/>-->
-            <ctrls:FlowPipe   Height="8"  Width="36" Canvas.Left="208"  Canvas.Top="290" RotateTransformValue="90" />
-            <ctrls:FlowPipe   Height="8"  Width="54" Canvas.Left="257"  Canvas.Top="270" RotateTransformValue="90" />
+            <ctrls:FlowPipe   Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding MFC2ValveIsOpen}"/>
+            <TextBlock Text="V2" Canvas.Left="438" Canvas.Top="264"/>
+
+            <customControls:CommonValveControl Status="{Binding MFC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280" IsCanEdit="True" Tag="12" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
+            <ctrls:FlowPipe   Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="286" IsFlowing="{Binding PV21ValveIsOpen}"/>
+
+            <ctrls:FlowPipe   Height="8"  Width="80" Canvas.Left="177"  Canvas.Top="322" IsFlowing="{Binding PV22ValveIsOpen}"/>
+
+            <ctrls:FlowPipe   Height="8"  Width="32" Canvas.Left="178"  Canvas.Top="290" RotateTransformValue="90" IsFlowing="{Binding PV22ValveIsOpen}"/>
+            <ctrls:Pipe2     Canvas.Left="183"  Canvas.Top="330" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-180" />
+            <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="PV22ValveIsOpen"/>
+                        <Binding Path="PV32ValveIsOpen"/>
+                        <Binding Path="PV42ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
 
             <!--Gas3-->
-            <ctrls:FlowPipe Name="f3"  Height="8"  Width="278" Canvas.Left="206"  Canvas.Top="342"/>
-            <ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="338" />-->
-            <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="374" />-->
-            <ctrls:FlowPipe x:Name="Gas3Pipe1"  Height="8"  Width="152" Canvas.Left="64"  Canvas.Top="342"/>
-            <!--<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="56" Canvas.Left="201"  Canvas.Top="378"/>
-            <ctrls:FlowPipe   Height="8"  Width="34" Canvas.Left="208"  Canvas.Top="348" RotateTransformValue="90" />
-            <ctrls:FlowPipe   Height="8"  Width="56" Canvas.Left="257"  Canvas.Top="324" RotateTransformValue="90" />
+            <ctrls:FlowPipe  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding MFC3ValveIsOpen}"/>
+
+            <TextBlock Text="V3" Canvas.Left="436" Canvas.Top="320"/>
+
+            <customControls:CommonValveControl Status="{Binding MFC3ValveIsOpen,Mode=TwoWay}"   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336" IsCanEdit="True" Tag="13" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
+            <ctrls:FlowPipe   Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding PV31ValveIsOpen}"/>
+
+            <ctrls:FlowPipe   Height="8"  Width="80" Canvas.Left="177"  Canvas.Top="378" IsFlowing="{Binding PV32ValveIsOpen}"/>
+            <ctrls:FlowPipe   Height="8"  Width="30" Canvas.Left="178"  Canvas.Top="348" RotateTransformValue="90" IsFlowing="{Binding PV32ValveIsOpen}"/>
+            <ctrls:Pipe2     Canvas.Left="183"  Canvas.Top="386" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-180" />
+            <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="PV32ValveIsOpen"/>
+                        <Binding Path="PV42ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
 
 
 
 
             <!--Gas4-->
-            <ctrls:FlowPipe x:Name="Gas4Pipe1"  Height="8"  Width="142" Canvas.Left="64"  Canvas.Top="396"/>
-            <!--<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="56" Canvas.Left="201"  Canvas.Top="428"/>
-            <!--<ctrls:Pipe2 Canvas.Left="257" Canvas.Top="423" RotateTransformValue="90"/>-->
-            <ctrls:FlowPipe Name="f4"  Height="8"  Width="278" Canvas.Left="206"  Canvas.Top="396"/>
-            <ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="392" />-->
-            <ctrls:FlowPipe   Height="8"  Width="54" Canvas.Left="257"  Canvas.Top="380" RotateTransformValue="90" />
-            <ctrls:FlowPipe   Height="8"  Width="32" Canvas.Left="209"  Canvas.Top="400" RotateTransformValue="90" />
+            <ctrls:FlowPipe   Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="396" IsFlowing="{Binding PV41ValveIsOpen}"/>
+            <ctrls:FlowPipe   Height="8"  Width="76"  Canvas.Left="175"  Canvas.Top="428" IsFlowing="{Binding PV42ValveIsOpen}"/>
+            <ctrls:FlowPipe   Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding MFC4ValveIsOpen}"/>
+
+            <TextBlock Text="V4" Canvas.Left="436" Canvas.Top="374"/>
+            <customControls:CommonValveControl Status="{Binding MFC4ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390" IsCanEdit="True" Tag="14" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+            <ctrls:FlowPipe   Height="8"  Width="50" Canvas.Left="257"  Canvas.Top="380" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="PV42ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <ctrls:Pipe2    Canvas.Left="257"  Canvas.Top="423" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
+            <ctrls:FlowPipe   Height="8"  Width="30" Canvas.Left="178"  Canvas.Top="401" RotateTransformValue="90" IsFlowing="{Binding PV42ValveIsOpen}"/>
+            <ctrls:Pipe2     Canvas.Left="183"  Canvas.Top="436" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-180" />
 
 
             <!--Gas5-->
-            <ctrls:FlowPipe Name="f5"  Height="8"  Width="418" Canvas.Left="64"  Canvas.Top="452"/>
-            <ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="447.5" />-->
+            <ctrls:FlowPipe   Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding MFC5ValveIsOpen}"/>
+            <TextBlock Text="V5" Canvas.Left="438" Canvas.Top="430"/>
+            <customControls:CommonValveControl Status="{Binding MFC5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446" IsCanEdit="True" Tag="15" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <!--O2-->
-            <ctrls:FlowPipe Name="f6"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="507"/>
-            <ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="503" />-->
+            <ctrls:FlowPipe  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding MFC6ValveIsOpen}"/>
+            <TextBlock Text="V6" Canvas.Left="438" Canvas.Top="485"/>
+            <customControls:CommonValveControl Status="{Binding MFC6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501" IsCanEdit="True" Tag="16" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
 
             <!--Gas7-->
-            <ctrls:FlowPipe Name="f7"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563"/>
-            <ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554"/>
-            <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="559" />-->
+            <ctrls:FlowPipe   Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding MFC7ValveIsOpen}"/>
+            <TextBlock Text="V7" Canvas.Left="438" Canvas.Top="541"/>
+            <customControls:CommonValveControl Status="{Binding MFC7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557" IsCanEdit="True" Tag="17" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
-            <!--Gas8-->
-            <ctrls:FlowPipe Name="f8"  Height="8"  Width="418" Canvas.Left="68"  Canvas.Top="620"/>
-            <ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611"/>
-            <!--<ctrls:Pipe2 RotateTransformValue="90"   Canvas.Left="490" Canvas.Top="615"  />-->
-            <ctrls:FlowPipe Name="l8" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="126"  RotateTransformValue="90" />
-            <ctrls:FlowPipe Name="l1" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="180"  RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l9" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="234"  RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l2" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="290"  RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l3" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="344" RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l4" Height="9"  Width="58" Canvas.Left="490" Canvas.Top="400" RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l5" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="458" RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l6" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="514" RotateTransformValue="90"/>
-            <ctrls:FlowPipe Name="l7" Height="9"  Width="56" Canvas.Left="490" Canvas.Top="570" RotateTransformValue="90"/>
 
+            <!--Gas8-->
+            <ctrls:FlowPipe  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding MFC8ValveIsOpen}"/>
+            <TextBlock Text="V8" Canvas.Left="438" Canvas.Top="598"/>
+            <customControls:CommonValveControl Status="{Binding MFC8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614" IsCanEdit="True" Tag="18" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+
+            <!--与chamber上方连接的管道-->
+            <ctrls:FlowPipe  Height="8"  Width="100" Canvas.Left="482" Canvas.Top="120">
+                <ctrls:FlowPipe.IsFlowing>
+                    <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>
+            <Image Canvas.Left="590" Canvas.Top="110"  Width="40" Height="25"  Source="Pack://application:,,,/Venus_Themes;Component/Resources/Arrow.png" Stretch="Uniform">
+              
+            </Image>
+
+            <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="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  Height="8"  Width="56" Canvas.Left="490" Canvas.Top="180"  RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <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  Height="8"  Width="58" Canvas.Left="490" Canvas.Top="234"  RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <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  Height="8"  Width="56" Canvas.Left="490" Canvas.Top="290"  RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <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  Height="8"  Width="58" Canvas.Left="490" Canvas.Top="344" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="MFC4ValveIsOpen"/>
+                        <Binding Path="MFC5ValveIsOpen"/>
+                        <Binding Path="MFC6ValveIsOpen"/>
+                        <Binding Path="MFC7ValveIsOpen"/>
+                        <Binding Path="MFC8ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <ctrls:FlowPipe  Height="8"  Width="58" Canvas.Left="490" Canvas.Top="400" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="MFC5ValveIsOpen"/>
+                        <Binding Path="MFC6ValveIsOpen"/>
+                        <Binding Path="MFC7ValveIsOpen"/>
+                        <Binding Path="MFC8ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <ctrls:FlowPipe  Height="8"  Width="58" Canvas.Left="490" Canvas.Top="456" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="MFC6ValveIsOpen"/>
+                        <Binding Path="MFC7ValveIsOpen"/>
+                        <Binding Path="MFC8ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <ctrls:FlowPipe  Height="8"  Width="58" Canvas.Left="490" Canvas.Top="512" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="MFC7ValveIsOpen"/>
+                        <Binding Path="MFC8ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+            <ctrls:FlowPipe  Height="8"  Width="48" Canvas.Left="490" Canvas.Top="568" RotateTransformValue="90" IsReverse="True">
+                <ctrls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
+                        <Binding Path="MFC8ValveIsOpen"/>
+                    </MultiBinding>
+                </ctrls:FlowPipe.IsFlowing>
+            </ctrls:FlowPipe>
+         
 
 
 
             <!--阀-->
 
-            <ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="157" Canvas.Top="386"  />
-            <ctrls:FlowPipeValve    x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="157" Canvas.Top="333" />
-            <ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="157" Canvas.Top="276"  />
-            <ctrls:FlowPipeValve x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="157" Canvas.Top="220" />
-            <ctrls:FlowPipeValve   x:Name="pumpValve1"  Height="20" Width="24" Canvas.Left="157" Canvas.Top="163" Visibility="Hidden" />
+            <TextBlock Text="V41" Canvas.Left="128" Canvas.Top="374"/>
+            <customControls:CommonValveControl Status="{Binding PV41ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390" IsCanEdit="True" Tag="8" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
-            <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="217" Canvas.Top="256" />
-            <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="217" Canvas.Top="312" />
-            <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="217" Canvas.Top="368" />
-            <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="217" Canvas.Top="418" />
-            <ctrls:FlowPipeValve     x:Name="VN21"  Height="20" Width="24" Canvas.Left="266.5" Canvas.Top="148"   >
-                <ctrls:FlowPipeValve.RenderTransform>
-                    <TransformGroup>
-                        <RotateTransform Angle="90"/>
-                    </TransformGroup>
-                </ctrls:FlowPipeValve.RenderTransform>
-            </ctrls:FlowPipeValve>
+            <TextBlock Text="V31" Canvas.Left="128" Canvas.Top="320"/>
 
+            <customControls:CommonValveControl Status="{Binding PV31ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336" Tag="6" IsCanEdit="True"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="V21" Canvas.Left="128" Canvas.Top="266"/>
 
+            <customControls:CommonValveControl Status="{Binding PV21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280" Tag="4" IsCanEdit="True"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="V11" Canvas.Left="128" Canvas.Top="208"/>
+            <customControls:CommonValveControl Status="{Binding PV11ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224" Tag="2" IsCanEdit="True"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
-            <!--左侧管道标签-->
-            <ctrls:TextboxWithLabel  Canvas.Top="205" Canvas.Left="285" LabelValue="MFC1" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="205" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="285" LabelValue="MFC2" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="285" LabelValue="MFC3" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="285" LabelValue="MFC4" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="285" LabelValue="MFC5" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="285" LabelValue="MFC6" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="285" LabelValue="MFC7" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-            <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="285" LabelValue="MFC8" TextBoxValue="0.0" TextBoxColor="White" />
-            <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
 
 
+            <TextBlock Text="V12" Canvas.Left="200" Canvas.Top="243"/>
 
+            <customControls:CommonValveControl Status="{Binding PV12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259" IsCanEdit="True" Tag="3" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="V22" Canvas.Left="200" Canvas.Top="300"/>
 
+            <customControls:CommonValveControl Status="{Binding PV22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315" IsCanEdit="True" Tag="5" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="V32" Canvas.Left="200" Canvas.Top="355"/>
 
+            <customControls:CommonValveControl Status="{Binding PV32ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371" IsCanEdit="True" Tag="7" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="V42" Canvas.Left="200" Canvas.Top="405"/>
 
+            <customControls:CommonValveControl Status="{Binding PV42ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421" IsCanEdit="True" Tag="9" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
+            <TextBlock Text="VN21" Canvas.Left="200" Canvas.Top="152"/>
 
+            <customControls:CommonValveControl Status="{Binding PVN21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="243" Canvas.Top="148" IsCanEdit="True" Tag="0" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+
+            <!--左侧管道标签-->
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC1SetPoint,Mode=TwoWay}" IsReadOnly="False"  Canvas.Top="205" Canvas.Left="275" LabelValue="MFC1" ToolTip="{Binding MFC1Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <!--<TextBox Canvas.Top="205" Canvas.Left="250" Width="100" Text="{Binding MfcGas1Setpoint,Mode=TwoWay}"/>-->
+            <ctrls:TextboxWithLabel  Canvas.Top="205" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC1Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC2SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="260" Canvas.Left="275" LabelValue="MFC2" ToolTip="{Binding MFC2Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC2Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC3SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="318" Canvas.Left="275" LabelValue="MFC3" ToolTip="{Binding MFC3Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC3Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC4SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="370" Canvas.Left="275" LabelValue="MFC4" ToolTip="{Binding MFC4Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC4Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC5SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="426" Canvas.Left="275" LabelValue="MFC5" ToolTip="{Binding MFC5Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC5Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC6SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="482" Canvas.Left="275" LabelValue="MFC6" ToolTip="{Binding MFC6Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC6Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC7SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="538" Canvas.Left="275" LabelValue="MFC7" ToolTip="{Binding MFC7Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC7Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC8SetPoint,Mode=TwoWay}" IsReadOnly="False" Canvas.Top="595" Canvas.Left="275" LabelValue="MFC8" ToolTip="{Binding MFC8Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
+            <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding MFC8Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
 
-            <!--<TextBlock FontSize="13" Text="N2" Canvas.Left="34" Canvas.Top="117"/>
-            <TextBlock FontSize="13" Text="To pump" Canvas.Left="0" Canvas.Top="167" Visibility="Hidden"/>
-            <TextBlock FontSize="13" Text="Cl2" Canvas.Left="34" Canvas.Top="227"/>
-            <TextBlock FontSize="13" Text="SF6" Canvas.Left="34" Canvas.Top="284"/>
-            <TextBlock FontSize="13" Text="Gas3" Canvas.Left="30" Canvas.Top="338"/>
-            <TextBlock FontSize="13" Text="Gas4" Canvas.Left="30" Canvas.Top="392"/>
-            <TextBlock FontSize="13" Text="Gas5" Canvas.Left="30" Canvas.Top="448"/>
-            <TextBlock FontSize="13" Text="O2" Canvas.Left="30" Canvas.Top="503"/>
-            <TextBlock FontSize="13" Text="Gas7" Canvas.Left="30" Canvas.Top="562"/>
-            <TextBlock FontSize="13" Text="Gas8" Canvas.Left="30" Canvas.Top="618"/>-->
 
-            <Image   Width="40" Height="25"  Source="Pack://application:,,,/Venus_Themes;Component/Resources/Arrow.png" Canvas.Left="582" Canvas.Top="111" Stretch="Uniform"/>
 
-            <ctrls:CustomSwitch  Width="150" HorizontalContentAlignment="Center" Height="20" Value="  Gas ON/OFF  " Canvas.Left="310" Canvas.Top="690" />
 
-        </Canvas>
+
+
+            <Ellipse Width="20" Height="20" Fill="{Binding GasIsFlowing,Converter={StaticResource boolToColor}}"  Canvas.Left="360" Canvas.Top="680" Stroke="Silver" StrokeThickness="2"/>
+            <Button Width="100" Content="Gas ON/OFF" Canvas.Left="390" Canvas.Top="680" Style="{StaticResource SysBtnStyle}"  Command="{Binding GasCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
+            <TextBlock FontSize="13" Text="Vent N2" Canvas.Left="1" Canvas.Top="117" Foreground="Black"  Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC1Data.DisplayName}" Canvas.Left="10" Canvas.Top="227" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC2Data.DisplayName}" Canvas.Left="10" Canvas.Top="284" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC3Data.DisplayName}" Canvas.Left="10" Canvas.Top="338" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC4Data.DisplayName}" Canvas.Left="10" Canvas.Top="392" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC5Data.DisplayName}" Canvas.Left="10" Canvas.Top="448" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC6Data.DisplayName}" Canvas.Left="10" Canvas.Top="503" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC7Data.DisplayName}" Canvas.Left="10" Canvas.Top="562" Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="{Binding MFC8Data.DisplayName}" Canvas.Left="10" Canvas.Top="618" Block.TextAlignment="Right" Width="50"/>
+
+
+        </Canvas >
 
         <Canvas Grid.Column="2">
-            <Grid Width="350" Height="400" Canvas.Left="80" Canvas.Top="40" Background="White"  unity:GridOptions.ShowBorder="True">
+            <Grid Width="350" Height="440" Canvas.Left="80" Canvas.Top="20" Background="White"  unity:GridOptions.ShowBorder="True">
                 <Grid.RowDefinitions>
+                    <RowDefinition Height="40"/>
+                    <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition/>
@@ -228,52 +448,76 @@
                     <ColumnDefinition Width="2*"/>
                     <ColumnDefinition Width="3*"/>
                 </Grid.ColumnDefinitions>
-                <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="检漏设置" FontSize="15"   VerticalAlignment="Center" HorizontalAlignment="Center" />
+                <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="检漏设置" FontSize="22"   VerticalAlignment="Center" HorizontalAlignment="Center" />
                 <TextBlock Grid.Row="1"  Text="抽气时间(s)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="2"  Text="检漏时间(s)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="3"  Text="漏率上限(mt/min)" FontSize="15"   VerticalAlignment="Center" Padding="10" />
                 <TextBlock Grid.Row="4"  Text="检漏模式" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="5"  Text="MfcGas1" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="6"  Text="MfcGas2" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="7"  Text="MfcGas3" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="8"  Text="MfcGas4" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="9"  Text="MfcGas5" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="10" Text="MfcGas6" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="11"  Text="MfcGas7" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="12" Text="MfcGas8" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="13" Text="状态"     FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="14" Text="检漏时间" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-                <TextBlock Grid.Row="15" Text="当前压力" FontSize="15"   VerticalAlignment="Center" Padding="10" />
-
-                <TextBox  Grid.Row="1" Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding VentTime}"/>
-                <TextBox  Grid.Row="2" Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding CheckTime}"/>
-                <TextBox  Grid.Row="3" Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center"  Text="{Binding LeakRateUpperLimit}"/>
-                <ComboBox Grid.Row="4" Grid.Column="1"  BorderBrush="Transparent" Margin="-2,-2,-1,-1" ItemsSource="{Binding LeakCheckMode}" SelectedIndex="{Binding LeakCheckModeSelectedIndex}"/>
-                <CheckBox  Grid.Row="5" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[0]}"/>
-                <CheckBox  Grid.Row="6" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[1]}"/>
-                <CheckBox  Grid.Row="7" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[2]}"/>
-                <CheckBox  Grid.Row="8" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[3]}"/>
-                <CheckBox  Grid.Row="9" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[4]}"/>
-                <CheckBox  Grid.Row="10" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}" IsChecked="{Binding GasIsCheck[5]}"/>
-                <CheckBox  Grid.Row="11" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}" IsChecked="{Binding GasIsCheck[6]}"/>
-                <CheckBox  Grid.Row="12" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}" IsChecked="{Binding GasIsCheck[7]}"/>
-               
+                <TextBlock Grid.Row="5"  Text="全选" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="6"  Text="Vent N2" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="7"  Text="MfcGas1" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="8"  Text="MfcGas2" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="9"  Text="MfcGas3" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="10"  Text="MfcGas4" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="11"  Text="MfcGas5" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="12" Text="MfcGas6" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="13"  Text="MfcGas7" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="14" Text="MfcGas8" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="15" Text="状态"     FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="16" Text="检漏时间" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+                <TextBlock Grid.Row="17" Text="当前压力" FontSize="15"   VerticalAlignment="Center" Padding="10" />
+
+                <TextBox   Grid.Row="1"  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding VentTime}"/>
+                <TextBox   Grid.Row="2"  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" Text="{Binding CheckTime}"/>
+                <TextBox   Grid.Row="3"  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center"  Text="{Binding LeakRateUpperLimit}"/>
+
+                <ComboBox  Grid.Row="4"  Grid.Column="1"  BorderBrush="Transparent" Margin="-2,-2,-1,-1" ItemsSource="{Binding LeakCheckMode}" SelectedIndex="{Binding LeakCheckModeSelectedIndex}"/>
+
+                <CheckBox  Grid.Row="5"  Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}">
+                    <CheckBox.IsChecked>
+                        <MultiBinding Converter="{StaticResource AllNoneCheckboxConverter}">
+                            <Binding ElementName="n2CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas1CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas2CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas3CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas4CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas5CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas6CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas7CheckBox" Path="IsChecked"/>
+                            <Binding ElementName="gas8CheckBox" Path="IsChecked"/>
+                        </MultiBinding>
+                    </CheckBox.IsChecked>
+                </CheckBox>
+                <CheckBox x:Name="n2CheckBox" Grid.Row="6"  Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[0]}" />
+                <CheckBox x:Name="gas1CheckBox" Grid.Row="7"  Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[1]}"/>
+                <CheckBox x:Name="gas2CheckBox" Grid.Row="8"  Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[2]}"/>
+                <CheckBox x:Name="gas3CheckBox" Grid.Row="9"  Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[3]}"/>
+                <CheckBox x:Name="gas4CheckBox" Grid.Row="10" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[4]}"/>
+                <CheckBox x:Name="gas5CheckBox" Grid.Row="11" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[5]}"/>
+                <CheckBox x:Name="gas6CheckBox" Grid.Row="12" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[6]}"/>
+                <CheckBox x:Name="gas7CheckBox" Grid.Row="13" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[7]}"/>
+                <CheckBox x:Name="gas8CheckBox" Grid.Row="14" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding LeakCheckModeSelectedIndex}"  IsChecked="{Binding GasIsCheck[8]}"/>
+
+                <TextBlock Grid.Row="15" Grid.Column="1"/>
+                <TextBlock Grid.Row="16" Grid.Column="1"/>
+                <TextBlock Grid.Row="17" Grid.Column="1"/>
+                
             </Grid>
-            <Button    Foreground="White"  FontWeight="Bold"   Content="Leak Check"       Width="120" Height="30" Canvas.Left="480" Canvas.Top="40" Command="{Binding CheckCommand}"/>
-            <Button    Foreground="White"  FontWeight="Bold"   Content="Gas Pump Purge"   Width="120" Height="30" Canvas.Left="480" Canvas.Top="90" />
-            <Button    Foreground="White"  FontWeight="Bold"    Content="Abort"            Width="120" Height="30" Canvas.Left="480" Canvas.Top="140" />
+            <Button    Foreground="White"  FontWeight="Bold"   Content="Leak Check"       Width="120" Height="25" Canvas.Left="480" Canvas.Top="40" Command="{Binding CheckCommand}"/>
+            <Button    Foreground="White"  FontWeight="Bold"   Content="Gas Pump Purge"   Width="120" Height="25" Canvas.Left="480" Canvas.Top="90" />
+            <Button    Foreground="White"  FontWeight="Bold"    Content="Abort"            Width="120" Height="25" Canvas.Left="480" Canvas.Top="140" Command="{Binding AbortCommand}"/>
 
             <TextBlock Canvas.Left="80" Canvas.Top="460" Text="Leak Check Result" FontSize="15" FontWeight="Bold"/>
 
 
-            <Button  FontSize="15"  Foreground="White"  FontWeight="Bold"   Content="Export"    Width="100" Height="30" Canvas.Left="900" Canvas.Top="440"/>
+            <Button  FontSize="15"  Foreground="White"  FontWeight="Bold"   Content="Export"    Width="100" Height="30" Canvas.Left="900" Canvas.Top="440" Command="{Binding ExportCommand}"/>
             <Button  FontSize="15"  Foreground="White"  FontWeight="Bold"    Content="Delete"   Width="100" Height="30" Canvas.Left="1020" Canvas.Top="440" />
             <DataGrid Canvas.Left="80" Height="300" Canvas.Top="480" AutoGenerateColumns="False" BorderThickness="0.1"  FontSize="12" MinRowHeight="20" VerticalAlignment="Stretch"
                         CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="True" CanUserResizeRows="False" CanUserSortColumns="False" 
                         SelectionMode="Single" SelectionUnit="FullRow" Background="#05000000" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
                         ItemsSource="{Binding LeakCheckResultList}" SelectedItem="{Binding CurrentLeakCheckResultItem}" FontFamily="Arial,SimSun" Margin="0,0,8,45">
                 <DataGrid.Columns>
-                    <DataGridTextColumn Width="160" Binding="{Binding Date, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                    <DataGridTextColumn Width="160" Binding="{Binding CheckDate}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                         <DataGridTextColumn.HeaderTemplate >
                             <DataTemplate>
                                 <TextBlock Text="CheckDate" />
@@ -287,7 +531,7 @@
                             </DataTemplate>
                         </DataGridTextColumn.HeaderTemplate>
                     </DataGridTextColumn>
-                    <DataGridTextColumn Width="120" Binding="{Binding StopPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                    <DataGridTextColumn Width="120" Binding="{Binding EndPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                         <DataGridTextColumn.HeaderTemplate >
                             <DataTemplate>
                                 <TextBlock Text="StopPressure" />
@@ -301,21 +545,21 @@
                             </DataTemplate>
                         </DataGridTextColumn.HeaderTemplate>
                     </DataGridTextColumn>
-                    <DataGridTextColumn Width="120" Binding="{Binding LeakRate, StringFormat={}{0:F5}}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                    <DataGridTextColumn Width="120" Binding="{Binding LeakRate}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                         <DataGridTextColumn.HeaderTemplate >
                             <DataTemplate>
                                 <TextBlock Text="LeakRate" />
                             </DataTemplate>
                         </DataGridTextColumn.HeaderTemplate>
                     </DataGridTextColumn>
-                    <DataGridTextColumn Width="200" Binding="{Binding LeakCheckMode}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                    <DataGridTextColumn Width="200" Binding="{Binding CheckMode}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                         <DataGridTextColumn.HeaderTemplate >
                             <DataTemplate>
                                 <TextBlock Text="CheckMode" />
                             </DataTemplate>
                         </DataGridTextColumn.HeaderTemplate>
                     </DataGridTextColumn>
-                    <DataGridTextColumn Width="200" Binding="{Binding LeakCheckStatus}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                    <DataGridTextColumn Width="200" Binding="{Binding Result}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
                         <DataGridTextColumn.HeaderTemplate >
                             <DataTemplate>
                                 <TextBlock Text=" GlobalLableLeakCheckStatus" />

+ 3 - 5
Venus/Venus_MainPages/Views/MFCVerificationView.xaml

@@ -13,8 +13,6 @@
              xmlns:converters="clr-namespace:Venus_MainPages.Converters"
              d:DesignHeight="1450" d:DesignWidth="800">
     <UserControl.Resources>
-      
-
         <converters:MultiBindingConverter x:Key="MultiBindingConverter"/>
     </UserControl.Resources>
     <Grid>
@@ -1112,8 +1110,8 @@
                 <RowDefinition Height="30"></RowDefinition>
             </Grid.RowDefinitions>
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="Auto"></ColumnDefinition>
-                <ColumnDefinition Width="364"></ColumnDefinition>
+                <ColumnDefinition></ColumnDefinition>
+                <ColumnDefinition></ColumnDefinition>
             </Grid.ColumnDefinitions>
 
             <Grid Width="1545" Grid.Column="0">
@@ -1237,7 +1235,7 @@
                 </sciChart:SciChartSurface>-->
             </Grid>
 
-            <DataGrid  Grid.Column="1" Margin="1,0,0,0"
+            <DataGrid  Grid.Column="1" Margin="1,0,0,0" Visibility="Collapsed" Width="1000"
                   AlternationCount="2" ColumnHeaderHeight="30" 
                   ItemsSource="{Binding CalibrationErrorRate}" AutoGenerateColumns="False" 
                   CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="12">

+ 59 - 57
Venus/Venus_MainPages/Views/OverView.xaml

@@ -16,6 +16,7 @@
              xmlns:sys="clr-namespace:System;assembly=mscorlib"
              xmlns:attach="clr-namespace:Venus_UI.Themes.Attach;assembly=Venus_Themes"
              xmlns:viewmodel="clr-namespace:Venus_MainPages.ViewModels"
+             xmlns:converters2="clr-namespace:Venus_MainPages.Converters"
              d:DesignHeight="1450" Width="1900"
              >
     <UserControl.Resources>
@@ -35,9 +36,9 @@
         <converters:BoolToColor4 x:Key="boolToColor4"/>
         <converters:BoolToColor5 x:Key="boolToColor5"/>
         <converters:BoolToBool x:Key="BoolToBool"/>
-        <converters:IntToBoolConverter x:Key="converters:IntToBoolConverter"/>
-        <converters:IntToBoolConverter2 x:Key="converters:IntToBoolConverter2"/>
-
+        <!--<converters:IntToBoolConverter x:Key="converters:IntToBoolConverter"/>
+        <converters:IntToBoolConverter2 x:Key="converters:IntToBoolConverter2"/>-->
+        <converters2:HeaterToStringConverter x:Key="HeaterToStringConverter"/>
     </UserControl.Resources>
     <Canvas>
         <!--<Border BorderThickness="0,0,0,1" BorderBrush="Black" Canvas.Left="40" Canvas.Top="100" Width="920">-->
@@ -91,8 +92,8 @@
 
                 <TextBlock Text="分子泵AtSpeed" Margin="15,0,5,0" Grid.Column="14"  FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" />
             <Ellipse                            Grid.Column="15"  Width="16" Height="16"  Fill="{Binding IsTurboPumpAtSpeed,Converter={StaticResource boolToColor4}}"   Stroke="Silver" StrokeThickness="2"></Ellipse>
-            <TextBlock Text="分子泵冷却水信号" Margin="15,0,5,0" Grid.Column="16"  FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" />
-            <Ellipse                            Grid.Column="17"  Width="16" Height="16"  Fill="{Binding TurboPumpWaterFlowSwitch,Converter={StaticResource boolToColor4}}"   Stroke="Silver" StrokeThickness="2"></Ellipse>
+            <!--<TextBlock Text="分子泵冷却水信号" Margin="15,0,5,0" Grid.Column="16"  FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" />
+            <Ellipse                            Grid.Column="17"  Width="16" Height="16"  Fill="{Binding TurboPumpWaterFlowSwitch,Converter={StaticResource boolToColor4}}"   Stroke="Silver" StrokeThickness="2"></Ellipse>-->
         </Grid>
         <!--</Border>-->
        
@@ -109,9 +110,9 @@
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
-            <TextBlock Text="Vent Valve" Canvas.Left="416" Canvas.Top="138"/>
+            <TextBlock Text="Vent Valve" Canvas.Left="416" Canvas.Top="90"/>
 
-            <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114" IsCanEdit="True" Tag="10" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="10" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="193" Canvas.Left="64"  Canvas.Top="120">
                 <ctrls:FlowPipe.IsFlowing>
@@ -124,8 +125,8 @@
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
 
-            <TextBlock Text="VN22" Canvas.Left="280" Canvas.Top="138"/>
-            <customControls:CommonValveControl Status="{Binding PVN22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114" IsCanEdit="True" Tag="1" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <TextBlock Text="VN22" Canvas.Left="280" Canvas.Top="90"/>
+            <customControls:CommonValveControl Status="{Binding PVN22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="1" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
 
@@ -137,7 +138,7 @@
 
             <TextBlock Text="V1" Canvas.Left="438" Canvas.Top="208"/>
 
-            <customControls:CommonValveControl Status="{Binding MFC1ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224"/>
+            <customControls:CommonValveControl Status="{Binding MFC1ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="11" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <ctrls:FlowPipe   Height="8"  Width="114" Canvas.Left="64"  Canvas.Top="230" IsFlowing="{Binding PV11ValveIsOpen}"/>
@@ -161,7 +162,7 @@
             <ctrls:FlowPipe   Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding MFC2ValveIsOpen}"/>
             <TextBlock Text="V2" Canvas.Left="438" Canvas.Top="264"/>
 
-            <customControls:CommonValveControl Status="{Binding MFC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280"/>
+            <customControls:CommonValveControl Status="{Binding MFC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="12" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <ctrls:FlowPipe   Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="286" IsFlowing="{Binding PV21ValveIsOpen}"/>
@@ -183,9 +184,9 @@
             <!--Gas3-->
             <ctrls:FlowPipe  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding MFC3ValveIsOpen}"/>
 
-            <TextBlock Text="V3" Canvas.Left="436" Canvas.Top="320"/>
+            <TextBlock Text="V3" Canvas.Left="438" Canvas.Top="320"/>
 
-            <customControls:CommonValveControl Status="{Binding MFC3ValveIsOpen,Mode=TwoWay}"   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding MFC3ValveIsOpen,Mode=TwoWay}"   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="13" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <ctrls:FlowPipe   Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding PV31ValveIsOpen}"/>
@@ -210,8 +211,8 @@
             <ctrls:FlowPipe   Height="8"  Width="76"  Canvas.Left="175"  Canvas.Top="428" IsFlowing="{Binding PV42ValveIsOpen}"/>
             <ctrls:FlowPipe   Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding MFC4ValveIsOpen}"/>
 
-            <TextBlock Text="V4" Canvas.Left="436" Canvas.Top="374"/>
-            <customControls:CommonValveControl Status="{Binding MFC4ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390"/>
+            <TextBlock Text="V4" Canvas.Left="438" Canvas.Top="374"/>
+            <customControls:CommonValveControl Status="{Binding MFC4ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="14" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <ctrls:FlowPipe   Height="8"  Width="50" Canvas.Left="257"  Canvas.Top="380" RotateTransformValue="90" IsReverse="True">
                 <ctrls:FlowPipe.IsFlowing>
@@ -228,26 +229,26 @@
             <!--Gas5-->
             <ctrls:FlowPipe   Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding MFC5ValveIsOpen}"/>
             <TextBlock Text="V5" Canvas.Left="438" Canvas.Top="430"/>
-            <customControls:CommonValveControl Status="{Binding MFC5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446"/>
+            <customControls:CommonValveControl Status="{Binding MFC5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="15" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <!--O2-->
             <ctrls:FlowPipe  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding MFC6ValveIsOpen}"/>
             <TextBlock Text="V6" Canvas.Left="438" Canvas.Top="485"/>
-            <customControls:CommonValveControl Status="{Binding MFC6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501"/>
+            <customControls:CommonValveControl Status="{Binding MFC6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="16" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
 
             <!--Gas7-->
             <ctrls:FlowPipe   Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding MFC7ValveIsOpen}"/>
             <TextBlock Text="V7" Canvas.Left="438" Canvas.Top="541"/>
-            <customControls:CommonValveControl Status="{Binding MFC7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557"/>
+            <customControls:CommonValveControl Status="{Binding MFC7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="17" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <!--Gas8-->
             <ctrls:FlowPipe  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding MFC8ValveIsOpen}"/>
             <TextBlock Text="V8" Canvas.Left="438" Canvas.Top="598"/>
-            <customControls:CommonValveControl Status="{Binding MFC8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614"/>
+            <customControls:CommonValveControl Status="{Binding MFC8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="18" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <!--<TextBlock Text="Pressure Alarm" Canvas.Left="68" Canvas.Top="94"/>-->
             <Ellipse Width="20" Height="20"  Canvas.Left="90" Canvas.Top="114" Fill="{Binding MFCN2Data.IsWarning,Converter={StaticResource boolToColor4}}"   Stroke="Silver" StrokeThickness="2" ToolTip="Pressure Alarm"></Ellipse>
@@ -288,8 +289,8 @@
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
 
-            <TextBlock Text="Gas Final" Canvas.Left="900" Canvas.Top="138" FontSize="15"/>
-            <customControls:CommonValveControl Status="{Binding GasFinalValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="922" Canvas.Top="114" IsCanEdit="True" Tag="21" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <TextBlock Text="Gas Final" Canvas.Left="900" Canvas.Top="90" FontSize="15"/>
+            <customControls:CommonValveControl Status="{Binding GasFinalValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="922" Canvas.Top="114" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="21" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <ctrls:Pipe2    Canvas.Left="1000" Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Top"  />
 
@@ -420,40 +421,40 @@
             <!--阀-->
 
             <TextBlock Text="V41" Canvas.Left="128" Canvas.Top="374"/>
-            <customControls:CommonValveControl Status="{Binding PV41ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390"/>
+            <customControls:CommonValveControl Status="{Binding PV41ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="8" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V31" Canvas.Left="128" Canvas.Top="320"/>
 
-            <customControls:CommonValveControl Status="{Binding PV31ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336" Tag="6"/>
+            <customControls:CommonValveControl Status="{Binding PV31ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336" Tag="6" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V21" Canvas.Left="128" Canvas.Top="266"/>
 
-            <customControls:CommonValveControl Status="{Binding PV21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280" Tag="4"/>
+            <customControls:CommonValveControl Status="{Binding PV21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280" Tag="4" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V11" Canvas.Left="128" Canvas.Top="208"/>
-            <customControls:CommonValveControl Status="{Binding PV11ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224" Tag="2"/>
+            <customControls:CommonValveControl Status="{Binding PV11ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224" Tag="2" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
             
 
 
             <TextBlock Text="V12" Canvas.Left="200" Canvas.Top="243"/>
 
-            <customControls:CommonValveControl Status="{Binding PV12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259"/>
+            <customControls:CommonValveControl Status="{Binding PV12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="3" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V22" Canvas.Left="200" Canvas.Top="300"/>
 
-            <customControls:CommonValveControl Status="{Binding PV22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315"/>
+            <customControls:CommonValveControl Status="{Binding PV22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="5" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V32" Canvas.Left="200" Canvas.Top="355"/>
 
-            <customControls:CommonValveControl Status="{Binding PV32ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371"/>
+            <customControls:CommonValveControl Status="{Binding PV32ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="7" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="V42" Canvas.Left="200" Canvas.Top="405"/>
 
-            <customControls:CommonValveControl Status="{Binding PV42ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421"/>
+            <customControls:CommonValveControl Status="{Binding PV42ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="9" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <TextBlock Text="VN21" Canvas.Left="200" Canvas.Top="152"/>
 
-            <customControls:CommonValveControl Status="{Binding PVN21ValveIsOpen,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" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="0" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <!--左侧管道标签-->
             <ctrls:TextboxWithLabel TextBoxValue="{Binding MFC1SetPoint,Mode=TwoWay}" IsReadOnly="False"  Canvas.Top="205" Canvas.Left="275" LabelValue="MFC1" ToolTip="{Binding MFC1Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />
@@ -481,7 +482,7 @@
 
             <Ellipse Width="20" Height="20" Fill="{Binding GasIsFlowing,Converter={StaticResource boolToColor}}"  Canvas.Left="360" Canvas.Top="650" Stroke="Silver" StrokeThickness="2"/>
             <Button Width="100" Content="Gas ON/OFF" Canvas.Left="390" Canvas.Top="650" Style="{StaticResource SysBtnStyle}"  Command="{Binding GasCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
-            <TextBlock FontSize="13" Text="N2" Canvas.Left="10" Canvas.Top="117" Foreground="White"  Block.TextAlignment="Right" Width="50"/>
+            <TextBlock FontSize="13" Text="Vent N2" Canvas.Left="10" Canvas.Top="117" Foreground="Black"  Block.TextAlignment="Right" Width="50"/>
             <TextBlock FontSize="13" Text="{Binding MFC1Data.DisplayName}" Canvas.Left="10" Canvas.Top="227" Block.TextAlignment="Right" Width="50"/>
             <TextBlock FontSize="13" Text="{Binding MFC2Data.DisplayName}" Canvas.Left="10" Canvas.Top="284" Block.TextAlignment="Right" Width="50"/>
             <TextBlock FontSize="13" Text="{Binding MFC3Data.DisplayName}" Canvas.Left="10" Canvas.Top="338" Block.TextAlignment="Right" Width="50"/>
@@ -508,7 +509,7 @@
             <ctrls:FlowPipe  Height="8"  Width="70" Canvas.Left="1264" Canvas.Top="272"   />
             <TextBlock Text="Guage" Canvas.Left="1272" Canvas.Top="248"/>
 
-            <customControls:CommonValveControl   ValveOrientation="Horizontal" Status="{Binding GuageValveIsOpen,Mode=TwoWay}" Height="20" Width="20" Canvas.Left="1280" Canvas.Top="265" IsCanEdit="True" Tag="27" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl   ValveOrientation="Horizontal" Status="{Binding GuageValveIsOpen,Mode=TwoWay}" Height="20" Width="20" Canvas.Left="1280" Canvas.Top="265" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="27" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
             <Border    BorderBrush="Gray"  BorderThickness="0"  Width="18" Height="6" Canvas.Left="1315" Canvas.Top="164" >
                 <Border.RenderTransform>
@@ -617,19 +618,19 @@
             <ctrls:FlowPipe  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 TurboPumpPumpingValveIsOpen,Mode=TwoWay}"/>-->
-            <customControls:CommonValveControl Status="{Binding TurboPumpPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610" IsCanEdit="True" Tag="26" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding TurboPumpPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="26" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
             <TextBlock Text="Turbo N2&#10;   Purge" Canvas.Left="1365"  Canvas.Top="610" FontSize="15"/>
 
             <TextBlock Text="VHe1" Canvas.Top="636" Canvas.Left="985"/>
-            <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="990" Status="{Binding PVHe1ValveIsOpen,Mode=TwoWay}" Tag="19" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="990" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Status="{Binding PVHe1ValveIsOpen,Mode=TwoWay}" Tag="19" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             <TextBlock Text="VHe2" Canvas.Top="658" Canvas.Left="1094"/>
 
-            <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100" Status="{Binding PVHe2ValveIsOpen,Mode=TwoWay}" IsCanEdit="True" Tag="20" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
-            <customControls:CommonValveControl Status="{Binding SoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="555" Canvas.Left="1154" IsCanEdit="True" Tag="22" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
-            <customControls:CommonValveControl Status="{Binding FastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20" Canvas.Top="555" Canvas.Left="1205"  IsCanEdit="True" Tag="23" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
-            <customControls:CommonValveControl  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="596" Canvas.Left="1252" Status="{Binding TurboPumpPumpingValveIsOpen,Mode=TwoWay}" IsCanEdit="True" Tag="25" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100" Status="{Binding PVHe2ValveIsOpen,Mode=TwoWay}" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="20" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding SoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="555" Canvas.Left="1154" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="22" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding FastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20" Canvas.Top="555" Canvas.Left="1205"  IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="23" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="596" Canvas.Left="1252" Status="{Binding TurboPumpPumpingValveIsOpen,Mode=TwoWay}" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="25" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
             
@@ -714,15 +715,15 @@
             <ctrls:TextboxWithLabel  Canvas.Top="400" Canvas.Left="1290" LabelValue="Wall   Heater"   TextBoxValue="{Binding WallHeaterData.CoolantOutletTcFeedback}"     TextBoxColor="{Binding WallHeaterData.IsPowerOn,Converter={StaticResource boolToColor}}"  Cursor="Hand"/>-->
             <StackPanel Canvas.Top="470" Canvas.Left="960" Orientation="Vertical">
                 <TextBlock Text="Valve Heater"/>
-                <Button Height="18" Width="50" Content="{Binding ValveHeaterData.FeedBack}" Foreground="White" ContentStringFormat="F1" Background="{Binding ValveHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding ValveHeaterData}" Cursor="Hand"/>
+                <Button Height="18" Width="50" Content="{Binding ValveHeaterData.FeedBack}" ToolTip="{Binding ValveHeaterData,Converter={StaticResource HeaterToStringConverter}}" Foreground="White" ContentStringFormat="F1" Background="{Binding ValveHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding ValveHeaterData}" Cursor="Hand"/>
             </StackPanel>
             <StackPanel Canvas.Top="645" Canvas.Left="1160" Orientation="Vertical">
                 <TextBlock Text="Foreline Heater"/>
-                <Button Height="18" Width="50" Content="{Binding ForelineHeaterData.FeedBack}" Foreground="White" ContentStringFormat="F1"  Background="{Binding ForelineHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding ForelineHeaterData}" Cursor="Hand"/>
+                <Button Height="18" Width="50" Content="{Binding ForelineHeaterData.FeedBack}" ToolTip="{Binding ForelineHeaterData,Converter={StaticResource HeaterToStringConverter}}" Foreground="White" ContentStringFormat="F1"  Background="{Binding ForelineHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding ForelineHeaterData}" Cursor="Hand"/>
             </StackPanel>
             <StackPanel Canvas.Top="380" Canvas.Left="1280" Orientation="Vertical">
                 <TextBlock Text="Wall Heater"/>
-                <Button Height="18" Width="50" Content="{Binding WallHeaterData.FeedBack}" Foreground="White" ContentStringFormat="F1" Background="{Binding WallHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding WallHeaterData}" Cursor="Hand"/>
+                <Button Height="18" Width="50" Content="{Binding WallHeaterData.FeedBack}" ToolTip="{Binding WallHeaterData,Converter={StaticResource HeaterToStringConverter}}"  Foreground="White" ContentStringFormat="F1" Background="{Binding WallHeaterData.IsPowerOnSetPoint,Converter={StaticResource boolToColor5}}" Style="{x:Null}" Command="{Binding HeaterCommand}" CommandParameter="{Binding WallHeaterData}" Cursor="Hand"/>
             </StackPanel>
 
             <!--Chamber-->
@@ -732,6 +733,7 @@
                        IsLidOpen="{Binding IsLidClosed,Converter={StaticResource BoolToBool}}"  
                        IsBRFOn="{Binding BRFIsOn}"
                        IsSRFOn="{Binding SRFIsOn}"
+                       IsHasWafer="{Binding IsHasWafer}"
                         />
 
             <Ellipse Width="20" Height="20" Fill="{Binding LiftPinIsUp,Converter={StaticResource boolToColor}}"  Canvas.Left="1065" Canvas.Top="466" Stroke="Silver" StrokeThickness="2"/>
@@ -828,13 +830,13 @@
                 <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="11"  Grid.Column="1" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="12"  Grid.Column="1" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="13"  Grid.Column="1" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="14"  Grid.Column="1" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="15"  Grid.Column="1" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="16"  Grid.Column="1" Text=""       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="17"  Grid.Column="1" Text=""       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"/>
@@ -850,13 +852,13 @@
                 <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="11"  Grid.Column="2" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="12"  Grid.Column="2" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="13"  Grid.Column="2" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="14"  Grid.Column="2" Text=""       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="15"  Grid.Column="2" Text=""       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="16"  Grid.Column="2" Text=""       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,6,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="17"  Grid.Column="2" Text=""       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"/>
@@ -1074,13 +1076,13 @@
             <StackPanel Orientation="Horizontal">
                 <Button Width="120" Height="30" Content="初始化"   Command="{Binding PMInitCommnad}" Margin="10,0,0,0"/>
                 <Button Width="120" Height="30" Content="终 止"   Command="{Binding PMAbortCommnad}" Margin="50,0,30,0"/>
-                <customControls:AduRadioButtonIcon Content="手动"  IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}" Height="40"  attach:IconElement.Margin="-20" />
+                <customControls:AduRadioButtonIcon Content="MF"  IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}" Height="40"  attach:IconElement.Margin="-20" />
                 <Border BorderThickness="1" Height="30" Width="2" BorderBrush="Black" Margin="10,0,10,0">
                     <Border.RenderTransform>
                         <RotateTransform  Angle="15" CenterX="1" CenterY="15"></RotateTransform>
                     </Border.RenderTransform>
                 </Border>
-                <customControls:AduRadioButtonIcon Content="自动" IsChecked="{Binding IsAutoMode,Mode=TwoWay}"   Margin="0,0,50,0" Height="40"  attach:IconElement.Margin="-20" />
+                <customControls:AduRadioButtonIcon Content="AF" IsChecked="{Binding IsAutoMode,Mode=TwoWay}"   Margin="0,0,50,0" Height="40"  attach:IconElement.Margin="-20" />
                 <Button  Width="120" Height="30" Content="Vent"          Command="{Binding VentCommand}"         IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
                 <Button  Width="120" Height="30" Content="Pump Purge"   Command="{Binding PurgeCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
                 <Button  Width="120" Height="30" Content="Pump Down"     Command="{Binding PumpCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>

+ 10 - 0
Venus/Venus_MainPages/Views/PartialPressureView.xaml

@@ -207,6 +207,16 @@
                 <TextBlock Text="{Binding CurrentLineSeries[8]}"  Grid.Row="10" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding CurrentLineSeries[9]}" Grid.Row="11" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
+                <TextBlock Text="{Binding ReferenceFlow[0]}" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[1]}" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[2]}" Grid.Row="4" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[3]}" Grid.Row="5" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[4]}" Grid.Row="6" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[5]}" Grid.Row="7" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[6]}" Grid.Row="8" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[7]}" Grid.Row="9" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[8]}" Grid.Row="10" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="{Binding ReferenceFlow[9]}" Grid.Row="11" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
                 <TextBlock Text="{Binding ReferenceLineSeries[0]}" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding ReferenceLineSeries[1]}" Grid.Row="3" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>

+ 5 - 9
Venus/Venus_MainPages/Views/PlatformView.xaml

@@ -69,9 +69,9 @@
         <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"/>
+        <customControls:CommonValveControl Status="{Binding LoadLockVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="130" Canvas.Top="113" IsCanEdit="True" Tag="28" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
         <!--<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"/>
+        <customControls:CommonValveControl Status="{Binding LoadLockPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="262"  Canvas.Top="310" IsCanEdit="True" Tag="29" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
         <!--<ctrls:CustomSwitch   Height="20" Value="   Slit Door Open   " Canvas.Left="100" Canvas.Top="300" IsOpen="{Binding LoadLockDoorIsOpen,Mode=TwoWay}">
        
@@ -99,8 +99,8 @@
                 </LinearGradientBrush>
             </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="{Binding RtDataValues[PMA.LoadlockPressure],StringFormat='F2'}" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Left="310" Canvas.Top="254" LabelValue="CM3(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.LoadlockPressure],StringFormat='F2'}" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Left="500" Canvas.Top="94" LabelValue="CM(mTorr)"   TextBoxValue="{Binding RtDataValues[PMA.ForelinePressure],StringFormat='F2'}" TextBoxColor="#D7E4BD"/>
         <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Left="400" Canvas.Top="124" >
             <Border.RenderTransform>
                 <RotateTransform Angle="90"/>
@@ -197,13 +197,9 @@
                     </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}" Command="{Binding PurgeCommand}">
+                        <Button Content="循环吹扫" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding PurgeCommand}">
 
                         </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">

+ 206 - 205
Venus/Venus_MainPages/Views/TMView.xaml

@@ -20,7 +20,9 @@
         <converters:BoolToBool x:Key="BoolToBool"/>
     </UserControl.Resources>
         <Canvas>
-        <StackPanel Canvas.Top="5" Canvas.Left="10" Width="715">
+       
+
+        <StackPanel Canvas.Top="20" Canvas.Left="10" Width="480">
             <Grid>
                 <Grid.RowDefinitions>
                     <RowDefinition Height="30"/>
@@ -39,12 +41,12 @@
                                 </TransformGroup>
                             </Path.RenderTransform>
                         </Path>
-                        <TextBlock  Margin="5,0,0,0" Text="TM/LoadLock Leak Check" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                        <TextBlock  Margin="5,0,0,0" Text="TM/LoadLock Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </StackPanel>
                 </Border>
                 <Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,0" Padding="5,1">
                     <WrapPanel Margin="10,10,10,0" Orientation="Horizontal" HorizontalAlignment="Center">
-                        <RadioButton Content="TM"  Width="80" Margin="2 0 0 10" IsChecked="True">
+                        <RadioButton Content="TM"  Width="80" Margin="2 0 0 10" IsChecked="True" x:Name="tmRadioButton">
                             <i:Interaction.Triggers>
                                 <i:EventTrigger EventName="Checked">
                                     <i:InvokeCommandAction Command="{Binding ModuleCheckedCommand}" CommandParameter="TM"/>
@@ -69,96 +71,143 @@
                     </WrapPanel>
                 </Border>
                 <!--<Border  Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,1" >-->
-                <Grid Grid.Row="2" unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black"   Background="{DynamicResource Table_BG_Content}">
+                    <Grid Grid.Row="2" unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black"  unity:GridOptions.LineThickness="1" Background="{DynamicResource Table_BG_Content}">
+                        <Grid.RowDefinitions>
+                            <RowDefinition/>
+                            <RowDefinition/>
+                            <RowDefinition/>
+
+                        </Grid.RowDefinitions>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+
+                        </Grid.ColumnDefinitions>
+                        <TextBlock Text="Purge Count"   Padding="10,7,0,5" Background="#D0D8E8"/>
+                        <TextBlock Text="All Count"        Grid.Column="2"  Padding="20,7,0,5" Background="#D0D8E8"/>
+                        <Button Content="Purge"  Width="80" Margin="0,3,0,3" Height="24" VerticalAlignment="Center"  Grid.Column="4" Command="{Binding PurgeCommand}"  IsEnabled="{Binding Path=TMIsOFFline}"/>
+
+                        <StackPanel Grid.Row="1" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
+                            <Button Content="Home"          Width="85" Height="25" Margin="0,0,5,0"   Command="{Binding HomeCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
+
+                            <Button Content="Vent"             Width="80" Height="25" Margin="0 5 5 5"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding VentCommand}"/>
+                            <Button Content="Pump"              Width="80" Height="25" Margin="0 5 0 5"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding PumpCommand}"/>
+                            <Button Content="Check Load"    Width="85" Height="25" Margin="5,0,0,0" Visibility="{Binding ElementName=tmRadioButton,Path=IsChecked,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding Path=TMIsOFFline}"/>
+
+                            <Button Content="Abort"   Width="80" Margin="5,5,5,5" Command="{Binding AbortCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
+
+                        </StackPanel>
+
+                        <StackPanel Grid.Row="2" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
+                            <RadioButton Content="Online"  Grid.Row="2" Grid.Column="2"  Width="80" Margin="0 5 5 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Converter={StaticResource BoolToBool},Mode=TwoWay}"/>
+                            <RadioButton Content="Offline" Grid.Row="2" Grid.Column="3"  Width="80" Margin="5 5 0 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Mode=TwoWay}"/>
+                        </StackPanel>
+
+                    </Grid>
+                <!--</Border>-->
+            </Grid>
+        </StackPanel>
+
+        <Grid      Canvas.Top="20" Canvas.Left="500" Width="460">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"/>
+                <RowDefinition Height="Auto"/>
+            </Grid.RowDefinitions>
+            <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
+                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
+                    <Path Data="M0,0 L5,0 5,5 z" Fill="White" HorizontalAlignment="Left" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Width="5" Height="5">
+                        <Path.RenderTransform>
+                            <TransformGroup>
+                                <ScaleTransform/>
+                                <SkewTransform/>
+                                <RotateTransform Angle="45"/>
+                                <TranslateTransform/>
+                            </TransformGroup>
+                        </Path.RenderTransform>
+                    </Path>
+                    <TextBlock  Margin="5,0,0,0" Text="TM Robot Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                </StackPanel>
+            </Border>
+            
+            <!--<Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}"   >-->
+            <Grid unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black" Grid.Row="1" Background="{DynamicResource Table_BG_Content}">
                     <Grid.RowDefinitions>
+                        <RowDefinition Height="25"/>
+                        <RowDefinition/>
+                        <RowDefinition/>
+                        <RowDefinition/>
                         <RowDefinition/>
                         <RowDefinition/>
-                        <!--<RowDefinition/>-->
-
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
-                        <ColumnDefinition/>
-                        <ColumnDefinition/>
-                        <ColumnDefinition/>
-                 
                     </Grid.ColumnDefinitions>
-                    <TextBlock Text="Base Pressure"   Padding="6,7,0,5" Background="#D0D8E8"/>
-                    <TextBox  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
-                    <TextBlock Text="Pump Time"        Grid.Column="2"  Padding="15,7,0,5" Background="#D0D8E8"/>
-                    <TextBox  Grid.Column="3" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
-                    <TextBlock Text="Hold Time"        Grid.Column="4"  Padding="15,7,0,5" Background="#D0D8E8"/>
-                    <TextBox  Grid.Column="5" BorderThickness="0"  VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
-                    <Button Content="Start"  Width="80" Margin="0,3,0,3" Height="24" VerticalAlignment="Center"  Grid.Column="6" />
 
-                    <DataGrid Height="200" Grid.ColumnSpan="7" Grid.Row="1"  AutoGenerateColumns="False" BorderThickness="0"  FontSize="12" MinRowHeight="20" VerticalAlignment="Stretch"
-                        CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="True" CanUserResizeRows="False" CanUserSortColumns="False" 
-                        SelectionMode="Single" SelectionUnit="FullRow" Background="#05000000" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
-                        ItemsSource="{Binding LeakCheckResultList}" SelectedItem="{Binding CurrentLeakCheckResultItem}" FontFamily="Arial,SimSun" Margin="2">
-                        <DataGrid.Columns>
-                            <DataGridTextColumn Width="120" Binding="{Binding Date, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="CheckDate" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding StartPressure}" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="StartPressure" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding StopPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="StopPressure" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding PumpTime}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="Pump Time(s)" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding LeakCheckTime}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="Check Time(s)" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding LeakRate, StringFormat={}{0:F5}}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="LeakRate" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
-                            <DataGridTextColumn Width="100" Binding="{Binding Result}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
-                                <DataGridTextColumn.HeaderTemplate >
-                                    <DataTemplate>
-                                        <TextBlock Text="Result" />
-                                    </DataTemplate>
-                                </DataGridTextColumn.HeaderTemplate>
-                            </DataGridTextColumn>
+                    <TextBlock Text="Module"                    HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14" />
+                    <TextBlock Text="Slot" Grid.Column="1"      HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14"/>
+                    <TextBlock Text="Blada" Grid.Column="2"       HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
+                    <TextBlock Text="Operation" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14"/>
 
+                    <ComboBox Grid.Row="1"                 Margin="5" SelectedItem="{Binding PickSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="SelectionChanged">
+                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Pick"/>
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </ComboBox>
+                    <ComboBox Grid.Row="1" Grid.Column="1"   Margin="5" ItemsSource="{Binding PickSoltItemsSource}" SelectedIndex="{Binding PickSoltSelectedIndex}"/>
+                    <ComboBox Grid.Row="1" Grid.Column="2"   Margin="5"  SelectedItem="{Binding PickSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <Button   Grid.Row="1" Grid.Column="3"   Margin="5"  Content="Pick" Height="25" Command="{Binding PickCommand}"/>
 
-                        </DataGrid.Columns>
+                    <ComboBox Grid.Row="2"                 Margin="5" SelectedItem="{Binding PlaceSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="SelectionChanged">
+                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Place" />
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </ComboBox>
+                    <ComboBox Grid.Row="2" Grid.Column="1" Margin="5" ItemsSource="{Binding PlaceSoltItemsSource}" SelectedIndex="{Binding PlaceSoltSelectedIndex}"/>
+                    <ComboBox Grid.Row="2" Grid.Column="2" Margin="5" SelectedItem="{Binding PlaceSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <Button   Grid.Row="2" Grid.Column="3" Margin="5" Content="Place" Height="25" Command="{Binding PlaceCommand}"/>
+
+
+                    <ComboBox Grid.Row="3"                 Margin="5" SelectedItem="{Binding ExtendSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="SelectionChanged">
+                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Extend" />
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </ComboBox>
+                    <ComboBox Grid.Row="3" Grid.Column="1" Margin="5" ItemsSource="{Binding ExtendSoltItemsSource}" SelectedIndex="{Binding ExtendSoltSelectedIndex}"/>
+                    <ComboBox Grid.Row="3" Grid.Column="2" Margin="5" SelectedItem="{Binding ExtendSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <Button   Grid.Row="3" Grid.Column="3" Margin="5" Content="Extend" Height="25" Command="{Binding ExtendCommand}"/>
+
+                    <ComboBox Grid.Row="4"                 Margin="5" SelectedItem="{Binding RetractSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="SelectionChanged">
+                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Retract" />
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </ComboBox>
+                    <ComboBox Grid.Row="4" Grid.Column="1" Margin="5" ItemsSource="{Binding RetractSoltItemsSource}" SelectedIndex="{Binding RetractSoltSelectedIndex}"/>
+                    <ComboBox Grid.Row="4" Grid.Column="2" Margin="5" SelectedItem="{Binding RetractSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <Button   Grid.Row="4" Grid.Column="3" Margin="5" Content="Retract" Height="25" Command="{Binding RetractCommand}"/>
+
+                    <ComboBox   Grid.Row="5" Grid.Column="0"  Margin="5"  SelectedItem="{Binding WaferRobotTAction}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <ComboBox   Grid.Row="5" Grid.Column="2"  Margin="5"   SelectedItem="{Binding GoToSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
+                    <Button     Grid.Row="5" Grid.Column="3"  Margin="5" Height="25"  Content="Goto" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding GotoCommand}"/>
 
-                    </DataGrid>
                 </Grid>
-                <!--</Border>-->
-            </Grid>
-        </StackPanel>
+            <!--</Border>-->
+        </Grid>
 
-        <StackPanel Canvas.Top="320" Canvas.Left="10" Width="715">
+        <StackPanel Canvas.Top="260" Canvas.Left="10" Width="950">
             <Grid>
                 <Grid.RowDefinitions>
                     <RowDefinition Height="30"/>
@@ -256,7 +305,7 @@
             </Grid>
         </StackPanel>
 
-        <StackPanel Canvas.Top="5" Canvas.Right="10" Width="480">
+        <StackPanel Canvas.Top="480" Canvas.Left="10" Width="950">
             <Grid>
                 <Grid.RowDefinitions>
                     <RowDefinition Height="30"/>
@@ -275,12 +324,12 @@
                                 </TransformGroup>
                             </Path.RenderTransform>
                         </Path>
-                        <TextBlock  Margin="5,0,0,0" Text="TM/LoadLock Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                        <TextBlock  Margin="5,0,0,0" Text="TM/LoadLock Leak Check" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </StackPanel>
                 </Border>
                 <Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,0" Padding="5,1">
                     <WrapPanel Margin="10,10,10,0" Orientation="Horizontal" HorizontalAlignment="Center">
-                        <RadioButton Content="TM"  Width="80" Margin="2 0 0 10" IsChecked="True" x:Name="tmRadioButton">
+                        <RadioButton Content="TM"  Width="80" Margin="2 0 0 10" IsChecked="True">
                             <i:Interaction.Triggers>
                                 <i:EventTrigger EventName="Checked">
                                     <i:InvokeCommandAction Command="{Binding ModuleCheckedCommand}" CommandParameter="TM"/>
@@ -305,143 +354,97 @@
                     </WrapPanel>
                 </Border>
                 <!--<Border  Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,1" >-->
-                    <Grid Grid.Row="2" unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black"  unity:GridOptions.LineThickness="1" Background="{DynamicResource Table_BG_Content}">
-                        <Grid.RowDefinitions>
-                            <RowDefinition/>
-                            <RowDefinition/>
-                            <RowDefinition/>
-
-                        </Grid.RowDefinitions>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition/>
-                            <ColumnDefinition/>
-                            <ColumnDefinition/>
-                            <ColumnDefinition/>
-                            <ColumnDefinition/>
-
-                        </Grid.ColumnDefinitions>
-                        <TextBlock Text="Purge Count"   Padding="10,7,0,5" Background="#D0D8E8"/>
-                        <TextBlock Text="All Count"        Grid.Column="2"  Padding="20,7,0,5" Background="#D0D8E8"/>
-                        <Button Content="Purge"  Width="80" Margin="0,3,0,3" Height="24" VerticalAlignment="Center"  Grid.Column="4" Command="{Binding PurgeCommand}"  IsEnabled="{Binding Path=TMIsOFFline}"/>
-
-                        <StackPanel Grid.Row="1" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
-                            <Button Content="Home"          Width="85" Height="25" Margin="0,0,5,0"   Command="{Binding HomeCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
-
-                            <Button Content="Vent"             Width="80" Height="25" Margin="0 5 5 5"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding VentCommand}"/>
-                            <Button Content="Pump"              Width="80" Height="25" Margin="0 5 0 5"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding PumpCommand}"/>
-                            <Button Content="Check Load"    Width="85" Height="25" Margin="5,0,0,0" Visibility="{Binding ElementName=tmRadioButton,Path=IsChecked,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding Path=TMIsOFFline}"/>
-
-                            <Button Content="Abort"   Width="80" Margin="5,5,5,5" Command="{Binding AbortCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
-
-                        </StackPanel>
-
-                        <StackPanel Grid.Row="2" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
-                            <RadioButton Content="Online"  Grid.Row="2" Grid.Column="2"  Width="80" Margin="0 5 5 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Converter={StaticResource BoolToBool},Mode=TwoWay}"/>
-                            <RadioButton Content="Offline" Grid.Row="2" Grid.Column="3"  Width="80" Margin="5 5 0 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Mode=TwoWay}"/>
-                        </StackPanel>
-
-                    </Grid>
-                <!--</Border>-->
-            </Grid>
-        </StackPanel>
-
-        <Grid      Canvas.Top="300" Canvas.Right="10" Width="480">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"/>
-                <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
-            <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
-                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
-                    <Path Data="M0,0 L5,0 5,5 z" Fill="White" HorizontalAlignment="Left" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Width="5" Height="5">
-                        <Path.RenderTransform>
-                            <TransformGroup>
-                                <ScaleTransform/>
-                                <SkewTransform/>
-                                <RotateTransform Angle="45"/>
-                                <TranslateTransform/>
-                            </TransformGroup>
-                        </Path.RenderTransform>
-                    </Path>
-                    <TextBlock  Margin="5,0,0,0" Text="TM Robot Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-                </StackPanel>
-            </Border>
-            
-            <!--<Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}"   >-->
-            <Grid unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black" Grid.Row="1" Background="{DynamicResource Table_BG_Content}">
+                <Grid Grid.Row="2" unity:GridOptions.ShowBorder="True" unity:GridOptions.LineBrush="Black"   Background="{DynamicResource Table_BG_Content}">
                     <Grid.RowDefinitions>
-                        <RowDefinition Height="25"/>
-                        <RowDefinition/>
-                        <RowDefinition/>
-                        <RowDefinition/>
                         <RowDefinition/>
                         <RowDefinition/>
+                        <!--<RowDefinition/>-->
+
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
                         <ColumnDefinition/>
-                    </Grid.ColumnDefinitions>
-
-                    <TextBlock Text="Module"                    HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14" />
-                    <TextBlock Text="Slot" Grid.Column="1"      HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14"/>
-                    <TextBlock Text="Blada" Grid.Column="2"       HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
-                    <TextBlock Text="Operation" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"   FontSize="14"/>
-
-                    <ComboBox Grid.Row="1"                 Margin="5" SelectedItem="{Binding PickSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="SelectionChanged">
-                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Pick"/>
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </ComboBox>
-                    <ComboBox Grid.Row="1" Grid.Column="1"   Margin="5" ItemsSource="{Binding PickSoltItemsSource}" SelectedIndex="{Binding PickSoltSelectedIndex}"/>
-                    <ComboBox Grid.Row="1" Grid.Column="2"   Margin="5"  SelectedItem="{Binding PickSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <Button   Grid.Row="1" Grid.Column="3"   Margin="5"  Content="Pick" Height="25" Command="{Binding PickCommand}"/>
-
-                    <ComboBox Grid.Row="2"                 Margin="5" SelectedItem="{Binding PlaceSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="SelectionChanged">
-                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Place" />
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </ComboBox>
-                    <ComboBox Grid.Row="2" Grid.Column="1" Margin="5" ItemsSource="{Binding PlaceSoltItemsSource}" SelectedIndex="{Binding PlaceSoltSelectedIndex}"/>
-                    <ComboBox Grid.Row="2" Grid.Column="2" Margin="5" SelectedItem="{Binding PlaceSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <Button   Grid.Row="2" Grid.Column="3" Margin="5" Content="Place" Height="25" Command="{Binding PlaceCommand}"/>
+                        <ColumnDefinition/>
+                        <ColumnDefinition/>
+                        <ColumnDefinition/>
 
+                    </Grid.ColumnDefinitions>
+                    <TextBlock Text="Base Pressure"   Padding="6,7,0,5" Background="#D0D8E8"/>
+                    <TextBox  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Text="{Binding RobotAction}"/>
+                    <TextBlock Text="Pump Time"        Grid.Column="2"  Padding="15,7,0,5" Background="#D0D8E8"/>
+                    <TextBox  Grid.Column="3" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Text="{Binding RobotArm}"/>
+                    <TextBlock Text="Hold Time"        Grid.Column="4"  Padding="15,7,0,5" Background="#D0D8E8"/>
+                    <TextBox  Grid.Column="5" BorderThickness="0"  VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Text="{Binding RobotTarget}"/>
+                    <Button Content="Start"  Width="80" Margin="0,3,0,3" Height="24" VerticalAlignment="Center"  Grid.Column="6" />
 
-                    <ComboBox Grid.Row="3"                 Margin="5" SelectedItem="{Binding ExtendSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="SelectionChanged">
-                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Extend" />
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </ComboBox>
-                    <ComboBox Grid.Row="3" Grid.Column="1" Margin="5" ItemsSource="{Binding ExtendSoltItemsSource}" SelectedIndex="{Binding ExtendSoltSelectedIndex}"/>
-                    <ComboBox Grid.Row="3" Grid.Column="2" Margin="5" SelectedItem="{Binding ExtendSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <Button   Grid.Row="3" Grid.Column="3" Margin="5" Content="Extend" Height="25" Command="{Binding ExtendCommand}"/>
+                    <DataGrid Height="200" Grid.ColumnSpan="7" Grid.Row="1"  AutoGenerateColumns="False" BorderThickness="0"  FontSize="12" MinRowHeight="20" VerticalAlignment="Stretch"
+                        CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="True" CanUserResizeRows="False" CanUserSortColumns="False" 
+                        SelectionMode="Single" SelectionUnit="FullRow" Background="#05000000" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
+                        ItemsSource="{Binding LeakCheckResultList}" SelectedItem="{Binding CurrentLeakCheckResultItem}" FontFamily="Arial,SimSun" Margin="2">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Width="120" Binding="{Binding Date, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"  CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="CheckDate" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding StartPressure}" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="StartPressure" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding StopPressure}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="StopPressure" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding PumpTime}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="Pump Time(s)" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding LeakCheckTime}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="Check Time(s)" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding LeakRate, StringFormat={}{0:F5}}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="LeakRate" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="100" Binding="{Binding Result}"   CanUserSort="False" CanUserReorder="False" IsReadOnly="True" >
+                                <DataGridTextColumn.HeaderTemplate >
+                                    <DataTemplate>
+                                        <TextBlock Text="Result" />
+                                    </DataTemplate>
+                                </DataGridTextColumn.HeaderTemplate>
+                            </DataGridTextColumn>
 
-                    <ComboBox Grid.Row="4"                 Margin="5" SelectedItem="{Binding RetractSelectedModule}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="SelectionChanged">
-                                <i:InvokeCommandAction Command="{Binding ModuleChangeCommand}" CommandParameter="Retract" />
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </ComboBox>
-                    <ComboBox Grid.Row="4" Grid.Column="1" Margin="5" ItemsSource="{Binding RetractSoltItemsSource}" SelectedIndex="{Binding RetractSoltSelectedIndex}"/>
-                    <ComboBox Grid.Row="4" Grid.Column="2" Margin="5" SelectedItem="{Binding RetractSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <Button   Grid.Row="4" Grid.Column="3" Margin="5" Content="Retract" Height="25" Command="{Binding RetractCommand}"/>
 
-                    <ComboBox   Grid.Row="5" Grid.Column="0"  Margin="5"  SelectedItem="{Binding WaferRobotTAction}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <ComboBox   Grid.Row="5" Grid.Column="2"  Margin="5"   SelectedItem="{Binding GoToSelectedBlade}" MyItemsControlHelper:ItemsControlHelper.EnumValuesToItemsSource="True"/>
-                    <Button     Grid.Row="5" Grid.Column="3"  Margin="5" Height="25"  Content="Goto" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding GotoCommand}"/>
+                        </DataGrid.Columns>
 
+                    </DataGrid>
                 </Grid>
-            <!--</Border>-->
-        </Grid>
+                <!--</Border>-->
+            </Grid>
+        </StackPanel>
+
 
-        <Canvas Canvas.Top="50" Canvas.Left="680">
+        <Canvas Canvas.Top="120" Canvas.Left="1080">
             <userControls:FOUPFrontView UnitData="{Binding LLAModuleInfo}" VerticalAlignment="Top" Canvas.Top="350" Canvas.Left="226" />
             <userControls:FOUPFrontView UnitData="{Binding LLBModuleInfo}" VerticalAlignment="Top" Canvas.Top="350" Canvas.Left="446" />
             <Viewbox Width="350" Height="600" Stretch="Fill" >
@@ -451,8 +454,8 @@
                     <customControls:WaferRobotControl OriginT="PMD"   Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
 
 
-                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding LLAWafer}"/>
-                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding LLBWafer}"/>
+                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"/>
+                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"/>
 
 
                     <userControls:TMChamber x:Name="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}"/>
@@ -461,8 +464,6 @@
                     <userControls:TMChamber x:Name="PMD" Canvas.Top="160"  Canvas.Left="788" Width="140" Height="140" RotateTransformValue="90"   DoorIsOpen="{Binding RtDataValues[PMD.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMDWafer}"/>
                 </Canvas>
             </Viewbox>
-
-           
         </Canvas>
   
     </Canvas>

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

@@ -85,35 +85,36 @@
                     <RowDefinition/>
             
                 </Grid.RowDefinitions>
-                <TextBlock Text="Current"                 Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="Reference" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="Current"      Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="Reference"    Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="Position"     Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="sccm/mTorr" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="sccm/mTorr"   Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="Position"     Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="sccm/mTorr" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="sccm/mTorr"   Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
-                <TextBlock Text="25"  Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="50"  Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="100"  Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="150"  Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="200"  Grid.Row="6" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="250"  Grid.Row="7" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="300"  Grid.Row="8" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="350"  Grid.Row="9" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="400"  Grid.Row="10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="450"  Grid.Row="11" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="500"  Grid.Row="12" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="550"  Grid.Row="13" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="600"  Grid.Row="14" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="650"  Grid.Row="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="700"  Grid.Row="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="750"  Grid.Row="17" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="800"  Grid.Row="18" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="850"  Grid.Row="19" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="900"  Grid.Row="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="950"  Grid.Row="21" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="1000"  Grid.Row="22" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <!--<TextBlock Text="25"  Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
+                <TextBlock Text="50"   Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="100"  Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="150"  Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="200"  Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="250"  Grid.Row="6" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="300"  Grid.Row="7" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="350"  Grid.Row="8" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="400"  Grid.Row="9" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="450"  Grid.Row="10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="500"  Grid.Row="11" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="550"  Grid.Row="12" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="600"  Grid.Row="13" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="650"  Grid.Row="14" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="700"  Grid.Row="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="750"  Grid.Row="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="800"  Grid.Row="17" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="850"  Grid.Row="18" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="900"  Grid.Row="19" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="950"  Grid.Row="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="1000"  Grid.Row="21" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
+                <!--<TextBlock Text="{Binding CurrentLineSeries[0]}"  Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
                 <TextBlock Text="{Binding CurrentLineSeries[0]}"  Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding CurrentLineSeries[1]}"  Grid.Row="3" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding CurrentLineSeries[2]}"  Grid.Row="4" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
@@ -134,29 +135,28 @@
                 <TextBlock Text="{Binding CurrentLineSeries[17]}"  Grid.Row="19" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding CurrentLineSeries[18]}"  Grid.Row="20" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding CurrentLineSeries[19]}"  Grid.Row="21" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="{Binding CurrentLineSeries[20]}"  Grid.Row="22" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
-                <TextBlock Text="25"  Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="50"  Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="100"  Grid.Row="4" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="150"  Grid.Row="5" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="200"  Grid.Row="6" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="250"  Grid.Row="7" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="300"  Grid.Row="8" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="350"  Grid.Row="9" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="400"  Grid.Row="10" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="450"  Grid.Row="11" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="500"  Grid.Row="12" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="550"  Grid.Row="13" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="600"  Grid.Row="14" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="650"  Grid.Row="15" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="700"  Grid.Row="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="750"  Grid.Row="17" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="800"  Grid.Row="18" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="850"  Grid.Row="19" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="900"  Grid.Row="20" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="950"  Grid.Row="21" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="1000"  Grid.Row="22" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <!--<TextBlock Text="25"  Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
+                <TextBlock Text="50"   Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="100"  Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="150"  Grid.Row="4" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="200"  Grid.Row="5" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="250"  Grid.Row="6" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="300"  Grid.Row="7" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="350"  Grid.Row="8" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="400"  Grid.Row="9" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="450"  Grid.Row="10" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="500"  Grid.Row="11" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="550"  Grid.Row="12" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="600"  Grid.Row="13" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="650"  Grid.Row="14" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="700"  Grid.Row="15" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="750"  Grid.Row="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="800"  Grid.Row="17" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="850"  Grid.Row="18" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="900"  Grid.Row="19" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="950"  Grid.Row="20" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <TextBlock Text="1000"  Grid.Row="21" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
 
                 <TextBlock Text="{Binding ReferenceLineSeries[0]}"  Grid.Row="2" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding ReferenceLineSeries[1]}"  Grid.Row="3" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
@@ -178,9 +178,9 @@
                 <TextBlock Text="{Binding ReferenceLineSeries[17]}"  Grid.Row="19" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding ReferenceLineSeries[18]}"  Grid.Row="20" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBlock Text="{Binding ReferenceLineSeries[19]}"  Grid.Row="21" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <TextBlock Text="{Binding ReferenceLineSeries[20]}"  Grid.Row="22" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                <!--<TextBlock Text="{Binding ReferenceLineSeries[20]}"  Grid.Row="22" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
             </Grid>
-            <Button Content="Save"              Canvas.Left="10"  Canvas.Top="740" Width="120"  Height="26"/>
+            <Button Content="Save"              Canvas.Left="10"  Canvas.Top="740" Width="120"  Height="26" Command="{Binding SaveCommand}"/>
             <Button Content="Load Reference"    Canvas.Left="290" Canvas.Top="740" Width="120" Height="26" Command="{Binding LoadReferenceCommand}"/>
 
         </Canvas>
@@ -195,7 +195,7 @@
 
             <lvc:CartesianChart.AxisX>
 
-                <lvc:Axis Title="VAT Position" LabelsRotation="0" Labels="25 ,50, 100 ,150 ,200 ,250 ,300 ,350 ,400 ,450 ,500 ,550 ,600, 650 ,700 ,750, 800 ,850 ,900 ,950, 1000"  FontSize="15" Foreground="Black" >
+                <lvc:Axis Title="VAT Position" LabelsRotation="0" Labels="50, 100 ,150 ,200 ,250 ,300 ,350 ,400 ,450 ,500 ,550 ,600, 650 ,700 ,750, 800 ,850 ,900 ,950, 1000"  FontSize="15" Foreground="Black" >
                     <lvc:Axis.Separator>
                         <lvc:Separator Step="1"/>
                     </lvc:Axis.Separator>

+ 11 - 7
Venus/Venus_RT/Devices/JetPM.cs

@@ -276,12 +276,12 @@ namespace Venus_RT.Devices
             _N2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveN2}");
             _Mfc1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc1}");
             _Mfc2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
-            _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
+            _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc3}");
+            _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc4}");
+            _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc5}");
+            _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
+            _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
+            _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
             _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
             _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
             _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
@@ -607,7 +607,7 @@ namespace Venus_RT.Devices
         public void CloseValves()
         {
             _PVN21Valve.TurnValve(false, out _);
-            //_PVN22Valve.TurnValve(false, out _);
+           // _PVN22Valve.TurnValve(false, out _);
             _PV11Valve.TurnValve(false, out _);
             _PV12Valve.TurnValve(false, out _);
             _PV21Valve.TurnValve(false, out _);
@@ -810,6 +810,10 @@ namespace Venus_RT.Devices
 
             //2023/03/08添加
             OpenValve(ValveType.PVN22, true);
+            //2023/04/25临时添加
+            //RetractWafer();
+
+
         }
 
         public bool SetLiftPin(MovementPosition dirt, out string reason)

+ 161 - 78
Venus/Venus_RT/Devices/SkyPump.cs

@@ -1,6 +1,11 @@
 using System;
 using System.Collections;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 using System.Text;
+using System.Threading.Tasks;
 using System.Xml;
 using Aitex.Core.Common.DeviceData;
 using Aitex.Core.RT.DataCenter;
@@ -237,7 +242,7 @@ namespace Venus_RT.Devices
                 return deviceData;
             }
         }
-
+        BlockingCollection<string> blockingCollection = new BlockingCollection<string>();
         // --------------------------Constructor-----------------------
         //
         public SkyPump(ModuleName mod) : base(mod.ToString(), VenusDevice.MainPump.ToString(), "SKY pump", "")
@@ -246,6 +251,14 @@ namespace Venus_RT.Devices
             StatusDry = SkyPumpState.Unknown;
 
             _serial = new AsyncSerialPort(_PortNum, 9600, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "\r\n", false);
+            Task.Run(() =>
+            {
+                foreach (var data in blockingCollection.GetConsumingEnumerable())
+                {
+                    _serial?.Write(data);
+                    System.Threading.Thread.Sleep(900);
+                }
+            });           
         }
 
         public override bool Initialize()
@@ -275,6 +288,8 @@ namespace Venus_RT.Devices
             return true;
         }
 
+        Stopwatch stopwatch = new Stopwatch();
+        List<byte> bytes = new List<byte>();
         private void OnPortBinaryDataChanged(byte[] obj)
         {
             try
@@ -283,7 +298,27 @@ namespace Venus_RT.Devices
                 _timerReceiveStatus.Start(CHK_REC_INTERVAL);
                 _trigReceiveStatus.RST = true;
 
+
+                if (obj[0] == 0x40 && obj[1] == 0x30)
+                {
+                    bytes.Clear();
+                    //bytes.AddRange(new List<byte>(obj));
+
+                }
+                bytes.AddRange(obj);
+                if (bytes[bytes.Count - 1] == 0x0A && bytes[bytes.Count - 2] == 0x0D)
+                {
+
+                }
+                else
+                {
+                    return;
+                }
+
+                obj = bytes.ToArray();
                 var strData = System.Text.Encoding.ASCII.GetString(obj);
+                bytes.Clear();
+
                 if (strData.Contains(SkyPumpMessage.EOF))
                 {
                     string cmd = "";
@@ -296,12 +331,16 @@ namespace Venus_RT.Devices
                         _trigPumpOn.CLK = true;
                         _timerPumpOn.Start(CHK_PUMP_REC_INTERVAL);
                         //LOG.Info($"[{Module}] {SkyPumpMessage.GET_ON}");
+                        LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"[{Module}] {SkyPumpMessage.GET_ON}");
+
                         return;
                     }
                     if (cmd == SkyPumpMessage.GET_OFF)
                     {
                         _trigPumpOff.CLK = true;
                         _timerPumpOff.Start(CHK_PUMP_REC_INTERVAL);
+                        LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"[{Module}] {SkyPumpMessage.GET_ON}");
+
                         //LOG.Info($"[{Module}] {SkyPumpMessage.GET_OFF}");
                         return;
                     }
@@ -327,6 +366,7 @@ namespace Venus_RT.Devices
                     if (!SC.GetValue<bool>("System.IsSimulatorMode"))
                     {
                         //LOG.Info($"[{Module}] Sky Pump 数据无效:[{strData}]");
+                        LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"[{Module}] Sky Pump 数据无效:[{strData}]");
                     }
                 }
             }
@@ -342,6 +382,8 @@ namespace Venus_RT.Devices
         private void OnErrorOccurred(string obj)
         {
             StatusDry = SkyPumpState.ERROR;
+            LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}] sky pump error: [{obj}]");
+
             //LOG.Error($"[{Module}] sky pump error: [{obj}]");
         }
 
@@ -426,6 +468,8 @@ namespace Venus_RT.Devices
             {
                 _counter = 0;
                 //LOG.Info($"[{Module}] {sRes}");
+                //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"[{Module}] {sRes}");
+
             }
         }
 
@@ -505,90 +549,126 @@ namespace Venus_RT.Devices
 
         public void ErrSta1(int error)
         {
-            //switch (error)
-            //{
-            //    //case 7:
-            //    //    LOG.Error($"[{Module}]上泵变频器除通讯外故障");
-            //    //    break;
-            //    //case 6:
-            //    //    LOG.Error($"[{Module}]下泵变频器除通讯外故障");
-            //    //    break;
-            //    //case 5:
-            //    //    LOG.Error($"[{Module}]上泵接触器");
-            //    //    break;
-            //    //case 4:
-            //    //    LOG.Error($"[{Module}]下泵接触器");
-            //    //    break;
-            //    //case 3:
-            //    //    LOG.Error($"[{Module}]上泵电机过热");
-            //    //    break;
-            //    //case 2:
-            //    //    LOG.Error($"[{Module}]下泵电机过热");
-            //    //    break;
-            //    //case 1:
-            //    //    LOG.Error($"[{Module}]急停");
-            //    //    break;
-            //    //case 0:
-            //    //    LOG.Error($"[{Module}]水冷");
-            //    //    break;
-            //    //default:
-            //    //    break;
-            //}
+            switch (error)
+            {
+                case 7:
+                    //LOG.Error($"[{Module}]上泵变频器除通讯外故障");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵变频器除通讯外故障");
+
+                    break;
+                case 6:
+                    //LOG.Error($"[{Module}]下泵变频器除通讯外故障");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵变频器除通讯外故障");
+
+                    break;
+                case 5:
+                    //LOG.Error($"[{Module}]上泵接触器");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵接触器");
+
+                    break;
+                case 4:
+                    //LOG.Error($"[{Module}]下泵接触器");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵接触器");
+
+                    break;
+                case 3:
+                    //LOG.Error($"[{Module}]上泵电机过热");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵电机过热");
+
+                    break;
+                case 2:
+                    //LOG.Error($"[{Module}]下泵电机过热");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵电机过热");
+
+                    break;
+                case 1:
+                    //LOG.Error($"[{Module}]急停");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]急停");
+
+                    break;
+                case 0:
+                    //LOG.Error($"[{Module}]水冷");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]水冷");
+
+                    break;
+                default:
+                    break;
+            }
         }
 
         public void ErrSta2(int error)
         {
-            //switch (error)
-            //{
-            //    //case 7:
-            //    //    LOG.Error($"[{Module}]下泵变频器通讯故障");
-            //    //    break;
-            //    //case 6:
-            //    //    LOG.Error($"[{Module}]上泵变频器通讯故障");
-            //    //    break;
-            //    //case 5:
-            //    //    LOG.Error($"[{Module}]排气压力");
-            //    //    break;
-            //    //case 4:
-            //    //    LOG.Error($"[{Module}]氮气流量");
-            //    //    break;
-            //    //case 3:
-            //    //    LOG.Error($"[{Module}]下泵电流");
-            //    //    break;
-            //    //case 2:
-            //    //    LOG.Error($"[{Module}]上泵电流");
-            //    //    break;
-            //    //case 1:
-            //    //    LOG.Error($"[{Module}]下泵温度");
-            //    //    break;
-            //    //case 0:
-            //    //    LOG.Error($"[{Module}]上泵温度");
-            //    //    break;
-            //    //default:
-            //    //    break;
-            //}
+            switch (error)
+            {
+                case 7:
+                    //LOG.Error($"[{Module}]下泵变频器通讯故障");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵变频器通讯故障");
+
+                    break;
+                case 6:
+                    //LOG.Error($"[{Module}]上泵变频器通讯故障");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵变频器通讯故障");
+
+                    break;
+                case 5:
+                    //LOG.Error($"[{Module}]排气压力");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]排气压力");
+
+                    break;
+                case 4:
+                    //LOG.Error($"[{Module}]氮气流量");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]氮气流量");
+
+                    break;
+                case 3:
+                    // LOG.Error($"[{Module}]下泵电流");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵电流");
+
+                    break;
+                case 2:
+                    // LOG.Error($"[{Module}]上泵电流");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵电流");
+
+                    break;
+                case 1:
+                    // LOG.Error($"[{Module}]下泵温度");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵温度");
+
+                    break;
+                case 0:
+                    // LOG.Error($"[{Module}]上泵温度");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵温度");
+
+                    break;
+                default:
+                    break;
+            }
         }
 
         public void ErrSta3(int error)
         {
-            //switch (error)
-            //{
-            //    case 7:
-            //    case 6:
-            //    case 5:
-            //    case 4:
-            //    case 3:
-            //    case 2:
-            //        break;
-            //    case 1:
-            //        LOG.Error($"[{Module}]下泵温度传感器未连接");
-            //        break;
-            //    case 0:
-            //        LOG.Error($"[{Module}]上泵温度传感器未连接");
-            //        break;
-            //    default:
-            //        break;
-            //}
+            switch (error)
+            {
+                case 7:
+                case 6:
+                case 5:
+                case 4:
+                case 3:
+                case 2:
+                    break;
+                case 1:
+                    //LOG.Error($"[{Module}]下泵温度传感器未连接");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]下泵温度传感器未连接");
+
+                    break;
+                case 0:
+                    //LOG.Error($"[{Module}]上泵温度传感器未连接");
+                    LOG.Write(eEvent.ERR_DRY_PUMP, Module, $"[{Module}]上泵温度传感器未连接");
+
+                    break;
+                default:
+                    break;
+            }
         }
 
         public override void Monitor()
@@ -658,7 +738,10 @@ namespace Venus_RT.Devices
 
         private bool SendCmd(string str)
         {
-            return _serial.Write(str + "\r");
+            var newstr = str + "\r";
+            blockingCollection.Add(newstr);
+            return true;
+            //return _serial.Write(newstr);
         }
 
         public override void Reset()

+ 37 - 10
Venus/Venus_RT/Modules/PMs/GasBoxLeakCheckRoutine.cs

@@ -5,6 +5,9 @@ using MECF.Framework.Common.Routine;
 using System.Diagnostics;
 using System.Collections.Generic;
 using Venus_Core;
+using System;
+using Venus_Unity;
+
 namespace Venus_RT.Modules.PMs
 {
     class GasBoxLeakCheckRoutine : PMRoutineBase, IRoutine
@@ -32,7 +35,9 @@ namespace Venus_RT.Modules.PMs
 
         Stopwatch _leakCheckTimer = new Stopwatch();
 
-
+        bool isCheckVentLine;
+        PMLeakCheckResult pMLeakCheckResult;
+        Stopwatch _routineTimer = new Stopwatch();
         public GasBoxLeakCheckRoutine(JetPM chamber) : base(chamber)
         {
             Name = "GasBox Leakcheck";
@@ -47,14 +52,18 @@ namespace Venus_RT.Modules.PMs
                 Reset();
 
                 _basePressure = SC.GetValue<int>($"{Module}.Pump.PumpBasePressure");
-                _leakcheckPumpTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
-                _leakcheckHoldTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckHoldTime");
-                _leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
+                //_leakcheckPumpTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
+                //_leakcheckHoldTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckHoldTime");
+                //_leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
+                _leakcheckPumpTime = (int)(objs[0]);
+                _leakcheckHoldTime = (int)(objs[1]);
+                _leakRate = (double)(objs[2]);
                 _leakCheckBasePressure = SC.GetValue<double>($"{Module}.Pump.LeakCheckBasePressure");
 
                 // Extract line numbers which need do Leakcheck from config file
                 _gasLineNums.Clear();
-                var lineNums = SC.GetStringValue($"{Module}.Pump.LeakCheckGasLineNums").Split(',');
+                //var lineNums = SC.GetStringValue($"{Module}.Pump.LeakCheckGasLineNums").Split(',');
+                var lineNums = objs[3].ToString().Split(',');
                 int nNum;
                 foreach(string num in lineNums)
                 {
@@ -66,8 +75,12 @@ namespace Venus_RT.Modules.PMs
                         }
                     }
                 }
+                isCheckVentLine = (bool)objs[4];
+                pMLeakCheckResult = new PMLeakCheckResult();
+
+                pMLeakCheckResult.CheckMode = $"{objs[5].ToString()}({objs[3].ToString()})";
 
-                if(_gasLineNums.Count == 0)
+                if (_gasLineNums.Count == 0 && isCheckVentLine==false)
                 {
                     Stop($"No Gasline need do LeakCheck, please check the config item{Module}.Pump.LeakCheckGasLineNums");
                     return RState.Failed;
@@ -75,6 +88,8 @@ namespace Venus_RT.Modules.PMs
 
 
                 PreSetValves();
+                pMLeakCheckResult.CheckDate = DateTime.Now.ToString("yyyyMMddHHmm");
+                _routineTimer.Restart();
                 Reset();
                 return Runner.Start(Module, Name);
             }
@@ -100,13 +115,21 @@ namespace Venus_RT.Modules.PMs
         {
             foreach(var num in _gasLineNums)
             {
-                _chamber.FlowGas(num, _GasFlow);
+                _chamber.FlowGas(num-1, _GasFlow);
             }
             _chamber.OpenValve(ValveType.PV11, true);
             _chamber.OpenValve(ValveType.PV21, true);
             _chamber.OpenValve(ValveType.PV31, true);
             _chamber.OpenValve(ValveType.PV41, true);
 
+            //2023/04/25添加vent line漏气检测
+            if (isCheckVentLine == true)
+            {
+                _chamber.OpenValve(ValveType.PVN21, true);
+                _chamber.OpenValve(ValveType.PVN22, true);
+                _chamber.OpenValve(ValveType.N2, true);
+
+            }
             _leakCheckTimer.Restart();
             return true;
         }
@@ -129,7 +152,7 @@ namespace Venus_RT.Modules.PMs
         private bool StartLeakCheck()
         {
             _startPressure = _chamber.ChamberPressure;
-
+            pMLeakCheckResult.StartPressure = _startPressure;
             Notify($"PM 压力开始值 {_startPressure} mt");
 
             _chamber.TurnPendulumValve(false);
@@ -139,16 +162,18 @@ namespace Venus_RT.Modules.PMs
         private bool CalcLeakCheckResult()
         {
             _endPressure = _chamber.ChamberPressure;
-
+            pMLeakCheckResult.EndPressure = _endPressure;
             LeakRate = (_endPressure - _startPressure) * 60.0 / _leakcheckHoldTime;
-
+            pMLeakCheckResult.LeakRate = LeakRate;
             if (LeakRate < _leakRate)
             {
                 Notify($"GasBox Leakcheck完成, 压力结束值: {_startPressure} mt, 漏率:{LeakRate} mt/min");
+                pMLeakCheckResult.Result = "Success";
             }
             else
             {
                 Stop($"GasBox Leakcheck失败, 腔体漏率 [{LeakRate}] mt/min, 高于 [{_leakRate}] mt/min");
+                pMLeakCheckResult.Result = "Fail";
             }
 
             _chamber.StopAllGases();
@@ -158,6 +183,8 @@ namespace Venus_RT.Modules.PMs
             _chamber.OpenValve(ValveType.PV21, false);
             _chamber.OpenValve(ValveType.PV31, false);
             _chamber.OpenValve(ValveType.PV41, false);
+            pMLeakCheckResult.LeakCheckTime = (int)_routineTimer.ElapsedMilliseconds / 1000;
+            SerializeHelper.Instance.WriteToJsonFile<PMLeakCheckResult>(pMLeakCheckResult, $"LeakCheck/PM/{DateTime.Now.ToString("yyyyMMddHHmm")}.json");
 
             return true;
         }

+ 8 - 4
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -572,6 +572,7 @@ namespace Venus_RT.Modules.PMs
                 _pmVATPerformanceRoutine.Abort();
                 return true;
             }, PMState.Idle);
+         
 
             Running = true;
 
@@ -597,6 +598,8 @@ namespace Venus_RT.Modules.PMs
 
             OP.Subscribe($"{Module}.{RtOperation.GasFlow}", (cmd, args) => CheckToPostMessage((int)MSG.GasFlow, args));
             OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck, args));
+            OP.Subscribe($"{Module}.{RtOperation.GasLeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.GasLeakCheck, args));
+
             OP.Subscribe($"{Module}.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
             OP.Subscribe($"{Module}.{RtOperation.StartPump}", (cmd, args) => CheckToPostMessage((int)MSG.LaunchPump));
             OP.Subscribe($"{Module}.{RtOperation.StartTurboPump}", (cmd, args) => CheckToPostMessage((int)MSG.LaunchTurboPump));
@@ -613,7 +616,7 @@ namespace Venus_RT.Modules.PMs
             OP.Subscribe($"{Module}.{RtOperation.LLPick}", (cmd, args) => CheckToPostMessage((int)MSG.LLPick));
             OP.Subscribe($"{Module}.{RtOperation.LLPlace}", (cmd, args) => CheckToPostMessage((int)MSG.LLPlace));
 
-            OP.Subscribe($"{Module}.{RtOperation.MFCVerification}", (cmd, args) => CheckToPostMessage((int)MSG.MFCVerification, args[0], args[1], args[2]));
+            OP.Subscribe($"{Module}.{RtOperation.MFCVerification}", (cmd, args) => CheckToPostMessage((int)MSG.MFCVerification, args));
 
             OP.Subscribe($"{Module}.{RtOperation.RunRecipe}", (cmd, args) => CheckToPostMessage((int)MSG.RunRecipe, args[0]));
 
@@ -622,6 +625,7 @@ namespace Venus_RT.Modules.PMs
 
 
 
+
             return true;
         }
         private bool FnIdle(object[] objs)
@@ -989,7 +993,7 @@ namespace Venus_RT.Modules.PMs
 
         private bool FnStartPMLeakCheck(object[] param)
         {
-            return _leakCheckRoutine.Start() == RState.Running;
+            return _leakCheckRoutine.Start(param) == RState.Running;
         }
 
         private bool FnPMLeakCheckTimeout(object[] param)
@@ -1012,7 +1016,7 @@ namespace Venus_RT.Modules.PMs
 
         private bool FnStartGasBoxLeakCheck(object[] param)
         {
-            return _gasBoxLeakCheckRoutine.Start() == RState.Running;
+            return _gasBoxLeakCheckRoutine.Start(param) == RState.Running;
         }
 
         private bool FnGasBoxLeakCheckTimeout(object[] param)
@@ -1157,7 +1161,7 @@ namespace Venus_RT.Modules.PMs
 
         private bool FnStartMFCVerification(object[] param)
         {
-            _gasVerificationRoutine.Init((string)param[0], (double)param[1], (int)param[2]);
+            _gasVerificationRoutine.Init((string)param[0], Convert.ToDouble( param[1]), (int)param[2]);
             return _gasVerificationRoutine.Start(param) ==  RState.Running;
         }
 

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

@@ -44,7 +44,7 @@ namespace Venus_RT.Modules.PMs
 
         private bool IsHomed()
         {
-            return _chamber.IsSlitDoorClosed && _chamber.LiftPinPosition == Venus_Core.MovementPosition.Down && _chamber.PVN22ValveIsOpen;
+            return _chamber.IsSlitDoorClosed && _chamber.LiftPinPosition == Venus_Core.MovementPosition.Down && _chamber.PVN22ValveIsOpen && _chamber.IsLoadlockArmRetract;
         }
     }
 }

+ 28 - 9
Venus/Venus_RT/Modules/PMs/PMLeakCheckRoutine.cs

@@ -4,6 +4,8 @@ using Venus_RT.Devices;
 using MECF.Framework.Common.Routine;
 using System.Diagnostics;
 using Venus_Core;
+using System;
+using Venus_Unity;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -28,8 +30,8 @@ namespace Venus_RT.Modules.PMs
         private double _leakCheckBasePressure = 1;
 
         Stopwatch _leakCheckTimer = new Stopwatch();
-
-
+        PMLeakCheckResult pMLeakCheckResult;
+        Stopwatch _routineTimer=new Stopwatch();
         public PMLeakCheckRoutine(JetPM chamber) : base(chamber)
         {
             Name = "PM Leakcheck";
@@ -43,14 +45,22 @@ namespace Venus_RT.Modules.PMs
             {
                 Reset();
 
-                _basePressure = SC.GetValue<int>($"{Module}.Pump.PumpBasePressure");
-                _leakcheckPumpTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
-                _leakcheckHoldTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckHoldTime");
-                _leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
+                 _basePressure = SC.GetValue<int>($"{Module}.Pump.PumpBasePressure");
+                //_leakcheckPumpTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
+                //_leakcheckHoldTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckHoldTime");
+                //_leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
+
+                _leakcheckPumpTime = (int)(objs[0]);
+                _leakcheckHoldTime = (int)(objs[1]);
+                _leakRate = (double)(objs[2]);
+
                 _leakCheckBasePressure = SC.GetValue<double>($"{Module}.Pump.LeakCheckBasePressure");
 
                 PreSetValves();
-
+                pMLeakCheckResult = new PMLeakCheckResult();
+                pMLeakCheckResult.CheckDate = DateTime.Now.ToString("yyyyMMddHHmm");
+                pMLeakCheckResult.CheckMode = "ChamberOnly";
+                _routineTimer.Restart();
                 return Runner.Start(Module, Name);
             }
             return RState.Failed;
@@ -100,6 +110,7 @@ namespace Venus_RT.Modules.PMs
         private bool StartLeakCheck()
         {
             _startPressure = _chamber.ChamberPressure;
+            pMLeakCheckResult.StartPressure = _startPressure;
 
             Notify($"PM 压力开始值 {_startPressure} mt");
 
@@ -110,21 +121,26 @@ namespace Venus_RT.Modules.PMs
         private bool CalcLeakCheckResult()
         {
             _endPressure = _chamber.ChamberPressure;
-
+            pMLeakCheckResult.EndPressure = _endPressure;
             LeakRate = (_endPressure - _startPressure) * 60.0 / _leakcheckHoldTime;
-
+            pMLeakCheckResult.LeakRate = LeakRate;
             if (LeakRate < _leakRate)
             {
                 Notify($"PM Leakcheck完成, 压力结束值: {_startPressure} mt, 漏率:{LeakRate} mt/min");
+                pMLeakCheckResult.Result = "Success";
+
             }
             else
             {
                 Stop($"PM Leakcheck失败, 腔体漏率 [{LeakRate}] mt/min, 高于 [{_leakRate}] mt/min");
+                pMLeakCheckResult.Result = "Fail";
             }
 
             _chamber.OpenValve(ValveType.GasFinal, true);
             _chamber.TurnPendulumValve(true);
+            pMLeakCheckResult.LeakCheckTime = (int)_routineTimer.ElapsedMilliseconds / 1000;
 
+            SerializeHelper.Instance.WriteToJsonFile<PMLeakCheckResult>(pMLeakCheckResult, $"LeakCheck/PM/{DateTime.Now.ToString("yyyyMMddHHmm")}.json");
             return true;
         }
 
@@ -135,6 +151,9 @@ namespace Venus_RT.Modules.PMs
             _chamber.OpenValve(ValveType.TurboPumpPumping, true);
             _chamber.OpenValve(ValveType.Guage, true);
             _chamber.OpenValve(ValveType.GasFinal, true);
+            
+            
+            
 
             _chamber.TurnPendulumValve(true);
 

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

@@ -41,12 +41,16 @@ namespace Venus_RT.Modules.PMs
                 Stop("钟摆阀没有打开");
                 return RState.Failed;
             }
+            _chamber.OpenValve(ValveType.Guage, true);
+            _chamber.OpenValve(ValveType.TurboPumpPumping, true);
+            _chamber.OpenValve(ValveType.TurboPumpPurge, true);
+
             counter = 1;
             Reset();
             gasIndex = (int)objs[0];
             gasTime  = (int)objs[1];
             GasMaxScale = SC.GetValue<int>($"{Module}.MfcGas{gasIndex.ToString()}.MfcN2Scale");
-            _chamber.CloseValves();
+            //_chamber.CloseValves();
             _chamber.SetPVPostion(1000);
 
             return Runner.Start(Module, Name);

+ 5 - 2
Venus/Venus_RT/Modules/PMs/PMVATPerformanceRoutine.cs

@@ -19,7 +19,7 @@ namespace Venus_RT.Modules.PMs
         int gasTime;
         int gasSetPoint;
         ValveType[] valveTypes = new ValveType[4] { ValveType.PV11, ValveType.PV21, ValveType.PV31, ValveType.PV41 };
-        List<int> Positions = new List<int>() { 25,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000};
+        List<int> Positions = new List<int>() {50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000};
 
         private enum VATPerformanceStep
         {
@@ -46,12 +46,15 @@ namespace Venus_RT.Modules.PMs
                 Stop("钟摆阀没有打开");
                 return RState.Failed;
             }
+            _chamber.OpenValve(ValveType.Guage, true);
+            _chamber.OpenValve(ValveType.TurboPumpPumping, true);
+            _chamber.OpenValve(ValveType.TurboPumpPurge, true);
             counter = 1;
             Reset();
             gasIndex = (int)objs[0];
             gasTime = (int)objs[1];
             gasSetPoint = (int)objs[2];
-            _chamber.CloseValves();
+            //_chamber.CloseValves();
             //_chamber.SetPVPostion(25);
 
             return Runner.Start(Module, Name);

+ 18 - 9
Venus/Venus_RT/Modules/PMs/PumpDownRoutine.cs

@@ -18,6 +18,7 @@ namespace Venus_RT.Modules.PMs
             kISOValve,
             kTurboN2Purge,
             kVATValve,
+            kOpenTurboPumpPurgeGasFinal,
             kFinalStep,
             kEnd,
         }
@@ -57,13 +58,19 @@ namespace Venus_RT.Modules.PMs
         }
         public RState Monitor()
         {
-            Runner.Delay((int)PumpStep.kDelay_2s,   _delay_2s)
-                .Run((int)PumpStep.kCloseISOValve,  HOFs.WrapAction(_chamber.OpenValve, ValveType.TurboPumpPumping, false), _delay_2s)
-                .Run((int)PumpStep.kSoftPump,       HOFs.WrapAction(_chamber.OpenValve, ValveType.SoftPump, true),          () => { return _chamber.ChamberPressure < _roughPumpPressure; })
-                .Run((int)PumpStep.kFastPump,       OpenFastPump,                                                           () => { return _chamber.ChamberPressure < _vHe2FlowPressure; })
-                .Run((int)PumpStep.kPVHe2,          OpenHe2Valve,                                                           _delay_2s)
-                .Run((int)PumpStep.kISOValve,       OpenISOValve,                                                           _delay_2s)
-                .Run((int)PumpStep.kVATValve,       OpenVATValve,                                                           _delay_5s)  
+            Runner.Delay((int)PumpStep.kDelay_2s, _delay_2s)
+                .Run((int)PumpStep.kCloseISOValve, HOFs.WrapAction(_chamber.OpenValve, ValveType.TurboPumpPumping, false), _delay_2s)
+                .Run((int)PumpStep.kSoftPump, HOFs.WrapAction(_chamber.OpenValve, ValveType.SoftPump, true), () => { return _chamber.ChamberPressure < _roughPumpPressure; })
+                .Run((int)PumpStep.kFastPump, OpenFastPump, () => { return _chamber.ChamberPressure < _vHe2FlowPressure; })
+                .Run((int)PumpStep.kPVHe2, OpenHe2Valve, _delay_2s)
+                .Run((int)PumpStep.kISOValve, OpenISOValve, _delay_2s)
+                .Run((int)PumpStep.kVATValve, OpenVATValve, _delay_5s)
+                .Run((int)PumpStep.kOpenTurboPumpPurgeGasFinal, () => 
+                {
+                    _chamber.OpenValve(ValveType.TurboPumpPurge, true);
+                    _chamber.OpenValve(ValveType.GasFinal, true);
+                    return true;
+                }, 3000)
                 .Run((int)PumpStep.kFinalStep,      FinalStep,                                                              () => { return _chamber.ChamberPressure < _basePressure; })
                 .End((int)PumpStep.kEnd,            NullFun,                                                                _delay_1s);
 
@@ -106,8 +113,10 @@ namespace Venus_RT.Modules.PMs
         private bool FinalStep()
         {
             _chamber.OpenValve(ValveType.Guage, true);
-            _chamber.OpenValve(ValveType.TurboPumpPurge, true);
-            _chamber.OpenValve(ValveType.GasFinal, true);
+
+            //2023/04/25修改
+            //_chamber.OpenValve(ValveType.TurboPumpPurge, true);
+            //_chamber.OpenValve(ValveType.GasFinal, true);
 
             return true;
         }

+ 3 - 0
Venus/Venus_RT/Modules/TM/MFPickRoutine.cs

@@ -140,6 +140,9 @@ namespace Venus_RT.Modules.TM
             }
             else if (_robot.Status == RState.End)
             {
+                //WaferManager.Instance.WaferMoved(ModuleName.TM, (int)_hand, _targetModule, _targetSlot);
+                WaferManager.Instance.WaferMoved(_targetModule, _targetSlot, ModuleName.TM, (int)_hand);
+
                 return true;
             }
             else

+ 1 - 0
Venus/Venus_RT/Modules/TM/MFPlaceRoutine.cs

@@ -141,6 +141,7 @@ namespace Venus_RT.Modules.TM
             }
             else if (_robot.Status == RState.End)
             {
+                WaferManager.Instance.WaferMoved(ModuleName.TM, (int)_hand, _targetModule, _targetSlot);
                 return true;
             }
             else

+ 12 - 1
Venus/Venus_RT/Modules/TM/TMEntity.cs

@@ -12,6 +12,7 @@ using Venus_RT.Modules.TM;
 using Aitex.Core.RT.DataCenter;
 using Aitex.Core.RT.OperationCenter;
 using MECF.Framework.Common.Schedulers;
+using MECF.Framework.Common.CommonData;
 
 namespace Venus_RT.Modules
 {
@@ -133,6 +134,12 @@ namespace Venus_RT.Modules
             OP.Subscribe("TM.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
             OP.Subscribe($"TM.{RtOperation.LLPick}", (cmd, args) => CheckToPostMessage((int)MSG.Pick, args));
             OP.Subscribe($"TM.{RtOperation.LLPlace}", (cmd, args) => CheckToPostMessage((int)MSG.Place, args));
+            OP.Subscribe($"TM.{RtOperation.PMPick}", (cmd, args) => CheckToPostMessage((int)MSG.PMPick, args));
+            OP.Subscribe($"TM.{RtOperation.PMPlace}", (cmd, args) => CheckToPostMessage((int)MSG.PMPlace, args));
+            OP.Subscribe($"TM.{RtOperation.Extend}", (cmd, args) => CheckToPostMessage((int)MSG.Extend, args));
+            OP.Subscribe($"TM.{RtOperation.Retract}", (cmd, args) => CheckToPostMessage((int)MSG.Retract, args));
+
+            //OP.Subscribe($"TM.{RtOperation.LLPlace}", (cmd, args) => CheckToPostMessage((int)MSG.Place, args));
             OP.Subscribe($"TM.{RtOperation.Pump}", (cmd, args) => CheckToPostMessage((int)MSG.Pump));
             OP.Subscribe($"TM.{RtOperation.Vent}", (cmd, args) => CheckToPostMessage((int)MSG.Vent));
             OP.Subscribe($"TM.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck));
@@ -144,7 +151,11 @@ namespace Venus_RT.Modules
             DATA.Subscribe("TM.FsmState", () => (((STATE)fsm.State).ToString()));
             DATA.Subscribe("TM.FsmPrevState", () => (((PMState)fsm.PrevState).ToString()));
             DATA.Subscribe("TM.FsmLastMessage", () => (((MSG)fsm.LastMsg).ToString()));
-            DATA.Subscribe("TM.RobotMoveAction", () => _robot.TMRobotMoveInfo) ;
+
+            DATA.Subscribe("TM.RobotMoveAction.ArmTarget", () =>   _robot.TMRobotMoveInfo.ArmTarget.ToString()) ;
+            DATA.Subscribe("TM.RobotMoveAction.BladeTarget", () => _robot.TMRobotMoveInfo.BladeTarget);
+            DATA.Subscribe("TM.RobotMoveAction.RobotAction", () => _robot.TMRobotMoveInfo.Action.ToString());
+
             return true;
         }
 

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

@@ -207,6 +207,11 @@ namespace Venus_Simulator.Instances
             IO.DI[$"{mod}.DI_LLB_Chamber_VAC_Gauge_Alarm"].Value = true;
             IO.DI[$"{mod}.DI_LLB_Foreline_VAC_Gauge_Alarm"].Value = true;
 
+            IO.DI[$"{mod}.DI_TM_ATM_Switch"].Value = true;
+            IO.DI[$"{mod}.DI_LLA_ATM_Switch"].Value = true;
+            IO.DI[$"{mod}.DI_LLB_ATM_Switch"].Value = true;
+
+
             // Datetime
             SetAiValue($"{mod}.AI_Year", DateTime.Today.Year);
             SetAiValue($"{mod}.AI_Month", DateTime.Today.Month);

+ 17 - 0
Venus/Venus_Themes/UserControls/Chamber.xaml

@@ -271,6 +271,23 @@
                             </Style.Triggers>
                         </Style>
                     </Grid.Style>
+                    <!--<Rectangle Stroke="{DynamicResource Lid_BD}" Fill="BlueViolet"  StrokeThickness="1" VerticalAlignment="Top"  Height="8" Margin="0,2,0,0" Width="70" Visibility="{Binding ElementName=chamber,Path=IsHasWafer,Converter={StaticResource bool2VisibilityConverter}}"/>-->
+                    <!--<Rectangle  Stroke="Black" VerticalAlignment="Top"  Height="8" Margin="0,2,0,0" Width="70" Visibility="{Binding ElementName=chamber,Path=IsHasWafer,Converter={StaticResource bool2VisibilityConverter}}">
+                        <Rectangle.Fill>
+                            <LinearGradientBrush StartPoint="1,1" EndPoint="0,0">
+                                <GradientStop Color="Black" Offset="0" />
+                                <GradientStop Color="White"  Offset="1" />
+                            </LinearGradientBrush>
+                        </Rectangle.Fill>
+                    </Rectangle>-->
+                    <Border BorderThickness="1" BorderBrush="Black" CornerRadius="4" VerticalAlignment="Top"  Height="8" Margin="0,2,0,0" Width="70" Visibility="{Binding ElementName=chamber,Path=IsHasWafer,Converter={StaticResource bool2VisibilityConverter}}">
+                        <Border.Background>
+                            <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
+                                <GradientStop Color="Orange" Offset="0" />
+                                <GradientStop Color="Gray"  Offset="1" />
+                            </LinearGradientBrush>
+                        </Border.Background>
+                    </Border>
                     <Rectangle HorizontalAlignment="Left" Fill="{DynamicResource Lid_BG3}" Stroke="{DynamicResource Lid_BD}" Width="8" Margin="48,10,0,4"/>
                     <Rectangle HorizontalAlignment="Right" Fill="{DynamicResource Lid_BG3}" Stroke="{DynamicResource Lid_BD}" Width="8" Margin="0,10,48,4"/>
                     <Rectangle Stroke="{DynamicResource Lid_BD}" Fill="{DynamicResource Lid_BG3}" StrokeThickness="1" VerticalAlignment="Bottom" Height="8" Margin="5,0" Width="64" />

+ 11 - 0
Venus/Venus_Themes/UserControls/Chamber.xaml.cs

@@ -44,6 +44,17 @@ namespace Venus_Themes.UserControls
             set { this.SetValue(IsLiftPinUpProperty, value); }
         }
 
+
+        public static readonly DependencyProperty IsHasWaferProperty = DependencyProperty.Register(
+          "IsHasWafer", typeof(bool), typeof(Chamber),
+          new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool IsHasWafer
+        {
+            get { return (bool)this.GetValue(IsHasWaferProperty); }
+            set { this.SetValue(IsHasWaferProperty, value); }
+        }
+
+
         public static readonly DependencyProperty IsLidOpenProperty = DependencyProperty.Register(
          "IsLidOpen", typeof(bool), typeof(Chamber),
          new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));

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

@@ -64,7 +64,7 @@
                 <Path.Data>
                     <GeometryGroup>
                         <!--<PathGeometry Figures="M 200,100 A 80,80 1 1 1 200,99.9"/>-->
-                        <PathGeometry Figures="M 190,100 A 70,70 1 1 1 190,99.9" />
+                        <!--<PathGeometry Figures="M 190,100 A 70,70 1 1 1 190,99.9" />-->
                         <PathGeometry Figures="M 180,100 A 60,60 1 1 1 180,99.9" />
                         <PathGeometry Figures="M 170,100 A 50,50 1 1 1 170,99.9" />
                         <PathGeometry Figures="M 160,100 A 40,40 1 1 1 160,99.9" />

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

@@ -64,7 +64,7 @@
                 <Path.Data>
                     <GeometryGroup>
                         <!--<PathGeometry Figures="M 200,100 A 80,80 1 1 1 200,99.9"/>-->
-                        <PathGeometry Figures="M 190,100 A 70,70 1 1 1 190,99.9" />
+                        <!--<PathGeometry Figures="M 190,100 A 70,70 1 1 1 190,99.9" />-->
                         <PathGeometry Figures="M 180,100 A 60,60 1 1 1 180,99.9" />
                         <PathGeometry Figures="M 170,100 A 50,50 1 1 1 170,99.9" />
                         <PathGeometry Figures="M 160,100 A 40,40 1 1 1 160,99.9" />

+ 2 - 1
Venus/Venus_Themes/UserControls/TMChamber.xaml

@@ -40,6 +40,7 @@
 
 
             <Canvas Width="200" Height="200" Grid.Row="1">
+                <TextBlock Text="{Binding ElementName=tmChamber,Path=Name}" Canvas.Top="-50" Canvas.Left="65" FontSize="30"/>
                 <Polygon Stroke="Black"  StrokeThickness="2" Points="00,200 0,0 200,0 200,200">
                     <Polygon.Fill>
                         <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
@@ -50,7 +51,7 @@
                     </Polygon.Fill>
 
                 </Polygon>
-                <Path  Stroke="Black"  Canvas.Left="-20" >
+                <Path  Stroke="Gray"  Canvas.Left="-20" StrokeThickness="2" >
                     <Path.Data>
                         <GeometryGroup>
                             <!--<PathGeometry Figures="M 200,100 A 80,80 1 1 1 200,99.9"/>-->

+ 1 - 1
Venus/Venus_UI/Config/VenusMenu.json

@@ -222,7 +222,7 @@
       {
         "Id": "OperationOverView",
         "IsShow": "true",
-        "Name": "OperationOverView",
+        "Name": "OverView",
         "View": "OperationOverView"
       }
     ]