Browse Source

add vpw recipe releated

chenzk 3 weeks ago
parent
commit
90ccba8e1a

+ 6 - 0
.gitignore

@@ -8,3 +8,9 @@ Output
 packages
 TwinCAT Project1/
 /*.user
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_CompileInfo/674FCBAC-39BB-AEDA-75C8-1DC81940A0B0.compileinfo
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_CompileInfo/F4CA0B08-28C7-B789-9412-23CF1BB08D7E.compileinfo
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_Libraries/beckhoff automation gmbh/tc2_standard/3.4.5.0/tc2_standard.compiled-library
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_Libraries/beckhoff automation gmbh/tc2_system/3.6.4.0/tc2_system.compiled-library
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_Libraries/beckhoff automation gmbh/tc3_module/3.4.5.0/tc3_module.compiled-library
+/PunkHPX8_Twincate/PunkHPX8/PlcTest/_CompileInfo/*.compileinfo

+ 2 - 0
Framework/Common/Common.csproj

@@ -480,6 +480,8 @@
     <Compile Include="RecipeCenter\SrdRecipe.cs" />
     <Compile Include="RecipeCenter\SequenceRecipe.cs" />
     <Compile Include="RecipeCenter\RecipeType.cs" />
+    <Compile Include="RecipeCenter\VpwRecipe.cs" />
+    <Compile Include="RecipeCenter\VpwRinseStep.cs" />
     <Compile Include="Reservior\ReserviorInfo.cs" />
     <Compile Include="Routine\ICycle.cs" />
     <Compile Include="Routine\RoutineBase.cs" />

+ 0 - 2
Framework/Common/CommonData/Vpw/VpwMainCommonData.cs

@@ -33,8 +33,6 @@ namespace MECF.Framework.Common.CommonData.Vpw
         
         public bool BoosterPumpEnable { get { return _boosterPumpEnable; } set { _boosterPumpEnable = value;InvokePropertyChanged(nameof(BoosterPumpEnable)); } }
 
-
-
         /// <summary>
         /// pump状态内容
         /// </summary>

+ 0 - 1
Framework/Common/DataCenter/IQueryDataService.cs

@@ -120,7 +120,6 @@ namespace MECF.Framework.Common.DataCenter
     [ServiceKnownType(typeof(AITHighTemperatureHeaterData))]
     [ServiceKnownType(typeof(ResRecipe))]
     [ServiceKnownType(typeof(DepRecipe))]
-    [ServiceKnownType(typeof(PwtRecipe))]
     [ServiceKnownType(typeof(HvdRecipe))]
     [ServiceKnownType(typeof(SrdRecipe))]
     [ServiceKnownType(typeof(QdrRecipe))]

+ 3 - 3
Framework/Common/RecipeCenter/PwtRecipe.cs

@@ -14,7 +14,7 @@ namespace MECF.Framework.Common.RecipeCenter
         private string _author;
         private string _description;
         private string _ppid;
-        private RecipeType _recipeType=RecipeType.PWT;
+        //private RecipeType _recipeType=RecipeType.PWT;
         private DateTime _saveDate;
         private DateTime _createDate;
         private int _numberOfScans;
@@ -34,8 +34,8 @@ namespace MECF.Framework.Common.RecipeCenter
         [JsonProperty]
         public string Ppid { get { return _ppid; } set { _ppid = value; InvokePropertyChanged(nameof(Ppid)); } }
 
-        [JsonProperty]
-        public RecipeType RecipeType { get { return _recipeType; } set { _recipeType = value; InvokePropertyChanged(nameof(RecipeType)); } }
+        //[JsonProperty]
+        //public RecipeType RecipeType { get { return _recipeType; } set { _recipeType = value; InvokePropertyChanged(nameof(RecipeType)); } }
 
         [JsonProperty]
         public DateTime CreateDate { get { return _createDate; } set { _createDate = value; InvokePropertyChanged(nameof(CreateDate)); } }

+ 3 - 3
Framework/Common/RecipeCenter/RecipeType.cs

@@ -11,7 +11,7 @@ namespace MECF.Framework.Common.RecipeCenter
     {
         Sequence=0,
         SRD=1,
-        PWT=2,
+        VPW=2,
         DEP=3,
         QDR=4,
         HVD=5,
@@ -22,8 +22,8 @@ namespace MECF.Framework.Common.RecipeCenter
 
     public enum ActiveRecipeType
     {
-        [Description("Pre Wet Recipe")]
-        PWT,
+        [Description("Vacuum Prewet Recipe")]
+        VPW,
         [Description("Deposition Recipe")]
         DEP,
         [Description("Rinse Recipe")]

+ 4 - 4
Framework/Common/RecipeCenter/SequenceRecipeManager.cs

@@ -32,9 +32,9 @@ namespace MECF.Framework.Common.RecipeCenter
             {
                 return RecipeType.HVD;
             }
-            else if(str.EndsWith("pwt.rcp"))
+            else if(str.EndsWith("vpw.rcp"))
             {
-                return RecipeType.PWT;
+                return RecipeType.VPW;
             }
             else if(str.EndsWith("qdr.rcp"))
             {
@@ -101,8 +101,8 @@ namespace MECF.Framework.Common.RecipeCenter
                     return RecipeFileManager.Instance.LoadGenericityRecipe<ResRecipe>(strProduction);
                 case RecipeType.SRD:
                     return RecipeFileManager.Instance.LoadGenericityRecipe<SrdRecipe>(strProduction);
-                case RecipeType.PWT:
-                    return RecipeFileManager.Instance.LoadGenericityRecipe<PwtRecipe>(strProduction);
+                case RecipeType.VPW:
+                    return RecipeFileManager.Instance.LoadGenericityRecipe<VpwRecipe>(strProduction);
                 case RecipeType.QDR:
                     return RecipeFileManager.Instance.LoadGenericityRecipe<QdrRecipe>(strProduction);
                 case RecipeType.DEP:

+ 130 - 0
Framework/Common/RecipeCenter/VpwRecipe.cs

@@ -0,0 +1,130 @@
+using MECF.Framework.Common.CommonData;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MECF.Framework.Common.RecipeCenter
+{
+    public class VpwRecipe : NotifiableItem
+    {
+        #region 内部变量
+        private string _author;
+        private string _description;
+        private string _ppid;
+        private RecipeType _recipeType = RecipeType.VPW;
+        private DateTime _saveDate;
+        private DateTime _createDate;
+        private int _waferSize;
+        private int _totalTimeSeconds;
+        
+        private bool _purgeEnable;
+        private double _diwLoopDoSet;
+
+        private double _vacuumTarget;
+        private bool _isSprayBarRetract;
+        private int _dryHoldTime;
+        private bool _vacuumPrewetDripEnable;
+        private bool _vacuumPrewetSmallEnable;
+        private bool _vacuumPrewetLargeEnable;
+        private ObservableCollection<VpwRinseStep> _vacuumRinseStep;
+
+        private bool _ventPrewetDripEnable;
+        private bool _ventPrewetSmallEnable;
+        private bool _ventPrewetLargeEnable;
+        private ObservableCollection<VpwRinseStep> _ventRinseStep;
+
+        private bool _extendCleanDripEnable;
+        private bool _extendCleanSmallEnable;
+        private bool _extendCleanLargeEnable;
+        private ObservableCollection<VpwRinseStep> _extendCleanRinseStep;
+
+        private int _spinSpeed;
+        private int _spinTime;
+
+        #endregion
+
+        #region 属性
+        [JsonProperty]
+        public string Description { get { return _description; } set { _description = value; InvokePropertyChanged(nameof(Description)); } }
+
+        [JsonProperty]
+        public string Ppid { get { return _ppid; } set { _ppid = value; InvokePropertyChanged(nameof(Ppid)); } }
+
+        [JsonProperty]
+        public RecipeType RecipeType { get { return _recipeType; } set { _recipeType = value; InvokePropertyChanged(nameof(RecipeType)); } }
+
+        [JsonProperty]
+        public DateTime SaveDate { get { return _saveDate; } set { _saveDate = value; InvokePropertyChanged(nameof(SaveDate)); } }
+
+        [JsonProperty]
+        public DateTime CreateDate { get { return _createDate; } set { _createDate = value; InvokePropertyChanged(nameof(CreateDate)); } }
+
+        [JsonProperty]
+        public int WaferSize { get { return _waferSize; } set { _waferSize = value; InvokePropertyChanged(nameof(WaferSize)); } }
+
+        [JsonProperty]
+        public int TotalTimeSeconds { get { return _totalTimeSeconds; } set { _totalTimeSeconds = value; InvokePropertyChanged(nameof(TotalTimeSeconds)); } }
+
+        [JsonProperty]
+        public bool PurgeEnable { get { return _purgeEnable; } set { _purgeEnable = value; InvokePropertyChanged(nameof(PurgeEnable)); } }
+
+        [JsonProperty]
+        public double DiwLoopDoSet { get { return _diwLoopDoSet; } set { _diwLoopDoSet = value; InvokePropertyChanged(nameof(DiwLoopDoSet)); } }
+
+        [JsonProperty]
+        public double VacuumTarget { get { return _vacuumTarget; } set { _vacuumTarget = value; InvokePropertyChanged(nameof(VacuumTarget)); } }
+
+        [JsonProperty]
+        public bool IsSprayBarRetract { get { return _isSprayBarRetract; } set { _isSprayBarRetract = value; InvokePropertyChanged(nameof(IsSprayBarRetract)); } }
+
+        [JsonProperty]
+        public int DryHoldTime { get { return _dryHoldTime; } set { _dryHoldTime = value; InvokePropertyChanged(nameof(DryHoldTime)); } }
+
+        [JsonProperty]
+        public bool VacuumPrewetDripEnable { get { return _vacuumPrewetDripEnable; } set { _vacuumPrewetDripEnable = value; InvokePropertyChanged(nameof(VacuumPrewetDripEnable)); } }
+
+        [JsonProperty]
+        public bool VacuumPrewetSmallEnable { get { return _vacuumPrewetSmallEnable; } set { _vacuumPrewetSmallEnable = value; InvokePropertyChanged(nameof(VacuumPrewetSmallEnable)); } }
+
+        [JsonProperty]
+        public bool VacuumPrewetLargeEnable { get { return _vacuumPrewetLargeEnable; } set { _vacuumPrewetLargeEnable = value; InvokePropertyChanged(nameof(VacuumPrewetLargeEnable)); } }
+
+        [JsonProperty]
+        public ObservableCollection<VpwRinseStep> VacuumRinseStep { get { return _vacuumRinseStep; } set { _vacuumRinseStep = value; InvokePropertyChanged(nameof(VacuumRinseStep)); } }
+
+        [JsonProperty]
+        public bool VentPrewetDripEnable { get { return _ventPrewetDripEnable; } set { _ventPrewetDripEnable = value; InvokePropertyChanged(nameof(VentPrewetDripEnable)); } }
+
+        [JsonProperty]
+        public bool VentPrewetSmallEnable { get { return _ventPrewetSmallEnable; } set { _ventPrewetSmallEnable = value; InvokePropertyChanged(nameof(VentPrewetSmallEnable)); } }
+
+        [JsonProperty]
+        public bool VentPrewetLargeEnable { get { return _ventPrewetLargeEnable; } set { _ventPrewetLargeEnable = value; InvokePropertyChanged(nameof(VentPrewetLargeEnable)); } }
+
+        [JsonProperty]
+        public ObservableCollection<VpwRinseStep> VentRinseStep { get { return _ventRinseStep; } set { _ventRinseStep = value; InvokePropertyChanged(nameof(VentRinseStep)); } }
+
+        [JsonProperty]
+        public bool ExtendCleanDripEnable { get { return _extendCleanDripEnable; } set { _extendCleanDripEnable = value; InvokePropertyChanged(nameof(ExtendCleanDripEnable)); } }
+
+        [JsonProperty]
+        public bool ExtendCleanSmallEnable { get { return _extendCleanSmallEnable; } set { _extendCleanSmallEnable = value; InvokePropertyChanged(nameof(ExtendCleanSmallEnable)); } }
+
+        [JsonProperty]
+        public bool ExtendCleanLargeEnable { get { return _extendCleanLargeEnable; } set { _extendCleanLargeEnable = value; InvokePropertyChanged(nameof(ExtendCleanLargeEnable)); } }
+
+        [JsonProperty]
+        public ObservableCollection<VpwRinseStep> ExtendCleanRinseStep { get { return _extendCleanRinseStep; } set { _extendCleanRinseStep = value; InvokePropertyChanged(nameof(ExtendCleanRinseStep)); } }
+
+        [JsonProperty]
+        public int SpinSpeed { get { return _spinSpeed; } set { _spinSpeed = value; InvokePropertyChanged(nameof(SpinSpeed)); } }
+        
+        [JsonProperty]
+        public int SpinTime { get { return _spinTime; } set { _spinTime = value; InvokePropertyChanged(nameof(SpinTime)); } }
+        #endregion
+    }
+}

+ 25 - 0
Framework/Common/RecipeCenter/VpwRinseStep.cs

@@ -0,0 +1,25 @@
+using MECF.Framework.Common.CommonData;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MECF.Framework.Common.RecipeCenter
+{
+    public class VpwRinseStep : NotifiableItem
+    {
+        #region 内部变量
+        private int _durationSeconds;
+        private int _rotationSpeed;
+        #endregion
+
+        #region 属性
+        [JsonProperty]
+        public int DurationSeconds { get { return _durationSeconds; } set { _durationSeconds = value; InvokePropertyChanged(nameof(DurationSeconds)); } }
+        [JsonProperty]
+        public int RotationSpeed { get { return _rotationSpeed; } set { _rotationSpeed = value; InvokePropertyChanged(nameof(RotationSpeed)); } }
+        #endregion
+    }
+}

+ 8 - 0
PunkHPX8_MainPages/PunkHPX8_MainPages.csproj

@@ -220,6 +220,7 @@
     <Compile Include="ViewModels\VPWCellViewModel.cs" />
     <Compile Include="ViewModels\VPWMainViewModel.cs" />
     <Compile Include="ViewModels\VPWMotionViewModel.cs" />
+    <Compile Include="ViewModels\VpwRecipeViewModel.cs" />
     <Compile Include="ViewModels\VPWStationSetupViewModel.cs" />
     <Compile Include="ViewModels\WaferDialogViewModel.cs" />
     <Compile Include="ViewModels\WaferHistoryDBViewModel.cs" />
@@ -391,6 +392,9 @@
     <Compile Include="Views\VPWMotionView.xaml.cs">
       <DependentUpon>VPWMotionView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\VpwRecipeView.xaml.cs">
+      <DependentUpon>VpwRecipeView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\VPWStationSetupView.xaml.cs">
       <DependentUpon>VPWStationSetupView.xaml</DependentUpon>
     </Compile>
@@ -663,6 +667,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\VpwRecipeView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\VPWStationSetupView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 286 - 0
PunkHPX8_MainPages/ViewModels/VpwRecipeViewModel.cs

@@ -0,0 +1,286 @@
+using Aitex.Core.UI.MVVM;
+using Aitex.Core.Utilities;
+using MECF.Framework.Common.RecipeCenter;
+using MECF.Framework.Common.Utilities;
+using Prism.Mvvm;
+using PunkHPX8_MainPages.PMs;
+using PunkHPX8_Themes.UserControls;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Input;
+
+namespace PunkHPX8_MainPages.ViewModels
+{
+    public class VpwRecipeViewModel : BindableBase
+    {
+        private const string ENGINEERING = "Engineering";
+
+        #region 内部变量
+        private Dictionary<string, RecipeNode> _recipeNodeDic = new Dictionary<string, RecipeNode>();
+        private ObservableCollection<RecipeNode> _recipeNodes;
+        private UiRecipeManager _uiRecipeManager = new UiRecipeManager();
+        private Dictionary<string, bool> _propertyValidResultDic = new Dictionary<string, bool>();
+        private VpwRecipe _recipe;
+        private bool _editEnable;
+        private bool _createEnable;
+        private RecipeNode _currentNode;
+        private bool _enable = false;
+        private bool _isEdit = false;
+        #endregion
+
+        #region 属性
+        public ObservableCollection<RecipeNode> RecipeNodes
+        {
+            get { return _recipeNodes; }
+            set { SetProperty(ref _recipeNodes, value); }
+        }
+        public Dictionary<string, bool> PropertyValidResultDic
+        {
+            get { return _propertyValidResultDic; }
+            set { SetProperty(ref _propertyValidResultDic, value); }
+        }
+        public RecipeNode CurrentNode
+        {
+            get { return _currentNode; }
+            set { SetProperty(ref _currentNode, value); }
+        }
+        public bool Enable
+        {
+            get { return _enable; }
+            set { SetProperty(ref _enable, value); }
+        }
+        public bool EditEnable
+        {
+            get { return _editEnable; }
+            set { SetProperty(ref _editEnable, value); }
+        }
+        public bool CreateEnable
+        {
+            get { return _createEnable; }
+            set { SetProperty(ref _createEnable, value); }
+        }
+
+        public VpwRecipe Recipe
+        {
+            get { return _recipe; }
+            set { SetProperty(ref _recipe, value); }
+        }
+       
+        #region 指令
+        public ICommand OperationCommand
+        {
+            get;
+            private set;
+        }
+        [IgnorePropertyChange]
+        public ICommand CreateCommand { get; private set; }
+        [IgnorePropertyChange]
+        public ICommand EditCommand { get; private set; }
+        [IgnorePropertyChange]
+        public ICommand SaveRecipeCommand { get; private set; }
+        [IgnorePropertyChange]
+        public ICommand SaveAsRecipeCommand { get; private set; }
+        #endregion
+
+        public VpwRecipeViewModel()
+        {
+            OperationCommand = new DelegateCommand<object>(SelectionChangedAction);
+            CreateCommand = new DelegateCommand<object>(CreateAction);
+            EditCommand = new DelegateCommand<object>(EditAction);
+            SaveRecipeCommand = new DelegateCommand<object>(SaveAction);
+            SaveAsRecipeCommand = new DelegateCommand<object>(SaveAsAction);
+        }
+        #endregion
+
+
+        public void LoadRecipeData()
+        {
+            RecipeNodes = _uiRecipeManager.GetRecipesByType("vpw");
+            _recipeNodeDic.Clear();
+            InitializeDictionary(RecipeNodes);
+        }
+
+        private void InitializeDictionary(ObservableCollection<RecipeNode> nodes)
+        {
+            if (nodes != null)
+            {
+                foreach (var node in nodes)
+                {
+                    if (node.NodeType == RecipeNodeType.File)
+                    {
+                        _recipeNodeDic[node.Name] = node;
+                    }
+                    InitializeDictionary(node.Children);
+                }
+            }
+        }
+
+        private void SelectionChangedAction(object param)
+        {
+            if (_recipeNodeDic.ContainsKey(param.ToString()))
+            {
+                CurrentNode = _recipeNodeDic[param.ToString()];
+                if (CurrentNode.NodeType == RecipeNodeType.File)
+                {
+                    if (CurrentNode.RecipeLocation == ENGINEERING)
+                    {
+                        EditEnable = true;
+                        CreateEnable = true;
+                    }
+                    else
+                    {
+                        EditEnable = false;
+                        CreateEnable = false;
+                    }
+                }
+                Recipe = _uiRecipeManager.LoadRecipe<VpwRecipe>(CurrentNode.RecipeFullFileName);
+                if (Recipe == null)
+                {
+                    MessageBox.Show("Invalid Recipe", "Load Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                    EditEnable = false;
+                    CreateEnable = false;
+                }
+                Enable = false;
+            }
+            else
+            {
+                if (param.ToString() == ENGINEERING)
+                {
+                    CreateEnable = true;
+                }
+                else
+                {
+                    CreateEnable = false;
+                }
+                CurrentNode = null;
+                Recipe = null;
+                EditEnable = false;
+                Enable = false;
+            }
+        }
+
+        private void CreateAction(object param)
+        {
+            RecipeNameDialog recipeNameDialog = new RecipeNameDialog();
+            if (recipeNameDialog.ShowDialog().Value)
+            {
+                if (!CheckNameExist(recipeNameDialog.RecipeName))
+                {
+                    Recipe = new VpwRecipe();
+                    Recipe.CreateDate = DateTime.Now;
+                    Recipe.Ppid = recipeNameDialog.RecipeName;
+                    Recipe.Description = recipeNameDialog.RecipeDescription;
+                    Enable = true;
+                    _isEdit = false;
+                }
+            }
+        }
+        private void EditAction(object param)
+        {
+            Enable = true;
+            _isEdit = false;
+        }
+        private void SaveAction(object param)
+        {
+            if (CheckValid(_isEdit))
+            {
+                Recipe.SaveDate = DateTime.Now;
+                try
+                {
+                    _uiRecipeManager.SaveRecipe<VpwRecipe>(ENGINEERING, Recipe.Ppid, "vpw", Recipe);
+                    LoadRecipeData();
+                    MessageBox.Show("Save Recipe Success", "Save Recipe", MessageBoxButton.OK, MessageBoxImage.Information);
+                    Enable = false;
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(ex.Message, "Save Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                }
+            }
+        }
+        /// <summary>
+        /// 另存为
+        /// </summary>
+        /// <param name="param"></param>
+        private void SaveAsAction(object param)
+        {
+            if (Recipe == null)
+            {
+                MessageBox.Show("Select a Recipe first", "SaveAs Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            VpwRecipe recipe = new VpwRecipe();
+            if (CheckValid(_isEdit))
+            {
+                RecipeNameDialog recipeNameDialog = new RecipeNameDialog();
+                if (recipeNameDialog.ShowDialog().Value)
+                {
+                    if (!CheckNameExist(recipeNameDialog.RecipeName))
+                    {
+                        recipe = new VpwRecipe();
+
+                        recipe = (VpwRecipe)PropertyUtil.Clone(Recipe);
+                        recipe.CreateDate = DateTime.Now;
+                        recipe.Ppid = recipeNameDialog.RecipeName;
+                        recipe.Description = recipeNameDialog.RecipeDescription;
+
+                    }
+                    else if (recipeNameDialog.RecipeName != null)
+                    {
+                        MessageBox.Show("Name can not be Null", "Create Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                        return;
+                    }
+                    else
+                    {
+                        return;
+                    }
+                }
+                try
+                {
+                    _uiRecipeManager.SaveRecipe<RdsRecipe>(ENGINEERING, recipe.Ppid, "vpw", recipe);
+                    LoadRecipeData();
+                    MessageBox.Show("Save As Recipe Success", "SaveAs Recipe", MessageBoxButton.OK, MessageBoxImage.Information);
+                    Enable = false;
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(ex.Message, "Save As Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                }
+            }
+        }
+
+        private bool CheckNameExist(string name)
+        {
+            foreach (string item in _recipeNodeDic.Keys)
+            {
+                if (item == name)
+                {
+                    MessageBox.Show($"{name} is exsit", "Save Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        private bool CheckValid(bool editType)
+        {
+            foreach (string key in _propertyValidResultDic.Keys)
+            {
+          
+                bool valid = _propertyValidResultDic[key];
+                if (!valid)
+                {
+                    MessageBox.Show($"{key} data invalid", "Save Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
+                    return false;
+                }
+            }
+            return true;
+        }
+
+    }
+}

+ 1 - 1
PunkHPX8_MainPages/Views/VPWMainView.xaml

@@ -38,7 +38,7 @@
                                                 InputPumpSpeed="{Binding VpwMainCommonData.BoosterPumpSpeed,Mode=TwoWay}"
                                                 PumpEnable="{Binding VpwMainCommonData.BoosterPumpEnable}"
                                                 StatusValue="{Binding VpwMainCommonData.BoosterPumpStatusContent}"
-                                                PumpSpeedAuto="{Binding VpwMainCommonData.BoosterPumpIsAutoMode}"
+                                                PumpSpeedAuto="{Binding VpwMainCommonData.BoosterPumpSpeedAuto}"
                                                 PressureCurrent="{Binding VpwMainCommonData.BoosterPumpCurrent}"
                 
                 ></UserControls:VPWBoosterPumpControl>

+ 35 - 0
PunkHPX8_MainPages/Views/VpwRecipeView.xaml

@@ -0,0 +1,35 @@
+<UserControl x:Class="PunkHPX8_MainPages.Views.VpwRecipeView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PunkHPX8_MainPages.Views"
+             xmlns:prism="http://prismlibrary.com/" 
+             xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"  
+             xmlns:converters="clr-namespace:PunkHPX8_MainPages.Converters"
+             xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls;assembly=PunkHPX8_Themes"  
+             xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" 
+             xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="800" d:DesignWidth="1800" Loaded="UserControl_Loaded">
+    <UserControl.Resources>
+        <converters:BoolReverseConverter x:Key="boolReverseConverter"/>
+        <converters:BoolVisibilityConverter x:Key="boolVisibilityConverter"/>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="100"></RowDefinition>
+            <RowDefinition Height="210"></RowDefinition>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="50"></ColumnDefinition>
+            <ColumnDefinition Width="400"></ColumnDefinition>
+            <ColumnDefinition></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <UserControls:RecipeFileLoadControl Grid.Row="1" Grid.RowSpan="2" Grid.Column="1" Title="VPW Recipe" RecipeNodes="{Binding RecipeNodes}" OperationCommand="{Binding OperationCommand}"
+                                     RecipeLocation="{Binding CurrentNode.RecipeLocation}" EditEnable="{Binding EditEnable}" CreateEnable="{Binding CreateEnable}" RecipeFileName="{Binding CurrentNode.FileName}"
+                                     CreateCommand="{Binding CreateCommand}" EditCommand="{Binding EditCommand}"/>
+    </Grid>
+</UserControl>

+ 34 - 0
PunkHPX8_MainPages/Views/VpwRecipeView.xaml.cs

@@ -0,0 +1,34 @@
+using PunkHPX8_MainPages.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_MainPages.Views
+{
+    /// <summary>
+    /// VpwRecipeView.xaml 的交互逻辑
+    /// </summary>
+    public partial class VpwRecipeView : UserControl
+    {
+        public VpwRecipeView()
+        {
+            InitializeComponent();
+        }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            (this.DataContext as VpwRecipeViewModel).LoadRecipeData();
+        }
+    }
+}

+ 2 - 1
PunkHPX8_RT/Devices/VpwMain/VpwMainDevice.cs

@@ -204,6 +204,7 @@ namespace PunkHPX8_RT.Devices.VpwMain
                         _commonData.BoosterPumpPressureData.Value = pressure;
                     }
                     break;
+
             }
         }
         /// <summary>
@@ -437,7 +438,7 @@ namespace PunkHPX8_RT.Devices.VpwMain
         /// <returns></returns>
         private bool BoosterPumpSpeedManualOperation()
         {
-            _commonData.BoosterPumpSpeedAuto = true;
+            _commonData.BoosterPumpSpeedAuto = false;
             _commonData.BoosterPumpModel = "Manual";
             string statusContent = _commonData.BoosterPumpStatus ? "On" : "Off";
             _commonData.BoosterPumpStatusContent = $"{_commonData.BoosterPumpModel}: {statusContent}";

BIN
PunkHPX8_Twincate/PunkHPX8/PlcTest/_CompileInfo/81A32A98-D497-21F2-932A-87DD61F7A7B2.compileinfo


BIN
PunkHPX8_Twincate/PunkHPX8/PlcTest/_CompileInfo/EC730D4F-1BB0-3D0E-7892-C5D7A41107F2.compileinfo


+ 3 - 3
PunkHPX8_UI/Config/UIMenu.json

@@ -330,10 +330,10 @@
 				"View": "SrdRecipeView"
 			},
 			{
-				"Id": "PwtRecipe",
+				"Id": "VpwRecipe",
 				"IsShow": "true",
-				"Name": "PWT",
-				"View": "PwtRecipeView"
+				"Name": "VPW",
+				"View": "VpwRecipeView"
 			},
 			{
 				"Id": "DepRecipe",

+ 4 - 4
PunkHPX8_UI/Config/UIMenu_permission.json

@@ -233,7 +233,7 @@
 						"Permission": 2
 					},
 					{
-						"MenuName": "PWT",
+						"MenuName": "VPW",
 						"Permission": 2
 					},
 					{
@@ -552,7 +552,7 @@
 						"Permission": 2
 					},
 					{
-						"MenuName": "PWT",
+						"MenuName": "VPW",
 						"Permission": 2
 					},
 					{
@@ -839,7 +839,7 @@
 						"Permission": 2
 					},
 					{
-						"MenuName": "PWT",
+						"MenuName": "VPW",
 						"Permission": 2
 					},
 					{
@@ -1171,7 +1171,7 @@
 						"Permission": 2
 					},
 					{
-						"MenuName": "PWT",
+						"MenuName": "VPW",
 						"Permission": 2
 					},
 					{