Browse Source

1revise vpw recipe step view
2revise vpw run Recipe do check
3add vpw cell start/Stop rotation

chenzk 3 days ago
parent
commit
04c2ef879c

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

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
 
 namespace MECF.Framework.Common.RecipeCenter
 {
-    public class VpwRinseStep : NotifiableItem,IDataErrorInfo, INotifyPropertyChanged
+    public class VpwRinseStep : NotifiableItem, INotifyPropertyChanged
     {
         #region 内部变量
         private int _durationSeconds;
@@ -32,31 +32,6 @@ namespace MECF.Framework.Common.RecipeCenter
         public int Step { get { return _step; } set { _step = value; InvokePropertyChanged(nameof(Step)); } }
         #endregion
 
-        // IDataErrorInfo 实现
-        public string Error => null;
-        public string this[string columnName]
-        {
-            get
-            {
-                switch (columnName)
-                {
-                    case nameof(DurationSeconds):
-                        if (DurationSeconds <= 0 || DurationSeconds > 200)
-                            return "Time must be between 0 and 200 seconds!";
-                        break;
-
-                    case nameof(RotationSpeed):
-                        if (RotationSpeed <= 0 || RotationSpeed > 800)
-                            return "Speed must be between 0 and 800 rpm!";
-                        break;
-                }
-                return null;
-            }
-        }
-
-        // INotifyPropertyChanged 实现
-        public event PropertyChangedEventHandler PropertyChanged;
-        protected void OnPropertyChanged(string name) =>
-            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+       
     }
 }

+ 36 - 0
PunkHPX8_MainPages/ViewModels/VpwRecipeViewModel.cs

@@ -34,6 +34,9 @@ namespace PunkHPX8_MainPages.ViewModels
         private bool _enable = false;
         private bool _isEdit = false;
         private string _recipeErrorReason;
+        private bool _isVacuumPrewetRinseAddInable = true;
+        private bool _isVentPrewetRinseAddInable = true;
+        private bool _isExtendCleanRinseAddInable = true;
         /// <summary>
         /// Wafer尺寸集合
         /// </summary>
@@ -479,6 +482,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void AddBelowAction(object param)
         {
+            if (Recipe!=null && Recipe.VacuumRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Vacuum Prewet Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();
@@ -500,6 +508,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void AddAboveAction(object param)
         {
+            if (Recipe != null && Recipe.VacuumRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Vacuum Prewet Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();
@@ -520,6 +533,7 @@ namespace PunkHPX8_MainPages.ViewModels
                     SelectedVacuumPrewetIndex--;
                 }
             }
+            
         }
         /// <summary>
         /// 上移
@@ -592,6 +606,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void VentPrewetAddBelowAction(object param)
         {
+            if (Recipe != null && Recipe.VentRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Vent Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();
@@ -613,6 +632,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void VentPrewetAddAboveAction(object param)
         {
+            if (Recipe != null && Recipe.VentRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Vent Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();
@@ -633,6 +657,7 @@ namespace PunkHPX8_MainPages.ViewModels
                     SelectedVentPrewetIndex--;
                 }
             }
+           
         }
         /// <summary>
         /// 上移
@@ -695,6 +720,7 @@ namespace PunkHPX8_MainPages.ViewModels
                     Recipe.VentRinseStep.RemoveAt(SelectedVentPrewetIndex);
                 }
             }
+           
         }
         #endregion
 
@@ -705,6 +731,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void ExtendCleanAddBelowAction(object param)
         {
+            if (Recipe != null && Recipe.ExtendCleanRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Extend Clean Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();
@@ -726,6 +757,11 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <param name="param"></param>
         private void ExtendCleanAddAboveAction(object param)
         {
+            if (Recipe != null && Recipe.ExtendCleanRinseStep.Count >= 5)
+            {
+                MessageBox.Show($"Extend Clean Rinse Step is already with 5 step,can not add", "Add Rinse Step", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
             if (Recipe != null)
             {
                 VpwRinseStep currentRinseSteps = new VpwRinseStep();

+ 0 - 75
PunkHPX8_MainPages/Views/VpwRecipeView.xaml

@@ -179,38 +179,11 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Vac
                     <DataGrid x:Name="VacuumPrewetRinseGrid"  Width="215" MinRowHeight="27" Grid.Row="6" AutoGenerateColumns="False"  CanUserAddRows="False"  FontFamily="Arial" FontSize="14" Margin="12,88,73,-78" 
           ItemsSource="{Binding Recipe.VacuumRinseStep}" SelectionMode="Single" IsEnabled="{Binding Enable}" SelectedIndex="{Binding SelectedVacuumPrewetIndex,Mode=TwoWay}"
                               ScrollViewer.HorizontalScrollBarVisibility="Disabled"  ScrollViewer.VerticalScrollBarVisibility="Auto">
-                        <DataGrid.Resources>
-                            <extendedControls:BindingProxy x:Key="DataShowProxy"  Data="{Binding}" />
-                        </DataGrid.Resources>
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" IsReadOnly="True" Width="50"  Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
                             <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                             <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                         </DataGrid.Columns>
                     </DataGrid>
@@ -325,32 +298,8 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Ven
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" Width="50"  IsReadOnly="True" Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
                             <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                             <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                         </DataGrid.Columns>
                     </DataGrid>
@@ -418,32 +367,8 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Ext
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" Width="50"  IsReadOnly="True" Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
                             <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                             <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
-                                <DataGridTextColumn.ElementStyle>
-                                    <Style TargetType="TextBlock">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.ElementStyle>
-                                <DataGridTextColumn.EditingElementStyle>
-                                    <Style TargetType="TextBox">
-                                        <Setter Property="ToolTip" 
-Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
-                                    </Style>
-                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
                         </DataGrid.Columns>
                     </DataGrid>

+ 3 - 1
PunkHPX8_RT/Devices/VpwCell/VpwCellDevice.cs

@@ -267,8 +267,10 @@ namespace PunkHPX8_RT.Devices.VpwCell
                 LOG.WriteLog(eEvent.ERR_VPW, Module, $"Start rotation paramater is wrong");
                 return false;
             }
-            double targetPostion = (int)args[0] * 6 * (int)args[1];
+            double targetPostion = (int)args[0]  * 6 * (int)args[1];
             object[] param = new object[] { "",targetPostion };
+            int degSpeed = (int)args[0] * 6;
+            SetRotationSpeed(degSpeed);
             return _rotationAxis.JogUpPosition("", param);
         }
 

+ 4 - 0
PunkHPX8_RT/Modules/VpwCell/VpwManualPrepareRoutine.cs

@@ -177,6 +177,10 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckLoopDO()
         {
+            if (_recipe.DiwLoopDoSet == 0)
+            {
+                return true;
+            }
             double loopDoValue = _vpwCellDevice.LoopDOValue;
             bool result = loopDoValue < _recipe.DiwLoopDoSet;
             if (!result) 

+ 4 - 0
PunkHPX8_RT/Modules/VpwCell/VpwRecipeRoutine.cs

@@ -107,6 +107,10 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         private bool CheckLoopDO()
         {
+            if(_recipe.DiwLoopDoSet == 0)
+            {
+                return true;
+            }
             double loopDoValue = _vpwCellDevice.LoopDOValue;
             bool result = loopDoValue < _recipe.DiwLoopDoSet;
             if (!result)

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwVacuumPrewetRoutine.cs

@@ -184,7 +184,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         private bool CheckVacuumValue()
         {
             double vacuumValue = _vpwCellDevice.CommonData.VacuumPressure;
-            if (vacuumValue >= _recipe.VacuumTarget)
+            if (vacuumValue <= _recipe.VacuumTarget)
             {
                 return true;
             }

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwVentPrewetRoutine.cs

@@ -106,7 +106,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         private bool CheckLidReleaseVacuum()
         {
             double vacuumValue = _vpwCellDevice.CommonData.VacuumPressure;
-            return vacuumValue >= _lidReleasePressure;
+            return vacuumValue <= _lidReleasePressure;
         }
         /// <summary>
         /// open vent valve

+ 3 - 1
PunkHPX8_RT/Modules/VpwMain/VPWHomeRoutine.cs

@@ -14,6 +14,7 @@ using SecsGem.Core.ItemModel;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Text;
 using System.Threading.Tasks;
@@ -176,7 +177,8 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         private bool CheckTotalFlowFailedAction()
         {
-           
+
+            LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $" current total flow {_mainDevice.CommonData.DiwTotalFlow} is less than {_totalFlowStartLimit}");
             _mainDevice.BoosterPumpDisable() ;
             _mainDevice.DiwDisable() ;
             _mainDevice.DiwProcessOff() ;

+ 1 - 1
PunkHPX8_RT/Modules/VpwMain/VpwPurgeRoutine.cs

@@ -350,7 +350,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         private bool OpenDiwDegas()
         {
-            return _mainDevice.DiwDegasValveOff();
+            return _mainDevice.DiwDegasValveOn();
         }
         /// <summary>
         /// 检验流量

+ 2 - 2
PunkHPX8_Themes/UserControls/VPWCellStatusControl.xaml

@@ -81,7 +81,7 @@
 
         <Grid Grid.Row="4" Grid.Column="1">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
-    Fill="{Binding ChamberClose, Converter={StaticResource boolToColor}, ElementName=self}"/>
+    Fill="{Binding ChamberOpen, Converter={StaticResource boolToColor}, ElementName=self}"/>
         </Grid>
         <Grid Grid.Row="4" Grid.Column="2" >
             <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Open" Click="ChamberOpen_Click"></Button>
@@ -91,7 +91,7 @@
         </Grid>
         <Grid Grid.Row="4" Grid.Column="4">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
-Fill="{Binding ChamberOpen, Converter={StaticResource boolToColor}, ElementName=self}"/>
+Fill="{Binding ChamberClose, Converter={StaticResource boolToColor}, ElementName=self}"/>
         </Grid>
 
         <Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black">

+ 2 - 2
PunkHPX8_Themes/UserControls/VPWMainStateControl.xaml

@@ -75,7 +75,7 @@
 
         <Grid Grid.Row="5" Grid.Column="1">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
-    Fill="{Binding ChamberClose, Converter={StaticResource boolToColor}, ElementName=self}"/>
+    Fill="{Binding ChamberOpen, Converter={StaticResource boolToColor}, ElementName=self}"/>
         </Grid>
         <Grid Grid.Row="5" Grid.Column="2" >
             <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Open" Click="ChamberOpen_Click"></Button>
@@ -85,7 +85,7 @@
         </Grid>
         <Grid Grid.Row="5" Grid.Column="4">
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
-Fill="{Binding ChamberOpen, Converter={StaticResource boolToColor}, ElementName=self}"/>
+Fill="{Binding ChamberClose, Converter={StaticResource boolToColor}, ElementName=self}"/>
         </Grid>
 
         <Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black">

+ 0 - 4
PunkHPX8_Twincate/PunkHPX8.project.~u

@@ -1,4 +0,0 @@
-JET-CK
-DESKTOP-JCT1016
-4172
-638864370298267372