Browse Source

1.2023/02/17现场rt代码修改
2.ui钟摆阀位置模式修改
3.给阀添加标签

lixiang 2 years ago
parent
commit
1f1fb71be3

+ 3 - 2
Venus/Venus_MainPages/ViewModels/ButterflyValveViewModel.cs

@@ -17,7 +17,7 @@ namespace Venus_MainPages.ViewModels
         private string ModuleName = "PMA";
         private string m_DeviceName = "PendulumValve";
         private bool m_IsPositionMode;
-        private int? m_SetValue;
+        private int m_SetValue;
         private int? m_FeedBackValue;
         private List<string> m_RtDataKeys;
         private Dictionary<string, object> m_RtDataValues;
@@ -31,7 +31,7 @@ namespace Venus_MainPages.ViewModels
         set { SetProperty(ref m_IsPositionMode, value); }
         }
 
-        public int? SetValue
+        public int SetValue
         {
             get { return m_SetValue; }
             set { SetProperty(ref m_SetValue, value); }
@@ -97,6 +97,7 @@ namespace Venus_MainPages.ViewModels
             if (IsPositionMode == true)
             {
                 FeedBackValue = (int)RtDataValues[$"{ModuleName}.PendulumValve.Position"];
+                SetValue = SetValue > 100 ? 100 : SetValue;
             }
             else
             { 

+ 24 - 21
Venus/Venus_MainPages/ViewModels/OverViewModel.cs

@@ -72,6 +72,7 @@ namespace Venus_MainPages.ViewModels
         private bool m_TurboIsOpen;
         private bool m_IsATM;
         private bool m_IsVAC;
+        private bool m_HVIsOn;
 
         private string ModuleName;
 
@@ -354,6 +355,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_ESCVoltage; }
             set { SetProperty(ref m_ESCVoltage, value); }
         }
+        public bool HVIsOn
+        {
+            get { return m_HVIsOn; }
+            set { SetProperty(ref m_HVIsOn, value); }
+        }
         
         #endregion
 
@@ -428,6 +434,10 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand HVCommand =>
             _HVCommand ?? (_HVCommand = new DelegateCommand(OnHV));
 
+        private DelegateCommand _HVSetCommand;
+        public DelegateCommand HVSetCommand =>
+            _HVSetCommand ?? (_HVSetCommand = new DelegateCommand(OnHVSet));
+
         
         #endregion
 
@@ -488,8 +498,7 @@ namespace Venus_MainPages.ViewModels
         {
             if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "RfPowering")
             {
-                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
-                return;
+                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.Abort}");
             }
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.RfPower}");
         }
@@ -510,7 +519,7 @@ namespace Venus_MainPages.ViewModels
         {
             if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Venting")
             {
-                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
+                //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopVent");
             }
             else
             {
@@ -637,9 +646,14 @@ namespace Venus_MainPages.ViewModels
 
         private void OnHV()
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHV", ESCVoltage,true);
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHVIsOn", !HVIsOn);
             
         }
+        private void OnHVSet()
+        { 
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHV", ESCVoltage);
+
+        }
         #endregion
 
         #region 私有方法
@@ -674,6 +688,7 @@ namespace Venus_MainPages.ViewModels
             PVHe2ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVHe2.IsOpen"];
             PVN21ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN21.IsOpen"];
             PVN22ValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValvePVN22.IsOpen"];
+            HVIsOn= (bool)RtDataValues[$"{ModuleName}.ESCHV.IsOn"];
 
 
             TurboPumpPumpingValveIsOpen = (bool)RtDataValues[$"{ModuleName}.ValveTurboPumpPumping.IsOpen"];
@@ -686,22 +701,9 @@ namespace Venus_MainPages.ViewModels
             BRFIsOn = (bool)RtDataValues[$"{ModuleName}.BRfIsOn"];
             SRFIsOn = (bool)RtDataValues[$"{ModuleName}.SRfIsOn"];
 
-            if (IsPositionMode == true)
-            {
-                int value = (int)RtDataValues[$"{ModuleName}.GetPVPosition"];
-                if (value >= 100)
-                {
-                    PositionValue = 360;
-                }
-                else
-                {
-                    PositionValue = (int)(((int)RtDataValues[$"{ModuleName}.GetPVPosition"]) * 3.6);
-                }
-            }
-            else
-            {
-                PositionValue = 90;
-            }
+
+            PositionValue = -((int)(((int)RtDataValues[$"{ModuleName}.GetPVPosition"]) * 0.9));
+
 
 
         }
@@ -805,8 +807,9 @@ namespace Venus_MainPages.ViewModels
 
             m_RtDataKeys.Add($"{ModuleName}.ChillerTem");
             m_RtDataKeys.Add($"{ModuleName}.ESCHV.OutputVoltage");
+            m_RtDataKeys.Add($"{ModuleName}.ESCHV.IsOn");
 
-
+            
 
 
 

+ 1 - 1
Venus/Venus_MainPages/Views/ButterflyValveView.xaml

@@ -56,7 +56,7 @@
         <Label Grid.Row="3" Grid.Column="2" VerticalContentAlignment="Bottom" Content="{Binding FeedBackValue}"   Width="150"  FontSize="13" FontFamily="Arial,SimSun" Height="28" BorderThickness="0,0,0,1" BorderBrush="Black"/>
 
         <!--<TextBox Grid.Row="5" Grid.Column="2" x:Name="inputBoxPosition" BorderBrush="Green" BorderThickness="0,0,0,1"  Width="150" HorizontalAlignment="Left" FontSize="13" FontFamily="Arial,SimSun" Height="30" VerticalContentAlignment="Center"/>-->
-        <TextBox Grid.Row="4" Grid.Column="2"   Text="{Binding SetValue}" Width="150" HorizontalAlignment="Left" FontSize="13" FontFamily="Arial,SimSun" Height="30" VerticalContentAlignment="Center" BorderThickness="0,0,0,1" BorderBrush="Black"/>
+        <TextBox Grid.Row="4" Grid.Column="2"   Text="{Binding SetValue,UpdateSourceTrigger=PropertyChanged}" Width="150" HorizontalAlignment="Left" FontSize="13" FontFamily="Arial,SimSun" Height="30" VerticalContentAlignment="Center" BorderThickness="0,0,0,1" BorderBrush="Black"/>
 
         <Button Grid.Row="5" Grid.Column="1"  Content="Set" x:Name="buttonSet" Width="80" Height="26" VerticalAlignment="Top"  Margin="5,3,0,0" Command="{Binding SetCommand}"/>
         <Button Grid.Row="5" Grid.Column="2" Content="Cancel"  Width="80" Height="26" VerticalAlignment="Top" Margin="44,3,0,0" />

+ 70 - 63
Venus/Venus_MainPages/Views/OverView.xaml

@@ -44,7 +44,8 @@
                 </MultiBinding>
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <!--<ctrls:FlowPipeValve  x:Name="VentValve"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="110" IsOpen="{Binding N2ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="Vent Valve" Canvas.Left="410" Canvas.Top="98"/>
+
         <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="477.5" Canvas.Top="120" RotateTransformValue="-90" />-->
@@ -60,26 +61,23 @@
 
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
-        <!--<ctrls:Pipe3 Canvas.Left="245" Canvas.Top="120" RotateTransformValue="-90"/>-->
-        <!--<ctrls:FlowPipeValve   x:Name="VN22"  Height="20" Width="24" Canvas.Left="288" Canvas.Top="110"  IsOpen="{Binding PVN22Valve,Mode=TwoWay}"/>-->
+
+        <TextBlock Text="VN22" Canvas.Left="280" Canvas.Top="98"/>
         <customControls:CommonValveControl Status="{Binding PVN22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="288" Canvas.Top="114"/>
 
 
-        <!--To pump-->
-        <ctrls:FlowPipe Name="f1"  Height="8"  Width="422" Canvas.Left="64" Canvas.Top="173" Visibility="Hidden"/>
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="169"/>-->
-        <ctrls:FlowPipeValve x:Name="valve10"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="163" Visibility="Hidden" />
-        <!--<ctrls:Pump Width="40" Height="40" Opacity="0.7" x:Name="pump1" Canvas.Left="80" Canvas.Top="155" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
 
 
-        <!--Cl2-->
+
+
+
         <ctrls:FlowPipe Name="f9"  Height="8"  Width="308" Canvas.Left="176" Canvas.Top="230" IsFlowing="{Binding MFC1ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve8"    Height="20" Width="24" Canvas.Left="436" Canvas.Top="220.5" IsOpen="{Binding MFC1ValveIsOpen,Mode=TwoWay}"/>-->
+
+        <TextBlock Text="V1" Canvas.Left="438" Canvas.Top="208"/>
+
         <customControls:CommonValveControl Status="{Binding MFC1ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="224"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="226"/>-->
 
-        <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="262" />-->
         <ctrls:FlowPipe  Name="Gas1Pipe1" Height="8"  Width="114" Canvas.Left="64"  Canvas.Top="230" IsFlowing="{Binding PV11ValveIsOpen}"/>
         <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="230" RotateTransformValue="-90"/>-->
         <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="266" IsFlowing="{Binding PV12ValveIsOpen}"/>
@@ -98,16 +96,15 @@
 
         <!--SF6-->
         <ctrls:FlowPipe Name="f2"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="286" IsFlowing="{Binding MFC2ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve2"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="275.8" IsOpen="{Binding MFC2ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V2" Canvas.Left="438" Canvas.Top="264"/>
+
         <customControls:CommonValveControl Status="{Binding MFC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="280"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="282" />-->
 
-        <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="318" />-->
         <ctrls:FlowPipe x:Name="Gas2Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="286" IsFlowing="{Binding PV21ValveIsOpen}"/>
-        <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="286" RotateTransformValue="-90"/>-->
+
         <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="322" IsFlowing="{Binding PV22ValveIsOpen}"/>
-        <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="330" RotateTransformValue="-180"/>-->
+
         <ctrls:FlowPipe   Height="8"  Width="36" Canvas.Left="178"  Canvas.Top="290" RotateTransformValue="90" IsFlowing="{Binding PV22ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="55" Canvas.Left="257"  Canvas.Top="270" RotateTransformValue="90" IsReverse="True" >
             <ctrls:FlowPipe.IsFlowing>
@@ -121,14 +118,14 @@
 
         <!--Gas3-->
         <ctrls:FlowPipe Name="f3"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="342" IsFlowing="{Binding MFC3ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve3"   Height="20" Width="24" Canvas.Left="436" Canvas.Top="333" IsOpen="{Binding MFC3ValveIsOpen,Mode=TwoWay}"/>-->
+
+        <TextBlock Text="V3" Canvas.Left="436" Canvas.Top="320"/>
+
         <customControls:CommonValveControl Status="{Binding MFC3ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="336"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="338" />-->
-        <!--<ctrls:Pipe3 Canvas.Left="241" Canvas.Top="374" />-->
+
         <ctrls:FlowPipe x:Name="Gas3Pipe1"  Height="8"  Width="112" Canvas.Left="64"  Canvas.Top="342" IsFlowing="{Binding PV31ValveIsOpen}"/>
-        <!--<ctrls:Pipe3 Canvas.Left="197" Canvas.Top="342" RotateTransformValue="-90"/>-->
-        <!--<ctrls:Pipe2 Canvas.Left="214" Canvas.Top="386" RotateTransformValue="-180"/>-->
+
         <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="378" IsFlowing="{Binding PV32ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="35" Canvas.Left="178"  Canvas.Top="348" RotateTransformValue="90" IsFlowing="{Binding PV32ValveIsOpen}"/>
         <ctrls:FlowPipe   Height="8"  Width="57" Canvas.Left="257"  Canvas.Top="324" RotateTransformValue="90" IsReverse="True" >
@@ -150,7 +147,8 @@
         <ctrls:FlowPipe   Height="8"  Width="86" Canvas.Left="171"  Canvas.Top="428" IsFlowing="{Binding PV42ValveIsOpen}"/>
         <!--<ctrls:Pipe2 Canvas.Left="257" Canvas.Top="423" RotateTransformValue="90"/>-->
         <ctrls:FlowPipe Name="f4"  Height="8"  Width="310" Canvas.Left="174"  Canvas.Top="396" IsFlowing="{Binding MFC4ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve4"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="386" IsOpen="{Binding MFC4ValveIsOpen,Mode=TwoWay}"/>-->
+
+        <TextBlock Text="V4" Canvas.Left="436" Canvas.Top="374"/>
         <customControls:CommonValveControl Status="{Binding MFC4ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="390"/>
 
         <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="392" />-->
@@ -165,35 +163,30 @@
 
 
         <!--Gas5-->
-        <ctrls:FlowPipe Name="f5"  Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding MFC5ValveIsOpen}">
-
-        </ctrls:FlowPipe>
-        <!--<ctrls:FlowPipeValve x:Name="valve5"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="443" IsOpen="{Binding MFC5ValveIsOpen,Mode=TwoWay}"/>-->
+        <ctrls:FlowPipe Name="f5"  Height="8"  Width="419" Canvas.Left="64"  Canvas.Top="452" IsFlowing="{Binding MFC5ValveIsOpen}"/>
+        <TextBlock Text="V5" Canvas.Left="438" Canvas.Top="430"/>
         <customControls:CommonValveControl Status="{Binding MFC5ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="446"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="447.5" />-->
-
 
         <!--O2-->
         <ctrls:FlowPipe Name="f6"  Height="8"  Width="419" Canvas.Left="65"  Canvas.Top="507" IsFlowing="{Binding MFC6ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve6"   Height="20" Width="24" Canvas.Left="440" Canvas.Top="498" IsOpen="{Binding MFC6ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V6" Canvas.Left="438" Canvas.Top="485"/>
         <customControls:CommonValveControl Status="{Binding MFC6ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="436" Canvas.Top="501"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="503" />-->
+     
 
         <!--Gas7-->
         <ctrls:FlowPipe Name="f7"  Height="8"  Width="418" Canvas.Left="65"  Canvas.Top="563" IsFlowing="{Binding MFC7ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve7"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="554" IsOpen="{Binding MFC7ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V7" Canvas.Left="438" Canvas.Top="541"/>
         <customControls:CommonValveControl Status="{Binding MFC7ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="557"/>
 
-        <!--<ctrls:Pipe3 Canvas.Left="474" Canvas.Top="559" />-->
 
         <!--Gas8-->
         <ctrls:FlowPipe Name="f8"  Height="8"  Width="412" Canvas.Left="68"  Canvas.Top="620" IsFlowing="{Binding MFC8ValveIsOpen}"/>
-        <!--<ctrls:FlowPipeValve x:Name="valve9"  Height="20" Width="24" Canvas.Left="440" Canvas.Top="611" IsOpen="{Binding MFC8ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V8" Canvas.Left="438" Canvas.Top="598"/>
         <customControls:CommonValveControl Status="{Binding MFC8ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="614"/>
 
-        <!--<ctrls:Pipe2 RotateTransformValue="90"   Canvas.Left="490" Canvas.Top="615"  />-->
+        
 
 
 
@@ -216,6 +209,7 @@
             </ctrls:FlowPipe.IsFlowing>
         </ctrls:FlowPipe>
         <!--<ctrls:FlowPipeValve x:Name="GasFinalValve"  Height="20" Width="24" Canvas.Left="1086" Canvas.Top="110" IsOpen="{Binding GasFinalValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="Gas Final" Canvas.Left="1064" Canvas.Top="96" FontSize="15"/>
         <customControls:CommonValveControl Status="{Binding GasFinalValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="1086" Canvas.Top="114"/>
 
         <ctrls:Pipe2    Canvas.Left="1144" Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Top"  />
@@ -231,8 +225,10 @@
         <!--<ctrls:CustomSwitch   Height="20" Value="  Gas ON/OFF  " Canvas.Left="500" Canvas.Top="590" />-->
         <Button Content="Gas SetPoint" Canvas.Left="510" Canvas.Top="590" Background="Gray" Command="{Binding GasSetPointCommand}"/>
         <!--<ctrls:CustomSwitch   Height="20" Value="   HV ON/OFF   " Canvas.Left="1280" Canvas.Top="316" />-->
-        <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.LiftPinIsUp],Converter={StaticResource boolToColor}}"  Canvas.Left="1280" Canvas.Top="316"/>
-        <Button Height="20" Width="100" Content="HV ON/OFF" Canvas.Left="1310" Canvas.Top="316" Command="{Binding HVCommand}" CommandParameter="True" Background="Gray"/>
+        <Button Height="20" Width="60" Content="HV Set" Canvas.Left="1300" Canvas.Top="316" Command="{Binding HVSetCommand}"  Background="Gray"/>
+
+        <Ellipse Width="20" Height="20" Fill="{Binding HVIsOn,Converter={StaticResource boolToColor}}"  Canvas.Left="1380" Canvas.Top="316"/>
+        <Button Height="20" Width="100" Content="HV ON/OFF" Canvas.Left="1410" Canvas.Top="316" Command="{Binding HVCommand}" CommandParameter="True" Background="Gray"/>
         <!--<ctrls:CustomSwitch  IsOpen="{Binding RtDataValues[PMA.LiftPinIsUp]}"  Height="20" Value="    Pin Up     " Canvas.Left="1080" Canvas.Top="466"  />-->
         <Ellipse Width="20" Height="20" Fill="{Binding RtDataValues[PMA.LiftPinIsUp],Converter={StaticResource boolToColor}}"  Canvas.Left="1065" Canvas.Top="466"/>
         <Button Height="20" Width="100" Content="Pin Up" Canvas.Left="1100" Canvas.Top="466" Command="{Binding PinUpDownCommand}" CommandParameter="True" Background="Gray"/>
@@ -369,8 +365,8 @@
                 <ContextMenu>
                     <!--<RadioButton Content="Open" Command="{Binding OpenPumpCommand}"     IsChecked="{Binding PumpIsOpen,Mode=OneWay}"/>
                     <RadioButton Content="Close" Command="{Binding ClosePumpCommand}"   IsChecked="{Binding PumpIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}"/>-->
-                    <MenuItem Header="Open"  Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen,Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}"/>
-                    <MenuItem Header="Close" Command="{Binding ClosePumpCommand}" IsChecked="{Binding PumpIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Mode=OneWay}"/>
+                    <MenuItem Header="ON"  Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen,Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}"/>
+                    <MenuItem Header="OFF" Command="{Binding ClosePumpCommand}" IsChecked="{Binding PumpIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Mode=OneWay}"/>
                 </ContextMenu>
             </ctrls:Pump.ContextMenu>
         </ctrls:Pump>
@@ -378,32 +374,39 @@
 
         <!--阀-->
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas4Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="386"  IsOpen="{Binding PV41ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V41" Canvas.Left="128" Canvas.Top="374"/>
         <customControls:CommonValveControl Status="{Binding PV41ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="390"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas3Valve1" Height="20" Width="24" Canvas.Left="127" Canvas.Top="333" IsOpen="{Binding PV31ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V31" Canvas.Left="128" Canvas.Top="320"/>
+
         <customControls:CommonValveControl Status="{Binding PV31ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Left="127" Canvas.Top="336"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas2Valve1"   Height="20" Width="24" Canvas.Left="127" Canvas.Top="276"  IsOpen="{Binding PV21ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V21" Canvas.Left="128" Canvas.Top="266"/>
+
         <customControls:CommonValveControl Status="{Binding PV21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="280"/>
 
-        <!--<ctrls:FlowPipeValve  x:Name="Gas1Valve1"    Height="20" Width="24" Canvas.Left="127" Canvas.Top="220" IsOpen="{Binding PV11ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V11" Canvas.Left="128" Canvas.Top="208"/>
         <customControls:CommonValveControl Status="{Binding PV11ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="127" Canvas.Top="224"/>
 
         <ctrls:FlowPipeValve  x:Name="pumpValve1"  Height="20" Width="24" Canvas.Left="127" Canvas.Top="163" Visibility="Hidden" />
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="256" IsOpen="{Binding PV12ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V12" Canvas.Left="200" Canvas.Top="243"/>
+
         <customControls:CommonValveControl Status="{Binding PV12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="259"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="312" IsOpen="{Binding PV22ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V22" Canvas.Left="200" Canvas.Top="300"/>
+
         <customControls:CommonValveControl Status="{Binding PV22ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="200" Canvas.Top="315"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="368" IsOpen="{Binding PV32ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V32" Canvas.Left="200" Canvas.Top="355"/>
+
         <customControls:CommonValveControl Status="{Binding PV32ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="371"/>
 
-        <!--<ctrls:FlowPipeValve     Height="20" Width="24" Canvas.Left="200" Canvas.Top="418" IsOpen="{Binding PV42ValveIsOpen,Mode=TwoWay}"/>-->
+        <TextBlock Text="V42" Canvas.Left="200" Canvas.Top="405"/>
+
         <customControls:CommonValveControl Status="{Binding PV42ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="421"/>
 
+        <TextBlock Text="VN21" Canvas.Left="200" Canvas.Top="152"/>
 
         <customControls:CommonValveControl Status="{Binding PVN21ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="243" Canvas.Top="148"/>
 
@@ -415,10 +418,11 @@
 
         <ctrls:FlowPipe  Height="8"  Width="80" Canvas.Left="1252" Canvas.Top="182"   />
         <ctrls:FlowPipe  Height="8"  Width="70" Canvas.Left="1264" Canvas.Top="272"   />
-        <!--<ctrls:FlowPipeValve    Height="20" Width="24" Canvas.Left="1280" Canvas.Top="262"  />-->
+        <TextBlock Text="Guage" Canvas.Left="1272" Canvas.Top="250"/>
+
         <customControls:CommonValveControl   ValveOrientation="Horizontal" Status="{Binding RtDataValues[PMA.ValveGuage.IsOpen],Mode=TwoWay}" Height="20" Width="20" Canvas.Left="1280" Canvas.Top="265"/>
 
-        <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Left="1315" Canvas.Top="142" >
+        <Border    BorderBrush="Gray"  BorderThickness="0"  Width="30" Height="6" Canvas.Left="1315" Canvas.Top="152" >
             <Border.RenderTransform>
                 <RotateTransform Angle="90"/>
             </Border.RenderTransform>
@@ -430,7 +434,7 @@
                 </LinearGradientBrush>
             </Border.Background>
         </Border>
-        <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Left="1285" Canvas.Top="188" >
+        <Border    BorderBrush="Gray"  BorderThickness="0"  Width="30" Height="6" Canvas.Left="1285" Canvas.Top="188" >
             <Border.RenderTransform>
                 <RotateTransform Angle="90"/>
             </Border.RenderTransform>
@@ -442,10 +446,10 @@
                 </LinearGradientBrush>
             </Border.Background>
         </Border>
-        <Ellipse Width="20" Height="20"  Canvas.Left="1302" Canvas.Top="134" Fill="{Binding RtDataValues[PMA.IsATM],Converter={StaticResource boolToColor}}"></Ellipse>
-        <Ellipse Width="20" Height="20"  Canvas.Left="1272" Canvas.Top="218" Fill="{Binding RtDataValues[PMA.IsVAC],Converter={StaticResource boolToColor}}"></Ellipse>
-        <TextBlock Text="ATM" Canvas.Left="1300" Canvas.Top="120"/>
-        <TextBlock Text="VAC" Canvas.Left="1272" Canvas.Top="240"/>
+        <Ellipse Width="20" Height="20"  Canvas.Left="1302" Canvas.Top="150" Fill="{Binding RtDataValues[PMA.IsATM],Converter={StaticResource boolToColor}}"></Ellipse>
+        <Ellipse Width="20" Height="20"  Canvas.Left="1272" Canvas.Top="200" Fill="{Binding RtDataValues[PMA.IsVAC],Converter={StaticResource boolToColor}}"></Ellipse>
+        <TextBlock Text="ATM" Canvas.Left="1300" Canvas.Top="134"/>
+        <TextBlock Text="VAC" Canvas.Left="1270" Canvas.Top="220"/>
         <ctrls:Pipe2     Canvas.Left="1242" Canvas.Top="195" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
 
 
@@ -466,7 +470,9 @@
         </ctrls:FlowPipe>
         <ctrls:FlowPipe   Height="8"  Width="40" Canvas.Left="1265"  Canvas.Top="658" />
         <!--<ctrls:FlowPipe   Height="8"  Width="24" Canvas.Left="1266"  Canvas.Top="658" RotateTransformValue="90"/>-->
-        <ctrls:FlowPipe x:Name="TurboPipe"  Height="8"  Width="178" Canvas.Left="1266"  Canvas.Top="464" RotateTransformValue="90" />
+        <ctrls:FlowPipe x:Name="TurboPipe"  Height="8"  Width="178" Canvas.Left="1266"  Canvas.Top="464" RotateTransformValue="90" IsFlowing="{Binding TurboPumpPumpingValveIsOpen}">
+            
+        </ctrls:FlowPipe>
         <ctrls:FlowPipe x:Name="roughPumpPipe2"  Height="8"  Width="45" Canvas.Left="1266"  Canvas.Top="638" RotateTransformValue="90" >
             <ctrls:FlowPipe.IsFlowing>
                 <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
@@ -512,11 +518,12 @@
         <customControls:CommonValveControl Status="{Binding TurboPumpPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"  Height="20" Width="20"  Canvas.Left="1434"  Canvas.Top="610"/>
         <TextBlock Text="Turbo N2&#10;   Purge" Canvas.Left="1460"  Canvas.Top="610" FontSize="15"/>
 
-        <!--<ctrls:FlowPipeValve x:Name="HeValve1" Canvas.Top="649" Canvas.Left="1000"  Height="20" Width="24"  />-->
+        <TextBlock Text="VHe1" Canvas.Top="636" Canvas.Left="972"/>
         <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"   Canvas.Top="652" Canvas.Left="980" Status="{Binding PVHe1ValveIsOpen,Mode=TwoWay}"/>
 
 
-        <!--<ctrls:FlowPipeValve x:Name="HeValve2" Canvas.Top="671" Canvas.Left="1100"  Height="20" Width="24"  />-->
+        <TextBlock Text="VHe2" Canvas.Top="658" Canvas.Left="1094"/>
+
         <customControls:CommonValveControl   ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Top="674" Canvas.Left="1100" Status="{Binding PVHe2ValveIsOpen,Mode=TwoWay}"/>
 
 
@@ -540,8 +547,8 @@
         <ctrls:Turbo Width="40" Height="40"  Canvas.Top="521" Canvas.Left="1242" IsOpen="{Binding TurboIsOpen}">
             <ctrls:Turbo.ContextMenu>
                 <ContextMenu>
-                    <MenuItem Header="Open" Command="{Binding OpenTurboPumpCommand}" IsChecked="{Binding TurboIsOpen,Mode=OneWay}" IsEnabled="{Binding TurboIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}"/>
-                    <MenuItem Header="Close" Command="{Binding CloseTurboPumpCommand}" IsChecked="{Binding TurboIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}" IsEnabled="{Binding TurboIsOpen,Mode=OneWay}"/>
+                    <MenuItem Header="ON" Command="{Binding OpenTurboPumpCommand}" IsChecked="{Binding TurboIsOpen,Mode=OneWay}" IsEnabled="{Binding TurboIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}"/>
+                    <MenuItem Header="OFF" Command="{Binding CloseTurboPumpCommand}" IsChecked="{Binding TurboIsOpen,Converter={StaticResource BoolToBool},Mode=OneWay}" IsEnabled="{Binding TurboIsOpen,Mode=OneWay}"/>
                 </ContextMenu>
             </ctrls:Turbo.ContextMenu>
         </ctrls:Turbo>
@@ -587,14 +594,14 @@
         <ctrls:TextboxWithLabel  Canvas.Top="595" Canvas.Left="345" LabelValue="Flow" TextBoxValue="{Binding RtDataValues[PMA.MfcGas8.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
 
         <!--chamber管道标签-->
-        <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ProcessPressure],StringFormat='F3'}" TextBoxColor="#D7E4BD"/>
+        <ctrls:TextboxWithLabel  Canvas.Top="156" Canvas.Left="1326" LabelValue="CM2(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ProcessPressure],StringFormat='F3'}" TextBoxColor="#D7E4BD"/>
         <ctrls:TextboxWithLabel  Canvas.Top="248" Canvas.Left="1318" LabelValue="CM1(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ChamberPressure],StringFormat='F1'}" TextBoxColor="#D7E4BD"/>
         <!--<ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="800" LabelValue="Set(Torr)" TextBoxValue="0.0" TextBoxColor="White" />-->
         <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="870" LabelValue="Flow(sccm)" TextBoxValue="{Binding RtDataValues[PMA.MfcHe.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1300" LabelValue="CM3(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ForelinePressure],StringFormat='F2'}" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="464" Canvas.Left="1290" LabelValue="Position" TextBoxValue="{Binding RtDataValues[PMA.GetPVPosition],StringFormat='F0'}" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1300" LabelValue="CM3(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ForelinePressure],StringFormat='F2'}" TextBoxColor="#D7E4BD" />
+        <ctrls:TextboxWithLabel  Canvas.Top="464" Canvas.Left="1290" LabelValue="Position(%)" TextBoxValue="{Binding RtDataValues[PMA.GetPVPosition],StringFormat='F0'}" TextBoxColor="#D7E4BD" />
         <ctrls:TextboxWithLabel  Canvas.Top="511" Canvas.Left="1320" LabelValue="Flow(sccm)" TextBoxValue="{Binding RtDataValues[PMA.MfcN2.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD" />
-        <ctrls:TextboxWithLabel  Canvas.Top="556" Canvas.Left="932" LabelValue="Pressure(Torr)" TextBoxValue="{Binding RtDataValues[PMA.ESCHePressure],StringFormat='F1'}" TextBoxColor="#D7E4BD">
+        <ctrls:TextboxWithLabel  Canvas.Top="556" Canvas.Left="926" LabelValue="Pressure(mTorr)" TextBoxValue="{Binding RtDataValues[PMA.ESCHePressure],StringFormat='F1'}" TextBoxColor="#D7E4BD">
 
         </ctrls:TextboxWithLabel>
         <Border    BorderBrush="Gray"  BorderThickness="0"  Width="40" Height="6" Canvas.Top="581" Canvas.Left="1008">

+ 4 - 2
Venus/Venus_MainPages/Views/PlatformView.xaml

@@ -26,8 +26,10 @@
         <ctrls:Pump Canvas.Top="360"  Canvas.Left="254" Width="35" Height="35" IsOpen="{Binding PumpIsOpen,Mode=TwoWay}">
             <ctrls:Pump.ContextMenu>
                 <ContextMenu>
-                    <RadioButton Content="Open" Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen}"/>
-                    <RadioButton Content="Close" Command="{Binding ClosePumpCommand}"   IsChecked="{Binding PumpIsOpen,Converter={StaticResource boolToBool}}"/>
+                    <!--<RadioButton Content="Open" Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen}"/>
+                    <RadioButton Content="Close" Command="{Binding ClosePumpCommand}"   IsChecked="{Binding PumpIsOpen,Converter={StaticResource boolToBool}}"/>-->
+                    <MenuItem Header="ON"  Command="{Binding OpenPumpCommand}" IsChecked="{Binding PumpIsOpen,Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Converter={StaticResource boolToBool},Mode=OneWay}"/>
+                    <MenuItem Header="OFF" Command="{Binding ClosePumpCommand}" IsChecked="{Binding PumpIsOpen,Converter={StaticResource boolToBool},Mode=OneWay}" IsEnabled="{Binding PumpIsOpen,Mode=OneWay}"/>
                 </ContextMenu>
             </ctrls:Pump.ContextMenu>
         </ctrls:Pump>

+ 3 - 3
Venus/Venus_MainPages/Views/TopView.xaml

@@ -97,7 +97,7 @@
                 </i:Interaction.Triggers>
             </ToggleButton>-->
             <StackPanel Orientation="Horizontal" Grid.Column="6"  HorizontalAlignment="Center">
-                <TextBlock  Text=" 语言切换:" Foreground="White"    VerticalAlignment="Center"/>
+                <TextBlock  Text=" 语言:" Foreground="White"    VerticalAlignment="Center"/>
 
                 <ToggleButton    Style="{StaticResource ToggleButtonStyle1}">
                     <i:Interaction.Triggers>
@@ -112,8 +112,8 @@
             </StackPanel>
             
             <Button Content="Clear"  Grid.Column="6" Grid.Row="1" BorderThickness="0" Command="{Binding ClearCommand}"/>
-            <Button Content="Reset"       Grid.Column="7" Grid.Row="1" BorderThickness="0" Command="{Binding ResetCommand}"/>
-            <Button Content="Buzzer Off"  Grid.Column="8" Grid.Row="1" BorderThickness="0" Command="{Binding BuzzerOffCommand}"/>
+            <!--<Button Content="Reset"       Grid.Column="7" Grid.Row="1" BorderThickness="0" Command="{Binding ResetCommand}"/>
+            <Button Content="Buzzer Off"  Grid.Column="8" Grid.Row="1" BorderThickness="0" Command="{Binding BuzzerOffCommand}"/>-->
             <!--<Border   BorderBrush="#FF0A1624"  CornerRadius="6"  Grid.Column="8"  Grid.RowSpan="2">
                
             </Border>-->

BIN
Venus/Venus_RT/Config/Interlock.Venus.xml


+ 19 - 30
Venus/Venus_RT/Devices/ESC5HighVoltage.cs

@@ -125,11 +125,15 @@ namespace Venus_RT.Devices
 
         public void Monitor()
         {
-            if ((_queryWatch.ElapsedMilliseconds > _readInterval && _lastReadCommand == Operation.Invalid) || _queryWatch.ElapsedMilliseconds > _readTimeout)
+            if(_queryWatch.ElapsedMilliseconds > _readInterval)
             {
+
                 SendCommand(_opFlag++ % 2 == 0 ? Operation.ReadOutputVoltage : Operation.ReadStatus);
+
+
                 _queryWatch.Restart();
             }
+            
         }
 
         public void Reset()
@@ -158,40 +162,25 @@ namespace Venus_RT.Devices
 
             if(obj.EndsWith(EOF))
             {
-                string data = obj.Trim().Replace(EOF, "");
-                if (_lastReadCommand == Operation.Invalid || data.Length == 0 || data == ">")
-                    return;
-
+                string operation = obj.Substring(0, 3);
                 int nData;
-                if(int.TryParse(data, out nData))
+                switch (operation)
                 {
-                    switch(_lastReadCommand)
-                    {
-                        case Operation.ReadOutputVoltage:
+                    case "SB\r":
+                        
+                        if(int.TryParse(obj.Substring(3,4), out nData))
+                        {
                             OutputVoltage = nData;
-                            break;
-                        case Operation.ReadCenterTapVoltage:
-                            CenterTapVoltage = nData;
-                            break;
-                        case Operation.ReadNegativeOutputCurrent:
-                            NegativeOutputCurrent = nData;
-                            break;
-                        case Operation.ReadPositiveOutputCurrent:
-                            PositiveOutputCurrent = nData;
-                            break;
-                        case Operation.ReadStatus:
+                            LOG.Write(eEvent.EV_DEVICE_INFO, Module, $" HV OutputVoltage: {OutputVoltage}");
+                        }
+                        break;
+                    case "RV\r":
+                        if (int.TryParse(obj.Substring(5, 4), out nData))
+                        {
                             IsOn = (nData & 0x04) != 0;
-                            break;
-                    }
+                        }
+                        break;
                 }
-                else
-                {
-                    _noRepeatAlarm($"ESC-5 Electrostatic Voltage Source receive wrong format message: {obj}");
-                    _lastReadCommand = Operation.Invalid;
-                    return;
-                }
-
-                _lastReadCommand = Operation.Invalid;
             }
             else
             {

+ 9 - 6
Venus/Venus_RT/Devices/JetPM.cs

@@ -440,7 +440,7 @@ namespace Venus_RT.Devices
 
             DATA.Subscribe($"{Name}.ChillerTem", () => CoolantInletTempFB);
             DATA.Subscribe($"{Name}.ESCHV.OutputVoltage", () => ESCOutputVoltage);
-            //DATA.Subscribe($"{Name}.ESCHV.IsOn", () => _ESCHV.);
+            DATA.Subscribe($"{Name}.ESCHV.IsOn", () => IsHVOn);
 
             //DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => _);
 
@@ -458,14 +458,14 @@ namespace Venus_RT.Devices
 
             OP.Subscribe($"{Module}.SetSRf", (cmd, args) => {
 
-                GeneratorSetpower((float)args[0]);
+                //GeneratorSetpower((float)args[0]);
                 GeneratorPowerOn((bool)args[1]);
 
                 return true;
             });
 
             OP.Subscribe($"{Module}.SetBRf", (cmd, args) => {
-                SetBiasMatchPosition((float)args[0], (float)args[1]);
+                //SetBiasMatchPosition((float)args[0], (float)args[1]);
                 GeneratorBiasPowerOn((bool)args[0]);
                 return true;
             });
@@ -475,9 +475,12 @@ namespace Venus_RT.Devices
                 return true;
             });
 
+            OP.Subscribe($"{Module}.SetESCHVIsOn", (cmd, args) => {
+                _ESCHV.SetPowerOnOff((bool)args[0]);
+                return true;
+            });
             OP.Subscribe($"{Module}.SetESCHV", (cmd, args) => {
                 SetESCClampVoltage((int)args[0]);
-                _ESCHV.SetPowerOnOff((bool)args[1]);
                 return true;
             });
 
@@ -658,10 +661,10 @@ namespace Venus_RT.Devices
                 gas.Monitor();
             }
 
-            CheckInterlock();
+            //CheckInterlock();
         }
 
-        private void CheckInterlock()
+        public void CheckInterlock()
         {
             if (ProcessPressure > 100 && _GuageValve.SetPoint)
             {

+ 15 - 4
Venus/Venus_RT/Devices/PendulumValve.cs

@@ -160,7 +160,7 @@ namespace Venus_RT.Devices
         private readonly AsyncSerialPort _serial;
         private Stopwatch _queryWatch = new Stopwatch();
         private string _lastAlarmString = string.Empty;
-        private Operation[] _querys = new Operation[] { Operation.GetPressure, Operation.GetPosition, Operation.GetDeviceStatus };
+        private Operation[] _querys = new Operation[] { Operation.GetPressure, Operation.GetPosition, Operation.GetDeviceStatus, Operation.GetPressureSP };
 
         public PendulumValve(ModuleName mod)
         {
@@ -190,7 +190,7 @@ namespace Venus_RT.Devices
         {
             if(_queryWatch.ElapsedMilliseconds > _readInterval)
             {
-                SendCommand(_querys[_queryFlag++ % 3]);
+                SendCommand(_querys[_queryFlag++ % 4]);
                 _queryWatch.Restart();
             }
         }
@@ -245,6 +245,7 @@ namespace Venus_RT.Devices
                     case "C":
                     case "O":
                     case "H":
+                    case "R":
                     case "S":
                         break;
                     case "E":
@@ -342,6 +343,14 @@ namespace Venus_RT.Devices
                         }
                     }
                     break;
+                case Operation.GetPressureSP:
+                case Operation.GetPositionSP:
+                    {
+                        string Pressure = data.Substring(4, 8);
+
+                        //LOG.Write(eEvent.EV_DEVICE_INFO, Module, $" PV Pressure SetPoint: {Pressure}");
+                    }
+                    break;
                 default:
                     break;
             }
@@ -354,7 +363,7 @@ namespace Venus_RT.Devices
             if(_CheckStatus())
             {
                 IsOpen = postion > 0;
-                return SendCommand(Operation.SetPosition, postion);
+                return SendCommand(Operation.SetPosition, postion * 1000);
             }
 
             return false;
@@ -404,7 +413,9 @@ namespace Venus_RT.Devices
 
             if (_chamber.ForelinePressure > 500)
             {
-                _noRepeatAlarm($"Foreline Pressure:{_chamber.ForelinePressure} is too high, can not turn on pendulum valve.");
+                if(IsOpen)
+                    LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Foreline Pressure:{_chamber.ForelinePressure} is too high, can not turn on pendulum valve.");
+                //_noRepeatAlarm($"Foreline Pressure:{_chamber.ForelinePressure} is too high, can not turn on pendulum valve.");
                 return false;
             }
 

+ 1 - 0
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -391,6 +391,7 @@ namespace Venus_RT.Modules.PMs
 
         private bool FnIdleTimeout(object[] objs)
         {
+            _chamber.CheckInterlock();
             _debugRoutine();
             return true;
         }

+ 1 - 1
Venus/Venus_RT/Modules/PMs/PMPurgeRoutine.cs

@@ -45,7 +45,7 @@ namespace Venus_RT.Modules.PMs
                 CheckTurboPump())
             {
                 _purgeVentPressure = SC.GetValue<int>($"{Module}.Purge.PurgeVentPressure");
-                _roughPumpDownPressure = SC.GetValue<int>($"{Module}.Purge.PurgePumpPressure");
+                _roughPumpDownPressure = SC.GetValue<int>($"{Module}.Purge.PurgePumpPressure") * 1000;
                 _purgePumpTime = SC.GetValue<int>($"{Module}.Purge.PurgePumpTime");
                 _purgeCycleCount = SC.GetValue<int>($"{Module}.Purge.PurgeCycleCount");
 

+ 1 - 1
Venus/Venus_RT/Modules/PMs/PumpDownRoutine.cs

@@ -44,7 +44,7 @@ namespace Venus_RT.Modules.PMs
                 _pump_delay = SC.GetValue<int>($"{Module}.Pump.PumpValveDelay") * 1000;
                 _basePressure = (objs.Length >= 1) ? Convert.ToInt32(objs[0]) : SC.GetValue<int>($"{Module}.Pump.PumpBasePressure");
 
-
+                _chamber.TurnPendulumValve(false);
                 return Runner.Start(Module, Name);
             }
 

+ 4 - 1
Venus/Venus_RT/Modules/PMs/VentRoutine.cs

@@ -11,6 +11,7 @@ namespace Venus_RT.Modules.PMs
     {
         private enum VentStep
         {
+            kISODelay,
             kClosePVValves,
             kOpenVentValves,
             kDelay_2,
@@ -37,6 +38,7 @@ namespace Venus_RT.Modules.PMs
                 Reset();
 
                 _chamber.CloseValves();
+                _chamber.OpenValve(ValveType.TurboPumpPumping, true);
 
                 _checkATMTimeout = SC.GetValue<int>($"{Module}.CheckATMTimeout");
                 _ventTimeDelay = SC.GetValue<double>($"{Module}.OverVentTime");
@@ -48,7 +50,8 @@ namespace Venus_RT.Modules.PMs
         }
         public RState Monitor()
         {
-            Runner.Run( (int)VentStep.kClosePVValves,       ClosePVValves,                      _delay_1s)
+            Runner.Run((int)VentStep.kISODelay, NullFun, _delay_2s)
+                .Run( (int)VentStep.kClosePVValves,         ClosePVValves,                      _delay_5s)
                 .Run(   (int)VentStep.kOpenVentValves,      HOFs.Apply(TurnVentValves, true),   ()=> { return _chamber.IsATM; }, _checkATMTimeout * 1000)
                 .Delay( (int)VentStep.kDelay_2,             (int)_ventTimeDelay)
                 .End(   (int)VentStep.kCloseVentValves,     HOFs.Apply(TurnVentValves, false),   _defaut_timeout);

+ 1 - 1
Venus/Venus_Themes/Converters/BoolToColor.cs

@@ -13,7 +13,7 @@ namespace Venus_Themes.Converters
         public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
         {
 
-            return (bool)value ? new SolidColorBrush(Colors.Green) : new SolidColorBrush(Colors.Gray);
+            return (bool)value ? new SolidColorBrush(Colors.LimeGreen) : new SolidColorBrush(Colors.Gray);
         }
 
         public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

+ 1 - 1
Venus/Venus_Themes/Converters/BoolToColor2.cs

@@ -13,7 +13,7 @@ namespace Venus_Themes.Converters
         public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
         {
 
-            return (bool)value ?  new SolidColorBrush(Colors.Gray): new SolidColorBrush(Colors.Green);
+            return (bool)value ?  new SolidColorBrush(Colors.Gray): new SolidColorBrush(Colors.Lime);
         }
 
         public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

+ 7 - 6
Venus/Venus_Themes/Themes/Generic.xaml

@@ -12,12 +12,13 @@
                 <ControlTemplate TargetType="{x:Type customControls:CommonValveControl}">
                     <Viewbox Stretch="Fill">
                         <Grid x:Name="mainBody">
-                        <Canvas Width="40" Height="40">
-                            <Ellipse Height="40" Width="40" Fill="Gray"/>
-                                <Ellipse x:Name="InnerEllipse" Height="30" Width="30" Canvas.Left="5" Canvas.Top="5" />
-                                <Rectangle x:Name="Rectangle" Fill="White" RadiusX="2" RadiusY="2"/>
-                        </Canvas>
-                    </Grid>
+                                <Canvas Width="40" Height="40">
+                                    <Ellipse Height="40" Width="40" Fill="Gray"/>
+                                    <Ellipse x:Name="InnerEllipse" Height="30" Width="30" Canvas.Left="5" Canvas.Top="5" />
+                                    <Rectangle x:Name="Rectangle" Fill="White" RadiusX="2" RadiusY="2"/>
+                                </Canvas>
+                            </Grid>
+
                     </Viewbox>
                     <ControlTemplate.Triggers>
                         <Trigger Property="Status" Value="false">