Browse Source

1revise vpw main/cell ui
2add vpw cell recipe

chenzk 1 day ago
parent
commit
18d82fedb3

+ 21 - 2
PunkHPX8_MainPages/ViewModels/VPWCellViewModel.cs

@@ -314,7 +314,8 @@ namespace PunkHPX8_MainPages.ViewModels
         public void LoadData(string systemName)
         {
             Module = systemName;
-
+            RecipeModuleName = "VPW Recipe";
+            RecipeType = "vpw";
             _rtDataKeys.Clear();
             List<string> lst = new List<string>();
             _rtDataValueDic = QueryDataClient.Instance.Service.PollData(lst);
@@ -323,6 +324,7 @@ namespace PunkHPX8_MainPages.ViewModels
             _rtDataKeys.Add($"{Module}.{COMMONDATA}");
             _rtDataKeys.Add($"{Module}.FsmState");
             _rtDataKeys.Add($"VPWMain1.{COMMONDATA}");
+            _rtDataKeys.Add($"{Module}.AchievedCycle");
 
             if (_timer == null)
             {
@@ -347,7 +349,24 @@ namespace PunkHPX8_MainPages.ViewModels
                     VpwCellCommonData = CommonFunction.GetValue<VpwCellCommonData>(_rtDataValueDic, $"{Module}.{COMMONDATA}");
                     VpwMainCommonData = CommonFunction.GetValue<VpwMainCommonData>(_rtDataValueDic, $"VPWMain1.{COMMONDATA}");
                     VpwCellPersistent = CommonFunction.GetValue<VpwCellPersistentValue>(_rtDataValueDic, $"{Module}.{PERSISTENT_VALUE}");
-                    StateMachine = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState"); 
+                    StateMachine = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
+                    if ("Manual".Equals(VpwCellPersistent.OperatingMode))
+                    {
+                        IsEnabled = true;
+                        IsAutoEnabled = true;
+                    }
+                    else if ("Auto".Equals(VpwCellPersistent.OperatingMode))
+                    {
+                        IsAutoEnabled = true;
+                        IsEnabled = false;
+                    }
+                    else
+                    {
+                        State = "Stopped";
+                        IsEnabled = false;
+                        IsAutoEnabled = false;
+                    }
+                    AchievedRunRecipeCycle = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.AchievedCycle");
                 }
             }
         }

+ 8 - 8
PunkHPX8_MainPages/Views/VPWCellView.xaml

@@ -70,14 +70,14 @@
 
         <Grid Grid.Row="1" Grid.Column="2" Grid.RowSpan="2">
             <UserControls:RecipeControl HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center"
-          ModuleName="{Binding Module}" IsEnabled="{Binding IsEnabled}"
-          ModuleTitle="{Binding RecipeModuleName}"
-          RecipeType="{Binding RecipeType}"
-          SelectedRecipeNode="{Binding SelectedRecipeNode,Mode=TwoWay}"
-          AchievedCycleTimes="{Binding AchievedRunRecipeCycle}"
-          CurrentOperationMode="{Binding PrewetPersistent.OperatingMode}"
-          NumberOfSelectedRecipeScans="{Binding NumberOfRecipeScans,Mode=TwoWay}"
-          RecipeModeValue ="{Binding PrewetPersistent.RecipeOperatingMode}"/>
+            ModuleName="{Binding Module}" IsEnabled="{Binding IsEnabled}"
+            ModuleTitle="{Binding RecipeModuleName}"
+            RecipeType="{Binding RecipeType}"
+            SelectedRecipeNode="{Binding SelectedRecipeNode,Mode=TwoWay}"
+            AchievedCycleTimes="{Binding AchievedRunRecipeCycle}"
+            CurrentOperationMode="{Binding VpwCellPersistent.OperatingMode}"
+            NumberOfSelectedRecipeScans="{Binding NumberOfRecipeScans,Mode=TwoWay}"
+            RecipeModeValue ="{Binding VpwCellPersistent.RecipeOperatingMode}"/>
         </Grid>
 
         

+ 5 - 0
PunkHPX8_RT/Modules/VpwCell/VpwCellEntity.cs

@@ -71,6 +71,10 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// 手动recipe routine
         /// </summary>
         private VpwManualRecipeRoutine _manualRecipeRoutine;
+        /// <summary>
+        /// recipe完成次数
+        /// </summary>
+        private int _achievedCycle;
         #endregion
 
         #region 属性
@@ -219,6 +223,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
             DATA.Subscribe($"{Module}.IsDisable", () => IsDisable, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.IsBusy", () => IsBusy, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.IsError", () => IsError, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.AchievedCycle", () => _achievedCycle, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 初始化SVID

+ 6 - 6
PunkHPX8_Themes/UserControls/VPWCellUIControl.xaml

@@ -200,14 +200,14 @@
         <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwUp.png" Height="84"  Width="254"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="181" Canvas.Top="163"/>
         <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwCell.png" Height="236"  Width="236"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="187" Canvas.Top="247"/>
 
-        <userControls:FlowPipe  Height="6" Width="360" IsFlowing="{Binding RinseCommonData.FillValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="195" Canvas.Top="66" HorizontalAlignment="Left" VerticalAlignment="Center" />
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="409" Canvas.Top="70"/>
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1" Canvas.Left="203" Canvas.Top="67"/>
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="312" Canvas.Top="71"/>
+        <userControls:FlowPipe  Height="6" Width="360" IsFlowing="true" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="195" Canvas.Top="66" HorizontalAlignment="Left" VerticalAlignment="Center" />
+        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=LargeValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="409" Canvas.Top="70"/>
+        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=DripValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1" Canvas.Left="203" Canvas.Top="67"/>
+        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=SmallValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="312" Canvas.Top="71"/>
 
-        <userControls:FlowPipe  Height="6" Width="130" IsFlowing="{Binding ElementName=self,Path=VentValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="424" Canvas.Top="215" HorizontalAlignment="Left" VerticalAlignment="Top" />
+        <userControls:FlowPipe  Height="6" Width="130" IsFlowing="{Binding ElementName=self,Path=VentValve}" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="424" Canvas.Top="215" HorizontalAlignment="Left" VerticalAlignment="Top" />
         <userControls:FlowPipe  Height="6" Width="230" IsFlowing="{Binding ElementName=self,Path=DrainValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="321" Canvas.Top="391" HorizontalAlignment="Left" VerticalAlignment="Center" />
-        <userControls:FlowPipe  Height="6" Width="260" IsFlowing="{Binding ElementName=self,Path=DrainValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="48" Canvas.Top="443" HorizontalAlignment="Center" VerticalAlignment="Top" />
+        <userControls:FlowPipe  Height="6" Width="260" IsFlowing="{Binding ElementName=self,Path=VacuumValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="48" Canvas.Top="443" HorizontalAlignment="Center" VerticalAlignment="Top" />
 
         <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="DIW In" Canvas.Left="552" Canvas.Top="58" HorizontalAlignment="Center" VerticalAlignment="Top" />
         <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="N2 In" Canvas.Left="553" Canvas.Top="207" HorizontalAlignment="Left" VerticalAlignment="Top" />

+ 82 - 11
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml

@@ -13,6 +13,7 @@
         <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>
         <converters:BoolToVisibility x:Key="boolToVisibility"></converters:BoolToVisibility>
         <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>
+        <converters:MutiBoolToBool x:Key="mutiBoolToBool"/>
         <Style x:Key="DisableContextMenuStyle" TargetType="userControls:Pump1">
             <Setter Property="IsEnabled" Value="False"/>
         </Style>
@@ -162,19 +163,89 @@
         <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwShelf.png" Height="186"  Width="292"  HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="276" Canvas.Top="398"/>
 
         <userControls:FlowPipe  Height="6" Width="180" IsFlowing="{Binding IsBoosterPumpOpen,ElementName=self}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="71" Canvas.Top="95" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="360" IsFlowing="{Binding RinseCommonData.FillValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="261" Canvas.Top="95" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="400" IsFlowing="{Binding RinseCommonData.FillValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="330" Canvas.Top="241" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="100" IsFlowing="{Binding RinseCommonData.FillValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="630" Canvas.Top="95" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="418" Canvas.Top="95"/>
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="150"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="730" Canvas.Top="95"/>
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="80"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="530" Canvas.Top="241"/>
-        <userControls:FlowPipe IsFlowing="{Binding RinseCommonData.DrainValve}" Height="8"  Width="80"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="338" Canvas.Top="241"/>
+        <userControls:FlowPipe  Height="6" Width="360"  IsReverse="False" Panel.ZIndex="-1" Canvas.Left="261" Canvas.Top="95" HorizontalAlignment="Center" VerticalAlignment="Top" >
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWProcessValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="6" Width="400"  IsReverse="True" Panel.ZIndex="-1" Canvas.Left="330" Canvas.Top="241" HorizontalAlignment="Center" VerticalAlignment="Top" >
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWDegasValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="6" Width="100"  IsReverse="False" Panel.ZIndex="-1" Canvas.Left="630" Canvas.Top="95" HorizontalAlignment="Center" VerticalAlignment="Top" >
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWDegasValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="8"  Width="124"  IsReverse="True" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="418" Canvas.Top="95">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsDegasPumpOpen" />
+                    <Binding ElementName="self" Path="DegasAdjustValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe Height="8"  Width="150"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="730" Canvas.Top="95">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWDegasValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="8"  Width="80"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="530" Canvas.Top="241">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWDegasValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="8"  Width="80"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="338" Canvas.Top="241">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsBoosterPumpOpen" />
+                    <Binding ElementName="self" Path="DIWDegasValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
         <userControls:FlowPipe IsReverse="True" IsFlowing="{Binding IsVacuumPumpOpen,Mode=TwoWay,ElementName=self}" Height="8"  Width="40"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="437" Canvas.Top="617"/>
-        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=VPW1VACValve}" Height="8"  Width="40"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="304" Canvas.Top="569"/>
-        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=VPW2VACValve}" Height="8"  Width="40"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="564" Canvas.Top="569"/>
+        <userControls:FlowPipe  Height="8"  Width="40"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="304" Canvas.Top="569">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsVacuumPumpOpen" />
+                    <Binding ElementName="self" Path="VPW1VACValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="8"  Width="40"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="564" Canvas.Top="569">
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsVacuumPumpOpen" />
+                    <Binding ElementName="self" Path="VPW2VACValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
         <userControls:FlowPipe  Height="6" Width="160" IsFlowing="{Binding IsDegasPumpOpen,ElementName=self}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="100" Canvas.Top="213" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="160" IsFlowing="{Binding RinseCommonData.FillValve}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="255" Canvas.Top="213" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="135" IsFlowing="{Binding IsVacuumPumpOpen,ElementName=self}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="296" Canvas.Top="612" HorizontalAlignment="Center" VerticalAlignment="Top" />
+        <userControls:FlowPipe  Height="6" Width="160" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="255" Canvas.Top="213" HorizontalAlignment="Center" VerticalAlignment="Top" >
+            <userControls:FlowPipe.IsFlowing>
+                <MultiBinding Converter="{StaticResource mutiBoolToBool}">
+                    <Binding  ElementName="self" Path="IsDegasPumpOpen" />
+                    <Binding ElementName="self" Path="DegasAdjustValve"/>
+                </MultiBinding>
+            </userControls:FlowPipe.IsFlowing>
+        </userControls:FlowPipe>
+        <userControls:FlowPipe  Height="6" Width="135" IsFlowing="{Binding IsVacuumPumpOpen,ElementName=self}" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="296" Canvas.Top="612" HorizontalAlignment="Center" VerticalAlignment="Top" />
         <userControls:FlowPipe  Height="6" Width="135" IsFlowing="{Binding IsVacuumPumpOpen,ElementName=self}" IsReverse="False" Panel.ZIndex="-1" Canvas.Left="430" Canvas.Top="612" HorizontalAlignment="Center" VerticalAlignment="Top" />
 
         <Canvas Width="40" Height="20" Canvas.Left="710" Canvas.Top="55" HorizontalAlignment="Center" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" >