Browse Source

添加部分ui按钮控制rt功能

lixiang 2 years ago
parent
commit
ccb4444fa8
28 changed files with 1010 additions and 141 deletions
  1. 1 2
      Venus/Framework/Common/Fsm/StateMachine.cs
  2. 16 2
      Venus/Framework/Common/Log/LOG.cs
  3. 1 0
      Venus/Framework/RTEquipmentLibrary/HardwareUnits/PMs/PM.cs
  4. 9 0
      Venus/Venus_MainPages/Venus_MainPages.csproj
  5. 13 3
      Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs
  6. 66 0
      Venus/Venus_MainPages/ViewModels/GetRtAllData.cs
  7. 251 0
      Venus/Venus_MainPages/ViewModels/IOViewModel.cs
  8. 106 59
      Venus/Venus_MainPages/ViewModels/OverViewModel.cs
  9. 38 2
      Venus/Venus_MainPages/ViewModels/TopViewModel.cs
  10. 2 2
      Venus/Venus_MainPages/Views/GasLeakCheckView.xaml
  11. 160 0
      Venus/Venus_MainPages/Views/IOView.xaml
  12. 46 0
      Venus/Venus_MainPages/Views/IOView.xaml.cs
  13. 110 56
      Venus/Venus_MainPages/Views/OverView.xaml
  14. 1 1
      Venus/Venus_MainPages/Views/TopView.xaml
  15. 1 1
      Venus/Venus_RT/App.config
  16. 3 0
      Venus/Venus_RT/Devices/IODevices/IoMfc.cs
  17. 12 0
      Venus/Venus_RT/Devices/JetPM.cs
  18. 1 1
      Venus/Venus_RT/Instances/ToolLoader.cs
  19. 10 2
      Venus/Venus_RT/Modules/PMs/PMEntity.cs
  20. 2 1
      Venus/Venus_RT/Modules/RouteManager.cs
  21. BIN
      Venus/Venus_RT/bin/Release.zip
  22. 1 7
      Venus/Venus_Simulator/Instances/SimulatorSystem.cs
  23. 25 0
      Venus/Venus_Themes/Converters/DoubleToDoubleConverter.cs
  24. 57 0
      Venus/Venus_Themes/CustomControls/CommonValveControl.cs
  25. 70 1
      Venus/Venus_Themes/Themes/Generic.xaml
  26. 1 1
      Venus/Venus_Themes/UserControls/TextboxWithLabel.xaml
  27. 2 0
      Venus/Venus_Themes/Venus_Themes.csproj
  28. 5 0
      Venus/Venus_UI/Config/VenusMenu.json

+ 1 - 2
Venus/Framework/Common/Fsm/StateMachine.cs

@@ -24,8 +24,7 @@ namespace Aitex.Core.RT.Fsm
         TIMER = 0x0FFFFFF0,
         NONE,
         WARNING,
-        ALARM,
-        
+        ALARM,      
     }
 
     public enum FSM_STATE

+ 16 - 2
Venus/Framework/Common/Log/LOG.cs

@@ -2,6 +2,8 @@
 using System;
 using System.Linq;
 using MECF.Framework.Common.Equipment;
+using System.Text;
+
 namespace Aitex.Core.RT.Log
 {
     public static class LOG
@@ -54,13 +56,25 @@ namespace Aitex.Core.RT.Log
         {
             Write(eEvent.ERR_EXCEPTION, ModuleName.System, prefix + ex.Message);
         }
-
+       static string test;
         public static void Write(eEvent id, ModuleName module, params string[] values)
         {
+
            var logItem= LogDefineManager.LogItems.Where(x => x.Id == id).FirstOrDefault();
             if (logItem != null)
             {
-                string message = ((int)logItem.Id).ToString().PadRight(10)+ module.ToString().PadRight(12) +string.Format(logItem.GlobalDescription_zh, values);
+                //var item= ((int)logItem.Id).ToString().PadLeft(10);
+                //var item1 = module.ToString().PadLeft(12);
+                //var item = string.Format(logItem.GlobalDescription_zh, values);
+                StringBuilder text = new StringBuilder();
+                text.Append(((int)logItem.Id).ToString().PadLeft(10));
+                text.Append(module.ToString().PadLeft(12));
+                text.Append("        ");
+                text.Append(string.Format(logItem.GlobalDescription_zh, values));
+                //var count = item.Length + item1.Length;
+                //string message = ((int)logItem.Id).ToString().PadLeft(10)+ module.ToString().PadLeft(12) +string.Format(logItem.GlobalDescription_zh, values);
+                string message = text.ToString();
+                //test += (message + "\r\n");
                 Level level = Level.Undefine;
                 Enum.TryParse<Level>(logItem.Level, out level);
 

+ 1 - 0
Venus/Framework/RTEquipmentLibrary/HardwareUnits/PMs/PM.cs

@@ -44,6 +44,7 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs
             DATA.Subscribe($"{Name}.IsWaterLeak", () => { return CheckWaterLeak(); });
             DATA.Subscribe($"{Name}.ChamberPressure", () => ChamberPressure);
 
+
             IsInstalled = SC.GetValue<bool>($"System.{Name}IsInstalled");
 
 

+ 9 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -107,6 +107,8 @@
     <Compile Include="Unity\WaferAssociationInfo.cs" />
     <Compile Include="ViewModels\DataAnalysisViewModel.cs" />
     <Compile Include="ViewModels\GasLeakCheckViewModel.cs" />
+    <Compile Include="ViewModels\GetRtAllData.cs" />
+    <Compile Include="ViewModels\IOViewModel.cs" />
     <Compile Include="ViewModels\OperationOverViewModel.cs" />
     <Compile Include="ViewModels\OverViewModel.cs" />
     <Compile Include="ViewModels\PlatformViewModel.cs" />
@@ -118,6 +120,9 @@
     <Compile Include="Views\GasLeakCheckView.xaml.cs">
       <DependentUpon>GasLeakCheckView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\IOView.xaml.cs">
+      <DependentUpon>IOView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\OperationOverView.xaml.cs">
       <DependentUpon>OperationOverView.xaml</DependentUpon>
     </Compile>
@@ -171,6 +176,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\IOView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\OperationOverView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 13 - 3
Venus/Venus_MainPages/ViewModels/GasLeakCheckViewModel.cs

@@ -1,4 +1,5 @@
-using Prism.Commands;
+using MECF.Framework.Common.OperationCenter;
+using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -15,6 +16,7 @@ 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];
         #endregion
 
@@ -42,7 +44,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_CheckTime; }
             set { SetProperty(ref m_CheckTime, value); }
         }
-
+        public int LeakRateUpperLimit
+        {
+            get { return m_LeakRateUpperLimit; }
+            set { SetProperty(ref m_LeakRateUpperLimit, value); }
+        }
         public bool[] GasIsCheck
         {
             get { return m_GasIsCheck; }
@@ -63,13 +69,17 @@ namespace Venus_MainPages.ViewModels
             m_LeakCheckModeSelectedIndex = 0;
             m_VentTime = 120;
             m_CheckTime = 180;
+            m_LeakRateUpperLimit = 10;
         }
         #endregion
 
         #region 命令方法
         private void OnCheck()
         {
-            
+            InvokeClient.Instance.Service.DoOperation($"PMA.LeakCheck", new[]
+                                                     {
+                                                         VentTime.ToString()
+                                                      }); ;
         }
         #endregion
     }

+ 66 - 0
Venus/Venus_MainPages/ViewModels/GetRtAllData.cs

@@ -0,0 +1,66 @@
+using MECF.Framework.Common.DataCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+
+namespace Venus_MainPages.ViewModels
+{
+    public class GetRtAllData
+    {
+        private List<string> m_RtConfigKeys;
+        private List<string> m_RtDataKeys;
+        public static Dictionary<string, object> RtConfigValues;
+        public static Dictionary<string, object> RtDataValues;
+        private string ModuleName = "PMA";
+        DispatcherTimer timer = new DispatcherTimer();
+
+
+        public GetRtAllData()
+        {
+            m_RtConfigKeys = new List<string>();
+            m_RtDataKeys = new List<string>();
+            addConfigKeys();
+            addDataKeys();
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
+
+        }
+
+        void timer_Tick(object sender, EventArgs e)
+        {
+            RtConfigValues = QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys);
+            var t = RtConfigValues.Values.Count;
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+        }
+        private void addConfigKeys()
+        {
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas1.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas2.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas3.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas4.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas5.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas6.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas7.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas8.GasName");
+        }
+
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.FsmState");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.FeedBack");
+
+
+        }
+    }
+}

+ 251 - 0
Venus/Venus_MainPages/ViewModels/IOViewModel.cs

@@ -0,0 +1,251 @@
+using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.IOCore;
+using MECF.Framework.Common.OperationCenter;
+using OpenSEMI.ClientBase.IO;
+using Prism.Commands;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace Venus_MainPages.ViewModels
+{
+    public class IOViewModel : BindableBase
+    {
+        #region 私有属性
+        private Dictionary<string, IOItem<bool>> _diMap = new Dictionary<string, IOItem<bool>>();
+        private Dictionary<string, IOItem<bool>> _doMap = new Dictionary<string, IOItem<bool>>();
+        private Dictionary<string, IOItem<float>> _aiMap = new Dictionary<string, IOItem<float>>();
+        private Dictionary<string, AOItem32> _aoMap = new Dictionary<string, AOItem32>();
+
+        private ObservableCollection<IOItem<float>> m_AIs = new ObservableCollection<IOItem<float>>();
+        private ObservableCollection<AOItem32> m_AOs = new ObservableCollection<AOItem32>();
+        private ObservableCollection<IOItem<bool>> m_DIs = new ObservableCollection<IOItem<bool>>();
+        private ObservableCollection<IOItem<bool>> m_DOs = new ObservableCollection<IOItem<bool>>();
+
+        private string SystemName;
+
+        #endregion
+
+        #region 属性
+        public ObservableCollection<IOItem<float>> AIs
+        {
+            get { return m_AIs; }
+            set { SetProperty(ref m_AIs, value); }
+        }
+        public ObservableCollection<AOItem32> AOs
+        {
+            get { return m_AOs; }
+            set { SetProperty(ref m_AOs, value); }
+        }
+        public ObservableCollection<IOItem<bool>> DIs
+        {
+            get { return m_DIs; }
+            set { SetProperty(ref m_DIs, value); }
+        }
+        public ObservableCollection<IOItem<bool>> DOs
+        {
+            get { return m_DOs; }
+            set { SetProperty(ref m_DOs, value); }
+        }
+        #endregion
+
+        #region 命令
+        private DelegateCommand<IOItem<bool>> _SetDOCommand;
+        public DelegateCommand<IOItem<bool>> SetDOCommand =>
+            _SetDOCommand ?? (_SetDOCommand = new DelegateCommand<IOItem<bool>>(SetDO));
+
+        private DelegateCommand<AOItem32> _SetAOCommand;
+        public DelegateCommand<AOItem32> SetAOCommand =>
+            _SetAOCommand ?? (_SetAOCommand = new DelegateCommand<AOItem32>(SetAO));
+
+        //private DelegateCommand _SetDOCommand;
+        //public DelegateCommand SetDOCommand =>
+        //    _SetDOCommand ?? (_SetDOCommand = new DelegateCommand(SetDO));
+
+        #endregion
+
+
+
+
+        public IOViewModel()
+        {
+            SystemName = "PMA";
+
+            BuildIoSchema();
+
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = TimeSpan.FromSeconds(2);
+            timer.Tick += timer_Tick;
+            timer.Start();
+
+     
+
+        }
+        void timer_Tick(object sender, EventArgs e)
+        {
+            GetIOs();
+
+        }
+
+        #region 私有方法
+        public void SetAO(AOItem32 aoItem)
+        {
+            InvokeClient.Instance.Service.DoOperation("System.SetAoValue32", aoItem.Name, aoItem.NewValue);
+        }
+        private void SetDO(IOItem<bool> doItem)
+        {
+            InvokeClient.Instance.Service.DoOperation("System.SetDoValue", doItem.Name, !doItem.Value);
+        }
+        public void BuildIoSchema()
+        {
+            if (DIs.Count == 0)
+            {
+                var itemList = QueryDataClient.Instance.Service.GetData($"{SystemName}.PLC.DIItemList");
+
+                if (itemList != null)
+                {
+                    DIs = new ObservableCollection<IOItem<bool>>();
+                    foreach (var item in (List<NotifiableIoItem>)itemList)
+                    {
+                        var io = new IOItem<bool>()
+                        {
+                            Index = item.Index,
+                            Name = item.Name,
+                            Value = item.BoolValue,
+                            Address = item.Address
+                        };
+                        DIs.Add(io);
+                        _diMap.Add($"IO.{item.Name}", io);
+                    }
+                }
+            }
+            if (DOs.Count == 0)
+            {
+                var itemList = QueryDataClient.Instance.Service.GetData($"{SystemName}.PLC.DOItemList");
+
+                if (itemList != null)
+                {
+                    DOs = new ObservableCollection<IOItem<bool>>();
+                    foreach (var item in (List<NotifiableIoItem>)itemList)
+                    {
+                        var io = new IOItem<bool>()
+                        {
+                            Index = item.Index,
+                            Name = item.Name,
+                            Value = item.BoolValue,
+                            Address = item.Address
+                        };
+                        DOs.Add(io);
+
+                        _doMap.Add($"IO.{item.Name}", io);
+                    }
+                }
+            }
+            if (AIs.Count == 0)
+            {
+                var itemList = QueryDataClient.Instance.Service.GetData($"{SystemName}.PLC.AIItemList");
+
+                if (itemList != null)
+                {
+                    AIs = new ObservableCollection<IOItem<float>>();
+                    foreach (var item in (List<NotifiableIoItem>)itemList)
+                    {
+                        var io = new IOItem<float>()
+                        {
+                            Index = item.Index,
+                            Name = item.Name,
+                            Value = item.ShortValue,
+                            Address = item.Address
+                        };
+                        AIs.Add(io);
+                        _aiMap.Add($"IO32.{item.Name}", io);
+                    }
+                }
+            }
+            if (AOs.Count == 0)
+            {
+                var itemList = QueryDataClient.Instance.Service.GetData($"{SystemName}.PLC.AOItemList");
+
+                if (itemList != null)
+                {
+                    AOs = new ObservableCollection<AOItem32>();
+                    foreach (var item in (List<NotifiableIoItem>)itemList)
+                    {
+                        var io = new AOItem32()
+                        {
+                            Index = item.Index,
+                            Name = item.Name,
+                            Value = item.ShortValue,
+                            Address = item.Address
+                        };
+                        AOs.Add(io);
+                        _aoMap.Add($"IO32.{item.Name}", io);
+                    }
+                }
+            }
+        }
+        public void GetIOs()
+        {
+            var diValues = QueryDataClient.Instance.Service.PollData(_diMap.Keys);
+            foreach (var item in _diMap)
+            {
+                if (diValues.ContainsKey(item.Key))
+                    _diMap[item.Key].Value = (bool)diValues[item.Key];
+            }
+            var doValues = QueryDataClient.Instance.Service.PollData(_doMap.Keys);
+            foreach (var item in _doMap)
+            {
+                if (doValues.ContainsKey(item.Key))
+                    _doMap[item.Key].Value = (bool)doValues[item.Key];
+            }
+            var aiValues = QueryDataClient.Instance.Service.PollData(_aiMap.Keys);
+            foreach (var item in _aiMap)
+            {
+                if (aiValues.ContainsKey(item.Key))
+                    _aiMap[item.Key].Value = (float)aiValues[item.Key];
+            }
+            var aoValues = QueryDataClient.Instance.Service.PollData(_aoMap.Keys);
+            foreach (var item in _aoMap)
+            {
+                if (aoValues.ContainsKey(item.Key))
+                    _aoMap[item.Key].Value = (float)aoValues[item.Key];
+            }
+        }
+        #endregion
+    }
+    public class AOItem32 : IOItem<float>
+    {
+        public static readonly DependencyProperty NewValueProperty = DependencyProperty.Register(nameof(NewValue), typeof(float), typeof(AOItem32), new PropertyMetadata((object)(float)0));
+        public static readonly DependencyProperty TextSavedProperty = DependencyProperty.Register(nameof(TextSaved), typeof(bool), typeof(AOItem32), new PropertyMetadata((object)true));
+
+        public float NewValue
+        {
+            get
+            {
+                return (float)this.GetValue(NewValueProperty);
+            }
+            set
+            {
+                this.SetValue(NewValueProperty, (object)value);
+            }
+        }
+
+        public bool TextSaved
+        {
+            get
+            {
+                return (bool)this.GetValue(TextSavedProperty);
+            }
+            set
+            {
+                this.SetValue(TextSavedProperty, (object)value);
+            }
+        }
+    }
+}

+ 106 - 59
Venus/Venus_MainPages/ViewModels/OverViewModel.cs

@@ -1,28 +1,24 @@
 using Aitex.Core.Common.DeviceData;
 using Aitex.Core.RT.SCCore;
+using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.OperationCenter;
+using OpenSEMI.ClientBase.IO;
 using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Threading;
+using Venus_Core;
 
 namespace Venus_MainPages.ViewModels
 {
     internal class OverViewModel : BindableBase
     {
         #region 私有字段
-        private string m_Gas1Name;
-        private string m_Gas2Name;
-        private string m_Gas3Name;
-        private string m_Gas4Name;
-        private string m_Gas5Name;
-        private string m_Gas6Name;
-        private string m_Gas7Name;
-        private string m_Gas8Name;
-
-
         private bool m_VN2Valve1IsOpen;
         private bool m_VN2Valve2IsOpen;
         private bool m_VN2Valve3IsOpen;
@@ -46,54 +42,35 @@ namespace Venus_MainPages.ViewModels
         private bool m_PurgeValveIsOpen;
         private bool m_SoftPumpValveIsOpen;
         private bool m_FastPumpValveIsOpen;
-
+       
         private AITPumpData m_MainPumpData=new AITPumpData ();
 
         private bool m_PumpIsOpen;
         private bool m_IsATM;
+        private bool m_IsVAC;
+
+        private string ModuleName;
+
+        private List<string> m_RtConfigKeys;
+        private Dictionary<string, object> m_RtConfigValues;
+
+        private List<string> m_RtDataKeys;
+        private Dictionary<string, object> m_RtDataValues;
 
+        //private ObservableCollection<IOItem<float>> m_RtAiValues;
+        //private ObservableCollection<AOItem> m_RtAOs;
         #endregion
 
-        #region  属性
-        public string Gas1Name
-        {
-            get { return m_Gas1Name; }
-            set { SetProperty(ref m_Gas1Name, value); }
-        }
-        public string Gas2Name
-        {
-            get { return m_Gas2Name; }
-            set { SetProperty(ref m_Gas2Name, value); }
-        }
-        public string Gas3Name
-        {
-            get { return m_Gas3Name; }
-            set { SetProperty(ref m_Gas3Name, value); }
-        }
-        public string Gas4Name
+        #region  属性      
+        public Dictionary<string, object> RtConfigValues
         {
-            get { return m_Gas4Name; }
-            set { SetProperty(ref m_Gas4Name, value); }
+            get { return m_RtConfigValues; }
+            set { SetProperty(ref m_RtConfigValues, value); }
         }
-        public string Gas5Name
+        public Dictionary<string, object> RtDataValues
         {
-            get { return m_Gas5Name; }
-            set { SetProperty(ref m_Gas5Name, value); }
-        }
-        public string Gas6Name
-        {
-            get { return m_Gas6Name; }
-            set { SetProperty(ref m_Gas6Name, value); }
-        }
-        public string Gas7Name
-        {
-            get { return m_Gas7Name; }
-            set { SetProperty(ref m_Gas7Name, value); }
-        }
-        public string Gas8Name
-        {
-            get { return m_Gas8Name; }
-            set { SetProperty(ref m_Gas8Name, value); }
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
         }
         public bool GasFinalValveIsOpen
         {
@@ -227,9 +204,20 @@ namespace Venus_MainPages.ViewModels
             get { return m_IsATM; }
             set { SetProperty(ref m_IsATM, value); }
         }
+
+        public bool IsVAC
+        {
+            get { return m_IsVAC; }
+            set { SetProperty(ref m_IsVAC, value); }
+        }
         #endregion
 
         #region 命令
+
+        private DelegateCommand _PMInitCommnad;
+        public DelegateCommand PMInitCommnad =>
+            _PMInitCommnad ?? (_PMInitCommnad = new DelegateCommand(OnPMInit));
+
         private DelegateCommand _GasCommand;
         public DelegateCommand GasCommand =>
             _GasCommand ?? (_GasCommand = new DelegateCommand(OnGas));
@@ -260,21 +248,37 @@ namespace Venus_MainPages.ViewModels
         #region 构造函数
         public OverViewModel()
         {
-            m_Gas1Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas1.GasName");
-            m_Gas2Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas2.GasName");
-            m_Gas3Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas3.GasName");
-            m_Gas4Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas4.GasName");
-            m_Gas5Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas5.GasName");
-            m_Gas6Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas6.GasName");
-            m_Gas7Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas7.GasName");
-            m_Gas8Name = (string)MECF.Framework.Common.DataCenter.QueryDataClient.Instance.Service.GetConfig("PMA.MfcGas8.GasName");
-
+            m_RtConfigKeys=new List<string>();
+            m_RtDataKeys = new List<string>();
+            
             m_IsATM = true;
 
+            ModuleName = "PMA";
+            addConfigKeys();
+            addDataKeys();
+
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
+
+            //GetRtAllData getRtAllData = new GetRtAllData();
+
+        }
+        void timer_Tick(object sender, EventArgs e)
+        {
+            RtConfigValues = QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys);
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+
         }
         #endregion
 
         #region 命令方法
+
+        private void OnPMInit()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Home");            
+        }
         private void OnGas()
         {
             closeAllValve();
@@ -310,6 +314,7 @@ namespace Venus_MainPages.ViewModels
         {
             closeAllValve();
             IsATM = !IsATM;
+            
         }
 
         private void OnPurge()
@@ -346,13 +351,55 @@ namespace Venus_MainPages.ViewModels
 
         private void OnOpenPump()
         {
-            //MainPumpData.IsError = true;
             PumpIsOpen = true;
-
+            if (RtDataValues[$"{ModuleName}.FsmState"].ToString()== "LaunchingPump")
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+                return;
+            }
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartPump");
         }
         #endregion
 
         #region 私有方法
+
+        private void addConfigKeys()
+        {
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas1.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas2.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas3.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas4.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas5.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas6.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas7.GasName");
+            m_RtConfigKeys.Add($"{ModuleName}.MfcGas8.GasName");
+        }
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.FsmState");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas1.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas2.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas3.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas4.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas5.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas6.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas7.FeedBack");
+            m_RtDataKeys.Add($"{ModuleName}.MfcGas8.FeedBack");
+
+            m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
+            m_RtDataKeys.Add($"{ModuleName}.ProcessPressure");
+            m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");
+
+            m_RtDataKeys.Add($"{ModuleName}.IsATM");
+            m_RtDataKeys.Add($"{ModuleName}.IsVAC");
+
+            m_RtDataKeys.Add($"{ModuleName}.LiftPinIsUp");
+            m_RtDataKeys.Add($"{ModuleName}.LiftPinIsDown");
+
+
+
+
+        }
         private void closeAllValve()
         {
             if (VN2Valve1IsOpen == true) VN2Valve1IsOpen = false;

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

@@ -1,4 +1,5 @@
-using Prism.Commands;
+using MECF.Framework.Common.DataCenter;
+using Prism.Commands;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -6,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
+using System.Windows.Threading;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -14,6 +16,11 @@ namespace Venus_MainPages.ViewModels
         #region 私有字段
         private string m_Title;
         private string m_SoftwareVersion;
+
+        private List<string> m_RtDataKeys=new List<string> ();
+        private Dictionary<string, object> m_RtDataValues;
+
+        private string ModuleName;
         #endregion
 
         #region  属性
@@ -27,6 +34,12 @@ namespace Venus_MainPages.ViewModels
             get { return m_SoftwareVersion; }
             set { SetProperty(ref m_SoftwareVersion, value); }
         }
+
+        public Dictionary<string, object> RtDataValues
+        {
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
+        }
         #endregion
 
         #region 命令
@@ -40,13 +53,28 @@ namespace Venus_MainPages.ViewModels
         {
             Title = "Venus";
             m_SoftwareVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+            ModuleName = "PMA";
+            addDataKeys();
+
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Tick += timer_Tick;
+            timer.Start();
         }
         #endregion
 
+
+
         #region 方法
-        private void OnSwitchLanguage()
+
+        void timer_Tick(object sender, EventArgs e)
         {
+            //RtConfigValues = QueryDataClient.Instance.Service.PollConfig(m_RtConfigKeys);
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+        }
 
+        private void OnSwitchLanguage()
+        {
             
             List<ResourceDictionary> dictionaryList = new List<ResourceDictionary>();
             foreach (ResourceDictionary dictionary in Application.Current.Resources.MergedDictionaries)
@@ -71,6 +99,14 @@ namespace Venus_MainPages.ViewModels
                 Application.Current.Resources.MergedDictionaries.Add(resourceDictionary2);
             }
         }
+
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add($"{ModuleName}.FsmState");
+
+
+
+        }
         #endregion
 
     }

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

@@ -247,8 +247,8 @@
 
                 <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"/>
-                <ComboBox Grid.Row="4" Grid.Column="1"  BorderBrush="Transparent" Margin="-2,-2,-2,-1" ItemsSource="{Binding LeakCheckMode}" SelectedIndex="{Binding LeakCheckModeSelectedIndex}"/>
+                <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]}"/>

+ 160 - 0
Venus/Venus_MainPages/Views/IOView.xaml

@@ -0,0 +1,160 @@
+<UserControl x:Class="Venus_MainPages.Views.IOView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Venus_MainPages.Views"
+             xmlns:prism="http://prismlibrary.com/"
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
+             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+             xmlns:toolkit="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <local:DisplayNameConverter x:Key="DisplayConverter" />
+    </UserControl.Resources>
+    <Grid ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*" />
+            <ColumnDefinition Width="*" />
+            <ColumnDefinition Width="*" />
+            <ColumnDefinition Width="1.2*" />
+        </Grid.ColumnDefinitions>
+        <TabControl Grid.Column="0" Margin="5,0,0,0">
+            <TabItem Header="DI">
+                <ListView ItemsSource="{Binding Path=DIs}" AlternationCount="2" VerticalAlignment="Top" Name="DIListView">
+                    <ListView.View>
+                        <GridView>
+                            <GridViewColumn Width="40" Header="Index" DisplayMemberBinding="{Binding Path=Index}" />
+                            <GridViewColumn Width="220" Header="Name">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
+                            <GridViewColumn Width="40" Header="Value">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <Grid Width="35">
+                                            <ctrl:SwitchButton HorizontalAlignment="Center" ON="{Binding Value}" Style="{StaticResource Lamp-Button}"></ctrl:SwitchButton>
+                                        </Grid>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                        </GridView>
+                    </ListView.View>
+                </ListView>
+            </TabItem>
+        </TabControl>
+        <TabControl Grid.Column="1" Margin="5,0,0,0">
+            <TabItem Header="DO">
+                <ListView ItemsSource="{Binding Path=DOs}" AlternationCount="2" VerticalAlignment="Top" Name="DOListView">
+                    <ListView.View>
+                        <GridView>
+                            <GridViewColumn Width="40" Header="Index" DisplayMemberBinding="{Binding Path=Index}" />
+                            <GridViewColumn Width="200" Header="Name">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
+                            <GridViewColumn Width="40" Header="Value">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <Grid Width="35">
+                                            <ctrl:SwitchButton HorizontalAlignment="Center" ON="{Binding Value}" Style="{StaticResource Lamp-Button}"></ctrl:SwitchButton>
+                                        </Grid>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <GridViewColumn Width="65" Header="Set">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <Grid Width="35">
+                                            <!--<ctrl:SwitchButton ON="{Binding Value}" Style="{StaticResource OperationButton}" HorizontalAlignment="Center" >
+                                                <i:Interaction.Triggers>
+                                                    <i:EventTrigger EventName="Click">
+                                                        <i:InvokeCommandAction Command="{Binding SetDOCommand}" CommandParameter="{Binding }"/>
+                                                    </i:EventTrigger>
+                                                </i:Interaction.Triggers>
+                                            </ctrl:SwitchButton>-->
+                                            <Button Content="Set" Command="{Binding Path=DataContext.SetDOCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" CommandParameter="{Binding }"/>
+                                        </Grid>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                        </GridView>
+                    </ListView.View>
+                </ListView>
+            </TabItem>
+        </TabControl>
+        <TabControl Grid.Column="2" Margin="5,0,0,0">
+            <TabItem Header="AI">
+                <ListView ItemsSource="{Binding Path=AIs}" AlternationCount="2" Name="AIListView" VerticalAlignment="Top">
+                    <ListView.View>
+                        <GridView>
+                            <GridViewColumn Width="40" Header="Index" DisplayMemberBinding="{Binding Path=Index}" />
+                            <GridViewColumn Width="200" Header="Name">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
+                            <GridViewColumn Width="80" Header="Value" DisplayMemberBinding="{Binding Path=Value}" />
+                        </GridView>
+                    </ListView.View>
+                </ListView>
+            </TabItem>
+        </TabControl>
+        <TabControl Grid.Column="3" Margin="5,0,0,0">
+            <TabItem Header="AO">
+                <ListView ItemsSource="{Binding Path=AOs}" AlternationCount="2" VerticalAlignment="Top" Name="AOListView">
+                    <ListView.View>
+                        <GridView>
+                            <GridViewColumn Width="40" Header="Index" DisplayMemberBinding="{Binding Path=Index}" />
+                            <GridViewColumn Width="210" Header="Name">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
+                            <GridViewColumn Width="50" Header="Value" DisplayMemberBinding="{Binding Path=Value}" />
+                            <GridViewColumn Width="80" Header="New Value">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <toolkit:IntegerUpDown Text="{Binding Path=NewValue}" Width="60" />
+                                        
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                            <GridViewColumn Width="65" Header="Operation">
+                                <GridViewColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <Button Content="Set" Height="20" Width="35" Command="{Binding Path=DataContext.SetAOCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" CommandParameter="{Binding }">
+                                            <!--<i:Interaction.Triggers>
+                                                <i:EventTrigger EventName="Click">
+                                                    <cal:ActionMessage MethodName="SetAO">
+                                                        <cal:Parameter Value="{Binding }" />
+                                                    </cal:ActionMessage>
+                                                </i:EventTrigger>
+                                            </i:Interaction.Triggers>-->
+                                        </Button>
+                                    </DataTemplate>
+                                </GridViewColumn.CellTemplate>
+                            </GridViewColumn>
+                        </GridView>
+                    </ListView.View>
+                </ListView>
+            </TabItem>
+        </TabControl>
+    </Grid>
+</UserControl>

+ 46 - 0
Venus/Venus_MainPages/Views/IOView.xaml.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Venus_MainPages.Views
+{
+    /// <summary>
+    /// IOView.xaml 的交互逻辑
+    /// </summary>
+    public partial class IOView : UserControl
+    {
+        public IOView()
+        {
+            InitializeComponent();
+        }
+    }
+    public class DisplayNameConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is string s1)
+            {
+                int idx = s1.IndexOf('_');
+                return s1.Substring(idx + 1);
+            }
+            return value;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 110 - 56
Venus/Venus_MainPages/Views/OverView.xaml

@@ -9,8 +9,10 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:unity="clr-namespace:Venus_MainPages.Unity"
              xmlns:ctrls="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
+             xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
              xmlns:converters="clr-namespace:Venus_Themes.Converters;assembly=Venus_Themes"
+             xmlns:viewmodel="clr-namespace:Venus_MainPages.ViewModels"
              d:DesignHeight="1450" Width="1900"
              >
     <UserControl.Resources>
@@ -39,7 +41,9 @@
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" IsOpen="{Binding VN2Valve3IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" IsOpen="{Binding VN2Valve3IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding VN2Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114"/>
+
         <!--<ctrls: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">
@@ -54,7 +58,9 @@
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <!--<ctrls:Pipe3 Canvas.Left="245" Canvas.Top="120" RotateTransformValue="-90"/>-->
-        <ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  IsOpen="{Binding VN2Valve2IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  IsOpen="{Binding VN2Valve2IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding VN2Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114"/>
+
 
         <!--To pump-->
         <ctrls:FlowPipe Name="f1"  Height="8"  Width="422" Canvas.Left="64" Canvas.Top="173" Visibility="Hidden"/>
@@ -65,7 +71,9 @@
 
         <!--Cl2-->
         <ctrls:FlowPipe Name="f9"  Height="8"  Width="308" Canvas.Left="176" Canvas.Top="230" IsFlowing="{Binding Gas1Valve3IsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5" IsOpen="{Binding Gas1Valve3IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5" IsOpen="{Binding Gas1Valve3IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas1Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="226"/>-->
 
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="262" />-->
@@ -87,7 +95,9 @@
 
         <!--SF6-->
         <ctrls:FlowPipe Name="f2"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding Gas2Valve3IsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8" IsOpen="{Binding Gas2Valve3IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8" IsOpen="{Binding Gas2Valve3IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas2Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="282" />-->
 
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="318" />-->
@@ -108,7 +118,9 @@
 
         <!--Gas3-->
         <ctrls:FlowPipe Name="f3"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding Gas3Valve3IsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333" IsOpen="{Binding Gas3Valve3IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333" IsOpen="{Binding Gas3Valve3IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas3Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="338" />-->
         <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="374" />-->
         <ctrls:FlowPipe x:Name="Gas3Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding Gas3Valve1IsOpen}"/>
@@ -135,7 +147,9 @@
         <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="428" IsFlowing="{Binding Gas4Valve2IsOpen}"/>
         <!--<ctrls:Pipe2 Canvas.Left="257" Canvas.Top="423" RotateTransformValue="90"/>-->
         <ctrls:FlowPipe Name="f4"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding Gas4Valve3IsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386" IsOpen="{Binding Gas4Valve3IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386" IsOpen="{Binding Gas4Valve3IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas4Valve3IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="392" />-->
         <ctrls:FlowPipe   Height="8"  Width="54" Canvas.Left="257"  Canvas.Top="380" RotateTransformValue="90" IsReverse="True">
             <ctrls:FlowPipe.IsFlowing>
@@ -151,23 +165,31 @@
         <ctrls:FlowPipe Name="f5"  Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding Gas5ValveIsOpen}">
             
         </ctrls:FlowPipe>
-        <ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443" IsOpen="{Binding Gas5ValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443" IsOpen="{Binding Gas5ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="447.5" />-->
 
 
         <!--O2-->
         <ctrls:FlowPipe Name="f6"  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding Gas6ValveIsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498" IsOpen="{Binding Gas6ValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498" IsOpen="{Binding Gas6ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="503" />-->
 
         <!--Gas7-->
         <ctrls:FlowPipe Name="f7"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding Gas7ValveIsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554" IsOpen="{Binding Gas7ValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554" IsOpen="{Binding Gas7ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557"/>
+
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="559" />-->
 
         <!--Gas8-->
         <ctrls:FlowPipe Name="f8"  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding Gas8ValveIsOpen}"/>
-        <ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611" IsOpen="{Binding Gas8ValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611" IsOpen="{Binding Gas8ValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614"/>
+
         <!--<ctrls:Pipe2 RotateTransformValue="90"   Canvas.Left="490" Canvas.Top="615"  />-->
         
 
@@ -181,7 +203,9 @@
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <ctrls:FlowPipeValve x:Name="GasFinalValve"  Height="20" Width="24" Canvas.Left="1086" Canvas.Top="110" IsOpen="{Binding GasFinalValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="GasFinalValve"  Height="20" Width="24" Canvas.Left="1086" Canvas.Top="110" IsOpen="{Binding GasFinalValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding GasFinalValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="1086" Canvas.Top="114"/>
+
         <ctrls:Pipe2    Canvas.Left="1144" Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Top"  />
 
         
@@ -192,8 +216,8 @@
         <ctrls:CustomSwitch   Height="20" Value="  Gas ON/OFF  " Canvas.Left="500" Canvas.Top="590" />
         <ctrls:CustomSwitch   Height="20" Value="   HV ON/OFF   " Canvas.Left="1280" Canvas.Top="316" />
 
-        <ctrls:CustomSwitch    Height="20" Value="    Pin Up     " Canvas.Left="1080" Canvas.Top="466"  />
-        <ctrls:CustomSwitch    Height="20" Value="  Pin Down  " Canvas.Left="1080" Canvas.Top="490" />
+        <ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsUp]}"  Height="20" Value="    Pin Up     " Canvas.Left="1080" Canvas.Top="466"  />
+        <ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsDown]}"  Height="20" Value="  Pin Down  " Canvas.Left="1080" Canvas.Top="490" />
 
 
 
@@ -314,23 +338,40 @@
 
         <!--阀-->
 
-        <ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="386"  IsOpen="{Binding Gas4Valve1IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve  x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="127" Canvas.Top="333" IsOpen="{Binding Gas3Valve1IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="276"  IsOpen="{Binding Gas2Valve1IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve  x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="127" Canvas.Top="220" IsOpen="{Binding Gas1Valve1IsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="386"  IsOpen="{Binding Gas4Valve1IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas4Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390"/>
+
+        <!--<ctrls:FlowPipeValve  x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="127" Canvas.Top="333" IsOpen="{Binding Gas3Valve1IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas3Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336"/>
+
+        <!--<ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="276"  IsOpen="{Binding Gas2Valve1IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas2Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280"/>
+
+        <!--<ctrls:FlowPipeValve  x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="127" Canvas.Top="220" IsOpen="{Binding Gas1Valve1IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas1Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224"/>
+
         <ctrls:FlowPipeValve  x:Name="pumpValve1"  Height="20" Width="24" Canvas.Left="127" Canvas.Top="163" Visibility="Hidden" />
 
-        <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="256" IsOpen="{Binding Gas1Valve2IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="312" IsOpen="{Binding Gas2Valve2IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="368" IsOpen="{Binding Gas3Valve2IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="418" IsOpen="{Binding Gas4Valve2IsOpen,Mode=TwoWay}"/>
-        <ctrls:FlowPipeValve     x:Name="VN21"  Height="20" Width="24" Canvas.Left="267" Canvas.Top="148"  IsOpen="{Binding VN2Valve1IsOpen,Mode=TwoWay}" >
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="256" IsOpen="{Binding Gas1Valve2IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas1Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259"/>
+
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="312" IsOpen="{Binding Gas2Valve2IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas2Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315"/>
+
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="368" IsOpen="{Binding Gas3Valve2IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas3Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371"/>
+
+        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="418" IsOpen="{Binding Gas4Valve2IsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding Gas4Valve2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421"/>
+
+        <!--<ctrls:FlowPipeValve     x:Name="VN21"  Height="20" Width="24" Canvas.Left="267" Canvas.Top="148"  IsOpen="{Binding VN2Valve1IsOpen,Mode=TwoWay}" >
             <ctrls:FlowPipeValve.RenderTransform>
                 <TransformGroup>
                     <RotateTransform Angle="90"/>
                 </TransformGroup>
             </ctrls:FlowPipeValve.RenderTransform>
-        </ctrls:FlowPipeValve>
+        </ctrls:FlowPipeValve>-->
+        <customControls:CommonValveControl Status="{Binding VN2Valve1IsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="243" Canvas.Top="148"/>
 
 
         <!--与chamber左上角连接的管道-->
@@ -340,7 +381,9 @@
        
         <ctrls:FlowPipe  Height="8"  Width="80" Canvas.Left="1252" Canvas.Top="182"   />
         <ctrls:FlowPipe  Height="8"  Width="70" Canvas.Left="1264" Canvas.Top="272"   />
-        <ctrls:FlowPipeValve    Height="20" Width="24" Canvas.Left="1280" Canvas.Top="262"  />
+        <!--<ctrls:FlowPipeValve    Height="20" Width="24" Canvas.Left="1280" Canvas.Top="262"  />-->
+        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="1280" Canvas.Top="265"/>
+
         <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Left="1315" Canvas.Top="142" >
             <Border.RenderTransform>
                 <RotateTransform Angle="90"/>
@@ -365,8 +408,8 @@
                 </LinearGradientBrush>
             </Border.Background>
         </Border>
-        <Ellipse Width="20" Height="20"  Canvas.Left="1302" Canvas.Top="134" Fill="{Binding IsATM,Converter={StaticResource boolToColor}}"></Ellipse>
-        <Ellipse Width="20" Height="20"  Canvas.Left="1272" Canvas.Top="218" Fill="{Binding IsATM,Converter={StaticResource boolToColor2}}"></Ellipse>
+        <Ellipse Width="20" Height="20"  Canvas.Left="1302" Canvas.Top="134" Fill="{Binding RtDataValues[PMA.IsATM],Converter={StaticResource boolToColor}}"></Ellipse>
+        <Ellipse Width="20" Height="20"  Canvas.Left="1272" Canvas.Top="218" Fill="{Binding RtDataValues[PMA.IsVAC],Converter={StaticResource boolToColor}}"></Ellipse>
         <TextBlock Text="ATM" Canvas.Left="1300" Canvas.Top="120"/>
         <TextBlock Text="VAC" Canvas.Left="1272" Canvas.Top="240"/>
         <ctrls:Pipe2     Canvas.Left="1242" Canvas.Top="195" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
@@ -432,19 +475,32 @@
         </ctrls:FlowPipe>
         <ctrls:FlowPipe  x:Name="purgeFlow2" ToolTip="123"   Height="8"  Width="142" Canvas.Left="1448"  Canvas.Top="542" RotateTransformValue="90" IsReverse="True" IsFlowing="{Binding PurgeValveIsOpen}"/>
         <ctrls:Pipe2    Canvas.Left="1435"  Canvas.Top="535" HorizontalAlignment="Left" VerticalAlignment="Top"  />
-        <ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="1458"  Canvas.Top="610" RotateTransformValue="90" IsOpen="{Binding PurgeValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="purgevalve"   Height="20" Width="24" Canvas.Left="1458"  Canvas.Top="610" RotateTransformValue="90" IsOpen="{Binding PurgeValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding PurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610"/>
+
+
+        <!--<ctrls:FlowPipeValve x:Name="HeValve1" Canvas.Top="649" Canvas.Left="1000"  Height="20" Width="24"  />-->
+        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="980" />
 
-        <ctrls:FlowPipeValve x:Name="HeValve1" Canvas.Top="649" Canvas.Left="1000"  Height="20" Width="24"  />
 
-        <ctrls:FlowPipeValve x:Name="HeValve2" Canvas.Top="671" Canvas.Left="1100"  Height="20" Width="24"  />
+        <!--<ctrls:FlowPipeValve x:Name="HeValve2" Canvas.Top="671" Canvas.Left="1100"  Height="20" Width="24"  />-->
+        <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100"/>
 
-        <ctrls:FlowPipeValve x:Name="SoftPumpValve" ToolTip="Soft"  Canvas.Top="555" Canvas.Left="1178"  Height="20" Width="24" RotateTransformValue="90" IsOpen="{Binding SoftPumpValveIsOpen,Mode=TwoWay}" />
 
-        <ctrls:FlowPipeValve x:Name="FastPumpValve" ToolTip="Fast"   Canvas.Top="555" Canvas.Left="1229"  Height="20" Width="24"  RotateTransformValue="90" IsOpen="{Binding FastPumpValveIsOpen,Mode=TwoWay}"/>
+        <!--<ctrls:FlowPipeValve x:Name="SoftPumpValve" ToolTip="Soft"  Canvas.Top="555" Canvas.Left="1178"  Height="20" Width="20" RotateTransformValue="90" IsOpen="{Binding SoftPumpValveIsOpen,Mode=TwoWay}" />-->
+        <customControls:CommonValveControl Status="{Binding SoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="555" Canvas.Left="1154"/>
+
+
+        <!--<ctrls:FlowPipeValve x:Name="FastPumpValve" ToolTip="Fast"   Canvas.Top="555" Canvas.Left="1229"  Height="20" Width="24"  RotateTransformValue="90" IsOpen="{Binding FastPumpValveIsOpen,Mode=TwoWay}"/>-->
+        <customControls:CommonValveControl Status="{Binding FastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20" Canvas.Top="555" Canvas.Left="1205"/>
+        
         <!--<ctrls:purge Name="purge" Canvas.Left="1410"  Canvas.Top="620" />-->
 
 
-        <ctrls:FlowPipeValve     Canvas.Top="596" Canvas.Left="1276"  Height="20" Width="24"  RotateTransformValue="90"/>
+        <!--<ctrls:FlowPipeValve     Canvas.Top="596" Canvas.Left="1276"  Height="20" Width="24"  RotateTransformValue="90"/>-->
+        <customControls:CommonValveControl  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Top="596" Canvas.Left="1252"/>
+
+
         <ctrls:Pipe2    Canvas.Left="490"  Canvas.Top="615" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
 
         <!--turbo-->
@@ -467,29 +523,29 @@
 
         <!--左侧管道标签-->
         <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="205" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas1.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="285" LabelValue="MFC2" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="260" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas2.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="285" LabelValue="MFC3" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="318" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas3.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="285" LabelValue="MFC4" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="370" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas4.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="285" LabelValue="MFC5" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="426" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas5.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="285" LabelValue="MFC6" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="482" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas6.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="285" LabelValue="MFC7" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="538" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas7.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="285" LabelValue="MFC8" TextBoxValue="0.0" TextBoxColor="White" />
-        <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas8.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
 
         <!--chamber管道标签-->
-        <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD"/>
-        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="800" LabelValue="Set(Torr)" TextBoxValue="0.0" TextBoxColor="White" />
+        <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ProcessPressure],StringFormat='F3'}" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ChamberPressure],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+        <!--<ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="800" LabelValue="Set(Torr)" TextBoxValue="0.0" TextBoxColor="White" />-->
         <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="870" LabelValue="Flow(sccm)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1300" LabelValue="CM3(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="470" Canvas.Left="1290" LabelValue="Position" TextBoxValue="1000" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1300" LabelValue="CM3(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ForelinePressure],StringFormat='F2'}" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="464" Canvas.Left="1290" LabelValue="Position" TextBoxValue="1000" TextBoxColor="#D7E4BD" />
         <ctrls:TextboxWithLabel  Canvas.Top="511" Canvas.Left="1320" LabelValue="Flow(sccm)" TextBoxValue="0.0" TextBoxColor="#D7E4BD" />
         <ctrls:TextboxWithLabel  Canvas.Top="581" Canvas.Left="1022" LabelValue="Pressure(Torr)" TextBoxValue="0.0" TextBoxColor="#D7E4BD">
             <ctrls:TextboxWithLabel.RenderTransform>
@@ -615,14 +671,14 @@
 
         <TextBlock FontSize="13" Text="N2" Canvas.Left="10" Canvas.Top="117" Foreground="White"  Block.TextAlignment="Right" Width="50"/>
         <TextBlock FontSize="13" Text="To pump" Canvas.Left="10" Canvas.Top="167" Visibility="Hidden" Block.TextAlignment="Right"/>
-        <TextBlock FontSize="13" Text="{Binding Gas1Name}" Canvas.Left="10" Canvas.Top="227" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas2Name}" Canvas.Left="10" Canvas.Top="284" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas3Name}" Canvas.Left="10" Canvas.Top="338" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas4Name}" Canvas.Left="10" Canvas.Top="392" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas5Name}" Canvas.Left="10" Canvas.Top="448" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas6Name}" Canvas.Left="10" Canvas.Top="503" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas7Name}" Canvas.Left="10" Canvas.Top="562" Block.TextAlignment="Right" Width="50"/>
-        <TextBlock FontSize="13" Text="{Binding Gas8Name}" Canvas.Left="10" Canvas.Top="618" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas1.GasName]}" Canvas.Left="10" Canvas.Top="227" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas2.GasName]}" Canvas.Left="10" Canvas.Top="284" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas3.GasName]}" Canvas.Left="10" Canvas.Top="338" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas4.GasName]}" Canvas.Left="10" Canvas.Top="392" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas5.GasName]}" Canvas.Left="10" Canvas.Top="448" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas6.GasName]}" Canvas.Left="10" Canvas.Top="503" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas7.GasName]}" Canvas.Left="10" Canvas.Top="562" Block.TextAlignment="Right" Width="50"/>
+        <TextBlock FontSize="13" Text="{Binding RtConfigValues[PMA.MfcGas8.GasName]}" Canvas.Left="10" Canvas.Top="618" Block.TextAlignment="Right" Width="50"/>
 
         <!--<Button  Background="{StaticResource buttonBrush}"  FontSize="15"  Foreground="Black" FontWeight="Bold"  BorderThickness="0" Content="Manual Endpoint" Width="150" Height="22" Canvas.Right="20" Canvas.Top="295" Canvas.Left="500" />
         <Button  Background="{StaticResource buttonBrush}"  FontSize="15"  Foreground="Black" FontWeight="Bold"  BorderThickness="0" Content="Abort" Width="150" Height="22" Canvas.Right="20" Canvas.Top="295" Canvas.Left="670" />
@@ -703,9 +759,7 @@
             <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,1" Padding="5,1">
                 <StackPanel Orientation="Vertical">
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
-                        <Button Width="80" Height="25" Margin="10,0" Content="初始化">
-                         
-                        </Button>
+                        <Button Width="80" Height="25" Margin="10,0" Content="初始化" Command="{Binding PMInitCommnad}"/>
                         <Button Width="80" Height="25" Margin="10,0" Content="终止">
                             
                         </Button>

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

@@ -32,7 +32,7 @@
                 <ColumnDefinition/>
             </Grid.ColumnDefinitions>
             <TextBlock Text="PMA" Foreground="White"   HorizontalAlignment="Center" VerticalAlignment="Center"/>
-            <TextBox Text="Init" Background="Yellow" Grid.Column="1"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderThickness="0" Margin="2"/>
+            <TextBox Text="{Binding RtDataValues[PMA.FsmState]}" Background="Yellow" Grid.Column="1"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderThickness="0" Margin="2"/>
             <TextBlock Text="Log" Grid.Row="1" Foreground="White"  TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
             <ComboBox Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="5" 
                                        

+ 1 - 1
Venus/Venus_RT/App.config

@@ -12,7 +12,7 @@
 			<param name="StaticLogFileName" value="false" />
 			<datePattern value="yyyyMMdd'.txt'" />
 			<layout type="log4net.Layout.PatternLayout,log4net">
-				<param name="ConversionPattern" value="%d  %-5p  %m%n" />
+				<param name="ConversionPattern" value="%d    %m%n" />
 				<param name="Header" value="&#xA;----------------------开启Venus--------------------------&#xA;" />
 			</layout>
 		</appender>

+ 3 - 0
Venus/Venus_RT/Devices/IODevices/IoMfc.cs

@@ -46,11 +46,14 @@ namespace Venus_RT.Devices.IODevices
         public virtual bool Initialize()
         {
             DATA.Subscribe($"{Module}.{Name}.VerificationResult", () => _verificationResult);
+            DATA.Subscribe($"{Module}.{Name}.FeedBack", () => FeedBack);
+            DATA.Subscribe($"{Module}.{Name}.SetPoint", () => SetPoint);
             return true;
         }
 
         public virtual void Monitor()
         {
+            
         }
 
         public virtual void Reset()

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

@@ -12,6 +12,7 @@ using System.Collections.Generic;
 using Venus_Core;
 using Venus_RT.Devices.IODevices;
 using Venus_RT.Devices.EPD;
+using Aitex.Core.RT.DataCenter;
 
 namespace Venus_RT.Devices
 {
@@ -156,6 +157,10 @@ namespace Venus_RT.Devices
         public bool IsMfc8ValveOpened => _Mfc8Valve.Status;
         // 压力信号
         public bool IsATM => _ATM_sw.Value;
+
+        public bool LiftPinIsDown => _LiftPin.OFFFeedback;
+        public bool LiftPinIsUp => _LiftPin.ONFeedback;
+
         public bool IsATMLoadlock => _ATM_Loadlock_sw.Value;
         public bool IsVACLoadLock => LoadlockPressure <= 1000;
         public bool IsVAC => _VAC_sw.Value;
@@ -378,6 +383,13 @@ namespace Venus_RT.Devices
             }
 
             _epdClient = DEVICE.GetDevice<EPDClient>($"{Module}.{VenusDevice.EndPoint}");
+
+            DATA.Subscribe($"{Name}.ForelinePressure", () => ForelinePressure);
+            DATA.Subscribe($"{Name}.ProcessPressure", () => ProcessPressure);
+            DATA.Subscribe($"{Name}.IsATM", () => IsATM);
+            DATA.Subscribe($"{Name}.IsVAC", () => IsVAC);
+            DATA.Subscribe($"{Name}.LiftPinIsUp", () => LiftPinIsUp);
+            DATA.Subscribe($"{Name}.LiftPinIsDown", () => LiftPinIsDown);
         }
 
 

+ 1 - 1
Venus/Venus_RT/Instances/ToolLoader.cs

@@ -79,7 +79,7 @@ namespace Venus_RT.Instances
             DataCollectionManager.Instance.Initialize(RtInstance.DatabaseName);
 
             RtSystemManager.Instance.AddCustomBackend("SC", new BackendSCConfigView());
-            //RtSystemManager.Instance.AddCustomBackend("IO", new IOView());
+            RtSystemManager.Instance.AddCustomBackend("IO", new IOView());
             RtSystemManager.Instance.AddCustomBackend("FSM", new FSMView());
 
             Singleton<RouteManager>.Instance.Initialize();

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

@@ -305,12 +305,22 @@ namespace Venus_RT.Modules.PMs
             Transition(PMState.Processing,      FSM_MSG.TIMER,      FnProcessTimeout,           PMState.Idle);
             Transition(PMState.Processing,      MSG.Abort,          FnAbortProcess,             PMState.Idle);
 
+            //DATA.Subscribe("MyTest", () => { return "123"; });
+
             Running = true;
 
             WaferManager.Instance.SubscribeLocation(ModuleName.PMA, 1);
             WaferManager.Instance.SubscribeLocation(ModuleName.LLA, 1);
         }
+        protected override bool Init()
+        {
+            DATA.Subscribe($"{Module}.FsmState", () => ((PMState)fsm.State).ToString());
 
+            OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck, args));
+            OP.Subscribe($"{Module}.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
+            OP.Subscribe($"{Module}.{RtOperation.StartPump}", (cmd, args) => CheckToPostMessage((int)MSG.LaunchPump));
+            return true;
+        }
         private bool FnIdle(object[] objs)
         {
             Running = false;
@@ -325,7 +335,6 @@ namespace Venus_RT.Modules.PMs
         private bool FnError(object[] objs)
         {
             Running = false;
-
             if (((PMState)fsm.State == PMState.Processing) || ((PMState)fsm.State == PMState.PreProcess)
                 || ((PMState)fsm.State == PMState.Homing) || ((PMState)fsm.State == PMState.LoadProcessRecipe))
                 return false;
@@ -334,7 +343,6 @@ namespace Venus_RT.Modules.PMs
             {
                 WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Failed);
             }
-
             return true;
         }
 

+ 2 - 1
Venus/Venus_RT/Modules/RouteManager.cs

@@ -4,7 +4,6 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using Aitex.Core.RT.Fsm;
-
 using Aitex.Core.Common;
 using Aitex.Core.RT.DataCenter;
 using Aitex.Core.RT.Event;
@@ -66,6 +65,8 @@ namespace Venus_RT.Modules
 
         public RouteManager()
         {
+            Name = "System";
+
             if (SC.GetValue<bool>("System.PMAIsInstalled"))
                 PMA = new PMEntity(ModuleName.PMA);
             if (SC.GetValue<bool>("System.PMBIsInstalled"))

BIN
Venus/Venus_RT/bin/Release.zip


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

@@ -167,7 +167,7 @@ namespace Venus_Simulator.Instances
                 MonitorPressure(ModuleName.PMA);
                 MonitorExtendAndRetract(ModuleName.PMA);
                 //MonitorTemperature(ModuleName.PMA);
-                //MonitorGas(ModuleName.PMA);
+                MonitorGas(ModuleName.PMA);
                 //MonitorRF(ModuleName.PMA);
                 //ChangeTime(ModuleName.PMA);
                 //MonitorIOPumpCtrl(ModuleName.PMA);
@@ -643,12 +643,6 @@ namespace Venus_Simulator.Instances
             this.SimulateMFC(ModuleName.PMA, 3);
             this.SimulateMFC(ModuleName.PMA, 4);
             this.SimulateMFC(ModuleName.PMA, 5);
-
-            this.SimulateMFC(ModuleName.PMB, 1);
-            this.SimulateMFC(ModuleName.PMB, 2);
-            this.SimulateMFC(ModuleName.PMB, 3);
-            this.SimulateMFC(ModuleName.PMB, 4);
-            this.SimulateMFC(ModuleName.PMB, 5);
         }
 
         private void SimulateMFC(ModuleName mod, byte gasNum)

+ 25 - 0
Venus/Venus_Themes/Converters/DoubleToDoubleConverter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Venus_Themes.Converters
+{
+    public class DoubleToDoubleConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            var test= ((double)value).ToString();
+
+            return ((double)value).ToString();
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+
+        }
+    }
+}

+ 57 - 0
Venus/Venus_Themes/CustomControls/CommonValveControl.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Venus_Themes.CustomControls
+{
+    public class CommonValveControl : Control
+    {
+        public CommonValveControl()
+        {
+            //this.MouseDoubleClick += CommonValveControl_MouseDoubleClick;
+        }
+        static CommonValveControl()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(CommonValveControl), new FrameworkPropertyMetadata(typeof(CommonValveControl)));
+        }
+
+        //private  void CommonValveControl_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        //{
+        //    Status = !Status;
+        //}
+        public override void OnApplyTemplate()
+        {
+            var  devBtn = GetTemplateChild("mainBody") as Grid;
+            devBtn.MouseLeftButtonDown += DevBtn_Click;
+            base.OnApplyTemplate();
+        }
+        private void DevBtn_Click(object sender, RoutedEventArgs e)
+        {
+            Status = !Status;
+        }
+
+        public bool Status
+        {
+            get => (bool)GetValue(StatusProperty);
+            set => SetValue(StatusProperty, value);
+        }
+        public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
+           "Status",
+           typeof(bool),
+           typeof(CommonValveControl));
+
+        public Orientation ValveOrientation
+        {
+            get => (Orientation)GetValue(CommonValveOrientationProperty);
+            set => SetValue(CommonValveOrientationProperty, value);
+        }
+        public static readonly DependencyProperty CommonValveOrientationProperty = DependencyProperty.Register(
+            "ValveOrientation",
+            typeof(Orientation),
+            typeof(CommonValveControl));
+    }
+}

+ 70 - 1
Venus/Venus_Themes/Themes/Generic.xaml

@@ -1,8 +1,77 @@
 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                     xmlns:converters="clr-namespace:Venus_Themes.Converters">
+                    xmlns:converters="clr-namespace:Venus_Themes.Converters"
+                    xmlns:customControls="clr-namespace:Venus_Themes.CustomControls"
+                    >
 
 
+    <Style TargetType="{x:Type customControls:CommonValveControl}">
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type customControls:CommonValveControl}">
+                    <Viewbox Stretch="Fill">
+                        <Grid x:Name="mainBody">
+                        <Canvas Width="40" Height="40">
+                            <Ellipse Height="40" Width="40" Fill="Gray"/>
+                                <Ellipse x:Name="InnerEllipse" Height="30" Width="30" Canvas.Left="5" Canvas.Top="5" />
+                                <Rectangle x:Name="Rectangle" Fill="White" RadiusX="2" RadiusY="2"/>
+                        </Canvas>
+                    </Grid>
+                    </Viewbox>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="Status" Value="false">
+                            <Setter TargetName="InnerEllipse" Property="Fill" Value="Silver"/>
+                        </Trigger>
+                        <Trigger Property="Status" Value="true">
+                            <Setter TargetName="InnerEllipse" Property="Fill" Value="Green"/>
+                        </Trigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="ValveOrientation" Value="Horizontal"/>
+                                <Condition Property="Status" Value="false"/>
+                            </MultiTrigger.Conditions>
+                            <Setter TargetName="Rectangle" Property="Width" Value="6"/>
+                            <Setter TargetName="Rectangle" Property="Height" Value="30"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Left" Value="17"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Top" Value="5"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="ValveOrientation" Value="Horizontal"/>
+                                <Condition Property="Status" Value="true"/>
+                            </MultiTrigger.Conditions>
+                            <Setter TargetName="Rectangle" Property="Width" Value="30"/>
+                            <Setter TargetName="Rectangle" Property="Height" Value="6"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Left" Value="5"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Top" Value="17"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="ValveOrientation" Value="Vertical"/>
+                                <Condition Property="Status" Value="false"/>
+                            </MultiTrigger.Conditions>
+                            <Setter TargetName="Rectangle" Property="Width" Value="30"/>
+                            <Setter TargetName="Rectangle" Property="Height" Value="6"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Left" Value="5"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Top" Value="17"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="ValveOrientation" Value="Vertical"/>
+                                <Condition Property="Status" Value="true"/>
+                            </MultiTrigger.Conditions>
+                            <Setter TargetName="Rectangle" Property="Width" Value="6"/>
+                            <Setter TargetName="Rectangle" Property="Height" Value="30"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Left" Value="17"/>
+                            <Setter TargetName="Rectangle" Property="Canvas.Top" Value="5"/>
+                        </MultiTrigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    
     <Style x:Key="textBlockStyle" TargetType="TextBlock">
         <!--字体渐变-->
         <Setter Property="Foreground">

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

@@ -8,6 +8,6 @@
               x:Name="tblabel">
     <StackPanel>
         <TextBlock Text="{Binding ElementName=tblabel,Path=LabelValue}"      TextWrapping="Wrap" Block.TextAlignment="Center"/>
-        <TextBox Text="{Binding ElementName=tblabel,Path=TextBoxValue}"   Margin="0,5,0,0" Width="50" HorizontalContentAlignment="Center" IsReadOnly="True" Background="{Binding ElementName=tblabel,Path=TextBoxColor}"/>
+        <TextBox Text="{Binding ElementName=tblabel,Path=TextBoxValue}"   Margin="0,5,0,0" Width="70" HorizontalContentAlignment="Center" IsReadOnly="True" Background="{Binding ElementName=tblabel,Path=TextBoxColor}"/>
     </StackPanel>
 </UserControl>

+ 2 - 0
Venus/Venus_Themes/Venus_Themes.csproj

@@ -67,6 +67,7 @@
     <Compile Include="Converters\BoolToVisibility.cs" />
     <Compile Include="Converters\boolToVisibility2.cs" />
     <Compile Include="Converters\BooToBool.cs" />
+    <Compile Include="Converters\DoubleToDoubleConverter.cs" />
     <Compile Include="Converters\FOUPStatusConverter.cs" />
     <Compile Include="Converters\IntPlusConverter.cs" />
     <Compile Include="Converters\IntToIsEnableConverter.cs" />
@@ -74,6 +75,7 @@
     <Compile Include="Converters\ToBoolMultiValueConverter2.cs" />
     <Compile Include="Converters\ToBoolMultiValueConverter3.cs" />
     <Compile Include="CustomControls\AduRadioButtonIcon.cs" />
+    <Compile Include="CustomControls\CommonValveControl.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Themes\Attach\BorderElement.cs" />
     <Compile Include="Themes\Attach\ElementBackground.cs" />

+ 5 - 0
Venus/Venus_UI/Config/VenusMenu.json

@@ -8,6 +8,11 @@
             "View": "OverView"
           },
           {
+            "Id": "IO",
+            "Name": "IO",
+            "View": "IOView"
+          },
+          {
             "Id": "Recipe",
             "Name": "Recipe",
             "View": "RecipeView"