瀏覽代碼

1.添加数据分析 Recipe step功能

lixiang 1 年之前
父節點
當前提交
edb5ad6960

+ 9 - 0
Venus/Framework/Common/ControlDataContext/ProcessDataChartDataItem.cs

@@ -362,4 +362,13 @@ namespace Aitex.Core.UI.ControlDataContext
             }
         }
     }
+
+    public class HistoryStepItem
+    {
+        public DateTime StartTime { get; set; }
+        public DateTime EndTime { get; set; }
+        public int StepHoldTime { get; set; }
+        public string RecipeId { get; set; }
+        public string StepNo { get; set; }
+    }
 }

+ 40 - 10
Venus/Framework/Common/DBCore/ProcessDataRecorder.cs

@@ -5,6 +5,7 @@ using Aitex.Core.RT.DBCore;
 using Aitex.Core.RT.Log;
 using Aitex.Core.UI.ControlDataContext;
 using Aitex.Sorter.Common;
+using DocumentFormat.OpenXml.Drawing;
 using MECF.Framework.Common.CommonData;
 using MECF.Framework.Common.Equipment;
 
@@ -109,16 +110,7 @@ namespace MECF.Framework.Common.DBCore
             DB.Insert(sql);
         }
 
-        public static void StepStart(string recipeGuid, int stepNumber, string stepName, float stepTime)
-        {
-            string guid = Guid.NewGuid().ToString();
-
-            string sql = $"INSERT INTO \"recipe_step_data\"(\"guid\", \"step_begin_time\", \"step_name\" , \"step_time\", \"process_data_guid\", \"step_number\")VALUES ('{guid}', '{DateTime.Now:yyyy/MM/dd HH:mm:ss.fff}', '{stepName}', '{stepTime}', '{recipeGuid}', '{stepNumber}' );";
-
-            //System.Diagnostics.Trace.WriteLine(sql);
-
-            DB.Insert(sql);
-        }
+       
 
 
         public static void StepEnd(string recipeGuid, int stepNumber, List<FdcDataItem> stepData = null)
@@ -471,5 +463,43 @@ namespace MECF.Framework.Common.DBCore
 
             return result;
         }
+
+        public static void StepStart(string recipeGuid, int stepNumber, string stepName, float stepTime)
+        {
+            string guid = Guid.NewGuid().ToString();
+
+            string sql = $"INSERT INTO \"recipe_step_data\"(\"guid\", \"step_begin_time\", \"step_name\" , \"step_time\", \"process_data_guid\", \"step_number\")VALUES ('{guid}', '{DateTime.Now:yyyy/MM/dd HH:mm:ss.fff}', '{stepName}', '{stepTime}', '{recipeGuid}', '{stepNumber}' );";
+
+            //System.Diagnostics.Trace.WriteLine(sql);
+
+            DB.Insert(sql);
+        }
+        public static List<HistoryStepItem> GetHistoryStepList(DateTime begin, DateTime end)
+        {
+            List<HistoryStepItem> result = new List<HistoryStepItem>();
+
+            string sql = string.Format("SELECT * FROM \"recipe_step_data\" where \"step_begin_time\" >= '{0}' and \"step_begin_time\" <= '{1}' order by \"step_begin_time\" ASC;",
+                begin.ToString("yyyy/MM/dd HH:mm:ss.fff"), end.ToString("yyyy/MM/dd HH:mm:ss.fff"));
+
+            DataSet ds = DB.ExecuteDataset(sql);
+            if (ds == null)
+                return result;
+
+            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+            {
+                result.Add(new HistoryStepItem()
+                {
+                    StartTime = Convert.ToDateTime(ds.Tables[0].Rows[i]["step_begin_time"]),
+                    EndTime =  DateTime.Now,
+                    StepHoldTime=Convert.ToInt32(ds.Tables[0].Rows[i]["step_time"]),
+                    RecipeId= ds.Tables[0].Rows[i]["process_data_guid"].ToString(),
+                    StepNo=$"Step{Convert.ToInt32(ds.Tables[0].Rows[i]["step_number"])}"
+                });
+            }
+
+            ds.Clear();
+
+            return result;
+        }
     }
 }

+ 4 - 0
Venus/Framework/Common/DataCenter/IQueryDataService.cs

@@ -187,5 +187,9 @@ namespace MECF.Framework.Common.DataCenter
         [OperationContract]
 
         List<MFCVerificationTenPointsData> GetMFCVerificationTenPointsData();
+
+        [OperationContract]
+
+        List<HistoryStepItem> GetHistorySteps(DateTime begin, DateTime end);
     }
 }

+ 4 - 0
Venus/Framework/Common/DataCenter/QueryDataService.cs

@@ -199,5 +199,9 @@ namespace MECF.Framework.Common.DataCenter
         {
             return MFCVerificationDataRecorder.GetMFCVerificationTenPointsData();
         }
+        public List<HistoryStepItem> GetHistorySteps(DateTime begin, DateTime end)
+        {
+            return ProcessDataRecorder.GetHistoryStepList(begin,end);
+        }
     }
 }

+ 10 - 0
Venus/Framework/Common/DataCenter/QueryDataServiceClient.cs

@@ -228,5 +228,15 @@ namespace MECF.Framework.Common.DataCenter
             });
             return result;
         }
+
+        public List<HistoryStepItem> GetHistorySteps(DateTime begin, DateTime end)
+        {
+            List<HistoryStepItem> result = null;
+            Invoke(svc =>
+            {
+                result = svc.GetHistorySteps(begin,end);
+            });
+            return result;
+        }
     }
 }

+ 6 - 6
Venus/Framework/Common/RecipeCenter/RecipeService.cs

@@ -20,7 +20,7 @@ namespace MECF.Framework.Common.RecipeCenter
         /// <returns></returns>
         public string LoadRecipe(ModuleName chamId, string recipeName)
         {
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Read {0} recipe {1}", chamId, recipeName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Read {0} Recipe: {1}", chamId, recipeName));
 
             return RecipeFileManager.Instance.LoadRecipe(chamId.ToString(), recipeName, false);
         }
@@ -36,7 +36,7 @@ namespace MECF.Framework.Common.RecipeCenter
             if (CheckSoftwareExpired())
                 return false;
             //if (!ChamberOperationService.IsSuperEnter()) return false;
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Delete {0} recipe {1}", chamId, recipeName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Delete {0} Recipe: {1}", chamId, recipeName));
             return RecipeFileManager.Instance.DeleteRecipe(chamId.ToString(), recipeName);
         }
 
@@ -75,7 +75,7 @@ namespace MECF.Framework.Common.RecipeCenter
         {
             if (CheckSoftwareExpired())
                 return false;
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Rename {0} recipe {1}为{2}", chamId, oldName, newName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Rename {0} Recipe {1}为{2}", chamId, oldName, newName));
             //if (!ChamberOperationService.IsSuperEnter()) return false;
             return RecipeFileManager.Instance.RenameRecipe(chamId.ToString(), oldName, newName);
         }
@@ -91,7 +91,7 @@ namespace MECF.Framework.Common.RecipeCenter
             if (CheckSoftwareExpired())
                 return false;
             //if (!ChamberOperationService.IsSuperEnter()) return false;
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Delete {0} recipe folder {1}", chamId, folderName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Delete {0} Recipe Folder: {1}", chamId, folderName));
             return RecipeFileManager.Instance.DeleteFolder(chamId.ToString(), folderName);
         }
 
@@ -106,7 +106,7 @@ namespace MECF.Framework.Common.RecipeCenter
         {
             if (CheckSoftwareExpired())
                 return false;
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Modify and save {0} recipe {1}", chamId, recipeName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Modify and save {0} Recipe: {1}", chamId, recipeName));
             return RecipeFileManager.Instance.SaveRecipe(chamId.ToString(), recipeName, recipeContent, false, false);
         }
 
@@ -120,7 +120,7 @@ namespace MECF.Framework.Common.RecipeCenter
         {
             if (CheckSoftwareExpired())
                 return false;
-            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Move {0} recipe {1}", chamId, recipeName));
+            LOG.Write(eEvent.EV_SEQUENCE, ModuleName.System, string.Format("Move {0} recipe :{1}", chamId, recipeName));
             return RecipeFileManager.Instance.MoveRecipeFile(chamId.ToString(), recipeName, tragetFolderName, false, false);
         }
 

+ 14 - 0
Venus/Venus_Core/StepItem.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_Core
+{
+    public class StepItem
+    {
+        public double StartValue { get; set; }
+        public string Information { get; set; }
+    }
+}

+ 1 - 0
Venus/Venus_Core/Venus_Core.csproj

@@ -63,6 +63,7 @@
     <Compile Include="PMLeakCheckResult.cs" />
     <Compile Include="PMVATPerformance.cs" />
     <Compile Include="RecipeResult.cs" />
+    <Compile Include="StepItem.cs" />
     <Compile Include="SubItem.cs" />
     <Compile Include="ModuleName.cs" />
     <Compile Include="ProcessUnitDefine.cs" />

+ 18 - 9
Venus/Venus_MainPages/ViewModels/DataHistoryViewModel.cs

@@ -45,6 +45,7 @@ namespace Venus_MainPages.ViewModels
         public List<SolidColorBrush> solidColorBrushes = new List<SolidColorBrush> ();
         DateTime currentTime;
         private bool firstFlag = true;
+        private DateTime startTime=DateTime.Now;
         #endregion
 
         #region 属性
@@ -101,7 +102,7 @@ namespace Venus_MainPages.ViewModels
         {
             OldKeyDataCollection = new ObservableCollection<KeyData>();
             ParameterNodes = _provider.GetParameters();
-            timer.Interval = TimeSpan.FromSeconds(0.5);
+            timer.Interval = TimeSpan.FromSeconds(1);
             timer.Tick += Timer_Tick;
             solidColorBrushes.Add(new SolidColorBrush (Colors.Green));
             solidColorBrushes.Add(new SolidColorBrush(Colors.Red));
@@ -139,7 +140,8 @@ namespace Venus_MainPages.ViewModels
             GC.WaitForPendingFinalizers(); // Doesn't help either
         }
         private void OnParameterCheck(object obj)
-        {      
+        {
+            startTime= DateTime.Now;
             ParameterNode node = obj as ParameterNode;
             if (!RefreshTreeStatusToChild(node))
             {
@@ -266,6 +268,7 @@ namespace Venus_MainPages.ViewModels
         private void OnClear()
         {
             this.DataHistoryView.MyDrawGraphicsControl.ClearPlotPoints();
+            this.DataHistoryView.MyDrawGraphicsControl.YPoints = new List<Venus_Core.StepItem>();
             KeyDataObservableCollection.Clear();
             CloseAll(ParameterNodes);
         }
@@ -424,10 +427,8 @@ namespace Venus_MainPages.ViewModels
             
 
         }
-
         private void Timer_Tick(object sender, EventArgs e)
-        {
-           
+        {    
             if (Keys.Count > 10)
             {
                 WPFMessageBox.ShowWarning("最多显示10个数据");
@@ -454,12 +455,20 @@ namespace Venus_MainPages.ViewModels
             }
             
             this.DataHistoryView.MyDrawGraphicsControl.PointCollections = cls;
-            if (this.DataHistoryView.MyDrawGraphicsControl.IsHorizontalNavigationEnabled == false && this.DataHistoryView.MyDrawGraphicsControl.IsVerticalNavigationEnabled == false)
+            //if (this.DataHistoryView.MyDrawGraphicsControl.IsHorizontalNavigationEnabled == false && this.DataHistoryView.MyDrawGraphicsControl.IsVerticalNavigationEnabled == false)
+            //{
+            //    this.DataHistoryView.MyDrawGraphicsControl.FitControlWithoutDrawing();
+            //}
+            //DateTime dateTimeNow = DateTime.Now;
+            this.DataHistoryView.MyDrawGraphicsControl.YPoints.Clear();
+            var item = QueryDataClient.Instance.Service.GetHistorySteps(startTime, DateTime.Now);
+            if (item.Count > 0)
             {
-                this.DataHistoryView.MyDrawGraphicsControl.FitControlWithoutDrawing();
-
+                item.ForEach(x =>
+                {
+                    this.DataHistoryView.MyDrawGraphicsControl.YPoints.Add(new Venus_Core.StepItem() { StartValue = x.StartTime.ToOADate(),Information=$"{x.RecipeId}:{x.StepNo}" });
+                });
             }
-
         }
         #endregion
 

+ 1 - 58
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -793,7 +793,7 @@ namespace Venus_MainPages.ViewModels
             {
                 return;
             }
-            #region pick 和 place LL
+            
             if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
             {
                 var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
@@ -838,63 +838,6 @@ namespace Venus_MainPages.ViewModels
                 }
             }
 
-            #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["TMRobot"].WaferManager.Wafers[0].WaferStatus;
-            //arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
         }
         private async Task ChangePosition(WaferRobotTAction waferRobotTAction)
         {

+ 4 - 1
Venus/Venus_MainPages/ViewModels/OverKepler2200AViewModel.cs

@@ -198,6 +198,8 @@ namespace Venus_MainPages.ViewModels
 
         private string m_WaferID;
         private string m_ModuleName;
+        private int? currentRecipeNumber;
+
         #endregion
 
         #region  属性
@@ -1549,12 +1551,13 @@ namespace Venus_MainPages.ViewModels
             if (PMCurrentState == PMState.Processing)
             {
                 CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
-                if (CurrentRecipeResult.RecipeStepNumber != null)
+                if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber != currentRecipeNumber)
                 {
                     var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, CurrentRecipeResult.RecipeName + ".rcp");
                     CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
                     CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
                 }
+                currentRecipeNumber = CurrentRecipeResult.RecipeStepNumber;
             }
             else
             {

+ 7 - 27
Venus/Venus_MainPages/ViewModels/OverKepler2300ViewModel.cs

@@ -197,7 +197,8 @@ namespace Venus_MainPages.ViewModels
 
         private string m_ModuleName;
         private string m_WaferID;
-       
+        private int? currentRecipeNumber;
+
         #endregion
 
         #region  属性
@@ -1179,43 +1180,21 @@ namespace Venus_MainPages.ViewModels
 
         private void OnPurge()
         {
-            //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() ==PMState.Purge.ToString())
-            //if (PMCurrentState == PMState.Purging || N2SetPoint<=0)
-            //{
-            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", 0);
-            //    await Task.Delay(1000);
-            //    //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
-            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
-
-            //}
-            //else
-            //{
-            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", N2SetPoint);
-            //    await Task.Delay(1000);
-            //    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
-            //}
             if (PMCurrentState == PMState.Purging)
             {
-                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", 0);
-                //await Task.Delay(1000);
-                ////InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
 
             }
             else
             {
-                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcN2.SetPoint", N2SetPoint);
-                //await Task.Delay(1000);
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
             }
         }
 
         private void OnVent()
         {
-            //if (RtDataValues[$"{ModuleName}.FsmState"].ToString()==PMState.Venting.ToString())
             if (PMCurrentState == PMState.Venting)
             {
-                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopVent");
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
 
             }
@@ -1223,7 +1202,6 @@ namespace Venus_MainPages.ViewModels
             {
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Vent");
             }
-
         }
 
         private void OnPump()
@@ -1588,8 +1566,8 @@ namespace Venus_MainPages.ViewModels
 
             ProcessHighPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessHighPressure");
             ProcessLowPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessLowPressure");
-            ForelinePressure = float.Parse(RtDataValues[$"{ModuleName}.ForelinePressure"].ToString());
-            ESCHePressure = float.Parse(RtDataValues[$"{ModuleName}.ESCHePressure"].ToString());
+            ForelinePressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ForelinePressure");
+            ESCHePressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ESCHePressure");
 
             //ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
 
@@ -1630,12 +1608,14 @@ namespace Venus_MainPages.ViewModels
             if (PMCurrentState == PMState.Processing)
             {
                 CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
-                if (CurrentRecipeResult.RecipeStepNumber != null)
+                if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber != currentRecipeNumber)
                 {
                     var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, CurrentRecipeResult.RecipeName + ".rcp");
                     CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
                     CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
                 }
+                currentRecipeNumber = CurrentRecipeResult.RecipeStepNumber;
+
             }
             else
             {

+ 4 - 1
Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs

@@ -205,6 +205,7 @@ namespace Venus_MainPages.ViewModels
 
         private string m_WaferID;
         private string m_ModuleName;
+        private int? currentRecipeNumber;
 
         #endregion
 
@@ -1581,12 +1582,14 @@ namespace Venus_MainPages.ViewModels
 
 
                     CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
-                    if (CurrentRecipeResult.RecipeStepNumber != null)
+                    if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber!= currentRecipeNumber)
                     {
                         var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, CurrentRecipeResult.RecipeName + ".rcp");
                         CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
                         CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
                     }
+                    currentRecipeNumber = CurrentRecipeResult.RecipeStepNumber;
+
                 }
                 else
                 {

+ 15 - 0
Venus/Venus_MainPages/ViewModels/RecipeViewModel.cs

@@ -122,6 +122,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand _DeleteStepCommand;
         public DelegateCommand DeleteStepCommand =>
             _DeleteStepCommand ?? (_DeleteStepCommand = new DelegateCommand(OnDeleteStep));
+
+        private DelegateCommand _RefreshCommand;
+        public DelegateCommand RefreshCommand =>
+            _RefreshCommand ?? (_RefreshCommand = new DelegateCommand(OnRefresh));
         TreeViewFileItem selectedItem;
 
         #endregion
@@ -1423,6 +1427,17 @@ namespace Venus_MainPages.ViewModels
 
             }
         }
+
+        private void OnRefresh()
+        {
+            if (CurrentRecipeName != "")
+            {
+                string xmlRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, CurrentRecipeName);
+                CurrentRecipe = Recipe.Load(xmlRecipeData);
+                LoadRecipe(CurrentRecipe);
+            }
+           
+        }
         #endregion
     }
 }

+ 1 - 0
Venus/Venus_MainPages/Views/RecipeView.xaml

@@ -104,6 +104,7 @@
                 <customeControls:PathButton PathData="{StaticResource Icon_Save}"    Content="Save"           DefaultFillBrush="White"     Command="{Binding SaveRecipeCommand}"    Margin="30,4,22,0"        FontSize="16" Height="30"   Width="140"   VerticalContentAlignment="Center"  HorizontalAlignment="Right" VerticalAlignment="Top"/>
                 <customeControls:PathButton PathData="{StaticResource Icon_Add}"     Content="Add Step"       DefaultFillBrush="White"     Command="{Binding AddStepCommand}"       Margin="30,4,22,0"        FontSize="16" Height="30"   Width="140"   VerticalContentAlignment="Center"  HorizontalAlignment="Right" VerticalAlignment="Top"/>
                 <customeControls:PathButton PathData="{StaticResource Icon_Delete}"  Content="Del Step"       DefaultFillBrush="White"     Command="{Binding DeleteStepCommand}"    Margin="30,4,22,0"        FontSize="16" Height="30"   Width="140"   VerticalContentAlignment="Center"  HorizontalAlignment="Right" VerticalAlignment="Top"/>
+                <customeControls:PathButton PathData="{StaticResource Icon_Refresh}"  Content="Refresh"        DefaultFillBrush="White"     Command="{Binding RefreshCommand}"      Margin="30,4,22,0"        FontSize="16" Height="30"   Width="140"   VerticalContentAlignment="Center"  HorizontalAlignment="Right" VerticalAlignment="Top"/>
             </StackPanel>
             <Grid x:Name="grid1" Grid.Row="1">
                 <Grid.RowDefinitions>

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

@@ -13,6 +13,7 @@ using MECF.Framework.Common.DBCore;
 using Venus_RT.FAs;
 using MECF.Framework.Common.RecipeCenter;
 using Venus_Unity;
+using System.Threading.Tasks;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -304,6 +305,7 @@ namespace Venus_RT.Modules.PMs
 
         public RState StartNewStep()
         {
+            ProcessDataRecorder.StepStart($"{Module}:{_currentRecipe.Header.Name}:{_currentRecipe.Steps[_currentStep].Description}", _currentRecipe.Steps[_currentStep].StepNo, "", _currentRecipe.Steps[_currentStep].Time);
             _stepTime.Restart();
             var state = _currentRecipe.Steps[_currentStep].Start();
             if (state != RState.Running)
@@ -473,7 +475,7 @@ namespace Venus_RT.Modules.PMs
             }
         }
 
-        public void Abort()
+        public async void Abort()
         {
             WaferInfo waferInfo = WaferManager.Instance.GetWafer(ModuleHelper.Converter(Module.ToString()), 0);
             if (!waferInfo.IsEmpty)
@@ -487,10 +489,12 @@ namespace Venus_RT.Modules.PMs
             _chamber.GeneratorBiasPowerOn(false);
             _chamber.GeneratorPowerOn(false);
             _chamber.TurnPendulumValve(false);
-            _chamber.OnOffSetESCHV(false);
             CloseAllValves();
             _chamber.OpenValve(ValveType.TurboPumpPumping, true);
             _chamber.OpenValve(ValveType.TurboPumpPurge, true);
+            await Task.Delay(3000);
+            _chamber.OnOffSetESCHV(false);
+
         }
     }
 }

+ 2 - 1
Venus/Venus_RT/Modules/PMs/ProcessDefine.cs

@@ -26,6 +26,7 @@ namespace Venus_RT.Modules.PMs
         private List<float> rfMatchC2 = new List<float>();
         private int rfMatchC1C2Index = 0;
 
+
         private List<float> biasRfMatchC1 = new List<float>();
         private List<float> biasRfMatchC2 = new List<float>();
         private int biasRfMatchC1C2Index = 0;
@@ -316,7 +317,7 @@ namespace Venus_RT.Modules.PMs
                 Chamber.GeneratorBiasSetpower(0);
                 Chamber.GeneratorBiasPowerOn(false);
             }
-            if (step.ElapsedTime() > rfMatchC1C2Index * 1000)
+            if (step.ElapsedTime() > biasRfMatchC1C2Index * 1000)
             {
                 biasRfMatchC1.Add(Chamber.BiasRFMatchC1);
                 biasRfMatchC2.Add(Chamber.BiasRFMatchC2);

File diff suppressed because it is too large
+ 1 - 0
Venus/Venus_Themes/Themes/Generic.xaml


+ 32 - 3
Venus/Venus_Themes/UserControls/DrawGraphicsControl.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Animation;
 using System.Windows.Media.Imaging;
+using Venus_Core;
 
 namespace Venus_Themes.UserControls
 {
@@ -104,6 +105,15 @@ namespace Venus_Themes.UserControls
             DependencyProperty.RegisterAttached("Points", typeof(PointCollection), typeof(DrawGraphicsControl));
 
 
+        public List<StepItem> YPoints
+        {
+            get { return (List<StepItem>)GetValue(YPointsProperty); }
+            set { SetValue(YPointsProperty, value);  }
+        }
+        public static readonly DependencyProperty YPointsProperty =
+            DependencyProperty.RegisterAttached("YPoints", typeof(List<StepItem>), typeof(DrawGraphicsControl),new PropertyMetadata (new List<StepItem>()));
+
+
         #region 起始坐标轴
         public double WavePlotOriginX
         {
@@ -654,6 +664,25 @@ namespace Venus_Themes.UserControls
                         }
                     }
                 }
+                if (YPoints.Count > 0)
+                { 
+                    YPoints.ForEach(p => 
+                    {
+                        double StartX = m_StartDrawLineX + (Canvas_Main.ActualWidth - m_StartDrawLineX) / m_WavePlotWidth * (p.StartValue - m_WavePlotX);
+                        if (StartX < m_StartDrawLineX || p.StartValue < m_WavePlotX)
+                        {
+                            StartX = m_StartDrawLineX;
+                        }
+                        if (StartX > Canvas_Main.ActualWidth || p.StartValue > m_WavePlotX + m_WavePlotWidth)
+                        {
+                            StartX = Canvas_Main.ActualWidth;
+                        }
+                       
+                        graphics.DrawLine(Pens.Red, (float)StartX, (float)Canvas_Main.ActualHeight-50, (float)StartX,0);
+                        graphics.DrawString(p.Information, System.Drawing.SystemFonts.DefaultFont, System.Drawing.Brushes.Red, (float)StartX, (float)Canvas_Main.ActualHeight/6);
+                    });
+                }
+
                 //框选
                 if (m_StartMouseMove && m_MouseMove)
                 {
@@ -663,9 +692,9 @@ namespace Venus_Themes.UserControls
                         int y = m_StartPoint.Y > m_EndPoint.Y ? (int)m_EndPoint.Y : (int)m_StartPoint.Y;
                         int width = (int)Math.Abs(m_EndPoint.X - m_StartPoint.X);
                         int height = (int)Math.Abs(m_EndPoint.Y - m_StartPoint.Y);
-                        System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(x, y, width, height);
-                        
-                        graphics.FillRectangle(System.Drawing.Brushes.LightGray, rectangle);
+                        System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(x, y, width, height);                    
+                        SolidBrush shadowBrush = new SolidBrush(System.Drawing.Color.FromArgb(100,100,100,100));
+                        graphics.FillRectangle(shadowBrush, rectangle);
                         graphics.DrawRectangle(new System.Drawing.Pen (System.Drawing.Color.Transparent), rectangle);
                     }
                 }