瀏覽代碼

Add VenusDE WallChiller UI & ViewModel

hecl 1 年之前
父節點
當前提交
21d202af0e

+ 1 - 0
Venus/Framework/Common/Device/Bases/ChillerBase.cs

@@ -27,6 +27,7 @@ namespace MECF.Framework.Common.Device.Bases
         public virtual float Temperature { get; set; }
 
         public virtual float CoolantInletTcFeedback { get; set; }
+        public virtual float ControlTcFeedback { get; set; }
 
         public virtual float CoolantOutletTcFeedback { get; set; }
 

+ 36 - 7
Venus/Venus_MainPages/ViewModels/OverVenusDEViewModel.cs

@@ -183,6 +183,7 @@ namespace Venus_MainPages.ViewModels
         private bool m_HeIsPressureMode = true;
 
         private bool m_ChillerIsOn;
+        private bool m_WallChillerIsOn;
 
         private float m_ChamberPressure;
         private float m_ProcessPressure;
@@ -202,6 +203,7 @@ namespace Venus_MainPages.ViewModels
         private bool m_IsLidClosed = true;
 
         private float m_ChillerTemperature;
+        private float m_WallChillerTemperature;
         private float m_HVTemperature;
 
 
@@ -362,6 +364,14 @@ namespace Venus_MainPages.ViewModels
                 SetProperty(ref m_ChillerTemperature, value);
             }
         }
+        public float WallChillerTemperature
+        {
+            get { return m_WallChillerTemperature; }
+            set
+            {
+                SetProperty(ref m_WallChillerTemperature, value);
+            }
+        }
         public float HVTemperature
         {
             get { return m_HVTemperature; }
@@ -1073,6 +1083,11 @@ namespace Venus_MainPages.ViewModels
             get { return m_ChillerIsOn; }
             set { SetProperty(ref m_ChillerIsOn, value); }
         }
+        public bool WallChillerIsOn
+        {
+            get { return m_WallChillerIsOn; }
+            set { SetProperty(ref m_WallChillerIsOn, value); }
+        }
 
         public double ChamberPressureFeedBack
         {
@@ -1200,11 +1215,15 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand SetChillerTempCommand =>
             _SetChillerTempCommand ?? (_SetChillerTempCommand = new DelegateCommand(OnSetChillerTemp));
 
-
+        private DelegateCommand _SetWallChillerTempCommand;
+        public DelegateCommand SetWallChillerTempCommand =>
+            _SetWallChillerTempCommand ?? (_SetWallChillerTempCommand = new DelegateCommand(OnSetWallChillerTemp));
         private DelegateCommand _OnOffChillerCommand;
         public DelegateCommand OnOffChillerCommand =>
             _OnOffChillerCommand ?? (_OnOffChillerCommand = new DelegateCommand(OnOffChiller));
-
+        private DelegateCommand _OnOffWallChillerCommand;
+        public DelegateCommand OnOffWallChillerCommand =>
+            _OnOffWallChillerCommand ?? (_OnOffWallChillerCommand = new DelegateCommand(OnOffWallChiller));
 
         private DelegateCommand<object> _HeaterCommand;
         public DelegateCommand<object> HeaterCommand =>
@@ -1540,6 +1559,7 @@ namespace Venus_MainPages.ViewModels
             butterflyValveMessageBox.Owner = _mainWindow;
 
         }
+        //WallChiller
         private void OnLoadRecipe()
         {
             string recipeType = SelectedRecipeType.Content.ToString();
@@ -1602,13 +1622,22 @@ namespace Venus_MainPages.ViewModels
             float.TryParse(value, out x);
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeatChiller", ChillerType.Chiller.ToString(), ChillerTempSetpoint, x);
         }
-
+        private void OnSetWallChillerTemp()
+        {
+            var value = (QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.WallChiller.ChillerTemperatureOffset").ToString());
+            float x;
+            float.TryParse(value, out x);
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeatChiller", ChillerType.WallChiller.ToString(), WallTempSetpoint, x);
+        }
         private void OnOffChiller()
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", ChillerType.Chiller.ToString(), !ChillerIsOn);
         }
 
-
+        private void OnOffWallChiller()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.OnOffChiller", ChillerType.WallChiller.ToString(), !WallChillerIsOn);
+        }
         private void OnHeater(object obj)
         {
             if (IsAutoMode == true)
@@ -1837,13 +1866,13 @@ namespace Venus_MainPages.ViewModels
                 ESCHePressure = float.Parse(RtDataValues[$"{ModuleName}.ESCHePressure"].ToString());
 
                 ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
-
+                WallChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.WallChiller.Temp"].ToString());
                 HVTemperature = float.Parse(RtDataValues[$"{ModuleName}.{VenusDevice.ESCHV}.Temp"].ToString());
 
 
 
                 ChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.Chiller.IsOn");
-
+                WallChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.WallChiller.IsOn");
                 BiasRFFanInterlock = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.SourceRFFanInterlock");
                 IsWLK = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWLK");
                 IsWaterFlowOk = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWaterFlowOk");
@@ -1919,7 +1948,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"{ModuleName}.MfcGas12");
             m_RtDataKeys.Add($"{ModuleName}.MfcHe");
             m_RtDataKeys.Add($"{ModuleName}.MfcN2");
-
+            m_RtDataKeys.Add($"{ModuleName}.WallChiller.Temp");
 
             m_RtDataKeys.Add($"{ModuleName}.ForelinePressure");
             m_RtDataKeys.Add($"{ModuleName}.ChamberPressure");

+ 19 - 28
Venus/Venus_MainPages/Views/OverVenusDEView.xaml

@@ -212,7 +212,7 @@
         <!--</Border>-->
         <Canvas Canvas.Top="40" >
             <!--N2-->
-            <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="230" Canvas.Left="255" Canvas.Top="120">
+            <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="104" Canvas.Left="381" Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Center">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
                         <Binding Path="PVN22ValveIsOpen"/>
@@ -224,7 +224,7 @@
 
             <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="N2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
-            <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="193" Canvas.Left="85"  Canvas.Top="120">
+            <ctrls:FlowPipe x:Name="N2Pipe1"  Height="8"  Width="302" Canvas.Left="85"  Canvas.Top="120" HorizontalAlignment="Left" VerticalAlignment="Center">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
                         <Binding Path="PVN22ValveIsOpen"/>
@@ -1041,7 +1041,7 @@
 
             <!--与chamber底部连接的管道-->
             <ctrls:FlowPipe   Height="8"  Width="255" Canvas.Left="798"  Canvas.Top="658" IsFlowing="{Binding PVHe1ValveIsOpen}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-            <ctrls:FlowPipe   Height="8"  Width="148" Canvas.Left="1055"  Canvas.Top="463" RotateTransformValue="90"  IsReverse="{Binding PVHe1ValveIsOpen}">
+            <ctrls:FlowPipe   Height="8"  Width="148" Canvas.Left="1055"  Canvas.Top="463" RotateTransformValue="90"  IsReverse="{Binding PVHe1ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Center">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
                         <Binding Path="HeISOValveIsOpen"/>
@@ -1051,11 +1051,11 @@
 
             <ctrls:FlowPipe   Height="8"  Width="90" Canvas.Left="1050"  Canvas.Top="610" IsFlowing="{Binding PVHe3ValveIsOpen}"/>
             <ctrls:FlowPipe   Height="8"  Width="65" Canvas.Left="1146"  Canvas.Top="615" RotateTransformValue="90" IsFlowing="{Binding PVHe3ValveIsOpen}"/>
-            <ctrls:FlowPipe   Height="8"  Width="56" Canvas.Left="1055"  Canvas.Top="610" RotateTransformValue="90" IsReverse="{Binding PVHe1ValveIsOpen}">
+            <ctrls:FlowPipe   Height="8"  Width="59" Canvas.Left="1055"  Canvas.Top="608" RotateTransformValue="90" IsReverse="{Binding PVHe1ValveIsOpen}">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
                         <Binding Path="PVHe1ValveIsOpen"/>
-                        <Binding Path="PVHe2ValveIsOpen"/>
+                        <Binding Path="HeISOValveIsOpen"/>
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
@@ -1668,9 +1668,7 @@
         </Grid>
         <Ellipse Width="20" Height="20" Fill="{Binding BRFData.IsRfOn,Converter={StaticResource boolToColor}}"  Canvas.Left="500" Canvas.Top="514" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Top"/>
         <Button Height="20" Width="100" Content="BRF ON/OFF" Canvas.Left="530" Canvas.Top="514" Command="{Binding SetBRfCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
-        <!--<Ellipse Width="20" Height="20" Fill="{Binding SRFData.IsRfOn,Converter={StaticResource boolToColor}}"  Canvas.Left="500" Canvas.Top="375" Stroke="Silver" StrokeThickness="2"/>
-        <Button Height="20" Width="100" Content="SRF ON/OFF" Canvas.Left="530" Canvas.Top="375" Command="{Binding SetSRfCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>-->
-        <Ellipse Width="20" Height="20" Fill="{Binding MagnetData.IsMagnetOn,Converter={StaticResource boolToColor}}"  Canvas.Left="501" Canvas.Top="374" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+        <!--<Ellipse Width="20" Height="20" Fill="{Binding MagnetData.IsMagnetOn,Converter={StaticResource boolToColor}}"  Canvas.Left="501" Canvas.Top="374" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>-->
         <Button Height="20" Width="100" Content="Set Magnet" Canvas.Left="530" Canvas.Top="374" Command="{Binding SetMagnetCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
 
         <Ellipse Width="20" Height="20" Fill="{Binding ESCHVData.IsOn,Converter={StaticResource boolToColor}}" Canvas.Left="501" Canvas.Top="247" Stroke="Silver" StrokeThickness="2"/>
@@ -1750,9 +1748,10 @@
             </TextBlock>
         </Grid>
 
-        <Grid Width="400" Height="25"  Background="#E8E8E8" unity:GridOptions.LineBrush="#afb4db" unity:GridOptions.ShowBorder="True" Canvas.Left="500" Canvas.Top="208">
+        <Grid Width="400" Height="50"  Background="#E8E8E8" unity:GridOptions.LineBrush="#afb4db" unity:GridOptions.ShowBorder="True" Canvas.Left="500" Canvas.Top="188">
             <Grid.RowDefinitions>
                 <RowDefinition/>
+                <RowDefinition/>
             </Grid.RowDefinitions>
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="3*"/>
@@ -1762,15 +1761,15 @@
             </Grid.ColumnDefinitions>
 
             <TextBlock Grid.Row="0" Text="Chiller Temp.(°C)" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="1,0,0,0"/>
-            <!--<TextBlock Grid.Row="1" Text="Wall Temp.(°C)" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="1,0,0,0"/>-->
+            <TextBlock Grid.Row="1" Text="Wall Temp.(°C)" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="1,0,0,0"/>
 
             <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding ChillerTempSetpoint,UpdateSourceTrigger=PropertyChanged}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
-            <!--<TextBox Grid.Row="1" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding WallTempSetpoint}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />-->
+            <TextBox Grid.Row="1" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding WallTempSetpoint}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />
 
             <TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding ChillerTemperature,StringFormat='F1'}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center">
-
             </TextBlock>
-
+            <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding WallChillerTemperature,StringFormat='F1'}" FontSize="15" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center">
+            </TextBlock>
 
             <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="3">
                 <Ellipse Width="18" Height="18" Fill="{Binding ChillerIsOn,Converter={StaticResource boolToColor}}"  Stroke="Silver" StrokeThickness="2"/>
@@ -1778,8 +1777,11 @@
                 <Button Margin="5,0,0,0" Height="20" Width="70"  Style="{x:Null}" Content="Set"             Command="{Binding SetChillerTempCommand}"  CommandParameter="True"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
             </StackPanel>
-
-
+            <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="3">
+                <Ellipse Width="18" Height="18" Fill="{Binding ChillerIsOn,Converter={StaticResource boolToColor}}"  Stroke="Silver" StrokeThickness="2"/>
+                <Button Margin="5,0,0,0" Height="20" Width="70"  Style="{x:Null}" Content="ON/OFF"          Command="{Binding OnOffChillerCommand}"    CommandParameter="True"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+                <Button Margin="5,0,0,0" Height="20" Width="70"  Style="{x:Null}" Content="Set"             Command="{Binding SetWallChillerTempCommand}"  CommandParameter="True"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+            </StackPanel>
         </Grid>
         <Grid Visibility="Hidden"  Height="120" Width="300"  Canvas.Left="400" Canvas.Top="70" Background="#E8E8E8"  unity:GridOptions.ShowBorder="True">
             <Grid.ColumnDefinitions>
@@ -1868,20 +1870,9 @@
                 </TransformGroup>
             </userControls:FlowPipe.RenderTransform>
             <userControls:FlowPipe.IsFlowing>
-                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter4}">
+                <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
+                    <Binding Path="PVN22ValveIsOpen"/>
                     <Binding Path="PurgeValveIsOpen"/>
-                    <Binding Path="MFC1ValveIsOpen"/>
-                    <Binding Path="MFC2ValveIsOpen"/>
-                    <Binding Path="MFC3ValveIsOpen"/>
-                    <Binding Path="MFC4ValveIsOpen"/>
-                    <Binding Path="MFC5ValveIsOpen"/>
-                    <Binding Path="MFC6ValveIsOpen"/>
-                    <Binding Path="MFC7ValveIsOpen"/>
-                    <Binding Path="MFC8ValveIsOpen"/>
-                    <Binding Path="MFC9ValveIsOpen"/>
-                    <Binding Path="MFC10ValveIsOpen"/>
-                    <Binding Path="MFC11ValveIsOpen"/>
-                    <Binding Path="MFC12ValveIsOpen"/>
                 </MultiBinding>
             </userControls:FlowPipe.IsFlowing>
         </userControls:FlowPipe>

+ 2 - 1
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -79,6 +79,7 @@ namespace Venus_RT.Devices
         public virtual bool IsHVOn { get; }
 
         public virtual float CoolantInletTempFB { get; }
+        public virtual float CoolantInletWallTempFB { get; }
         public virtual float CoolantOutletTempFB { get; }
         public virtual bool ChillerIsRunning { get; }
         //Loadlock_Arm
@@ -249,7 +250,7 @@ namespace Venus_RT.Devices
 
             DATA.Subscribe($"{Name}.ESCHV.Temp", () => CoolantOutletTempFB);
             DATA.Subscribe($"{Name}.Chiller.Temp", () => CoolantInletTempFB);
-
+            DATA.Subscribe($"{Name}.WallChiller.Temp", () => CoolantInletWallTempFB,SubscriptionAttribute.FLAG.IgnoreSaveDB);
             //DATA.Subscribe($"{Name}.Chiller.IsOn", () => ChillerIsRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Name}.IsTurboPumpAtSpeed", () => IsTurboPumpAtSpeed);
             DATA.Subscribe($"{Name}.EPDCfgList", () => EPDCfgList, SubscriptionAttribute.FLAG.IgnoreSaveDB);

+ 17 - 2
Venus/Venus_RT/Devices/JetVenusDEPM.cs

@@ -530,6 +530,21 @@ namespace Venus_RT.Devices
 
         public override bool IsHVOn => _ESCHV.IsOn;
 
+        public override float CoolantInletWallTempFB
+        {
+            get
+            {
+                switch (SC.GetValue<int>($"{Module}.WallChiller.CommunicationType"))
+                {
+                    case (int)CommunicationType.RS232:
+                        return _WallChiller.ControlTcFeedback;
+                    case (int)CommunicationType.RS485:
+                        return _WallChiller.Temperature;
+                    default:
+                        return 0;
+                }
+            }
+        }
         public override float CoolantInletTempFB
         {
             get
@@ -537,7 +552,7 @@ namespace Venus_RT.Devices
                 switch (SC.GetValue<int>($"{Module}.Chiller.CommunicationType"))
                 {
                     case (int)CommunicationType.RS232:
-                        return _Chiller.CoolantInletTcFeedback;
+                        return _Chiller.ControlTcFeedback;
                     case (int)CommunicationType.RS485:
                         return _Chiller.Temperature;
                     default:
@@ -545,7 +560,7 @@ namespace Venus_RT.Devices
                 }
             }
         }
-        
+
         public override float CoolantOutletTempFB => _Chiller.CoolantOutletTcFeedback;
 
         public override bool ChillerIsRunning => _Chiller.IsRunning;