lixiang 2 years ago
parent
commit
78e40e1681

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

@@ -88,6 +88,8 @@ namespace Venus_MainPages.ViewModels
 
         private string m_title = "123";
 
+        private int m_ESCVoltage;
+
         #endregion
 
         #region  属性      
@@ -347,6 +349,12 @@ namespace Venus_MainPages.ViewModels
             get { return m_BRFFwdPowerSetpoint; }
             set { SetProperty(ref m_BRFFwdPowerSetpoint, value); }
         }
+        public int ESCVoltage
+        {
+            get { return m_ESCVoltage; }
+            set { SetProperty(ref m_ESCVoltage, value); }
+        }
+        
         #endregion
 
         #region 命令
@@ -415,6 +423,12 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand _GasSetPointCommand;
         public DelegateCommand GasSetPointCommand =>
             _GasSetPointCommand ?? (_GasSetPointCommand = new DelegateCommand(OnGasSetPoint));
+
+        private DelegateCommand _HVCommand;
+        public DelegateCommand HVCommand =>
+            _HVCommand ?? (_HVCommand = new DelegateCommand(OnHV));
+
+        
         #endregion
 
         #region 构造函数
@@ -620,6 +634,12 @@ namespace Venus_MainPages.ViewModels
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas7.SetPoint", MfcGas7Setpoint);
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.MfcGas8.SetPoint", MfcGas8Setpoint);
         }
+
+        private void OnHV()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetESCHV", ESCVoltage,true);
+            
+        }
         #endregion
 
         #region 私有方法
@@ -784,6 +804,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.GetPVPosition");
 
             m_RtDataKeys.Add($"{ModuleName}.ChillerTem");
+            m_RtDataKeys.Add($"{ModuleName}.ESCHV.OutputVoltage");
 
 
 

+ 5 - 4
Venus/Venus_MainPages/Views/OverView.xaml

@@ -230,8 +230,9 @@
         <Button Height="20" Width="100" Content="BRF ON/OFF" Canvas.Left="680" Canvas.Top="325" Command="{Binding SetBRfCommand}"  Background="Gray"/>
         <!--<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" />
-
+        <!--<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"/>
         <!--<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"/>
@@ -710,13 +711,13 @@
             <TextBlock Grid.Row="4" Text="Wall Temp.(°C)" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10,0,0,0"/>
 
 
-            <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
+            <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding ESCVoltage}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
             <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.1"  TextBlock.TextAlignment="Center" VerticalAlignment="Bottom" Block.TextAlignment="Center" Margin="0,0,0,4"/>
             <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.2" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
             <TextBox Grid.Row="3" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
             <TextBox Grid.Row="4" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
 
-            <TextBlock Grid.Row="0" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
+            <TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding RtDataValues[PMA.ESCHV.OutputVoltage]}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
 
             <TextBlock Grid.Row="3" Grid.Column="2" Text="{Binding RtDataValues[PMA.ChillerTem],StringFormat='F1'}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" />
             <TextBlock Grid.Row="4" Grid.Column="2" Text="" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>

+ 7 - 4
Venus/Venus_RT/Devices/JetPM.cs

@@ -439,19 +439,21 @@ namespace Venus_RT.Devices
             DATA.Subscribe($"{Name}.GetPVPosition", () => GetPVPosition());
 
             DATA.Subscribe($"{Name}.ChillerTem", () => CoolantInletTempFB);
+            DATA.Subscribe($"{Name}.ESCHV.OutputVoltage", () => ESCOutputVoltage);
+            //DATA.Subscribe($"{Name}.ESCHV.IsOn", () => _ESCHV.);
 
             //DATA.Subscribe($"{Name}.TurboPumpIsRunning", () => _);
 
             OP.Subscribe($"{Module}.SetLiftPin", (cmd, args) => {
                 if ((bool)args[0] == true)
                 {
-                    SetLiftPin(MovementPosition.Up, out _);
+                  return SetLiftPin(MovementPosition.Up, out _);
                 }
                 else
                 { 
-                    SetLiftPin(MovementPosition.Down, out _);
+                  return  SetLiftPin(MovementPosition.Down, out _);
                 }
-                return true;
+                
             });
 
             OP.Subscribe($"{Module}.SetSRf", (cmd, args) => {
@@ -474,7 +476,8 @@ namespace Venus_RT.Devices
             });
 
             OP.Subscribe($"{Module}.SetESCHV", (cmd, args) => {
-                _ESCHV.SetPowerOnOff((bool)args[0]);
+                SetESCClampVoltage((int)args[0]);
+                _ESCHV.SetPowerOnOff((bool)args[1]);
                 return true;
             });