Преглед на файлове

添加process数据分析功能

lixiang преди 1 година
родител
ревизия
6dd42b5fb0

+ 18 - 0
Venus/Framework/Common/DBCore/ProcessDataRecorder.cs

@@ -49,6 +49,8 @@ namespace MECF.Framework.Common.DBCore
             DB.Insert(sql);
         }
 
+
+
         public static void UpdateStatus(string guid, string status)
         {
             string sql = string.Format(
@@ -137,6 +139,22 @@ namespace MECF.Framework.Common.DBCore
             }
         }
 
+        public static void RecordPrecess(string guid, DateTime startTime, DateTime endTime, string recipeName, string waferDataGuid, string processIn, string lotID, string slotID)
+        {
+            string sql = string.Format(
+                "INSERT INTO \"process_data\"(\"guid\", \"process_begin_time\",\"process_end_time\", \"recipe_name\" , \"wafer_data_guid\", \"process_in\", \"lot_id\", \"slot_id\" )VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}','{7}' );",
+                guid,
+                startTime.ToString("yyyy/MM/dd HH:mm:ss.fff"),
+                endTime.ToString("yyyy/MM/dd HH:mm:ss.fff"),
+                recipeName,
+                waferDataGuid,
+                processIn,
+                lotID,
+                string.IsNullOrEmpty(slotID) ? "" : (int.Parse(slotID) + 1).ToString());
+
+            DB.Insert(sql);
+        }
+
         public List<string> GetHistoryRecipeList(DateTime begin, DateTime end)
         {
             List<string> result = new List<string>();

+ 291 - 3
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -1,4 +1,6 @@
-using OpenSEMI.ClientBase;
+using MECF.Framework.Common.CommonData;
+using MECF.Framework.Common.DataCenter;
+using OpenSEMI.ClientBase;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -7,6 +9,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_MainPages.Unity;
+using Venus_Themes.CustomControls;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -16,7 +19,29 @@ namespace Venus_MainPages.ViewModels
         private bool m_TabIsChecked=true;
         private ModuleInfo m_LP1ModuleInfo;
         private ModuleInfo m_LP2ModuleInfo;
-
+        private WaferRobotTAction m_Robot1TAction;
+        private WaferRobotXAction m_Robot1XAction;
+        private WaferRobotTAction m_Robot2TAction;
+        private WaferRobotXAction m_Robot2XAction;
+        private RobotMoveInfo m_robotMoveInfo;
+        int arm1oldWaferStatus = 100;
+        int arm2oldWaferStatus = 100;
+        private WaferInfo m_PMAWafer;
+        private WaferInfo m_PMBWafer;
+        private WaferInfo m_PMCWafer;
+        private WaferInfo m_PMDWafer;
+        private WaferInfo m_LLAWafer;
+        private WaferInfo m_LLBWafer;
+        private WaferInfo m_BladeAWafer;
+        private WaferInfo m_BladeBWafer;
+        private List<string> m_RtDataKeys = new List<string>();
+        private Dictionary<string, object> m_RtDataValues;
+        private bool m_PMAIsInstalled;
+        private bool m_PMBIsInstalled;
+        private bool m_PMCIsInstalled;
+        private bool m_PMDIsInstalled;
+        private bool m_LLAIsInstalled;
+        private bool m_LLBIsInstalled;
         #endregion
 
         #region  属性
@@ -35,15 +60,130 @@ namespace Venus_MainPages.ViewModels
             get { return m_LP2ModuleInfo; }
             set { SetProperty(ref m_LP2ModuleInfo, value); }
         }
+        public WaferRobotTAction Robot1TAction
+        {
+            get { return m_Robot1TAction; }
+            set { SetProperty(ref m_Robot1TAction, value); }
+        }
+        public WaferRobotXAction Robot1XAction
+        {
+            get { return m_Robot1XAction; }
+            set { SetProperty(ref m_Robot1XAction, value); }
+        }
+        public WaferRobotTAction Robot2TAction
+        {
+            get { return m_Robot2TAction; }
+            set { SetProperty(ref m_Robot2TAction, value); }
+        }
+        public WaferRobotXAction Robot2XAction
+        {
+            get { return m_Robot2XAction; }
+            set { SetProperty(ref m_Robot2XAction, value); }
+        }
+        public RobotMoveInfo RobotMoveInfo
+        {
+            get { return m_robotMoveInfo; }
+            set
+            {
+                RobotMoveInfoChanged(m_robotMoveInfo, value);
+                m_robotMoveInfo = value;
+            }
+        }
+        public WaferInfo LLAWafer
+        {
+            get { return m_LLAWafer; }
+            set { SetProperty(ref m_LLAWafer, value); }
+        }
+        public WaferInfo LLBWafer
+        {
+            get { return m_LLBWafer; }
+            set { SetProperty(ref m_LLBWafer, value); }
+        }
+        public WaferInfo PMAWafer
+        {
+            get { return m_PMAWafer; }
+            set { SetProperty(ref m_PMAWafer, value); }
+        }
+        public WaferInfo PMBWafer
+        {
+            get { return m_PMBWafer; }
+            set { SetProperty(ref m_PMBWafer, value); }
+        }
+        public WaferInfo PMCWafer
+        {
+            get { return m_PMCWafer; }
+            set { SetProperty(ref m_PMCWafer, value); }
+        }
+        public WaferInfo PMDWafer
+        {
+            get { return m_PMDWafer; }
+            set { SetProperty(ref m_PMDWafer, value); }
+        }
+
+        public WaferInfo BladeAWafer
+        {
+            get { return m_BladeAWafer; }
+            set { SetProperty(ref m_BladeAWafer, value); }
+        }
+        public WaferInfo BladeBWafer
+        {
+            get { return m_BladeBWafer; }
+            set { SetProperty(ref m_BladeBWafer, value); }
+        }
+        public Dictionary<string, object> RtDataValues
+        {
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
+        }
+        public bool PMAIsInstalled
+        {
+            get { return m_PMAIsInstalled; }
+            set { SetProperty(ref m_PMAIsInstalled, value); }
+        }
+        public bool PMBIsInstalled
+        {
+            get { return m_PMBIsInstalled; }
+            set { SetProperty(ref m_PMBIsInstalled, value); }
+        }
+        public bool PMCIsInstalled
+        {
+            get { return m_PMCIsInstalled; }
+            set { SetProperty(ref m_PMCIsInstalled, value); }
+        }
+        public bool PMDIsInstalled
+        {
+            get { return m_PMDIsInstalled; }
+            set { SetProperty(ref m_PMDIsInstalled, value); }
+        }
+        public bool LLAIsInstalled
+        {
+            get { return m_LLAIsInstalled; }
+            set { SetProperty(ref m_LLAIsInstalled, value); }
+        }
+        public bool LLBIsInstalled
+        {
+            get { return m_LLBIsInstalled; }
+            set { SetProperty(ref m_LLBIsInstalled, value); }
+        }
         #endregion
 
         #region 构造函数
-        public  OperationOverViewModel()
+        public OperationOverViewModel()
         {
             DispatcherTimer timer = new DispatcherTimer();
             timer.Interval = TimeSpan.FromSeconds(0.5);
             timer.Tick += Timer_Tick;
             timer.Start();
+
+            addDataKeys();
+            string[] allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString().Split(',');
+            PMAIsInstalled = allModules.Contains("PMA");
+            PMBIsInstalled = allModules.Contains("PMB");
+            PMCIsInstalled = allModules.Contains("PMC");
+            PMDIsInstalled = allModules.Contains("PMD");
+            LLAIsInstalled = allModules.Contains("LLA");
+            LLBIsInstalled = allModules.Contains("LLB");
+
         }
         #endregion
 
@@ -52,6 +192,154 @@ namespace Venus_MainPages.ViewModels
         {
             LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
             LP2ModuleInfo = ModuleManager.ModuleInfos["LP1"];
+
+
+            if (LLAIsInstalled == true)
+            {
+                LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);           
+            }
+            if (LLBIsInstalled == true)
+            {
+                LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
+
+            }
+            if (PMAIsInstalled == true)
+            {
+                PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
+            }
+            if (PMBIsInstalled == true)
+            {
+                PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
+            }
+            if (PMCIsInstalled == true)
+            {
+                PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
+            }
+            if (PMDIsInstalled == true)
+            {
+                PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
+            }
+
+
+            BladeAWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0];
+            BladeBWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1];
+
+            RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
+
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+        }
+        private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
+        {
+            string RobotTarget;
+            if (oldValue == null || newValue == null)
+            {
+                return;
+            }
+            #region pick 和 place LL
+            if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot1XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot2XAction = WaferRobotXAction.Retract;
+                }
+            }
+
+            #endregion
+
+            #region pick 和 place pm
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+
+            }
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                if (arm == "ArmA")
+                {
+                    Robot1XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2XAction = WaferRobotXAction.Retract;
+                }
+
+            }
+            #endregion
+            arm1oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0].WaferStatus;
+            arm2oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus;
+
+        }
+
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
+
+            m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
+            m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
+
+
         }
         #endregion
     }

+ 63 - 6
Venus/Venus_MainPages/ViewModels/ProcessHistoryViewModel.cs

@@ -21,6 +21,7 @@ using System.IO;
 using System.Diagnostics;
 using Aitex.Core.RT.Routine;
 using System.Xml.Linq;
+using System.Windows.Forms;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -36,7 +37,10 @@ namespace Venus_MainPages.ViewModels
         public List<string> RecipesAdd=new List<string>();
         public List<SolidColorBrush> solidColorBrushes = new List<SolidColorBrush>();
         DateTime currentTime;
+        private RecipeItem selectedRecipeItem;
+
         #endregion
+
         #region 属性
         public List<HistoryDataItem> ProcessData { get; set; }
         public List<Recipeslist> CheboxRecipes { get; set; }
@@ -78,13 +82,28 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _PdParameterCheckCommand;
         public DelegateCommand<object> PdParameterCheckCommand=>
            _PdParameterCheckCommand??(_PdParameterCheckCommand=new DelegateCommand<object>(OnParameterCheck));
+
+
+        private DelegateCommand<object> _DataGridSelectionChangedCommand;
+        public DelegateCommand<object> DataGridSelectionChangedCommand =>
+           _DataGridSelectionChangedCommand ?? (_DataGridSelectionChangedCommand = new DelegateCommand<object>(OnDataGridSelectionChanged));
+
+
+        private DelegateCommand _SearchDataCommand;
+        public DelegateCommand SearchDataCommand =>
+        _SearchDataCommand ?? (_SearchDataCommand = new DelegateCommand(OnSearchData));
+
+
+        private DelegateCommand _ClearDataCommand;
+        public DelegateCommand ClearDataCommand =>
+        _ClearDataCommand ?? (_ClearDataCommand = new DelegateCommand(OnClearData));
         #endregion
 
         #region 构造函数
         public ProcessHistoryViewModel()
         {
             ProcessChartData = new ProcessDataChartDataItem(60000);
-            ParameterNodes = _provider.GetParameters();
+            
             Recipes = new ObservableCollection<RecipeItem>();
             timer.Interval = TimeSpan.FromSeconds(0.5);
             CheboxRecipes = new List<Recipeslist>();
@@ -100,6 +119,7 @@ namespace Venus_MainPages.ViewModels
             solidColorBrushes.Add(new SolidColorBrush(Colors.DarkGreen));
         }
         #endregion
+
         #region 命令方法
         private void OnLoadPd(Object eventView)
         {
@@ -128,8 +148,7 @@ namespace Venus_MainPages.ViewModels
         }
         public void SearchRecipe()
         {
-            //if (MenuPermission != 3) return;
-            Console.WriteLine("er");
+
             this.StartDateTime = this.view.wfTimeFrom.Value;
             this.EndDateTime = this.view.wfTimeTo.Value;
             Recipes.Clear();
@@ -161,7 +180,7 @@ namespace Venus_MainPages.ViewModels
                 DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
 
 
-                Application.Current.Dispatcher.BeginInvoke(new Action(() =>
+                System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                 {
                     if (dbData == null || dbData.Rows.Count == 0) return;
 
@@ -429,11 +448,49 @@ namespace Venus_MainPages.ViewModels
             }
             this.view.MyDrawGraphicsControl.PointCollections = cls;
             this.view.MyDrawGraphicsControl.FitControl();
-        }       
+        }
+
+        private void OnDataGridSelectionChanged(object obj)
+        {
+            selectedRecipeItem =  obj as RecipeItem;
+            ParameterNodes = new ObservableCollection<ParameterNode>(_provider.GetParameters().Where(x => x.Name == selectedRecipeItem?.Chamber));
+        }
+        private void OnSearchData()
+        {
+            this.view.MyDrawGraphicsControl.ClearPlotPoints();
+            var Keys = new List<string>();
+            PdKeyDataCollection.ToList().ForEach(key => 
+            {
+                Keys.Add(key.Key);
+            });
+            var result = GetData(Keys.Distinct().ToList(), Convert.ToDateTime(selectedRecipeItem.StartTime) , Convert.ToDateTime(selectedRecipeItem.EndTime) );
+            if (result == null)
+            {
+                return;
+            }
+            List<PointCollection> cls = new List<PointCollection>();
+            for (int i = 0; i < Keys.Count; i++)
+            {
+                PointCollection points = new PointCollection();
+                int k = 1;
+                result[Keys[i]].ForEach(point =>
+                {
+                    points.Add(new Point() { X = point.dateTime.ToOADate(), Y = point.value });
+                    k += 1;
+                });
+                cls.Add(points);
+            }
+            this.view.MyDrawGraphicsControl.PointCollections = cls;
+            this.view.MyDrawGraphicsControl.FitControl();
+        }
+        private void OnClearData()
+        { 
         
+        }
     }
     #endregion
-    #region 数据类
+
+        #region 数据类
     public class RecipeItem
     {
         public bool Selected { get; set; }

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

@@ -27,7 +27,7 @@
                 <Canvas Width="1000" Height="1000">
                     <userControls:MainTM Width="300" Height="250" Canvas.Left="380" Canvas.Top="90"/>
 
-                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}"  RobotWafer="{Binding BladeAWafer}"/>
                     <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
 
 
@@ -42,8 +42,8 @@
 
                     <userControls:EFEM Width="600" Height="300" Canvas.Left="200" Canvas.Top="474"/>
 
-                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"/>
-                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot3TAction}" RobotXAction="{Binding Robot3XAction}"  RobotWafer="{Binding BladeCWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot4TAction}" RobotXAction="{Binding Robot4XAction}"  RobotWafer="{Binding BladeDWafer}"/>
                 </Canvas>
 
             </Viewbox>

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

@@ -876,7 +876,7 @@
                 </TextBlock>
                 <TextBlock Grid.Row="12"        Background="#E9EDF4"    Padding="10,5,0,0" >
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}Gas13({0}:{1})">
+                        <MultiBinding StringFormat="{}Gas3({0}:{1})">
                             <Binding Path="MFC3Data.DisplayName"></Binding>
                             <Binding Path="MFC3Data.Scale"></Binding>
                         </MultiBinding>
@@ -923,7 +923,7 @@
                     </TextBlock.Text>
                 </TextBlock>
                 <TextBlock Grid.Row="18"   Text="ESC Clamp Voltage"          Background="#E9EDF4"  Padding="10,5,0,0"  />
-                <TextBlock Grid.Row="19"   Text="Esc Temperature"        Background="#D0D8E8"  Padding="10,5,0,0" />
+                <TextBlock Grid.Row="19"   Text="ESC Temperature"        Background="#D0D8E8"  Padding="10,5,0,0" />
                 <TextBlock Grid.Row="20"  Text="Helium Pressure"       Background="#E9EDF4"    Padding="10,5,0,0"/>
                 <TextBlock Grid.Row="21"   Text="Helium Flow"       Background="#D0D8E8"    Padding="10,5,0,0" />
 

+ 14 - 4
Venus/Venus_MainPages/Views/ProcessHistoryView.xaml

@@ -115,8 +115,9 @@
             </Border>
             <Border Grid.Row="0" Grid.Column="5" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
                 <Grid HorizontalAlignment="Center">
-                    <ComboBox Width="400" ItemsSource="{Binding CheboxRecipes, Mode=TwoWay}" SelectedValue="{Binding RecipeName ,Mode=TwoWay}" DisplayMemberPath="BoxName" SelectedValuePath="BoxName">
-                    </ComboBox>
+                    <!--<ComboBox Width="400" ItemsSource="{Binding CheboxRecipes, Mode=TwoWay}" SelectedValue="{Binding RecipeName ,Mode=TwoWay}" DisplayMemberPath="BoxName" SelectedValuePath="BoxName">
+                    </ComboBox>-->
+                    <TextBox Text="{Binding RecipeName}" Width="400" VerticalContentAlignment="Center" FontSize="15"/>
                 </Grid>
             </Border>
             <Button Margin="5,0,0,0" Grid.Column="6" Content="Search" Width="80" Height="30" Command="{Binding SearchRecipeCommand}">
@@ -140,8 +141,13 @@
                 <RowDefinition/>
             </Grid.RowDefinitions>
             <Button Grid.Row="0" Content="导出列表" FontSize="10" Height="18" Margin="0,5,12,0" x:Name="ButtonExportList"  VerticalAlignment="Top" IsEnabled="False" HorizontalAlignment="Right" Width="106"  Grid.ColumnSpan="3" Grid.Column="7" Click="buttonLotListExport_Click"/>
-            <DataGrid Grid.Row="1" ItemsSource="{Binding Recipes}" AutoGenerateColumns="False" CanUserAddRows="False" Name="dataGrid_RecipeList" SelectionChanged="DataGrid_SelectionChanged"
+            <DataGrid Grid.Row="1" ItemsSource="{Binding Recipes}" AutoGenerateColumns="False" CanUserAddRows="False" Name="dataGrid_RecipeList" 
                           CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" Margin="0,5,0,0" Grid.ColumnSpan="10" >
+                <i:Interaction.Triggers>
+                    <i:EventTrigger EventName="SelectionChanged">
+                        <i:InvokeCommandAction Command="{Binding DataGridSelectionChangedCommand}" CommandParameter="{Binding ElementName=dataGrid_RecipeList,Path=SelectedValue}"/>
+                    </i:EventTrigger>
+                </i:Interaction.Triggers>
                 <DataGrid.Columns>
                     <DataGridTemplateColumn Header="checked" Width="100">
                         <DataGridTemplateColumn.CellTemplate>
@@ -230,7 +236,7 @@
                 </Grid.ColumnDefinitions>
                 <Grid Grid.Column="1" Grid.ColumnSpan="2" Margin="0,0,19,0">
                     <StackPanel>
-                        <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}"  Canvas.Top="100" Height="400" >
+                        <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}"  Canvas.Top="100" Height="300">
                             <TreeView.ItemTemplate>
                                 <HierarchicalDataTemplate  ItemsSource="{Binding ChildNodes}">
                                     <StackPanel Orientation="Horizontal">
@@ -246,6 +252,10 @@
                                 </HierarchicalDataTemplate>
                             </TreeView.ItemTemplate>
                         </TreeView>
+                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
+                            <Button Width="100" Content="Search"                   Command="{Binding SearchDataCommand}"/>
+                            <Button Width="100" Content="Clear" Margin="10,0,0,0"  Command="{Binding ClearDataCommand}"/>
+                        </StackPanel>
                         <ListBox ItemsSource="{Binding PdKeyDataCollection}"  Margin="20,0,0,0" FontSize="14" Height="auto" VerticalAlignment="Bottom">
                             <ListBox.ItemTemplate>
                                 <DataTemplate>

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

@@ -456,8 +456,8 @@
                     <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
 
 
-                    <userControls:LoadLockLeft Door2IsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" 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}}" Door2IsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
+                    <userControls:LoadLockLeft Door2IsVisibility="Collapsed" 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 Door2IsVisibility="Collapsed" 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: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}" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>

+ 2 - 0
Venus/Venus_RT/Modules/PMs/LLPlaceRoutine.cs

@@ -14,6 +14,7 @@ namespace Venus_RT.Modules.PMs
         {
             kPrepareTransfer,
             kExtend,
+            KDelay2s,
             kPinUp,
             kRetract,
             kPostTransfer,
@@ -73,6 +74,7 @@ namespace Venus_RT.Modules.PMs
         {
             Runner.Run((int)LLPlaceStep.kPrepareTransfer,   PrepareTransfer,        IsPrepareReady,                                     _prepareTransferTimeout * 1000)
                 .Run((int)LLPlaceStep.kExtend,              _chamber.ExtendWafer,   () => { return _chamber.IsLoadlockArmExtend; },     _transferWaferTimeout * 1000)
+                .Delay((int)LLPlaceStep.KDelay2s, 2000)
                 .Run((int)LLPlaceStep.kPinUp,               SetLiftPinUp,           () => { return _chamber.CheckLiftUp(); })
                 .Run((int)LLPlaceStep.kRetract,             _chamber.RetractWafer,  () => { return _chamber.IsLoadlockArmRetract; },    _transferWaferTimeout * 1000)
                 .Run((int)LLPlaceStep.kPostTransfer,        PostTransfer,           IsPostTransferReady,                                _prepareTransferTimeout * 1000)

+ 6 - 2
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -12,6 +12,7 @@ using MECF.Framework.Common.SubstrateTrackings;
 using Venus_Core;
 using System.ServiceModel.Security.Tokens;
 using System.Diagnostics;
+using MECF.Framework.Common.DBCore;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -48,7 +49,6 @@ namespace Venus_RT.Modules.PMs
         private int _loopCounter = 0;
         private int _recipeRunningMode = 0;
         private Stopwatch _stepTime = new Stopwatch();
-
         public RecipeResult currentRecipeResult;
         public bool isMaualEndStep;
         
@@ -139,7 +139,7 @@ namespace Venus_RT.Modules.PMs
             {
                 return RState.Failed;
             }
-
+            RecipeStartTime = DateTime.Now;
             // Load/Validate Recipe
             _qeRecipes.Clear();
             string recipeName = (string)objs[0];
@@ -372,6 +372,10 @@ namespace Venus_RT.Modules.PMs
             _chamber.OpenValve(ValveType.Guage, true);
             _chamber.SetPVPostion(1000);
             WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Completed);
+
+        
+
+            ProcessDataRecorder.RecordPrecess(Guid.NewGuid().ToString(), RecipeStartTime, DateTime.Now, CurrentRunningRecipe, "", _chamber.Name, "", "");
             return true;
         }
 

+ 5 - 3
Venus/Venus_Themes/UserControls/LoadLockLeft.xaml

@@ -4,11 +4,13 @@
              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"
              
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800" Name="LeftLoadLock" Opacity="0.9">
     <UserControl.Resources>
+        
         <Style TargetType="Rectangle" x:Key="doorAnimation">
             <Setter Property="Width" Value="190"/>
             <Style.Triggers>
@@ -98,9 +100,9 @@
                        DataContext="{Binding ElementName=LeftLoadLock, Path=RobotWafer}"  HorizontalAlignment="Center" VerticalAlignment="Center">
                 </ctrl:Slot>
             </Viewbox>
-            
-            <Rectangle  Fill="Silver" Width="142"   VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1"/>
+
+            <Rectangle  Fill="Silver" Width="142"   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}"/>
 
         </Canvas>
             

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

@@ -47,6 +47,20 @@ namespace Venus_Themes.UserControls
                 this.SetValue(Door2IsOpenProperty, value);
             }
         }
+
+        public static readonly DependencyProperty Door2IsVisibilityProperty = DependencyProperty.Register(
+      "Door2IsVisibility", typeof(Visibility), typeof(LoadLockLeft));
+
+        public Visibility Door2IsVisibility
+        {
+            get { return (Visibility)this.GetValue(Door2IsVisibilityProperty); }
+            set
+            {
+                this.SetValue(Door2IsVisibilityProperty, value);
+            }
+        }
+
+
         public static readonly DependencyProperty RobotWaferProperty = DependencyProperty.Register(
       "RobotWafer", typeof(WaferInfo), typeof(LoadLockLeft));
         public WaferInfo RobotWafer

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

@@ -98,8 +98,8 @@
                        DataContext="{Binding ElementName=RightLoadLock, Path=RobotWafer}"  HorizontalAlignment="Center" VerticalAlignment="Center">
                 </ctrl:Slot>
             </Viewbox>
-            <Rectangle  Fill="Silver" Width="142"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"  >
+            <Rectangle  Fill="Silver" Width="142"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59" 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.RenderTransform>
                     <RotateTransform Angle="180" CenterX="71" CenterY="10"/>
                 </Rectangle.RenderTransform>

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

@@ -47,6 +47,18 @@ namespace Venus_Themes.UserControls
                 this.SetValue(Door2IsOpenProperty, value);
             }
         }
+        public static readonly DependencyProperty Door2IsVisibilityProperty = DependencyProperty.Register(
+      "Door2IsVisibility", typeof(Visibility), typeof(LoadLockRight));
+
+        public Visibility Door2IsVisibility
+        {
+            get { return (Visibility)this.GetValue(Door2IsVisibilityProperty); }
+            set
+            {
+                this.SetValue(Door2IsVisibilityProperty, value);
+            }
+        }
+
         public static readonly DependencyProperty RobotWaferProperty = DependencyProperty.Register(
        "RobotWafer", typeof(WaferInfo), typeof(LoadLockRight));
         public WaferInfo RobotWafer