瀏覽代碼

add platingcell/vpw wafersize

chenzk 1 月之前
父節點
當前提交
5c2acda55f

+ 8 - 0
Framework/Common/Persistent/VpwCell/VpwCellPersistentValue.cs

@@ -24,6 +24,10 @@ namespace MECF.Framework.Common.Persistent.VpwCell
         /// Recipe操作模式
         /// </summary>
         private string _recipeOperatingMode;
+        /// <summary>
+        /// VpwCellWaferSize
+        /// </summary>
+        private int _vpwCellWaferSize;
         #endregion
         /// <summary>
         /// 名称
@@ -38,6 +42,10 @@ namespace MECF.Framework.Common.Persistent.VpwCell
         /// Recipe操作模式
         /// </summary>
         public string RecipeOperatingMode { get { return _recipeOperatingMode; } set { _recipeOperatingMode = value; InvokePropertyChanged(nameof(RecipeOperatingMode)); } }
+        /// <summary>
+        /// VpwCellWaferSize
+        /// </summary>
+        public int VpwCellWaferSize { get { return _vpwCellWaferSize; } set { _vpwCellWaferSize = value; InvokePropertyChanged(nameof(VpwCellWaferSize)); } }
 
     }
 }

+ 30 - 1
PunkHPX8_MainPages/ViewModels/VPWCellViewModel.cs

@@ -1,4 +1,5 @@
-using Aitex.Core.UI.MVVM;
+using Aitex.Core.Common;
+using Aitex.Core.UI.MVVM;
 using MECF.Framework.Common.CommonData.Vpw;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.OperationCenter;
@@ -59,6 +60,14 @@ namespace PunkHPX8_MainPages.ViewModels
         /// 是否是Manual模式
         /// </summary>
         private bool _isManualOperationMode;
+        /// <summary>
+        /// WaferSize
+        /// </summary>
+        private int _selectedWaferSize = 0;
+        /// <summary>
+        /// Wafer Size List
+        /// </summary>
+        private List<int> _waferSizeList = new List<int>();
         #endregion
 
         #region VPW recipe
@@ -271,6 +280,22 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _recipeMode; }
             set { SetProperty(ref _recipeMode, value); }
         }
+        /// <summary>
+        /// WaferSize
+        /// </summary>
+        public int SelectedWaferSize
+        {
+            get { return _selectedWaferSize; }
+            set { SetProperty(ref _selectedWaferSize, value); }
+        }
+        /// <summary>
+        /// WaferSizeList
+        /// </summary>
+        public List<int> WaferSizeList
+        {
+            get { return _waferSizeList; }
+            set { SetProperty(ref _waferSizeList, value); }
+        }
         #endregion
 
         #region UI
@@ -360,6 +385,9 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             InitializeCommand = new DelegateCommand<object>(InitializeAction);
             HomeCommand = new DelegateCommand<object>(HomeAction);
+            WaferSizeList.Add((int)WaferSize.WS6);
+            WaferSizeList.Add((int)WaferSize.WS8);
+            WaferSizeList.Add((int)WaferSize.WS12);
         }
 
 
@@ -381,6 +409,7 @@ namespace PunkHPX8_MainPages.ViewModels
             _rtDataKeys.Add($"VPWMain1.{COMMONDATA}");
             _rtDataKeys.Add($"{Module}.AchievedCycle");
             _rtDataKeys.Add($"{Module}.LoopDoValue");
+            _rtDataKeys.Add($"{Module}.VpwWaferSize");
 
             if (_timer == null)
             {

+ 1 - 1
PunkHPX8_MainPages/Views/PlatingCellHomePageView.xaml

@@ -171,7 +171,7 @@
 
             <Grid Grid.Row="2" Grid.Column="0" Grid.RowSpan="2">
                 <UserControls:PlatingCellStatusControl HorizontalAlignment="Left" Margin="10,-50,0,0" VerticalAlignment="Center" 
-                                                IsEnabled="True"
+                                                IsEnabled="{Binding IsEnabled}"
                                                 ModuleName="{Binding Module}"
                                                 Chemistry="{Binding Chemistry}"
                                                 VerticalStation="{Binding VerticalMotionData.MotorPosition}"

+ 4 - 1
PunkHPX8_MainPages/Views/VPWCellView.xaml

@@ -48,12 +48,15 @@
         </Grid>
         <Grid Grid.Row="2" Grid.Column="0" Grid.RowSpan="2">
             <UserControls:VPWCellStatusControl HorizontalAlignment="Left" Margin="10,-50,0,0" VerticalAlignment="Center" 
-                        IsEnabled="True"
+                        IsEnabled="{Binding IsEnabled}"
                         WaterPressure="{Binding VpwMainCommonData.DiwPressure}"
                         ChamberClose="{Binding VpwMainCommonData.ChamberClosed}"
                         ChamberOpen="{Binding VpwMainCommonData.ChamberOpened}"
                         MachineState="{Binding StateMachine}"
                         ModuleName="{Binding Module}"
+                        WaferSize="{Binding VpwCellPersistent.VpwCellWaferSize}"
+                        SelectedWaferSize="{Binding SelectedWaferSize,Mode=TwoWay}"
+                        WaferSizeList="{Binding WaferSizeList}"
                          />
         </Grid>
         <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="3" HorizontalAlignment="Center" Margin="-120,100,0,0">

+ 14 - 0
PunkHPX8_RT/Devices/VpwCell/VpwCellDevice.cs

@@ -9,6 +9,7 @@ using MECF.Framework.Common.CommonData.Prewet;
 using MECF.Framework.Common.CommonData.Vpw;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.IOCore;
+using MECF.Framework.Common.Persistent.Reservoirs;
 using MECF.Framework.Common.Persistent.SRD;
 using MECF.Framework.Common.Persistent.Temperature;
 using MECF.Framework.Common.Persistent.VpwCell;
@@ -180,6 +181,7 @@ namespace PunkHPX8_RT.Devices.VpwCell
             DATA.Subscribe($"{Module}.DiwCellFlow", () => CommonData.DiwFlow, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.VacuumValve", () => CommonData.VacuumValve, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.{LOOPDO_VALUE}", ()=> { return GetLoopDOValue(); }, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.VpwWaferSize", ()=> { return GetLoopDOValue(); }, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 获取Loop do数值
@@ -279,6 +281,8 @@ namespace PunkHPX8_RT.Devices.VpwCell
             OP.Subscribe($"{Module}.StartRotation", StartRotationAction);
             OP.Subscribe($"{Module}.StopRotation", StopRotationAction);
 
+            OP.Subscribe($"{Module}.SetVpwCellWaferSize", (cmd, args) => { return SetVpwCellWaferSize(cmd, args); });
+
         }
         #endregion
 
@@ -472,6 +476,16 @@ namespace PunkHPX8_RT.Devices.VpwCell
             VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
+        private bool SetVpwCellWaferSize(string cmd, object[] args)
+        {
+            string waferSize = args[0] as string;
+            if (_vpwCellPersistentValue != null)
+            {
+                _vpwCellPersistentValue.VpwCellWaferSize = int.Parse(waferSize);
+            }
+            VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
+            return true;
+        }
         #endregion
 
         #region Vent Valve

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

@@ -181,6 +181,10 @@ namespace PunkHPX8_RT.Modules.VpwMain
                         fsm.State == (int)VPWCellState.ManualReciping ||
                          fsm.State == (int)VPWCellState.CycleManualProcessing;}
         }
+        /// <summary>
+        /// 当前Vpw设置的WaferSize
+        /// </summary>
+        public int VpwWaferSize { get { return _persistentValue.VpwCellWaferSize; } }
         #endregion
 
         /// <summary>

+ 1 - 1
PunkHPX8_Themes/UserControls/PlatingCellStatusControl.xaml

@@ -61,7 +61,7 @@
             <TextBlock  Text="{Binding ElementName=self,Path=VerticalStation}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
 
-        <ComboBox Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="2" Height="25" Width="80" ItemsSource="{Binding WaferSizeList}" SelectedItem="{Binding SelectedWaferSize,Mode=TwoWay}"/>
+        <ComboBox x:Name="cbox" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="2" Height="25" Width="80" ItemsSource="{Binding WaferSizeList}" SelectedItem="{Binding SelectedWaferSize,Mode=TwoWay}" SelectionChanged="WaferSize_SelectionChanged"/>
 
         <Grid Grid.Row="6" Grid.Column="2" >
             <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Start" Click="RotationStart_Click"></Button>

+ 5 - 0
PunkHPX8_Themes/UserControls/PlatingCellStatusControl.xaml.cs

@@ -261,5 +261,10 @@ namespace PunkHPX8_Themes.UserControls
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopRotation");
         }
+
+        private void WaferSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetPlatingCellWaferSize", cbox.SelectedItem.ToString());
+        }
     }
 }

+ 1 - 0
PunkHPX8_Themes/UserControls/VPWCellStatusControl.xaml

@@ -60,6 +60,7 @@
         <Border Grid.Row="1" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
             <TextBlock  Text="mm" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
+        <ComboBox x:Name="cbox" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" Height="25" Width="80" ItemsSource="{Binding WaferSizeList}" SelectedItem="{Binding SelectedWaferSize,Mode=TwoWay}" SelectionChanged="WaferSize_SelectionChanged"/>
 
         <Grid Grid.Row="5" Grid.Column="2" >
             <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Start" Click="RotationStart_Click"></Button>

+ 38 - 0
PunkHPX8_Themes/UserControls/VPWCellStatusControl.xaml.cs

@@ -177,6 +177,39 @@ namespace PunkHPX8_Themes.UserControls
                 this.SetValue(WaferSizeProperty, value);
             }
         }
+        public static readonly DependencyProperty WaferSizeListProperty = DependencyProperty.Register(
+           "WaferSizeList", typeof(List<int>), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        ///WaferSizeList
+        /// </summary>
+        public List<int> WaferSizeList
+        {
+            get
+            {
+                return (List<int>)this.GetValue(WaferSizeListProperty);
+            }
+            set
+            {
+                this.SetValue(WaferSizeListProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty SelectedWaferSizeProperty = DependencyProperty.Register(
+         "SelectedWaferSize", typeof(int), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(150, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        ///SelectedWaferSize
+        /// </summary>
+        public int SelectedWaferSize
+        {
+            get
+            {
+                return (int)this.GetValue(SelectedWaferSizeProperty);
+            }
+            set
+            {
+                this.SetValue(SelectedWaferSizeProperty, value);
+            }
+        }
 
         private void ChamberOpen_Click(object sender, RoutedEventArgs e)
         {
@@ -197,5 +230,10 @@ namespace PunkHPX8_Themes.UserControls
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopRotation");
         }
+
+        private void WaferSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetVpwCellWaferSize", cbox.SelectedItem.ToString());
+        }
     }
 }