Browse Source

revise vpw run recipe bug

chenzk 1 day ago
parent
commit
a6ae9d73ae

+ 13 - 1
PunkHPX8_RT/Modules/VpwCell/VpwExtendCleanRoutine.cs

@@ -113,17 +113,29 @@ namespace PunkHPX8_RT.Modules.VpwCell
                 count += _vpwCellDevice.FlowDripOn()?1:0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowDripOff();
+            }
             if (_recipe.ExtendCleanLargeEnable)
             {
                 count += _vpwCellDevice.FlowLargeOn() ? 1 : 0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowLargeOff();
+            }
             if (_recipe.ExtendCleanSmallEnable)
             {
                 count += _vpwCellDevice.FlowSmallOn() ? 1 : 0;
                 enableCount++;
             }
-            bool result= count == enableCount;
+            else
+            {
+                _vpwCellDevice.FlowSmallOff();
+            }
+            bool result = count == enableCount;
             if (!result)
             {
                 NotifyError(eEvent.ERR_VPW, "open cell valve failed", 0);

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

@@ -305,17 +305,29 @@ namespace PunkHPX8_RT.Modules.VpwCell
                 count += _vpwCellDevice.FlowDripOn()?1:0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowDripOff();
+            }
             if (_recipe.VacuumPrewetLargeEnable)
             {
                 count += _vpwCellDevice.FlowLargeOn() ? 1 : 0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowLargeOff();
+            }
             if (_recipe.VacuumPrewetSmallEnable)
             {
                 count += _vpwCellDevice.FlowSmallOn() ? 1 : 0;
                 enableCount++;
             }
-            bool result= count == enableCount;
+            else
+            {
+                _vpwCellDevice.FlowSmallOff();
+            }
+            bool result = count == enableCount;
             if (!result)
             {
                 NotifyError(eEvent.ERR_VPW, "open cell valve failed", 0);

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

@@ -147,17 +147,29 @@ namespace PunkHPX8_RT.Modules.VpwCell
                 count += _vpwCellDevice.FlowDripOn()?1:0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowDripOff();
+            }
             if (_recipe.VentPrewetLargeEnable)
             {
                 count += _vpwCellDevice.FlowLargeOn() ? 1 : 0;
                 enableCount++;
             }
+            else
+            {
+                _vpwCellDevice.FlowLargeOff();
+            }
             if (_recipe.VentPrewetSmallEnable)
             {
                 count += _vpwCellDevice.FlowSmallOn() ? 1 : 0;
                 enableCount++;
             }
-            bool result= count == enableCount;
+            else
+            {
+                _vpwCellDevice.FlowSmallOff();
+            }
+            bool result = count == enableCount;
             if (!result)
             {
                 NotifyError(eEvent.ERR_VPW, "open cell valve failed", 0);

+ 26 - 30
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml

@@ -257,38 +257,34 @@
                     <TranslateTransform/>
                 </TransformGroup>
             </Canvas.RenderTransform>
-            <Polygon Width="10" Points="0,10 20,0 20,20" Fill="Black" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"></Polygon>
-            <Polygon Points="0,0 30,0 30,4 0,4" Fill="Black" StrokeThickness="1" Canvas.Left="10" Canvas.Top="8" HorizontalAlignment="Left" VerticalAlignment="Center"></Polygon>
+            <Polygon Width="10" Points="0,10 20,0 20,20" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center">
+                <Polygon.Style>
+                    <Style TargetType="Polygon">
+                        <Setter Property="Fill" Value="Black"/>
+                        <Style.Triggers>
+                            <DataTrigger Binding="{Binding N2Valve,ElementName=self}" Value="true">
+                                <Setter Property="Fill" Value="lime" />
+                            </DataTrigger>
+                        </Style.Triggers>
+                    </Style>
+                </Polygon.Style>
+            </Polygon>
+            
+            <Polygon Points="0,0 30,0 30,4 0,4" StrokeThickness="1" Canvas.Left="10" Canvas.Top="8" HorizontalAlignment="Left" VerticalAlignment="Center">
+                <Polygon.Style>
+                    <Style TargetType="Polygon">
+                        <Setter Property="Fill" Value="Black"/>
+                        <Style.Triggers>
+                            <DataTrigger Binding="{Binding N2Valve,ElementName=self}" Value="true">
+                                <Setter Property="Fill" Value="lime" />
+                            </DataTrigger>
+                        </Style.Triggers>
+                    </Style>
+                </Polygon.Style>
+            </Polygon>
         </Canvas>
 
-        <Canvas Panel.ZIndex="1" RenderTransformOrigin="0.5,0.5"  Width="150" Height="10" Visibility="{Binding ElementName=self,Path=N2Valve,Mode=TwoWay,Converter={StaticResource boolToVisibility2}}" Canvas.Left="662" Canvas.Top="135" HorizontalAlignment="Center" VerticalAlignment="Top">
-            <Canvas.RenderTransform>
-                <TransformGroup>
-                    <ScaleTransform/>
-                    <SkewTransform/>
-                    <RotateTransform Angle="270"/>
-                    <TranslateTransform x:Name="translateTransform" X="0" Y="0" />
-                </TransformGroup>
-            </Canvas.RenderTransform>
-            <Canvas.Triggers>
-                <EventTrigger RoutedEvent="Loaded">
-                    <BeginStoryboard>
-                        <Storyboard AutoReverse="False" RepeatBehavior="Forever">
-                            <DoubleAnimation
-                    Storyboard.TargetName="translateTransform"
-                    Storyboard.TargetProperty="Y"
-                    From="0" To="100" Duration="0:0:1.5"/>
-                        </Storyboard>
-                    </BeginStoryboard>
-                </EventTrigger>
-            </Canvas.Triggers>
-            <Polygon Width="10" Points="0,2.5 5,0 5,5" Fill="Black" StrokeThickness="1"  VerticalAlignment="Top" Canvas.Left="132" Canvas.Top="2.5"/>
-            <Polygon Points="0,0 10,0 10,2 0,2" Fill="Black" StrokeThickness="1"   VerticalAlignment="Top" Canvas.Left="135" Canvas.Top="4"/>
-
-            <Polygon Width="10" Points="0,2.5 5,0 5,5" Fill="Black" StrokeThickness="1"  VerticalAlignment="Top" Canvas.Left="102" Canvas.Top="2.5"/>
-            <Polygon Points="0,0 10,0 10,2 0,2" Fill="Black" StrokeThickness="1"   VerticalAlignment="Top" Canvas.Left="105" Canvas.Top="4"/>
-
-        </Canvas>
+        
 
         <Grid Height="50" Width="120" Canvas.Left="229" Canvas.Top="265" HorizontalAlignment="Left" VerticalAlignment="Top"  >
             <Grid.RowDefinitions>