Browse Source

1add vpw main create wafer
2add vpw recipe save check

chenzk 5 days ago
parent
commit
469149c326

+ 2 - 2
Framework/Common/RecipeCenter/VpwRinseStep.cs

@@ -41,12 +41,12 @@ namespace MECF.Framework.Common.RecipeCenter
                 switch (columnName)
                 {
                     case nameof(DurationSeconds):
-                        if (DurationSeconds < 0 || DurationSeconds > 200)
+                        if (DurationSeconds <= 0 || DurationSeconds > 200)
                             return "Time must be between 0 and 200 seconds!";
                         break;
 
                     case nameof(RotationSpeed):
-                        if (RotationSpeed < 0 || RotationSpeed > 800)
+                        if (RotationSpeed <= 0 || RotationSpeed > 800)
                             return "Speed must be between 0 and 800 rpm!";
                         break;
                 }

+ 36 - 0
PunkHPX8_MainPages/ViewModels/VPWMainViewModel.cs

@@ -10,6 +10,7 @@ using MECF.Framework.Common.Persistent.VpwMain;
 using MECF.Framework.Common.RecipeCenter;
 using MECF.Framework.Common.Utilities;
 using Prism.Mvvm;
+using PunkHPX8_MainPages.Unity;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -17,6 +18,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Input;
 using System.Windows.Threading;
+using WaferInfo = OpenSEMI.ClientBase.WaferInfo;
 
 namespace PunkHPX8_MainPages.ViewModels
 {
@@ -94,6 +96,14 @@ namespace PunkHPX8_MainPages.ViewModels
         /// cell 2 vacuum valve
         /// </summary>
         private bool _vpw2VacuumValve;
+        /// <summary>
+        /// VPW1Wafer信息
+        /// </summary>
+        private WaferInfo _vPW1WaferInfo;
+        /// <summary>
+        /// VPW2Wafer信息
+        /// </summary>
+        private WaferInfo _vPW2WaferInfo;
         #endregion
 
 
@@ -215,6 +225,22 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _vpw2VacuumValve; }
             set { SetProperty(ref _vpw2VacuumValve, value); }
         }
+        /// <summary>
+        /// VPW1Wafer
+        /// </summary>
+        public WaferInfo VPW1WaferInfo
+        {
+            get { return _vPW1WaferInfo; }
+            set { SetProperty(ref _vPW1WaferInfo, value); }
+        }
+        /// <summary>
+        /// VPW2Wafer
+        /// </summary>
+        public WaferInfo VPW2WaferInfo
+        {
+            get { return _vPW2WaferInfo; }
+            set { SetProperty(ref _vPW2WaferInfo, value); }
+        }
         #endregion
 
         #endregion
@@ -277,6 +303,16 @@ namespace PunkHPX8_MainPages.ViewModels
                     Vpw2CellFlow = CommonFunction.GetValue<double>(_rtDataValueDic, $"VPW2.DiwCellFlow");
                     Vpw1VacuumValve = CommonFunction.GetValue<bool>(_rtDataValueDic, $"VPW1.VacuumValve");
                     Vpw2VacuumValve = CommonFunction.GetValue<bool>(_rtDataValueDic, $"VPW2.VacuumValve");
+                    //VPW1 Wafer信息
+                    if (ModuleManager.ModuleInfos["VPW1"].WaferManager.Wafers.Count != 0)
+                    {
+                        VPW1WaferInfo = ModuleManager.ModuleInfos["VPW1"].WaferManager.Wafers[0];
+                    }
+                    //VPW2 Wafer信息
+                    if (ModuleManager.ModuleInfos["VPW2"].WaferManager.Wafers.Count != 0)
+                    {
+                        VPW2WaferInfo = ModuleManager.ModuleInfos["VPW2"].WaferManager.Wafers[0];
+                    }
                 }
             }
         }

+ 51 - 0
PunkHPX8_MainPages/ViewModels/VpwRecipeViewModel.cs

@@ -33,6 +33,7 @@ namespace PunkHPX8_MainPages.ViewModels
         private RecipeNode _currentNode;
         private bool _enable = false;
         private bool _isEdit = false;
+        private string _recipeErrorReason;
         /// <summary>
         /// Wafer尺寸集合
         /// </summary>
@@ -318,10 +319,60 @@ namespace PunkHPX8_MainPages.ViewModels
             Enable = true;
             _isEdit = false;
         }
+        private bool CheckVpwRecipeRinseStepValueValid(VpwRecipe vpwRecipe,out string errorReason)
+        {
+            errorReason = "";
+            foreach (var item in vpwRecipe.VacuumRinseStep)
+            {
+                if (item.DurationSeconds <= 0 || item.DurationSeconds > 200)
+                {
+                    errorReason = "VacuumPrewet Rinse Step Time value is not in 0~200";
+                    return false;
+                }
+                if (item.RotationSpeed <= 0 || item.RotationSpeed > 800)
+                {
+                    errorReason = "VacuumPrewet Rinse Step Speed value is not in 0~800";
+                    return false;
+                }
+            }
+            foreach (var item in vpwRecipe.VentRinseStep)
+            {
+                if (item.DurationSeconds <= 0 || item.DurationSeconds > 200)
+                {
+                    errorReason = "VentPrewet Rinse Step Rinse Step Time value is not in 0~200";
+                    return false;
+                }
+                if (item.RotationSpeed <= 0 || item.RotationSpeed > 800)
+                {
+                    errorReason = "VentPrewet Rinse Step Speed value is not in 0~800";
+                    return false;
+                }
+            }
+            foreach (var item in vpwRecipe.ExtendCleanRinseStep)
+            {
+                if (item.DurationSeconds <= 0 || item.DurationSeconds > 200)
+                {
+                    errorReason = "ExtendClean Rinse Step Rinse Step Time value is not in 0~200";
+                    return false;
+                }
+                if (item.RotationSpeed <= 0 || item.RotationSpeed > 800)
+                {
+                    errorReason = "ExtendClean Rinse Step Rinse Step Speed value is not in 0~800";
+                    return false;
+                }
+            }
+
+            return true;
+        }
         private void SaveAction(object param)
         {
             if (CheckValid(_isEdit))
             {
+                if (!CheckVpwRecipeRinseStepValueValid(Recipe, out _recipeErrorReason))
+                {
+                    MessageBox.Show($"{_recipeErrorReason}", "Save Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                    return;
+                }
                 Recipe.SaveDate = DateTime.Now;
                 try
                 {

+ 2 - 0
PunkHPX8_MainPages/Views/VPWMainView.xaml

@@ -85,6 +85,8 @@
                                            Cell2DIWFlow="{Binding Vpw2CellFlow}"
                                            VPW1VACValve="{Binding Vpw1VacuumValve}"
                                            VPW2VACValve="{Binding Vpw2VacuumValve}"
+                                           VPW1WaferInfo="{Binding VPW1WaferInfo}"
+                                           VPW2WaferInfo="{Binding VPW2WaferInfo}"
                 
                 ></UserControls:VPWMainUIControl>
         </Grid>

+ 2 - 1
PunkHPX8_Themes/UserControls/VPWMainStateControl.xaml

@@ -14,6 +14,7 @@
         <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
         <converters:BoolToColor2 x:Key="boolToColor2"></converters:BoolToColor2>
         <converters:BoolToColor6 x:Key="boolToColor6"></converters:BoolToColor6>
+        <converters:BoolToYellowColor2  x:Key="boolToYellowColor2"></converters:BoolToYellowColor2>
         <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
     </UserControl.Resources>
     <Grid>
@@ -55,7 +56,7 @@
         </Grid>
         <Grid Grid.Row="1" Grid.Column="1">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
-              Fill="{Binding FluidInContainment, Converter={StaticResource boolToColor}, ElementName=self}"/>
+              Fill="{Binding FluidInContainment, Converter={StaticResource boolToYellowColor2}, ElementName=self}"/>
         </Grid>
         <Grid Grid.Row="4" Grid.Column="1">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"

+ 11 - 0
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml

@@ -301,5 +301,16 @@
             </Border>
         </Grid>
 
+        <Canvas Height="30" Width="150" Canvas.Left="228" Canvas.Top="354" RenderTransformOrigin="0.5,0.5" Panel.ZIndex="2">
+            <Viewbox   Canvas.Left="5"  Canvas.Top="2.5" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="5">
+                <local:VPWWaferCtrl Width="140" Height="25" WaferData="{Binding ElementName=self, Path=VPW1WaferInfo}"/>
+            </Viewbox>
+        </Canvas>
+        <Canvas Height="30" Width="150" Canvas.Left="488" Canvas.Top="354" RenderTransformOrigin="0.5,0.5" Panel.ZIndex="2">
+            <Viewbox   Canvas.Left="5"  Canvas.Top="2.5" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="5">
+                <local:VPWWaferCtrl Width="140" Height="25" WaferData="{Binding ElementName=self, Path=VPW2WaferInfo}"/>
+            </Viewbox>
+        </Canvas>
+
     </Canvas>
 </UserControl>

+ 35 - 0
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
+using OpenSEMI.ClientBase;
 
 namespace PunkHPX8_Themes.UserControls
 {
@@ -231,6 +232,40 @@ namespace PunkHPX8_Themes.UserControls
             }
         }
 
+        public static readonly DependencyProperty VPW1WaferInfoProperty = DependencyProperty.Register(
+            "VPW1WaferInfo", typeof(WaferInfo), typeof(VPWMainUIControl));
+        /// <summary>
+        /// VPW1WaferInfo
+        /// </summary>
+        public WaferInfo VPW1WaferInfo
+        {
+            get
+            {
+                return (WaferInfo)this.GetValue(VPW1WaferInfoProperty);
+            }
+            set
+            {
+                this.SetValue(VPW1WaferInfoProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty VPW2WaferInfoProperty = DependencyProperty.Register(
+      "VPW2WaferInfo", typeof(WaferInfo), typeof(VPWMainUIControl));
+        /// <summary>
+        /// VPW2WaferInfo
+        /// </summary>
+        public WaferInfo VPW2WaferInfo
+        {
+            get
+            {
+                return (WaferInfo)this.GetValue(VPW2WaferInfoProperty);
+            }
+            set
+            {
+                this.SetValue(VPW2WaferInfoProperty, value);
+            }
+        }
+
         private void OpenDIWProcessValve_Click(object sender, RoutedEventArgs e)
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwProcessOn");

+ 1 - 1
PunkHPX8_Themes/UserControls/VPWWaferCtrl.xaml

@@ -8,7 +8,7 @@
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"   
              xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation">
     <Grid RenderTransformOrigin="0.5,0.5">
-        <ctrl:Slot ViewType="Front" WaferStatus="{Binding ElementName=self, Path=WaferData.WaferStatus}" 
+        <ctrl:Slot ViewType="Front" WaferStatus="{Binding ElementName=self, Path=WaferData.WaferStatus}"  SlotWidth="140"
                               SlotID="{Binding ElementName=self, Path=WaferData.SlotID}" 
                               ModuleID="{Binding ElementName=self, Path=WaferData.ModuleID}" 
                               SourceName="{Binding ElementName=self, Path=WaferData.SourceName}"