ソースを参照

1.根据tps最新sequence 优化TM,更新界面及rt
2.添加EFEM robot 显示wafer的Front view ui界面
3添加ui界面右击开关门的功能
4.测试中遇到bug修改

lixiang 1 年間 前
コミット
edcd7c0ba1
共有28 個のファイルを変更した472 個の追加129 個の削除を含む
  1. 6 0
      Venus/Venus_Core/VenusDevice.cs
  2. 26 0
      Venus/Venus_MainPages/ViewModels/EfemViewModel.cs
  3. 21 1
      Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs
  4. 34 5
      Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs
  5. 19 0
      Venus/Venus_MainPages/ViewModels/TMViewModel.cs
  6. 5 4
      Venus/Venus_MainPages/Views/EfemView.xaml
  7. 8 8
      Venus/Venus_MainPages/Views/OperationOverView.xaml
  8. 109 26
      Venus/Venus_MainPages/Views/TMOperationView.xaml
  9. 4 4
      Venus/Venus_MainPages/Views/TMView.xaml
  10. BIN
      Venus/Venus_RT/Config/DeviceModelVenus_MF.xml
  11. 4 2
      Venus/Venus_RT/Config/System.sccfg
  12. 10 6
      Venus/Venus_RT/Devices/DeviceManager.cs
  13. 1 1
      Venus/Venus_RT/Devices/JetPMBase.cs
  14. 19 2
      Venus/Venus_RT/Devices/TM/JetTM.cs
  15. 1 1
      Venus/Venus_RT/Modules/LLs/LLEntity.cs
  16. 34 4
      Venus/Venus_RT/Modules/TM/MFVentRoutine.cs
  17. 1 1
      Venus/Venus_RT/Modules/TM/TMEntity.cs
  18. 7 26
      Venus/Venus_Themes/UserControls/EFEMFrontView.xaml
  19. 16 0
      Venus/Venus_Themes/UserControls/EFEMFrontView.xaml.cs
  20. 1 1
      Venus/Venus_Themes/UserControls/FOUPFrontView.xaml
  21. 26 21
      Venus/Venus_Themes/UserControls/LoadLockLeft.xaml
  22. 21 0
      Venus/Venus_Themes/UserControls/LoadLockLeft.xaml.cs
  23. 21 5
      Venus/Venus_Themes/UserControls/LoadLockRight.xaml
  24. 21 0
      Venus/Venus_Themes/UserControls/LoadLockRight.xaml.cs
  25. 10 10
      Venus/Venus_Themes/UserControls/TMChamber.xaml
  26. 11 1
      Venus/Venus_Themes/UserControls/TMChamber.xaml.cs
  27. 1 0
      Venus/Venus_Themes/Venus_Themes.csproj
  28. 35 0
      Venus/Venus_Themes/unity/UIEvents.cs

+ 6 - 0
Venus/Venus_Core/VenusDevice.cs

@@ -154,6 +154,12 @@
         PMCWaferSizeCheckSwitch,
         PMDWaferSizeCheckSwitch,
 
+        LLASoftVentValve,
+        LLAFastVentValve,
+        LLBSoftVentValve,
+        LLBFastVentValve,
+
+
     }
 
     public enum StateData

+ 26 - 0
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -15,6 +15,7 @@ using System.Linq;
 using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
+using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -37,6 +38,8 @@ namespace Venus_MainPages.ViewModels
         private ModuleInfo m_LP1ModuleInfo;
         private ModuleInfo m_LP2ModuleInfo;
         private ModuleInfo m_LP3ModuleInfo;
+        private ModuleInfo m_EFEMModuleInfo;
+
         private List<EFEMModule> m_EFEMModules = new List<EFEMModule>();
         private EFEMBlade m_PickSelectedBlade;
         private EFEMBlade m_PlaceSelectedBlade;
@@ -111,6 +114,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_LP3ModuleInfo; }
             set { SetProperty(ref m_LP3ModuleInfo, value); }
         }
+        public ModuleInfo EFEMModuleInfo
+        {
+            get { return m_EFEMModuleInfo; }
+            set { SetProperty(ref m_EFEMModuleInfo, value); }
+        }
         public List<EFEMModule> EFEMModules
         {
             get { return m_EFEMModules; }
@@ -371,7 +379,11 @@ namespace Venus_MainPages.ViewModels
             //OnModuleChange("Extend");
 
             //OnModuleChange("Retract");
+            UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
 
+            UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
+
+            UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
 
         }
         #endregion
@@ -667,6 +679,7 @@ namespace Venus_MainPages.ViewModels
             LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
             LP2ModuleInfo = ModuleManager.ModuleInfos["LP2"];
             LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
+            EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
             BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
             BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
             Aligner1Wafer= ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers[0];
@@ -701,6 +714,19 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
 
         }
+
+        private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
+        }
         #endregion
 
     }

+ 21 - 1
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -13,6 +13,7 @@ using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_MainPages.Unity;
 using Venus_Themes.CustomControls;
+using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -332,8 +333,12 @@ namespace Venus_MainPages.ViewModels
             LLAIsInstalled = allModules.Contains("LLA");
             LLBIsInstalled = allModules.Contains("LLB");
             EFEMIsInstalled = allModules.Contains("EFEM");
+            UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
+
+            UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
+
+            UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
 
-          
         }
         #endregion
 
@@ -601,6 +606,8 @@ namespace Venus_MainPages.ViewModels
 
             m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
             m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
+            m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
+            m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
             m_RtDataKeys.Add("System.IsAutoMode");
 
 
@@ -644,6 +651,19 @@ namespace Venus_MainPages.ViewModels
 
             return true;
         }
+
+        private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
+        }
         #endregion
     }
 }

+ 34 - 5
Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs

@@ -11,6 +11,7 @@ using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_Themes.CustomControls;
+using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -257,6 +258,8 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> ChamberDoorCloseCommand =>
             _ChamberDoorCloseCommand ?? (_ChamberDoorCloseCommand = new DelegateCommand<object>(OnChamberDoorClose));
 
+
+
         #endregion
 
         #region 构造函数
@@ -276,11 +279,23 @@ namespace Venus_MainPages.ViewModels
             timer.Interval = TimeSpan.FromSeconds(0.5);
             timer.Tick += timer_Tick;
             timer.Start();
+
+            UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
+
+            UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
+
+            UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
+
+
+
+
         }
+
+
         #endregion
 
         #region 命令方法
- 
+
 
         private void OnHome()
         {
@@ -370,11 +385,11 @@ namespace Venus_MainPages.ViewModels
             TMFastVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMFastVentValve.IsOpen"); ;
             LLASoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLASoftPumpValve.IsOpen");
             LLAFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAFastPumpValve.IsOpen");
-            //LLAPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAPurgeValve.IsOpen");
+            LLAPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAPurgeValve.IsOpen");
             LLAVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAVentValve.IsOpen");
             LLBSoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBSoftPumpValve.IsOpen");
             LLBFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBFastPumpValve.IsOpen");
-            //LLBPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBPurgeValve.IsOpen");
+            LLBPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBPurgeValve.IsOpen");
             LLBVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentValve.IsOpen");
         }
         private void addDataKeys()
@@ -385,9 +400,12 @@ namespace Venus_MainPages.ViewModels
             //m_RtDataKeys.Add($"TM.TMPurgeValve.IsOpen");
             m_RtDataKeys.Add($"TM.TMSoftVentValve.IsOpen");
             m_RtDataKeys.Add($"TM.TMFastVentValve.IsOpen");
+
             m_RtDataKeys.Add($"TM.LLASoftPumpValve.IsOpen");
             m_RtDataKeys.Add($"TM.LLAFastPumpValve.IsOpen");
-            //m_RtDataKeys.Add($"TM.LLAPurgeValve.IsOpen");
+            m_RtDataKeys.Add($"TM.LLAPurgeValve.IsOpen");
+            m_RtDataKeys.Add($"TM.LLBPurgeValve.IsOpen");
+
             m_RtDataKeys.Add($"TM.LLAVentValve.IsOpen");
             m_RtDataKeys.Add($"TM.LLBVentValve.IsOpen");
 
@@ -420,7 +438,18 @@ namespace Venus_MainPages.ViewModels
 
             
         }
-
+        private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
+        }
         #endregion
     }
 }

+ 19 - 0
Venus/Venus_MainPages/ViewModels/TMViewModel.cs

@@ -16,6 +16,7 @@ using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_Themes.CustomControls;
+using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -850,6 +851,11 @@ namespace Venus_MainPages.ViewModels
             RetractSoltItemsSource.Add(1);
             //Robot1TAction = WaferRobotTAction.PMA;
             //Robot2TAction = WaferRobotTAction.PMD;
+            UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
+
+            UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
+
+            UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
         }
 
        
@@ -1186,6 +1192,19 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("TMCycle.CycleIndex");
 
         }
+        private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+        }
+        private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
+        {
+            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
+        }
+
         #endregion
     }
 }

+ 5 - 4
Venus/Venus_MainPages/Views/EfemView.xaml

@@ -32,10 +32,11 @@
         <userControls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}"  Canvas.Top="70" Canvas.Left="10"/>
         <userControls:FOUPFrontView UnitData="{Binding LP2ModuleInfo}"  Canvas.Top="70" Canvas.Left="150"/>
         <userControls:FOUPFrontView UnitData="{Binding LP3ModuleInfo}"  Canvas.Top="70" Canvas.Left="300"/>
-        
-       
-        
-        
+
+        <userControls:EFEMFrontView UnitData="{Binding EFEMModuleInfo}" Title="Efem Robot"  Canvas.Top="280" Canvas.Left="1040"/>
+
+
+
 
         <Canvas Canvas.Top="-150">
             <Viewbox Width="890" Height="890" Canvas.Top="5" Canvas.Left="297" Stretch="Fill">

+ 8 - 8
Venus/Venus_MainPages/Views/OperationOverView.xaml

@@ -34,24 +34,24 @@
                 <Canvas Width="1000" Height="1000">
                     <userControls:MainTM Width="300" Height="250" Canvas.Left="380" Canvas.Top="90"/>
 
-                   
 
 
-                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
-                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
+                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLAESlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
+                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLBESlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
-                    <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}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <userControls:TMChamber x:Name="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <userControls:TMChamber x:Name="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <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}" PMVisibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+
+                    <userControls:TMChamber ModuleName="PMA" 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}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMAIsInstalled}"/>
+                    <userControls:TMChamber ModuleName="PMB" x:Name="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMBIsInstalled}"/>
+                    <userControls:TMChamber ModuleName="PMC" x:Name="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMCIsInstalled}"/>
+                    <userControls:TMChamber ModuleName="PMD" 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}" PMVisibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMDIsInstalled}"/>
 
 
                     
                 </Canvas>
 
             </Viewbox>
-            <userControls:EFEM Width="450" Height="180" Canvas.Left="160" Canvas.Top="480" Aligner1Wafer="{Binding Aligner1Wafer}"/>
+            <userControls:EFEM Width="450" Height="180" Canvas.Left="160" Canvas.Top="482" Aligner1Wafer="{Binding Aligner1Wafer}"/>
 
             <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="310" Canvas.Top="453"   Width="160" Height="240"    RobotTAction="{Binding Robot3TAction}" RobotXAction="{Binding Robot3XAction}"  RobotWafer="{Binding EFEMBladeAWafer}"/>
             <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="310" Canvas.Top="453"   Width="160" Height="240"    RobotTAction="{Binding Robot4TAction}" RobotXAction="{Binding Robot4XAction}"  RobotWafer="{Binding EFEMBladeBWafer}"/>

+ 109 - 26
Venus/Venus_MainPages/Views/TMOperationView.xaml

@@ -39,6 +39,7 @@
                         <Binding Path="TMSoftVentValveIsOpen"/>
                         <Binding Path="TMFastVentValveIsOpen"/>
                         <Binding Path="LLAVentValveIsOpen"/>
+                        <Binding Path="LLAPurgeValveIsOpen"/>
 
                     </MultiBinding>
                 </userControls:FlowPipe.IsFlowing>
@@ -51,8 +52,35 @@
                     </MultiBinding>
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
-            <userControls:FlowPipe   Height="8"  Width="200" Canvas.Left="260" Canvas.Top="255" RotateTransformValue="90" IsFlowing="{Binding LLAVentValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="240" Canvas.Left="260" Canvas.Top="450" IsFlowing="{Binding LLAVentValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="82" Canvas.Left="260" Canvas.Top="255" RotateTransformValue="90">
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLAVentValveIsOpen"/>
+                        <Binding Path="LLAPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="260" Canvas.Top="335" RotateTransformValue="90" IsFlowing="{Binding LLAVentValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="55" Canvas.Left="260" Canvas.Top="335" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="55" Canvas.Left="320" Canvas.Top="340" RotateTransformValue="90" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="256" Canvas.Top="395" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}" IsReverse="True"/>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="260" Canvas.Top="395" RotateTransformValue="90" >
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLAVentValveIsOpen"/>
+                        <Binding Path="LLAPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
+
+            <userControls:FlowPipe   Height="8"  Width="240" Canvas.Left="260" Canvas.Top="450" >
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLAVentValveIsOpen"/>
+                        <Binding Path="LLAPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
             <userControls:FlowPipe   Height="8"  Width="42" Canvas.Left="340" Canvas.Top="256" RotateTransformValue="-90" IsFlowing="{Binding TMFastVentValveIsOpen}"/>
             <userControls:FlowPipe   Height="8"  Width="40" Canvas.Left="348" Canvas.Top="254" RotateTransformValue="90" IsFlowing="{Binding TMSoftVentValveIsOpen}"/>
             <userControls:FlowPipe   Height="8"  Width="124" Canvas.Left="346" Canvas.Top="210" IsFlowing="{Binding TMFastVentValveIsOpen}"/>
@@ -70,9 +98,36 @@
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
             <userControls:FlowPipe   Height="8"  Width="804" Canvas.Left="256" Canvas.Top="50" IsFlowing="{Binding LLBVentValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="394" Canvas.Left="1072" Canvas.Top="54" RotateTransformValue="90" IsFlowing="{Binding LLBVentValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="265" Canvas.Left="800" Canvas.Top="450" IsFlowing="{Binding LLBVentValveIsOpen}" IsReverse="True"/>
-            <userControls:FlowPipe   Height="8"  Width="100" Canvas.Left="657" Canvas.Top="450" RotateTransformValue="90">
+            <userControls:FlowPipe   Height="8"  Width="282" Canvas.Left="1072" Canvas.Top="54" RotateTransformValue="90">
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLBVentValveIsOpen"/>
+                        <Binding Path="LLBPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="1072" Canvas.Top="336" RotateTransformValue="90" IsFlowing="{Binding LLBVentValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="54" Canvas.Left="1072" Canvas.Top="396" RotateTransformValue="90" >
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLBVentValveIsOpen"/>
+                        <Binding Path="LLBPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="1066" Canvas.Top="336" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="58" Canvas.Left="1006" Canvas.Top="334" RotateTransformValue="90" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="1066" Canvas.Top="396" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}" IsReverse="True"/>
+
+            <userControls:FlowPipe   Height="8"  Width="265" Canvas.Left="800" Canvas.Top="450"  IsReverse="True">
+                <userControls:FlowPipe.IsFlowing>
+                    <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
+                        <Binding Path="LLBVentValveIsOpen"/>
+                        <Binding Path="LLBPurgeValveIsOpen"/>
+                    </MultiBinding>
+                </userControls:FlowPipe.IsFlowing>
+            </userControls:FlowPipe>
+            <userControls:FlowPipe   Height="8"  Width="110" Canvas.Left="657" Canvas.Top="440" RotateTransformValue="90">
                 <userControls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
                         <Binding Path="TMSoftPumpValveIsOpen"/>
@@ -165,7 +220,7 @@
                     </MultiBinding>
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
-            <userControls:FlowPipe   Height="8"  Width="40" Canvas.Left="657" Canvas.Top="724" RotateTransformValue="90">
+            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="657" Canvas.Top="724" RotateTransformValue="90">
                 <userControls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
                         <Binding Path="LLASoftPumpValveIsOpen"/>
@@ -175,7 +230,7 @@
                     </MultiBinding>
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
-            <userControls:Pump Canvas.Left="636" Canvas.Top="744" Width="35" Height="35" IsOpen="{Binding RtDataValues[LL.PumpIsRunning],Mode=TwoWay}">
+            <userControls:Pump Canvas.Left="636" Canvas.Top="774" Width="35" Height="35" IsOpen="{Binding RtDataValues[LL.PumpIsRunning],Mode=TwoWay}">
                 <userControls:Pump.ContextMenu>
                     <ContextMenu>
                         <MenuItem Header="ON"  Command="{Binding OpenLLPumpCommand}"  IsChecked="{Binding RtDataValues[LL.PumpIsRunning],Mode=OneWay}" IsEnabled="{Binding RtDataValues[LL.PumpIsRunning],Converter={StaticResource BoolToBool},Mode=OneWay}"/>
@@ -186,8 +241,12 @@
 
             <customControls:CommonValveControl Status="{Binding TMValveN2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="160" Canvas.Top="44"  Tag="TMValveN2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
             <customControls:CommonValveControl Status="{Binding TMFastVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="440" Canvas.Top="204"  Tag="TMFastVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
-            <customControls:CommonValveControl Status="{Binding LLAVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="245.5" Canvas.Top="284"  Tag="LLAVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
-            <customControls:CommonValveControl Status="{Binding LLBVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="1058" Canvas.Top="284"  Tag="LLBVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
+            <customControls:CommonValveControl Status="{Binding LLAVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="245.5" Canvas.Top="360"  Tag="LLAVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
+            <customControls:CommonValveControl Status="{Binding LLAPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="307" Canvas.Top="360"  Tag="LLAPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
+
+            <customControls:CommonValveControl Status="{Binding LLBVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="1058" Canvas.Top="350"   Tag="LLBVentValve"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
+            <customControls:CommonValveControl Status="{Binding LLBPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="992" Canvas.Top="350"  Tag="LLBPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
+
             <customControls:CommonValveControl Status="{Binding TMSoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="603" Canvas.Top="570"  Tag="TMSoftPumpValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
             <customControls:CommonValveControl Status="{Binding TMFastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="683" Canvas.Top="570"  Tag="TMFastPumpValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
             <customControls:CommonValveControl Status="{Binding LLASoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="453" Canvas.Top="650"  Tag="LLASoftPumpValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
@@ -224,13 +283,26 @@
             <userControls:Pipe2    Canvas.Left="512"  Canvas.Top="728" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="180"/>
             <userControls:Pipe2    Canvas.Left="807"  Canvas.Top="715" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90"/>
 
+
+            <userControls:Pipe2    Canvas.Left="307"  Canvas.Top="335" HorizontalAlignment="Left" VerticalAlignment="Top" />
+            <userControls:Pipe2    Canvas.Left="320"  Canvas.Top="390" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
+
+            <userControls:Pipe2    Canvas.Left="1011"  Canvas.Top="396" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="180"/>
+            <userControls:Pipe2    Canvas.Left="998"  Canvas.Top="341" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="270"/>
+
+
+
             <TextBlock  FontSize="15" Canvas.Top="20" Canvas.Left="162" Text="V1"/>
             <TextBlock  FontSize="15" Canvas.Top="180" Canvas.Left="420" Text="Fast Vent"/>
             <TextBlock  FontSize="15" Canvas.Top="310" Canvas.Left="420" Text="Soft Vent"/>
-      
-            <TextBlock  FontSize="15" Canvas.Top="285" Canvas.Left="212" Text="V9"/>
-            <TextBlock  FontSize="15" Canvas.Top="285" Canvas.Left="1090" Text="V15"/>
-            <TextBlock  FontSize="15" Canvas.Top="785" Canvas.Left="625" Text="LL Pump"/>
+
+            <TextBlock  FontSize="15" Canvas.Top="345" Canvas.Left="212" Text="Fast&#x0A;Vent&#x0A; V9"/>
+            <TextBlock  FontSize="15" Canvas.Top="345" Canvas.Left="332" Text="Soft&#x0A;Vent&#x0A; V8"/>
+
+            <TextBlock  FontSize="15" Canvas.Top="335" Canvas.Left="1080" Text="Fast&#x0A;Vent&#x0A;V15"/>
+            <TextBlock  FontSize="15" Canvas.Top="335" Canvas.Left="960" Text="Soft&#x0A;Vent&#x0A;V14"/>
+
+            <TextBlock  FontSize="15" Canvas.Top="808" Canvas.Left="625" Text="LL Pump"/>
             <TextBlock  FontSize="15" Canvas.Top="700" Canvas.Left="620" Text="TM Pump"/>
 
             <TextBlock  FontSize="15" Canvas.Top="565" Canvas.Left="575" Text="Soft&#x0A; V2"/>
@@ -379,6 +451,17 @@
 
             <Ellipse Width="20" Height="20"  Canvas.Left="100" Canvas.Top="44"  Stroke="Silver" StrokeThickness="2" ToolTip="Pressure Alarm" Fill="{Binding RtDataValues[TM.N2PressureSwitch.Value],Converter={StaticResource boolToColor4}}"></Ellipse>
 
+            <Border    BorderBrush="Gray"  BorderThickness="0"  Width="20" Height="6" Canvas.Left="654" Canvas.Top="754" >
+                <Border.Background>
+                    <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
+                        <GradientStop Color="Gray" Offset="0"/>
+                        <GradientStop Color="White"  Offset="0.5"/>
+                        <GradientStop Color="Gray" Offset="1"/>
+                    </LinearGradientBrush>
+                </Border.Background>
+            </Border>
+            <userControls:TextboxWithLabel  Canvas.Left="668" Canvas.Top="729" LabelValue="CM7(Torr)" TextBoxValue="{Binding RtDataValues[TM.LoadlockForelineGauge.Value],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
+            
         </Canvas>
         
         <Canvas Canvas.Top="74" Canvas.Left="140" Width="450" Height="800">
@@ -387,10 +470,10 @@
             <userControls:LoadLockRight  Width="150" Height="150" Canvas.Top="309"  Canvas.Left="519"    DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLBESlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
 
-            <userControls:TMChamber x:Name="PMA" ModuleName="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="Collapsed"/>
-            <userControls:TMChamber x:Name="PMB" ModuleName="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="Collapsed"/>
-            <userControls:TMChamber x:Name="PMC" ModuleName="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="Collapsed"/>
-            <userControls:TMChamber x:Name="PMD" ModuleName="PMD" Canvas.Top="160"  Canvas.Left="788" Width="140" Height="140" RotateTransformValue="90"   DoorIsOpen="{Binding RtDataValues[PMD.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMDWafer}" PMVisibility="Collapsed"/>
+            <userControls:TMChamber x:Name="PMA" ModuleName="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="Collapsed" IsEnabled="{Binding PMAIsInstalled}"/>
+            <userControls:TMChamber x:Name="PMB" ModuleName="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="Collapsed" IsEnabled="{Binding PMBIsInstalled}"/>
+            <userControls:TMChamber x:Name="PMC" ModuleName="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="Collapsed" IsEnabled="{Binding PMCIsInstalled}"/>
+            <userControls:TMChamber x:Name="PMD" ModuleName="PMD" Canvas.Top="160"  Canvas.Left="788" Width="140" Height="140" RotateTransformValue="90"   DoorIsOpen="{Binding RtDataValues[PMD.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMDWafer}" PMVisibility="Collapsed" IsEnabled="{Binding PMDIsInstalled}"/>
         </Canvas>
         <customControls:CommonValveControl Status="{Binding TMSoftVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="440" Canvas.Top="284"  Tag="TMSoftVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="True"/>
         <!--<TextBlock  FontSize="15" Canvas.Top="260" Canvas.Left="350" Text="Pressure(mTorr)"/>
@@ -529,14 +612,14 @@
                                 </i:EventTrigger>
                             </i:Interaction.Triggers>
                         </RadioButton>
-
+                        <customControls:PathButton Content="Start"  Width="80" Height="28" VerticalAlignment="Center" Margin="0,-9,0,0" Command="{Binding PurgeCommand}"/>
                     </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.RowDefinitions>
                         <RowDefinition/>
-                        <RowDefinition/>
+                        <!--<RowDefinition/>-->
                         <RowDefinition/>
 
                     </Grid.RowDefinitions>
@@ -550,13 +633,13 @@
                         <ColumnDefinition/>
 
                     </Grid.ColumnDefinitions>
-                    <TextBlock Text="Base Pressure"   Padding="6,7,0,5" Background="#D0D8E8"/>
+                    <!--<TextBlock Text="Base Pressure"   Padding="6,7,0,5" Background="#D0D8E8"/>
                     <TextBox  Grid.Column="1" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Text="{Binding RobotAction2,UpdateSourceTrigger=PropertyChanged}"/>
                     <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,UpdateSourceTrigger=PropertyChanged}"/>
                     <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,UpdateSourceTrigger=PropertyChanged}"/>
-                    <customControls:PathButton Content="Start"  Width="80" Height="28" VerticalAlignment="Center"  Grid.Column="6" />
+                    <TextBox  Grid.Column="5" BorderThickness="0"  VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Text="{Binding RobotTarget,UpdateSourceTrigger=PropertyChanged}"/>-->
+                    
 
                     <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" 
@@ -649,11 +732,11 @@
                         <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource boolToColor}}"  Canvas.Left="380" Canvas.Top="10" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
                         <Button Width="130" Height="25" Content="PMA Door Closed"                                               Canvas.Left="410" Canvas.Top="10" Style="{StaticResource SysBtnStyle}" Command="{Binding DoorUpDownCommand}" CommandParameter="PMA.SlitDoor.Close" IsEnabled="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
 
-                        <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource boolToColor2}}"  Canvas.Left="180" Canvas.Top="40" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                        <Button Width="130" Height="25" Content="PMB Door Open"                                               Canvas.Left="210" Canvas.Top="40" Style="{StaticResource SysBtnStyle}"  Command="{Binding DoorUpDownCommand}" CommandParameter="PMB.SlitDoor.Open" IsEnabled="{Binding RtDataValues[PMB.IsSlitDoorClosed]}" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+                        <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource boolToColor2}}"  Canvas.Left="180" Canvas.Top="40" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+                        <Button Width="130" Height="25" Content="PMB Door Open"                                               Canvas.Left="210" Canvas.Top="40" Style="{StaticResource SysBtnStyle}"  Command="{Binding DoorUpDownCommand}" CommandParameter="PMB.SlitDoor.Open" IsEnabled="{Binding RtDataValues[PMB.IsSlitDoorClosed]}" Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
 
-                        <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource boolToColor}}"  Canvas.Left="380" Canvas.Top="40" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                        <Button Width="130" Height="25" Content="PMB Door Closed"                                               Canvas.Left="410" Canvas.Top="40" Style="{StaticResource SysBtnStyle}" Command="{Binding DoorUpDownCommand}" CommandParameter="PMB.SlitDoor.Close" IsEnabled="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+                        <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource boolToColor}}"  Canvas.Left="380" Canvas.Top="40" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+                        <Button Width="130" Height="25" Content="PMB Door Closed"                                               Canvas.Left="410" Canvas.Top="40" Style="{StaticResource SysBtnStyle}" Command="{Binding DoorUpDownCommand}" CommandParameter="PMB.SlitDoor.Close" IsEnabled="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
 
                         <Ellipse Width="22" Height="22" Fill="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource boolToColor2}}"  Canvas.Left="180" Canvas.Top="70" Stroke="Silver" StrokeThickness="2" Visibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
                         <Button Width="130" Height="25" Content="PMC Door Open"                                               Canvas.Left="210" Canvas.Top="70" Style="{StaticResource SysBtnStyle}"  Command="{Binding DoorUpDownCommand}" CommandParameter="PMC.SlitDoor.Open" IsEnabled="{Binding RtDataValues[PMC.IsSlitDoorClosed]}" Visibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>

+ 4 - 4
Venus/Venus_MainPages/Views/TMView.xaml

@@ -236,10 +236,10 @@
                     <userControls:LoadLockRight  Width="150" Height="150" Canvas.Top="309"  Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Door2IsOpen="{Binding RtDataValues[TM.LLBESlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
 
-                    <userControls:TMChamber x:Name="PMA" ModuleName="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <userControls:TMChamber x:Name="PMB" ModuleName="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <userControls:TMChamber x:Name="PMC" ModuleName="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-                    <userControls:TMChamber x:Name="PMD" ModuleName="PMD" Canvas.Top="160"  Canvas.Left="788" Width="140" Height="140" RotateTransformValue="90"   DoorIsOpen="{Binding RtDataValues[PMD.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMDWafer}" PMVisibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+                    <userControls:TMChamber x:Name="PMA" ModuleName="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMAIsInstalled}"/>
+                    <userControls:TMChamber x:Name="PMB" ModuleName="PMB" Canvas.Top="28"   Canvas.Left="315" Width="140" Height="140" RotateTransformValue="-28"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMBIsInstalled}"/>
+                    <userControls:TMChamber x:Name="PMC" ModuleName="PMC" Canvas.Top="-38"  Canvas.Left="588" Width="140" Height="140" RotateTransformValue="30"   DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMCIsInstalled}"/>
+                    <userControls:TMChamber x:Name="PMD" ModuleName="PMD" Canvas.Top="160"  Canvas.Left="788" Width="140" Height="140" RotateTransformValue="90"   DoorIsOpen="{Binding RtDataValues[PMD.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMDWafer}" PMVisibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding PMDIsInstalled}"/>
                 </Canvas>
             </Viewbox>
         </Canvas>

BIN
Venus/Venus_RT/Config/DeviceModelVenus_MF.xml


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

@@ -122,8 +122,8 @@
 
 		<config default="1" name="CheckLoadStation" nameView="Check Load Station Number" description="Station Number for Check Load" max="99" min="0" paramter="" tag="" unit="" type="Integer" />
 		
-		<config default="100" name="PumpBasePressure" nameView="Pump Base Pressure" description="" max="2000" min="0" paramter="" tag="" unit="mTorr" type="Double" />
-		<config default="2000" name="PumpCrossingPressure" nameView="Pump Crossing Pressure" description="" max="500000" min="200" paramter="" tag="" unit="mTorr" type="Double" />
+		<config default="100" name="PumpBasePressure" nameView="Pump Base Pressure" description="" max="200" min="0" paramter="" tag="" unit="mTorr" type="Double" />
+		<config default="2000" name="PumpCrossingPressure" nameView="Pump Crossing Pressure" description="" max="300000" min="200" paramter="" tag="" unit="mTorr" type="Double" />
 		<config default="60" name="PumpingTimeout" nameView="Pumping Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="60" name="VentingTimeout" nameView="Venting Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 
@@ -168,6 +168,7 @@
 		<config default="2000" name="PumpCrossingPressure" nameView="Pump Crossing Pressure" description="" max="500000" min="200" paramter="" tag="" unit="mTorr" type="Double" />
 		<config default="60" name="PumpingTimeout" nameView="Pumping Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="60" name="VentingTimeout" nameView="Venting Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
+		<config default="100" name="SoftVentEndPressure" nameView="Soft Vent End Pressure" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
 
 		<config default="2000" name="PurgeVentPressure" description="Purge Vent Pressure" max="760000" min="0" paramter="" tag="" unit="mTorr" type="Double" />
 		<config default="30" name="PurgeCycleCount" description="Purge Cycle Count" max="200" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -192,6 +193,7 @@
 		<config default="2000" name="PumpCrossingPressure" nameView="Pump Crossing Pressure" description="" max="500000" min="200" paramter="" tag="" unit="mTorr" type="Double" />
 		<config default="60" name="PumpingTimeout" nameView="Pumping Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="60" name="VentingTimeout" nameView="Venting Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
+		<config default="100" name="SoftVentEndPressure" nameView="Soft Vent End Pressure" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
 
 		<config default="2000" name="PurgeVentPressure" description="Purge Vent Pressure" max="760000" min="0" paramter="" tag="" unit="mTorr" type="Double" />
 		<config default="30" name="PurgeCycleCount" description="Purge Cycle Count" max="200" min="0" paramter="" tag="" unit="" type="Integer" />

+ 10 - 6
Venus/Venus_RT/Devices/DeviceManager.cs

@@ -154,14 +154,18 @@ namespace Venus_RT.Instances
             AddCustomModuleDevice(new AdixenTurboPump(mod));
             AddCustomModuleDevice(new PendulumValve(mod));
 
-            if(SC.GetValue<int>($"{mod}.EPD.EPDType") == 0)
+            if (SC.GetValue<bool>($"{mod}.EPD.IsEnabled") == true)
             {
-                AddCustomModuleDevice(new EPDClient(mod));
-            }
-            else
-            {
-                AddCustomModuleDevice(new EPDDevice (mod));
+                if (SC.GetValue<int>($"{mod}.EPD.EPDType") == 0)
+                {
+                    AddCustomModuleDevice(new EPDClient(mod));
+                }
+                else
+                {
+                    AddCustomModuleDevice(new EPDDevice(mod));
+                }
             }
+           
             
             //AddCustomDevice(new JetPM(mod));
 

+ 1 - 1
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -276,7 +276,7 @@ namespace Venus_RT.Devices
             });
             OP.Subscribe($"{Module}.EndPoint.SearchCfg", (cmd, args) =>
             {
-                _epdClient.QueryConfigList();
+                _epdClient?.QueryConfigList();
                 return true;
             });
         }

+ 19 - 2
Venus/Venus_RT/Devices/TM/JetTM.cs

@@ -48,6 +48,12 @@ namespace Venus_RT.Devices
         private readonly IoValve _LLAFastPumpValve;
         private readonly IoValve _LLAPurgeValve;
         private readonly IoValve _LLAVentValve;
+
+        private readonly IoValve _LLASoftVentValve;
+        private readonly IoValve _LLAFastVentValve;
+        private readonly IoValve _LLBSoftVentValve;
+        private readonly IoValve _LLBFastVentValve;
+
         private readonly IoValve _LLBSoftPumpValve;
         private readonly IoValve _LLBFastPumpValve;
         private readonly IoValve _LLBPurgeValve;
@@ -173,7 +179,14 @@ namespace Venus_RT.Devices
             _LLAFastPumpValve   = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAFastPumpValve}");
             _LLAPurgeValve      = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAPurgeValve}");
             _LLAVentValve       = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAVentValve}");
-            _LLBSoftPumpValve   = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBSoftPumpValve}");
+
+            _LLASoftVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLASoftVentValve}");
+            _LLAFastVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAFastVentValve}");
+            _LLBSoftVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBSoftVentValve}");
+            _LLBFastVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBFastVentValve}");
+
+
+            _LLBSoftPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBSoftPumpValve}");
             _LLBFastPumpValve   = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBFastPumpValve}");
             _LLBPurgeValve      = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBPurgeValve}");
             _LLBVentValve       = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBVentValve}");
@@ -270,6 +283,7 @@ namespace Venus_RT.Devices
             _WaferRelayValve.TurnValve(_WaferLeakSensor.Value, out string _);
         }
 
+        
         public void TurnSoftPumpValve(ModuleName mod, bool bOn)
         {
             switch(mod)
@@ -305,7 +319,8 @@ namespace Venus_RT.Devices
 
         public void TurnVentValve(ModuleName mod, bool bOn)
         {
-            switch(mod)
+            _TMN2Valve.TurnValve(bOn, out string _);
+            switch (mod)
             {
                 case ModuleName.TM:
                     _TMSoftVentValve.TurnValve(bOn, out string _);
@@ -319,6 +334,8 @@ namespace Venus_RT.Devices
             }
         }
 
+      
+
         public void TurnPurgeValve(ModuleName mod, bool bOn)
         {
             switch(mod)

+ 1 - 1
Venus/Venus_RT/Modules/LLs/LLEntity.cs

@@ -157,7 +157,7 @@ namespace Venus_RT.Modules
             Transition(STATE.Pumping,           MSG.Abort,          FnAbortPump,        STATE.Idle);
 
             // Purge sequence
-            Transition(STATE.Idle,              MSG.CyclePurge,     FnStartPurge,       STATE.Purging);
+            Transition(STATE.Idle,              MSG.Purge,     FnStartPurge,       STATE.Purging);
             Transition(STATE.Purging,           FSM_MSG.TIMER,      FnPurgeTimeout,     STATE.Idle);
             Transition(STATE.Purging,           MSG.Abort,          FnAbortPurge,       STATE.Idle);
 

+ 34 - 4
Venus/Venus_RT/Modules/TM/MFVentRoutine.cs

@@ -12,10 +12,14 @@ namespace Venus_RT.Modules.TM
         private enum VentStep
         {
             kVenting,
+            kOpenSoftVent,
+            KSwitchFastVent,
+            KDelay2S,
             kCloseVentValves,
         }
 
         private int _ventingTimeout;
+        private int _SoftVentEndPressure;
         private readonly JetTM _JetTM;
         public MFVentRoutine(JetTM jetTM, ModuleName mod) : base(mod)
         {
@@ -31,7 +35,7 @@ namespace Venus_RT.Modules.TM
             {
                 Reset();
                 _ventingTimeout = SC.GetValue<int>($"{Module}.VentingTimeout") * 1000;
-
+                _SoftVentEndPressure= SC.GetValue<int>($"{Module}.SoftVentEndPressure");
                 return Runner.Start(Module, Name);
             }
 
@@ -40,12 +44,34 @@ namespace Venus_RT.Modules.TM
 
         public RState Monitor()
         {
-            Runner.Run((int)VentStep.kVenting,          OpenVentValve,      IsPressureReady,    _ventingTimeout)
-                .End((int)VentStep.kCloseVentValves,    CloseVentValve,     _delay_50ms);
+            //Runner.Run((int)VentStep.kVenting,          OpenVentValve,      IsPressureReady,    _ventingTimeout)
+            //    .End((int)VentStep.kCloseVentValves,    CloseVentValve,     _delay_50ms);
+
+            Runner.Run((int)VentStep.kOpenSoftVent, OpenSoftVentValve, IsSoftVentEnd)
+                  .Run((int)VentStep.KSwitchFastVent,SwitchFastVentValve, IsPressureReady)
+                  .Delay((int)VentStep.KDelay2S, 2*1000)
+                  .End((int)VentStep.kCloseVentValves, CloseVentValve, _delay_50ms);
 
             return Runner.Status;
         }
 
+        private bool OpenSoftVentValve()
+        {
+            _JetTM.TurnN2Valve(true);
+            _JetTM.TurnPurgeValve(Module, true);
+            return true;
+        }
+        private bool IsSoftVentEnd()
+        {
+           return _JetTM.GetModulePressure(Module) > _SoftVentEndPressure;
+        }
+        private bool SwitchFastVentValve()
+        {
+            _JetTM.TurnPurgeValve(Module, false);
+
+            _JetTM.TurnVentValve(Module, true);
+            return true;
+        }
         private bool OpenVentValve()
         {
             if(!IsPressureReady())
@@ -58,7 +84,11 @@ namespace Venus_RT.Modules.TM
 
         private bool CloseVentValve()
         {
-            _JetTM.TurnVentValve(Module, false);
+             _JetTM.TurnN2Valve(false);
+             _JetTM.TurnPurgeValve(Module, false);
+             _JetTM.TurnVentValve(Module, false);
+
+            // _JetTM.TurnVentValve(Module, false);
             return true;
         }
 

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

@@ -211,7 +211,7 @@ namespace Venus_RT.Modules
             Transition(STATE.Pumping,           MSG.Abort,          FnAbortPump,        STATE.Idle);
 
             // Purge sequence
-            Transition(STATE.Idle,              MSG.CyclePurge,     FnStartPurge,       STATE.Purging);
+            Transition(STATE.Idle,              MSG.Purge,     FnStartPurge,       STATE.Purging);
             Transition(STATE.Purging,           FSM_MSG.TIMER,      FnPurgeTimeout,     STATE.Idle);
             Transition(STATE.Purging,           MSG.Abort,          FnAbortPurge,       STATE.Idle);
 

+ 7 - 26
Venus/Venus_Themes/UserControls/EFEMFrontView.xaml

@@ -6,13 +6,13 @@
              xmlns:local="Venus_Themes.UserControls"
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
              xmlns:cal="http://www.caliburn.org"     
-             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation" >
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation" x:Name="robotFrontView">
     <Grid x:Name="EFEM" HorizontalAlignment="Center" VerticalAlignment="Center">
         <Grid.RowDefinitions>
             <RowDefinition Height="Auto"/>
             <RowDefinition />
         </Grid.RowDefinitions>
-        <TextBlock Text="EFEM Front View" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center" HorizontalAlignment="Center">
+        <TextBlock Text="{Binding ElementName=robotFrontView,Path=Title}" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center" HorizontalAlignment="Center">
             <TextBlock.Style>
                 <Style>
                     <Style.Triggers>
@@ -48,8 +48,8 @@
                     </Grid.ColumnDefinitions>
                     <TextBlock Text="Upper" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,7,0,10"/>
                     <StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
-                        <ctrl:Slot ViewType="Front" x:Name="EFEMUpper" Width="100" DataContext="{Binding UnitData.WaferManager.Wafers[0],RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Top">
-                     
+                        <ctrl:Slot ViewType="Front" Cursor="Hand" x:Name="EFEMUpper" DataContext="{ Binding ElementName=robotFrontView,Path=UnitData.WaferManager.Wafers[1]}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Top" SlotMouseButtonDown="Slot_SlotMouseButtonDown">
+
                         </ctrl:Slot>
                         <Rectangle Width="30" Height="3" Fill="{DynamicResource FOUP_PathBG}" Margin="0,2,0,0"  RadiusX="0.5" RadiusY="0.5">
                             <Rectangle.Effect>
@@ -59,34 +59,15 @@
                     </StackPanel>
                     <TextBlock Grid.Row="1" Text="Lower" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,10,0,7"/>
                     <StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
-                        <ctrl:Slot ViewType="Front" x:Name="EFEMLower2" Width="100" Margin="0,10,0,0" DataContext="{Binding UnitData.WaferManager.Wafers[1],RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Top">
-                           
+                        <ctrl:Slot ViewType="Front" Cursor="Hand" x:Name="EFEMLower" DataContext="{Binding UnitData.WaferManager.Wafers[0],RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Top" SlotMouseButtonDown="Slot_SlotMouseButtonDown">
+       
                         </ctrl:Slot>
                         <Rectangle Width="30" Height="3" Fill="{DynamicResource FOUP_PathBG}" Margin="0,2,0,0"  RadiusX="0.5" RadiusY="0.5">
                             <Rectangle.Effect>
                                 <DropShadowEffect Direction="270" BlurRadius="0" ShadowDepth="1"/>
                             </Rectangle.Effect>
                         </Rectangle>
-                        <!--<ctrl:Slot ViewType="Front" x:Name="EFEMLower1" Width="100" Margin="0,10,0,0" DataContext="{Binding UnitData.WaferManager.Wafers[0],RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Top">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="SlotMouseButtonDown">
-                                    <cal:ActionMessage MethodName="OnMouseUp">
-                                        <cal:Parameter Value="$source" />
-                                        <cal:Parameter Value="$eventargs" />
-                                    </cal:ActionMessage>
-                                </i:EventTrigger>
-                                <i:EventTrigger EventName="WaferTransferStarted">
-                                    <cal:ActionMessage MethodName="OnWaferTransfer">
-                                        <cal:Parameter Value="$eventargs" />
-                                    </cal:ActionMessage>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ctrl:Slot>
-                        <Rectangle Width="30" Height="3" Fill="{DynamicResource FOUP_PathBG}" Margin="0,2,0,0" RadiusX="0.5" RadiusY="0.5">
-                            <Rectangle.Effect>
-                                <DropShadowEffect Direction="270" BlurRadius="0" ShadowDepth="1"/>
-                            </Rectangle.Effect>
-                        </Rectangle>-->
+
                     </StackPanel>
                 </Grid>
             </Grid>

+ 16 - 0
Venus/Venus_Themes/UserControls/EFEMFrontView.xaml.cs

@@ -14,6 +14,8 @@ using System.Windows.Navigation;
 using System.Windows.Shapes;
 
 using OpenSEMI.ClientBase;
+using OpenSEMI.Ctrlib.Controls;
+using Venus_Core;
 
 namespace Venus_Themes.UserControls
 {
@@ -43,6 +45,20 @@ namespace Venus_Themes.UserControls
         }
         public static readonly DependencyProperty ShowTitleProperty =
             DependencyProperty.Register("ShowTitle", typeof(bool), typeof(EFEMFrontView), new UIPropertyMetadata(true));
+
+
+        public string Title
+        {
+            get { return (string)GetValue(TitleProperty); }
+            set { SetValue(TitleProperty, value); }
+        }
+        public static readonly DependencyProperty TitleProperty =
+            DependencyProperty.Register("Title", typeof(string), typeof(EFEMFrontView));
+
+        private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            VenusGlobalEvents.OnSlotRightClickChanged(sender as Slot);
+        }
         #endregion  
     }
 }

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

@@ -72,7 +72,7 @@
                                                     </i:EventTrigger>
                                                 </i:Interaction.Triggers>-->
                                             </controls:Slot>
-                                            <TextBlock x:Name="Foup_Text" HorizontalAlignment="Center" Grid.Column="1" TextWrapping="Wrap" Text="{Binding SlotIndex}" Background="#FF646464" Foreground="White" VerticalAlignment="Bottom" FontFamily="Arial" FontSize="10" Width="13" TextAlignment="Center">
+                                            <TextBlock x:Name="Foup_Text" HorizontalAlignment="Center" Grid.Column="1" TextWrapping="Wrap" Text="{Binding SlotIndex}" Background="#FF646464" Foreground="White" VerticalAlignment="Bottom" FontFamily="Arial" FontSize="10" Width="13" TextAlignment="Center" >
                                             </TextBlock>
                                         </Grid>
                                         <DataTemplate.Triggers>

+ 26 - 21
Venus/Venus_Themes/UserControls/LoadLockLeft.xaml

@@ -3,10 +3,8 @@
              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_Themes.UserControls"
-             
-             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
-             
+             xmlns:local="clr-namespace:Venus_Themes.UserControls"         
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"          
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800" Name="LeftLoadLock" Opacity="0.9">
     <UserControl.Resources>
@@ -70,31 +68,31 @@
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="28" CenterX="95" CenterY="10"/>
                 </Rectangle.RenderTransform>
+              
             </Rectangle>
-            <Rectangle Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="27">
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="27">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="28" CenterX="95" CenterY="10"/>
                 </Rectangle.RenderTransform>
-               
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
             </Rectangle>
-            <Rectangle Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="27">
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="27">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="210" CenterX="95" CenterY="10"/>
                 </Rectangle.RenderTransform>
-                
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
             </Rectangle>
-            <!--<Path  Stroke="Black"  Canvas.Top="15" Canvas.Left="-34">
-                <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 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" />
-                        <PathGeometry Figures="M 150,100 A 30,30 1 1 1 150,99.9" />
-                    </GeometryGroup>
-                </Path.Data>
-            </Path>-->
+
             <Viewbox Stretch="Uniform" Width="190" Height="190" Canvas.Top="5" Canvas.Left="-15">
 
                 <Canvas UseLayoutRounding="False"  Width="93.693" Height="112.5" HorizontalAlignment="Left" VerticalAlignment="Top">
@@ -130,7 +128,14 @@
             </Viewbox>
 
             <Rectangle  Fill="Silver" Width="162"   VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1" Visibility="{Binding ElementName=LeftLoadLock,Path=Door2IsVisibility}"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1" Visibility="{Binding ElementName=LeftLoadLock,Path=Door2IsVisibility}"/>
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1" Visibility="{Binding ElementName=LeftLoadLock,Path=Door2IsVisibility}">
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor2_Click"    IsChecked="{Binding Door2IsOpen}" IsEnabled="{Binding Door2IsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor2_Click"    IsChecked="{Binding Door2IsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding Door2IsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
+            </Rectangle>
 
             <TextBlock Text="LLA" FontSize="35" Canvas.Left="-70" Canvas.Top="50"/>
         </Canvas>

+ 21 - 0
Venus/Venus_Themes/UserControls/LoadLockLeft.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
+using Venus_Themes.Unity;
 
 namespace Venus_Themes.UserControls
 {
@@ -68,5 +69,25 @@ namespace Venus_Themes.UserControls
             get => (WaferInfo)GetValue(RobotWaferProperty);
             set => SetValue(RobotWaferProperty, value);
         }
+        private void OpenDoor_Click(object sender, RoutedEventArgs e)
+        {
+            //var t = ((((this.Parent as Canvas).Parent as Canvas).Parent as UserControl).DataContext).;
+            UIEvents.OnLLTDoorRaiseChanged(new DoorPara() { ModuleName = "LLA", IsOpen = "Open" });
+        }
+
+        private void CloseDoor_Click(object sender, RoutedEventArgs e)
+        {
+            UIEvents.OnLLTDoorRaiseChanged(new DoorPara() { ModuleName = "LLA", IsOpen = "Close" });
+        }
+        private void OpenDoor2_Click(object sender, RoutedEventArgs e)
+        {
+            //var t = ((((this.Parent as Canvas).Parent as Canvas).Parent as UserControl).DataContext).;
+            UIEvents.OnLLEDoorRaiseChanged(new DoorPara() { ModuleName = "LLA", IsOpen = "Open" });
+        }
+
+        private void CloseDoor2_Click(object sender, RoutedEventArgs e)
+        {
+            UIEvents.OnLLEDoorRaiseChanged(new DoorPara() { ModuleName = "LLA", IsOpen = "Close" });
+        }
     }
 }

+ 21 - 5
Venus/Venus_Themes/UserControls/LoadLockRight.xaml

@@ -69,17 +69,27 @@
                 </Rectangle.RenderTransform>
 
             </Rectangle>
-            <Rectangle Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="-18">
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="-18">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="-30" CenterX="95" CenterY="10"/>
                 </Rectangle.RenderTransform>
-               
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
             </Rectangle>
-            <Rectangle Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="-18">
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}" Fill="DimGray"   VerticalAlignment="Top"    Height="20"  Canvas.Top="28" Canvas.Left="-18">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="-210" CenterX="95" CenterY="10"/>
                 </Rectangle.RenderTransform>
-                
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
             </Rectangle>
             <!--<Path  Stroke="Black"  Canvas.Top="15" >
                 <Path.Data>
@@ -128,10 +138,16 @@
                 </ctrl:Slot>
             </Viewbox>
             <Rectangle  Fill="Silver" Width="162"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="39" Visibility="{Binding ElementName=RightLoadLock,Path=Door2IsVisibility}"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"  Visibility="{Binding ElementName=RightLoadLock,Path=Door2IsVisibility}">
+            <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"  Visibility="{Binding ElementName=RightLoadLock,Path=Door2IsVisibility}">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="180" CenterX="71" CenterY="10"/>
                 </Rectangle.RenderTransform>
+                <Rectangle.ContextMenu >
+                    <ContextMenu>
+                        <MenuItem Header="Open Door"  Click="OpenDoor2_Click"    IsChecked="{Binding Door2IsOpen}" IsEnabled="{Binding Door2IsOpen,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Close Door" Click="CloseDoor2_Click"    IsChecked="{Binding Door2IsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding Door2IsOpen}"/>
+                    </ContextMenu>
+                </Rectangle.ContextMenu>
             </Rectangle>
             <TextBlock Text="LLB" FontSize="35" Canvas.Left="210" Canvas.Top="50"/>
 

+ 21 - 0
Venus/Venus_Themes/UserControls/LoadLockRight.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
+using Venus_Themes.Unity;
 
 namespace Venus_Themes.UserControls
 {
@@ -66,5 +67,25 @@ namespace Venus_Themes.UserControls
             get => (WaferInfo)GetValue(RobotWaferProperty);
             set => SetValue(RobotWaferProperty, value);
         }
+        private void OpenDoor_Click(object sender, RoutedEventArgs e)
+        {
+            //var t = ((((this.Parent as Canvas).Parent as Canvas).Parent as UserControl).DataContext).;
+            UIEvents.OnLLTDoorRaiseChanged(new DoorPara() { ModuleName = "LLB", IsOpen = "Open" });
+        }
+
+        private void CloseDoor_Click(object sender, RoutedEventArgs e)
+        {
+            UIEvents.OnLLTDoorRaiseChanged(new DoorPara() { ModuleName = "LLB", IsOpen = "Close" });
+        }
+        private void OpenDoor2_Click(object sender, RoutedEventArgs e)
+        {
+            //var t = ((((this.Parent as Canvas).Parent as Canvas).Parent as UserControl).DataContext).;
+            UIEvents.OnLLEDoorRaiseChanged(new DoorPara() { ModuleName = "LLB", IsOpen = "Open" });
+        }
+
+        private void CloseDoor2_Click(object sender, RoutedEventArgs e)
+        {
+            UIEvents.OnLLEDoorRaiseChanged(new DoorPara() { ModuleName = "LLB", IsOpen = "Close" });
+        }
     }
 }

+ 10 - 10
Venus/Venus_Themes/UserControls/TMChamber.xaml

@@ -96,22 +96,22 @@
 
                 <Rectangle Fill="Silver"  Width="200" VerticalAlignment="Top"    Height="20"    Canvas.Top="200" Canvas.Left="-2"/>
 
-                <Rectangle DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"    Canvas.Top="200" Canvas.Left="-2" Name="door1">
-                    <Rectangle.ContextMenu>
-                        <ContextMenu >
-                            <MenuItem Header="Open Door"   Command="{Binding ChamberDoorOpenCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:TMChamber},Path=ModuleName}"  IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen}"/>
-                            <MenuItem Header="Close Door"  Command="{Binding ChamberDoorCloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:TMChamber},Path=ModuleName}" IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen}"/>
+                <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"    Canvas.Top="200" Canvas.Left="-2" Name="door1">
+                    <Rectangle.ContextMenu >
+                        <ContextMenu>
+                            <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                            <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
                         </ContextMenu>
                     </Rectangle.ContextMenu>
                 </Rectangle>
-                <Rectangle  Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"    Canvas.Top="200" Canvas.Left="-2" Name="door2">
+                <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}"  Fill="DimGray"   VerticalAlignment="Top"    Height="20"    Canvas.Top="200" Canvas.Left="-2" Name="door2">
                     <Rectangle.RenderTransform >
                         <RotateTransform CenterX="102" CenterY="10" Angle="180"/>
                     </Rectangle.RenderTransform>
-                    <Rectangle.ContextMenu>
-                        <ContextMenu >
-                            <MenuItem Header="Open Door"   Command="{Binding ChamberDoorOpenCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:TMChamber},Path=ModuleName}"  IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen}"/>
-                            <MenuItem Header="Close Door"  Command="{Binding ChamberDoorCloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:TMChamber},Path=ModuleName}" IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Path=DoorIsOpen}"/>
+                    <Rectangle.ContextMenu >
+                        <ContextMenu>
+                            <MenuItem Header="Open Door"  Click="OpenDoor_Click"    IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
+                            <MenuItem Header="Close Door" Click="CloseDoor_Click"    IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
                         </ContextMenu>
                     </Rectangle.ContextMenu>
                 </Rectangle>

+ 11 - 1
Venus/Venus_Themes/UserControls/TMChamber.xaml.cs

@@ -1,7 +1,7 @@
 using OpenSEMI.ClientBase;
 using System.Windows;
 using System.Windows.Controls;
-
+using Venus_Themes.Unity;
 
 namespace Venus_Themes.UserControls
 {
@@ -61,5 +61,15 @@ namespace Venus_Themes.UserControls
             }
         }
 
+        private void OpenDoor_Click(object sender, RoutedEventArgs e)
+        {
+            //var t = ((((this.Parent as Canvas).Parent as Canvas).Parent as UserControl).DataContext).;
+            UIEvents.OnPMDoorRaiseChanged(new DoorPara() { ModuleName = ModuleName, IsOpen = "Open" });
+        }
+
+        private void CloseDoor_Click(object sender, RoutedEventArgs e)
+        {
+            UIEvents.OnPMDoorRaiseChanged(new DoorPara() { ModuleName = ModuleName, IsOpen = "Close" });
+        }
     }
 }

+ 1 - 0
Venus/Venus_Themes/Venus_Themes.csproj

@@ -103,6 +103,7 @@
     <Compile Include="Themes\Attach\ElementBrushBase.cs" />
     <Compile Include="Themes\Attach\ElementForeground.cs" />
     <Compile Include="Themes\Attach\IconElement.cs" />
+    <Compile Include="unity\UIEvents.cs" />
     <Compile Include="UserControls\ButterflyValve.xaml.cs">
       <DependentUpon>ButterflyValve.xaml</DependentUpon>
     </Compile>

+ 35 - 0
Venus/Venus_Themes/unity/UIEvents.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_Themes.Unity
+{
+    public static class UIEvents
+    {
+        
+        public static event Action<DoorPara> PMDoorRaiseChangedEvent;
+        public static void OnPMDoorRaiseChanged(DoorPara para)
+        {
+            PMDoorRaiseChangedEvent?.Invoke(para);
+        }
+
+        public static event Action<DoorPara> LLTDoorRaiseChangedEvent;
+        public static void OnLLTDoorRaiseChanged(DoorPara para)
+        {
+            LLTDoorRaiseChangedEvent?.Invoke(para);
+        }
+
+        public static event Action<DoorPara> LLEDoorRaiseChangedEvent;
+        public static void OnLLEDoorRaiseChanged(DoorPara para)
+        {
+            LLEDoorRaiseChangedEvent?.Invoke(para);
+        }
+    }
+    public class DoorPara
+    {
+        public string ModuleName { get; set; }
+        public string IsOpen { get; set; }
+    }
+}