Bläddra i källkod

添加rfmatch/biasrfmatch自动计算c1/c2功能

lixiang 1 år sedan
förälder
incheckning
649ac00032

+ 8 - 0
Venus/Venus_Core/ProcessUnitDefine.cs

@@ -117,6 +117,10 @@ namespace Venus_Core
         public int RFPower { get; set; }
         public int TuneCapPreset { get; set; }
         public int LoadCapPreset { get; set; }
+        [IsOnlyRead]
+        public int AutoC1 { get; set; }
+        [IsOnlyRead]
+        public int AutoC2 { get; set; }
         public int MaxReflectedPower { get; set; }
 
         private bool m_EnableRamp;
@@ -152,6 +156,10 @@ namespace Venus_Core
         public int BiasRFPower { get; set; }
         public int BiasTuneCapPreset { get; set; }
         public int BiasLoadCapPreset { get; set; }
+        [IsOnlyRead]
+        public int AutoC1 { get; set; }
+        [IsOnlyRead]
+        public int AutoC2 { get; set; }
         public int BiasMaxReflectedPower { get; set; }
         [JsonConverter(typeof(StringEnumConverter))]
         public GeneratorMode BiasGeneratorMode { get; set; }

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

@@ -71,10 +71,10 @@
                         </DataTemplate>
                     </ListBox.ItemTemplate>
                 </ListBox>-->
-                <DataGrid Grid.Row="1" x:Name="dataGrid_DataList" AutoGenerateColumns="False" Background="#FFD6D6D6"
-                            ItemsSource="{Binding KeyDataObservableCollection, Mode=TwoWay}" SelectionMode="Extended" SelectionUnit="FullRow" CanUserResizeRows="False" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserDeleteRows="True" CanUserAddRows="False" Focusable="False" HorizontalGridLinesBrush="Gray" VerticalGridLinesBrush="Gray" HeadersVisibility="Column" Margin="0,5,0,0" Height="200">
+                <DataGrid Style="{x:Null}" Grid.Row="1" x:Name="dataGrid_DataList" AutoGenerateColumns="False" Background="#FFD6D6D6"
+                            ItemsSource="{Binding KeyDataObservableCollection, Mode=TwoWay}"  SelectionUnit="FullRow" CanUserResizeRows="False" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserDeleteRows="True" CanUserAddRows="False" Focusable="False" HorizontalGridLinesBrush="Gray" VerticalGridLinesBrush="Gray" HeadersVisibility="Column" Margin="0,5,0,0" Height="200">
                     <DataGrid.Columns>
-                        <DataGridTextColumn Width="3*" Binding="{Binding Key,Mode=TwoWay}"  CanUserSort="False" IsReadOnly="True">
+                        <DataGridTextColumn Width="Auto" Binding="{Binding Key,Mode=TwoWay}"  CanUserSort="False" IsReadOnly="True">
                             <DataGridTextColumn.CellStyle>
                                 <Style TargetType="DataGridCell">
                                     <Setter Property="ToolTip" Value="{Binding Key}" />
@@ -86,7 +86,7 @@
                                 </DataTemplate>
                             </DataGridTextColumn.HeaderTemplate>
                         </DataGridTextColumn>
-                        <DataGridTemplateColumn Width="*" CanUserSort="True">
+                        <DataGridTemplateColumn Width="Auto" CanUserSort="True">
                             <DataGridTemplateColumn.CellTemplate>
                                 <DataTemplate>
                                     <Button Focusable="False" Width="42" FontSize="11"  Height="20" Tag="{Binding UniqueId}" Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor"/>

+ 1 - 2
Venus/Venus_MainPages/Views/DataHistoryView.xaml.cs

@@ -24,7 +24,7 @@ namespace Venus_MainPages.Views
         public DataHistoryView()
         {
             InitializeComponent();
-            this.DataContext = new DataHistoryViewModel();
+            //this.DataContext = new DataHistoryViewModel();
         }
         private DataHistoryViewModel _viewModel;
         private void OnChangeLineColor(object sender, RoutedEventArgs e)
@@ -46,7 +46,6 @@ namespace Venus_MainPages.Views
                         var _color = _viewModel.KeyDataObservableCollection[i].Color.Color;
                         MyDrawGraphicsControl.m_PenCollencteions[i] = new System.Drawing.Pen(System.Drawing.Color.FromArgb(_color.A, _color.R, _color.G, _color.B), 3);
                     }
-                    //_viewModel.OnSearchData();
                 }
             }
         }

+ 4 - 1
Venus/Venus_RT/Devices/JetKepler2200APM.cs

@@ -181,7 +181,10 @@ namespace Venus_RT.Devices
         public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
-
+        public override float RFMatchC1 => _Match.TunePosition1;
+        public override float RFMatchC2 => _Match.TunePosition2;
+        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
+        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
         public new ModuleName Module { get; }
 
         public override MovementPosition LiftPinPosition

+ 5 - 0
Venus/Venus_RT/Devices/JetKepler2300PM.cs

@@ -200,6 +200,11 @@ namespace Venus_RT.Devices
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
 
+        public override float RFMatchC1 => _Match.TunePosition1;
+        public override float RFMatchC2 => _Match.TunePosition2;
+        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
+        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
+
         public new ModuleName Module { get; }
 
         public override MovementPosition LiftPinPosition

+ 5 - 0
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -90,6 +90,11 @@ namespace Venus_RT.Devices
 
         public abstract bool BackSideHeOutOfRange { get; }
 
+        public abstract float RFMatchC1 { get; }
+        public abstract float RFMatchC2 { get; }
+        public abstract float BiasRFMatchC1 { get; }
+        public abstract float BiasRFMatchC2 { get; }
+
         public new ModuleName Module;
 
         public abstract MovementPosition LiftPinPosition { get; }

+ 5 - 0
Venus/Venus_RT/Devices/JetVenusPM.cs

@@ -185,6 +185,11 @@ namespace Venus_RT.Devices
         public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
+        public override float RFMatchC1 => _Match.TunePosition1;
+        public override float RFMatchC2 => _Match.TunePosition2;
+        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
+        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
+
 
         public new ModuleName Module { get; }
 

+ 7 - 0
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -11,6 +11,8 @@ using Venus_Core;
 using System.Diagnostics;
 using MECF.Framework.Common.DBCore;
 using Venus_RT.FAs;
+using MECF.Framework.Common.RecipeCenter;
+using Venus_Unity;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -407,6 +409,11 @@ namespace Venus_RT.Modules.PMs
 
         private bool ProcessDone()
         {
+            _currentRecipe.Steps[_currentStep].End();
+            //RecipeClient.Instance.Service.SaveAsRecipe(Module, CurrentRunningRecipe, RecipeUnity.RecipeToString(_currentRecipe));
+            //SerializeHelper.Instance.WriteToJsonFile<Recipe>(_currentRecipe, $"Recipe/{Module}/{CurrentRunningRecipe}.json");
+            //SaveRecipe(string chamId, string recipeName, string recipeContent, bool clearBarcode, bool notifyUI)
+            RecipeFileManager.Instance.SaveAsRecipe(Module.ToString(), CurrentRunningRecipe, RecipeUnity.RecipeToString(_currentRecipe));
             _stepTime.Stop();
             WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Idle);
             CloseAllValves();

+ 115 - 8
Venus/Venus_RT/Modules/PMs/ProcessDefine.cs

@@ -22,6 +22,13 @@ namespace Venus_RT.Modules.PMs
         private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> startHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
         private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> checkerHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
         private static Dictionary<string, Action<ProcessUnitBase, RecipeStep>> endHelper = new Dictionary<string, Action<ProcessUnitBase, RecipeStep>>();
+        private List<float> rfMatchC1 = new List<float>();
+        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;
 
         public ProcessHelper(JetPMBase pm)
         {
@@ -173,8 +180,28 @@ namespace Venus_RT.Modules.PMs
                 Chamber.GeneratorSetpower(0);
                 Chamber.GeneratorPowerOn(false);
             }
-            Chamber.SetMatchPosition(ProcessUnit.TuneCapPreset, ProcessUnit.LoadCapPreset);
-
+            int p1;
+            int p2;
+            if (ProcessUnit.TuneCapPreset > 0)
+            {
+                p1 = ProcessUnit.TuneCapPreset;
+            }
+            else
+            { 
+                p1 = ProcessUnit.AutoC1;
+            }
+            if (ProcessUnit.LoadCapPreset > 0)
+            {
+                p2 = ProcessUnit.LoadCapPreset;
+            }
+            else
+            {
+                p2 = ProcessUnit.AutoC2;
+            }
+            Chamber.SetMatchPosition(p1, p2);
+            rfMatchC1.Clear();
+            rfMatchC1.Clear();
+            rfMatchC1C2Index = 0;
             return RState.Running;
         }
 
@@ -194,13 +221,44 @@ namespace Venus_RT.Modules.PMs
                 Chamber.GeneratorPowerOn(false);
             }
 
-            return RState.Running;
+            if (step.ElapsedTime() > rfMatchC1C2Index * 1000)
+            {
+                rfMatchC1.Add(Chamber.RFMatchC1);
+                rfMatchC2.Add(Chamber.RFMatchC2);
+                rfMatchC1C2Index += 1;
+            }
+
+
+                return RState.Running;
         }
 
         private void TCPUnit_End(ProcessUnitBase unit, RecipeStep step)
         {
-            //Chamber.GeneratorSetpower(0);
-            //Chamber.GeneratorPowerOn(false);
+            var ProcessUnit = unit as TCPUnit;
+            if (rfMatchC1.Count >=6)
+            {
+                float allValue = 0;
+                for (int i = 4; i < rfMatchC1.Count; i++)
+                {
+                    allValue += rfMatchC1[i];
+                }
+                var average=allValue/ (rfMatchC1.Count-4);
+                ProcessUnit.AutoC1 = (int)average;
+            }
+            if (rfMatchC2.Count >= 6)
+            {
+                float allValue = 0;
+                for (int i = 4; i < rfMatchC2.Count; i++)
+                {
+                    allValue += rfMatchC2[i];
+                }
+                var average = allValue / (rfMatchC2.Count - 4);
+                ProcessUnit.AutoC2 = (int)average;
+            }
+
+            rfMatchC1.Clear();
+            rfMatchC2.Clear();
+            rfMatchC1C2Index = 0;
         }
 
         private RState BiasUnit_Start(ProcessUnitBase unit, RecipeStep step)
@@ -211,14 +269,34 @@ namespace Venus_RT.Modules.PMs
                 Chamber.GeneratorBiasSetpower(ProcessUnit.BiasRFPower);
                 Chamber.GeneratorBiasPowerOn(true);
             }
-           
-            Chamber.SetBiasMatchPosition(ProcessUnit.BiasTuneCapPreset, ProcessUnit.BiasLoadCapPreset);
+            int p1;
+            int p2;
+            if (ProcessUnit.BiasTuneCapPreset > 0)
+            {
+                p1 = ProcessUnit.BiasTuneCapPreset;
+            }
+            else
+            {
+                p1 = ProcessUnit.AutoC1;
+            }
+            if (ProcessUnit.BiasLoadCapPreset > 0)
+            {
+                p2 = ProcessUnit.BiasLoadCapPreset;
+            }
+            else
+            {
+                p2 = ProcessUnit.AutoC2;
+            }
+            Chamber.SetBiasMatchPosition(p1, p2);
             if(ProcessUnit.BiasGeneratorMode == GeneratorMode.Pulsing)
             {
                 Chamber.SetBiasPulseMode(true);
                 Chamber.SetBiasPulseRateFreq(ProcessUnit.PulseRateFreq);
                 Chamber.SetDiasPulseDutyCycle(ProcessUnit.PulseDutyCycle);
             }
+            biasRfMatchC1.Clear();
+            biasRfMatchC1.Clear();
+            biasRfMatchC1C2Index = 0;
             return RState.Running;
         }
 
@@ -238,14 +316,43 @@ namespace Venus_RT.Modules.PMs
                 Chamber.GeneratorBiasSetpower(0);
                 Chamber.GeneratorBiasPowerOn(false);
             }
-
+            if (step.ElapsedTime() > rfMatchC1C2Index * 1000)
+            {
+                biasRfMatchC1.Add(Chamber.BiasRFMatchC1);
+                biasRfMatchC2.Add(Chamber.BiasRFMatchC2);
+                biasRfMatchC1C2Index += 1;
+            }
             return RState.Running;
         }
 
         private void BiasUnit_End(ProcessUnitBase unit, RecipeStep step)
         {
+            var ProcessUnit = unit as BiasUnit;
             Chamber.GeneratorBiasSetpower(0);
             Chamber.GeneratorBiasPowerOn(false);
+            if (biasRfMatchC1.Count >= 6)
+            {
+                float allValue = 0;
+                for (int i = 4; i < biasRfMatchC1.Count; i++)
+                {
+                    allValue += biasRfMatchC1[i];
+                }
+                var average = allValue / (biasRfMatchC1.Count - 4);
+                ProcessUnit.AutoC1 = (int)average;
+            }
+            if (biasRfMatchC2.Count >= 6)
+            {
+                float allValue = 0;
+                for (int i = 4; i < biasRfMatchC2.Count; i++)
+                {
+                    allValue += biasRfMatchC2[i];
+                }
+                var average = allValue / (biasRfMatchC2.Count - 4);
+                ProcessUnit.AutoC2 = (int)average;
+            }
+            biasRfMatchC1.Clear();
+            biasRfMatchC1.Clear();
+            biasRfMatchC1C2Index = 0;
         }
 
         private RState GasControlUnit_Start(ProcessUnitBase unit, RecipeStep step)