Browse Source

添加PM与部分loadlock与rt交互功能

lixiang 2 years ago
parent
commit
bad994820a

+ 2 - 1
Venus/Venus_Core/VenusDevice.cs

@@ -172,6 +172,7 @@
         LockLid,
         UnlockLid,
         StartPump,
+        StartTurboPump,
         Pump,
         StopPump,
 
@@ -191,7 +192,7 @@
         RfPower,
 
         Vent,
-
+        VentLoadLock,
         Purge,
 
         Abort,

+ 25 - 12
Venus/Venus_MainPages/ViewModels/OverViewModel.cs

@@ -341,9 +341,14 @@ namespace Venus_MainPages.ViewModels
 
         private void OnRf()
         {
-            closeAllValve();
-            IsATM = !IsATM;
-            
+            //closeAllValve();
+            //IsATM = !IsATM;
+            if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "RfPowering")
+            {
+                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
+                return;
+            }
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.RfPower}");
         }
 
         private void OnPurge()
@@ -355,7 +360,7 @@ namespace Venus_MainPages.ViewModels
             //});
             if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Purge")
             {
-                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
+                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
             }
             else
             {
@@ -365,16 +370,23 @@ namespace Venus_MainPages.ViewModels
 
         private void OnVent()
         {
-            closeAllValve();
+            //closeAllValve();
 
-            Task.Run(() =>
+            //Task.Run(() =>
+            //{
+            //    //System.Threading.Thread.Sleep(100);
+            //    VN2Valve2IsOpen = true;
+            //    VN2Valve3IsOpen = true;
+            //    GasFinalValveIsOpen = true;
+            //});
+            if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Venting")
             {
-                //System.Threading.Thread.Sleep(100);
-                VN2Valve2IsOpen = true;
-                VN2Valve3IsOpen = true;
-                GasFinalValveIsOpen = true;
-            });
-           
+                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
+            }
+            else
+            {
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Vent");
+            }
 
         }
 
@@ -433,6 +445,7 @@ namespace Venus_MainPages.ViewModels
                 return;
             }
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartPump");
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartTurboPump");
         }
         #endregion
 

+ 37 - 9
Venus/Venus_MainPages/ViewModels/PlatformViewModel.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 bool m_PumpValveIsOpen;
         private bool m_VentValveIsOpen;
         private bool m_IsATM;
+        private string ModuleName="PMA";
         #endregion
 
         #region  属性
@@ -45,17 +47,17 @@ namespace Venus_MainPages.ViewModels
 
 
         #region 命令
-     
 
-      
 
-        //private DelegateCommand _PurgeCommand;
-        //public DelegateCommand PurgeCommand =>
-        //    _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
 
-        //private DelegateCommand _VentCommand;
-        //public DelegateCommand VentCommand =>
-        //    _VentCommand ?? (_VentCommand = new DelegateCommand(OnVent));
+
+        private DelegateCommand _PurgeCommand;
+        public DelegateCommand PurgeCommand =>
+            _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
+
+        private DelegateCommand _VentCommand;
+        public DelegateCommand VentCommand =>
+            _VentCommand ?? (_VentCommand = new DelegateCommand(OnVent));
 
         private DelegateCommand _PumpCommand;
         public DelegateCommand PumpCommand =>
@@ -80,7 +82,33 @@ namespace Venus_MainPages.ViewModels
             //PumpValveIsOpen = true;
             IsATM = !IsATM;
         }
+        private void OnPurge()
+        {
+        
+            //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Purge")
+            //{
+            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
+            //}
+            //else
+            //{
+            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
+            //}
+        }
 
+        private void OnVent()
+        {
+
+            //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Vent")
+            //{
+            //    //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
+            //}
+            //else
+            //{
+            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Vent");
+            //}
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VentLoadLock");
+
+        }
         #endregion
     }
 }

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

@@ -106,8 +106,8 @@
             <Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,0,1,1" Padding="5,1">
                 <StackPanel Margin="10,10,10,0" Orientation="Horizontal" HorizontalAlignment="Center">
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
-                        
-                        <Button Content="初始化" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
+
+                        <Button Content="初始化" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding LLInitCommnad}">
 
                         </Button>
                         <!--放片-->
@@ -115,14 +115,14 @@
 
                         </Button>
                         <!--检测漏率-->
-                        <Button Content="充气" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}">
+                        <Button Content="充气" Width="80" Height="25" Margin="0 0 0 10" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding VentCommand}">
 
                         </Button>
 
                     </StackPanel>
                     <StackPanel Margin="10,0,10,0"  Orientation="Vertical">
                         <!--充气-->
-                        <Button Content="泵吹扫" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}">
+                        <Button Content="泵吹扫" Width="80" Height="25" Margin="0 0 0 10" VerticalAlignment="Top" IsEnabled="{Binding Path=IsManualMode}" Command="{Binding PurgeCommand}">
 
                         </Button>
                         <!--取片-->

+ 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    %m%n" />
+				<param name="ConversionPattern" value="%d  %10p  %m%n" />
 				<param name="Header" value="&#xA;----------------------开启Venus--------------------------&#xA;" />
 			</layout>
 		</appender>

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

@@ -327,7 +327,22 @@ namespace Venus_RT.Modules.PMs
             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));
+            OP.Subscribe($"{Module}.{RtOperation.StartTurboPump}", (cmd, args) => CheckToPostMessage((int)MSG.LaunchTurboPump));
+            OP.Subscribe($"{Module}.{RtOperation.Pump}", (cmd, args) => CheckToPostMessage((int)MSG.Pump));
+            OP.Subscribe($"{Module}.{RtOperation.Purge}", (cmd, args) => CheckToPostMessage((int)MSG.CyclePurge));
+            OP.Subscribe($"{Module}.{RtOperation.RfPower}", (cmd, args) => CheckToPostMessage((int)MSG.RfPower));
+            OP.Subscribe($"{Module}.{RtOperation.Vent}", (cmd, args) => CheckToPostMessage((int)MSG.Vent));
+            OP.Subscribe($"{Module}.{RtOperation.VentLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.VentLoadLock));
+            //OP.Subscribe($"{Module}.{RtOperation.VentLoadLock}", (cmd, args) => CheckToPostMessage((int)MSG.VentLoadLock));
+            return true;
+        }
         private bool FnIdle(object[] objs)
         {
             Running = false;