Bläddra i källkod

add platingcell releated

chenzk 1 vecka sedan
förälder
incheckning
9b9dd56691

+ 2 - 0
Framework/Common/DataCenter/IQueryDataService.cs

@@ -12,6 +12,7 @@ using MECF.Framework.Common.CommonData.DeviceData;
 using MECF.Framework.Common.CommonData.Dryer;
 using MECF.Framework.Common.CommonData.Loader;
 using MECF.Framework.Common.CommonData.Metal;
+using MECF.Framework.Common.CommonData.PlatingCell;
 using MECF.Framework.Common.CommonData.PowerSupplier;
 using MECF.Framework.Common.CommonData.Prewet;
 using MECF.Framework.Common.CommonData.PUF;
@@ -159,6 +160,7 @@ namespace MECF.Framework.Common.DataCenter
     [ServiceKnownType(typeof(List<AlarmList>))]
     [ServiceKnownType(typeof(ObservableCollection<SignalTowerItem>))]
     [ServiceKnownType(typeof(ReservoirData))]
+    [ServiceKnownType(typeof(PlatingCellData))]
     public interface IQueryDataService
 	{
 		[OperationContract]

+ 64 - 4
PunkHPX8_MainPages/ViewModels/PlatingCellHomePageViewModel.cs

@@ -1,11 +1,15 @@
 using Aitex.Core.Common;
+using Aitex.Core.RT.DataCenter;
 using Aitex.Core.UI.MVVM;
 using MECF.Framework.Common.CommonData.Metal;
 using MECF.Framework.Common.CommonData.PlatingCell;
 using MECF.Framework.Common.CommonData.PowerSupplier;
+using MECF.Framework.Common.CommonData.Reservoir;
+using MECF.Framework.Common.CommonData.SRD;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.OperationCenter;
 using MECF.Framework.Common.Persistent.Reservoirs;
+using MECF.Framework.Common.Persistent.SRD;
 using MECF.Framework.Common.RecipeCenter;
 using MECF.Framework.Common.ToolLayout;
 using MECF.Framework.Common.Utilities;
@@ -24,6 +28,7 @@ namespace PunkHPX8_MainPages.ViewModels
     {
         #region 常量
         private const string PERSISTENT_VALUE = "PersistentValue";
+        private const string PLATINGCELLDATA = "PlatingCellData";
         #endregion
 
         #region 内部变量
@@ -42,6 +47,10 @@ namespace PunkHPX8_MainPages.ViewModels
         /// </summary>
         private PlatingCellData _platingCellCommonData;
         /// <summary>
+        /// ReservoirData
+        /// </summary>
+        private ReservoirData _reservoirCommonData;
+        /// <summary>
         /// Persistent
         /// </summary>
         private PlatingCellPersistentValue _platingCellPersistent;
@@ -52,7 +61,7 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <summary>
         /// WaferSize
         /// </summary>
-        private WaferSize _selectedWaferSize = 0;
+        private int _selectedWaferSize = 0;
         /// <summary>
         /// Wafer Size List
         /// </summary>
@@ -65,6 +74,10 @@ namespace PunkHPX8_MainPages.ViewModels
         /// AutoMode页面功能启用
         /// </summary>
         private bool _isAutoEnabled;
+        /// <summary>
+        /// 对应reservoir的name
+        /// </summary>
+        private string _reservoirName;
         #endregion
 
     
@@ -133,6 +146,10 @@ namespace PunkHPX8_MainPages.ViewModels
         /// 当前Recipe
         /// </summary>
         private string _currentRecipe;
+        /// <summary>
+        /// 当前Recipe的化学液
+        /// </summary>
+        private string _chemistry;
         #endregion
 
         #region UI Related
@@ -160,6 +177,15 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             get { return _platingCellCommonData; }
             set { SetProperty(ref _platingCellCommonData, value); }
+            
+        }
+        /// <summary>
+        /// PlatingCellData
+        /// </summary>
+        public ReservoirData ReservoirCommonData
+        {
+            get { return _reservoirCommonData; }
+            set { SetProperty(ref _reservoirCommonData, value); }
         }
         /// <summary>
         /// Persistent
@@ -188,7 +214,7 @@ namespace PunkHPX8_MainPages.ViewModels
         /// <summary>
         /// WaferSize
         /// </summary>
-        public WaferSize SelectedWaferSize
+        public int SelectedWaferSize
         {
             get { return _selectedWaferSize; }
             set { SetProperty(ref _selectedWaferSize, value); }
@@ -217,9 +243,17 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _isAutoEnabled; }
             set { SetProperty(ref _isAutoEnabled, value); }
         }
+        /// <summary>
+        /// Reservoir Name
+        /// </summary>
+        public string ReservoirName
+        {
+            get { return _reservoirName; }
+            set { SetProperty(ref _reservoirName, value); }
+        }
         #endregion
 
-       
+
         /// SeqRecipe
         /// </summary>
         public string SeqRecipe
@@ -312,6 +346,14 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _currentRecipe; }
             set { SetProperty(ref _currentRecipe, value); }
         }
+        /// <summary>
+        /// 当前Recipe
+        /// </summary>
+        public string Chemistry
+        {
+            get { return _chemistry; }
+            set { SetProperty(ref _chemistry, value); }
+        }
         #endregion
 
         #region UI Related
@@ -348,6 +390,7 @@ namespace PunkHPX8_MainPages.ViewModels
         public PlatingCellHomePageViewModel()
         {
             InitializeCommand = new DelegateCommand<object>(InitializeAction);
+            WaferSizeList.Add((int)WaferSize.WS6);
             WaferSizeList.Add((int)WaferSize.WS8);
             WaferSizeList.Add((int)WaferSize.WS12);
         }
@@ -362,6 +405,14 @@ namespace PunkHPX8_MainPages.ViewModels
             RecipeType = "dep";
             _rtDataKeys.Clear();
             _rtDataKeys.Add($"{Module}.FsmState");
+            _rtDataKeys.Add($"{Module}.{PERSISTENT_VALUE}");
+            _rtDataKeys.Add($"{Module}.CurrentRecipe");
+            _rtDataKeys.Add($"{Module}.TotalTime");
+            _rtDataKeys.Add($"{Module}.TimeRemain");
+            _rtDataKeys.Add($"{Module}.{PLATINGCELLDATA}");
+            _rtDataKeys.Add($"{Module}.ReservoirCommonData");
+            _rtDataKeys.Add($"{Module}.ReservoirName");
+            _rtDataKeys.Add($"{Module}.Chemistry");
             if (_timer == null)
             {
                 _timer = new DispatcherTimer();
@@ -382,7 +433,16 @@ namespace PunkHPX8_MainPages.ViewModels
                 _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
                 if (_rtDataValueDic != null)
                 {
-                   
+
+                    PlatingCellPersistent = CommonFunction.GetValue<PlatingCellPersistentValue>(_rtDataValueDic, $"{Module}.{PERSISTENT_VALUE}");
+                    State = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
+                    CurrentRecipe = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.CurrentRecipe");
+                    TotalTime = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.TotalTime");
+                    TimeRemaining = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.TimeRemain");
+                    PlatingCellCommonData = CommonFunction.GetValue<PlatingCellData>(_rtDataValueDic, $"{Module}.{PLATINGCELLDATA}");
+                    ReservoirCommonData = CommonFunction.GetValue<ReservoirData>(_rtDataValueDic, $"{Module}.ReservoirCommonData");
+                    Chemistry = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.Chemistry");
+                    ReservoirName = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.ReservoirName");
                 }
             }
         }

+ 34 - 18
PunkHPX8_MainPages/Views/PlatingCellHomePageView.xaml

@@ -55,7 +55,12 @@
             <Grid Grid.Row="1" Grid.Column="0">
                 <UserControls:SrdOverviewInformationPanel HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Center" 
                                    ModuleTitle="{Binding Module}" IsEnabled="{Binding IsEnabled}"
-                                   />
+                                   RecipeContentValue="{Binding CurrentRecipe}"
+                                   TimeRemainingValue="{Binding TimeRemaining}"
+                                   TotalTimeValue="{Binding TotalTime}"
+                                   StateValue="{Binding State}"
+                                   OperatingModeValue="{Binding PlatingCellPersistent.OperatingMode}"
+                                   RecipeModeValue="{Binding PlatingCellPersistent.RecipeOperatingMode}"/>
             </Grid>
             <Grid Grid.Row="1" Grid.Column="1">
                 <UserControls:WaferOverviewPanel HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Center" 
@@ -92,14 +97,14 @@
             <Grid Grid.Row="2" Grid.Column="3" Height="155" VerticalAlignment="Top">
                 <UserControls:OperatingModeControl HorizontalAlignment="Left" Margin="26,0,0,0" VerticalAlignment="Top" 
                                         ModuleName="{Binding Module}"
-                                        OperationModeValue="{Binding SRDPersistent.OperatingMode}"/>
+                                        OperationModeValue="{Binding PlatingCellPersistent.OperatingMode}"/>
 
             </Grid>
             <Grid Grid.Row="2" Grid.Column="3" Grid.RowSpan="2">
                 <Label Content="Recipe Mode"  FontSize="15" FontWeight="Bold" Margin="0,0,0,90" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"></Label>
                 <UserControls:RecipeModeControl HorizontalAlignment="Center" Margin="0,170,0,0" VerticalAlignment="Top" Width="190"
                         ModuleName="{Binding Module}"
-                        RecipeModeValue="{Binding ReservoirsPersistent.RecipeOperatingMode}" />
+                        RecipeModeValue="{Binding PlatingCellPersistent.RecipeOperatingMode}" />
             </Grid>
 
             <GroupBox Header="Cell Status" Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" HorizontalAlignment="Right" Height="180" VerticalAlignment="Center" Margin="0,0,30,50">
@@ -133,30 +138,30 @@
                     </Grid>
 
                     <Grid Grid.Row="0" Grid.Column="1">
-                        <Ellipse Grid.Column="0" Width="16" Height="16" HorizontalAlignment="Left" Margin="3,0,0,0"  Fill="{Binding CommonSafetyData.Reservoir12CAPumpEdm,Converter={StaticResource boolToRedGreenColor}}" Stroke="Silver"/>
+                        <Ellipse Grid.Column="0" Width="16" Height="16" HorizontalAlignment="Left" Margin="3,0,0,0"  Fill="{Binding ReservoirCommonData.AnTowerHigh,Converter={StaticResource boolToRedGreenColor}}" Stroke="Silver"/>
                         <Label Content="High" FontSize="12" FontWeight="Bold"   Margin="20,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left"/>
                     </Grid>
                     <Grid Grid.Row="0" Grid.Column="2">
-                        <Ellipse Grid.Column="0" Width="16" Height="16" HorizontalAlignment="Right" Margin="0 0 20 0"  Fill="{Binding CommonSafetyData.Reservoir12CAPumpEdm,Converter={StaticResource boolToRedGreenColor}}" Stroke="Silver"/>
+                        <Ellipse Grid.Column="0" Width="16" Height="16" HorizontalAlignment="Right" Margin="0 0 20 0"  Fill="{Binding ReservoirCommonData.AnTowerLow,Converter={StaticResource boolToRedGreenColor}}" Stroke="Silver"/>
                         <Label Content="Low" FontSize="12" FontWeight="Bold"   Margin="8,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left"/>
                     </Grid>
                     <Border Grid.Row="1" Grid.Column="1"  Margin="5,5,2,5" Background="Black">
-                        <TextBlock  Text="{Binding CommonData.VacuumValue, ElementName=self, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        <TextBlock  Text="{Binding ReservoirCommonData.AnFlow, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                     </Border>
                     <Border Grid.Row="1" Grid.Column="2"  Margin="5,5,25,5" Background="Black">
                         <TextBlock   Text="L/min"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </Border>
                     <Border Grid.Row="2" Grid.Column="1"  Margin="5,5,2,5" Background="Black">
-                        <TextBlock  Text="{Binding CommonData.VacuumValue, ElementName=self, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        <TextBlock  Text="{Binding PlatingCellCommonData.OverFlowLevel, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                     </Border>
                     <Border Grid.Row="2" Grid.Column="2"  Margin="5,5,25,5" Background="Black">
                         <TextBlock   Text="mm"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </Border>
                     <Border Grid.Row="3" Grid.Column="1"  Grid.ColumnSpan="2" Background="Black"  Height="30" Margin="5,5,25,5">
-                        <TextBlock Text="{Binding CurrentRecipe.Metal}" Foreground="Lime" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        <TextBlock Text="{Binding PlatingCellCommonData.OverFlowStatus}" Foreground="Lime" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
                     </Border>
                     <Border Grid.Row="4" Grid.Column="1"  Margin="5,5,2,5" Background="Black">
-                        <TextBlock  Text="{Binding CommonData.VacuumValue, ElementName=self, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        <TextBlock  Text="{Binding ReservoirCommonData.CaFlow, StringFormat=\{0:F2\}}"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                     </Border>
                     <Border Grid.Row="4" Grid.Column="2"  Margin="5,5,25,5" Background="Black">
                         <TextBlock   Text="L/min"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
@@ -166,8 +171,18 @@
 
             <Grid Grid.Row="2" Grid.Column="0" Grid.RowSpan="2">
                 <UserControls:PlatingCellStatusControl HorizontalAlignment="Left" Margin="10,-50,0,0" VerticalAlignment="Center" 
-                IsEnabled="True"
-                ModuleName="{Binding Module}"
+                                                IsEnabled="True"
+                                                ModuleName="{Binding Module}"
+                                                Chemistry="{Binding Chemistry}"
+                                                VerticalStation="{Binding }"
+                                                SelectedWaferSize="{Binding SelectedWaferSize,Mode=TwoWay}"
+                                                WaferSizeList="{Binding WaferSizeList}"
+                                                ClamshellSensor="{Binding PlatingCellCommonData.ClamShellDistance}"
+                                                IsClamshellOpen="{Binding PlatingCellCommonData.ClamShellClose,Converter={StaticResource BoolToBool}}"
+                                                IsClamshellClose="{Binding PlatingCellCommonData.ClamShellClose}"
+                                                IsAngleTilt="{Binding PlatingCellCommonData.IsHeadTilt}"
+                                                IsAngleVertical="{Binding PlatingCellCommonData.IsHeadVertical}"
+                    
                  />
             </Grid>
 
@@ -207,16 +222,17 @@
                     <Border Grid.Row="2" Grid.Column="2"  Margin="5,5,25,5" Background="Black">
                         <TextBlock   Text="mm"  Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </Border>
-         
+
                 </Grid>
             </GroupBox>
+            <UserControls:PlatingCellUIControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="3" HorizontalAlignment="Center" Margin="-120,100,0,0"
+                                                ModuleName="{Binding Module}"
+                                                ReservoirName="{Binding ReservoirName}" 
+                                                ANIsolationValve="{Binding ReservoirCommonData.AnIsolation}"
+                                                CAIsolationValve="{Binding ReservoirCommonData.CaIsolation}"
+                                     
+            />
 
-            <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="3" HorizontalAlignment="Center" Margin="-120,100,0,0">
-                <UserControls:PlatingCellUIControl ModuleName="{Binding Module}"
-                                      
-      
-             ></UserControls:PlatingCellUIControl>
-            </Grid>
 
 
 

+ 2 - 1
PunkHPX8_RT/Devices/DeviceManager.cs

@@ -69,8 +69,9 @@ namespace PunkHPX8_RT.Instances
             InitializeTemperature();
             InitializePowerSuppliers();
             InitializeVpw();
-            InitializePlatingCells();
             InitializeReservoir();
+            InitializePlatingCells();
+          
             SystemFacilities systemFacilities = new SystemFacilities();
             AddCustomModuleDevice(systemFacilities);
 

+ 27 - 2
PunkHPX8_RT/Devices/PlatingCell/PlatingCellDevice.cs

@@ -30,6 +30,7 @@ namespace PunkHPX8_RT.Devices.PlatingCell
     {
         #region 常量 
         private const string PERSISTENT_VALUE = "PersistentValue";
+        private const string PLATINGCELLDATA = "PlatingCellData";
         private const string AUTO = "Auto";
         private const string MANUAL = "Manual";
         private const string STRATUS = "Stratus";
@@ -69,6 +70,10 @@ namespace PunkHPX8_RT.Devices.PlatingCell
         /// </summary>
         private int _overflowLevelHigh = 85;
         private int _overflowLevelLow = 25;
+        /// <summary>
+        /// 对应reservoir的名字
+        /// </summary>
+        private string _reservoirName;
         #endregion
 
         #region 属性
@@ -104,6 +109,10 @@ namespace PunkHPX8_RT.Devices.PlatingCell
         /// 数据
         /// </summary>
         protected PlatingCellData _platingCellData = new PlatingCellData();
+        /// <summary>
+        /// 对应reservoir数据
+        /// </summary>
+        protected ReservoirData _reservoirData = new ReservoirData();
 
         #endregion
 
@@ -121,7 +130,7 @@ namespace PunkHPX8_RT.Devices.PlatingCell
         /// <param name="moduleName"></param>
         public PlatingCellDevice(string moduleName) : base(moduleName, moduleName, moduleName, moduleName)
         {
-        
+            
         }
         /// <summary>
         /// 初始化
@@ -160,6 +169,9 @@ namespace PunkHPX8_RT.Devices.PlatingCell
             }
             _overflowLevelHigh = SC.GetValue<int>($"PlatingCell.OverflowLevelHigh");
             _overflowLevelLow = SC.GetValue<int>($"PlatingCell.OverflowLevelLow");
+
+            _reservoirData = GetReservoirDevice().ReservoirData;
+            _reservoirName = GetReservoirDevice().Module;
         }
         protected virtual void SubscribeValueAction()
         {
@@ -246,6 +258,9 @@ namespace PunkHPX8_RT.Devices.PlatingCell
         private void SubscribeData()
         {
             DATA.Subscribe($"{Module}.{PERSISTENT_VALUE}", () => _persistentValue, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.{PLATINGCELLDATA}", () => _platingCellData, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.ReservoirCommonData", () => _reservoirData, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.ReservoirName", () => _reservoirName, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         
            
         }
@@ -417,10 +432,20 @@ namespace PunkHPX8_RT.Devices.PlatingCell
             PlatingCellPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
+
+        /// <summary>
+        /// 获取Reservoir设备
+        /// </summary>
+        /// <returns></returns>
+        private ReservoirDevice GetReservoirDevice()
+        {
+            string reservoir = ReservoirItemManager.Instance.GetReservoirByPlatingCell(Module);
+            return DEVICE.GetDevice<ReservoirDevice>(reservoir);
+        }
         #endregion
 
 
-        
+
 
         public virtual void Monitor()
         {

+ 13 - 0
PunkHPX8_RT/Modules/PlatingCell/PlatingCellEntity.cs

@@ -10,6 +10,7 @@ using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Persistent.Reservoirs;
 using MECF.Framework.Common.ProcessCell;
 using MECF.Framework.Common.RecipeCenter;
+using MECF.Framework.Common.Routine;
 using MECF.Framework.Common.ToolLayout;
 using PunkHPX8_Core;
 using PunkHPX8_RT.Devices.PlatingCell;
@@ -60,6 +61,14 @@ namespace PunkHPX8_RT.Modules.PlatingCell
         /// 当前recipe
         /// </summary>
         private DepRecipe _currentRecipe;
+        /// <summary>
+        /// recipe时间
+        /// </summary>
+        private int _recipeTime;
+        /// <summary>
+        /// 当前RunRecipe Routine
+        /// </summary>
+        private RoutineBase _currentRunRecipeRoutine;
         #endregion
         #region 属性
         /// <summary>
@@ -189,6 +198,10 @@ namespace PunkHPX8_RT.Modules.PlatingCell
         private void InitializeDATA()
         {
             DATA.Subscribe($"{Module}.FsmState", () => ((PlatingCellState)fsm.State).ToString(), SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.CurrentRecipe", () => _currentRecipe != null ? _currentRecipe.Ppid : "", SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.TotalTime", () => _recipeTime, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.TimeRemain", () => _recipeTime != 0 && _currentRunRecipeRoutine != null ? (_recipeTime - Math.Round((double)_currentRunRecipeRoutine.ElapsedMilliseconds / 1000, 0)) : 0, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.Chemistry", () => _currentRecipe != null ? _currentRecipe.Chemistry : "", SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 初始化Operation

+ 2 - 0
PunkHPX8_RT/Modules/RouteManager.cs

@@ -33,6 +33,7 @@ using PunkHPX8_RT.Schedulers;
 using MECF.Framework.Common.ProcessCell;
 using System.Reflection;
 using PunkHPX8_RT.Modules.VpwMain;
+using PunkHPX8_RT.Modules.PlatingCell;
 
 namespace PunkHPX8_RT.Modules
 {
@@ -197,6 +198,7 @@ namespace PunkHPX8_RT.Modules
             InitialModuleList(VpwCellItemManager.Instance.InstalledModules, typeof(VpwCellEntity), ModuleType.VPW);
             InitialModuleList(SrdItemManager.Instance.InstalledModules, typeof(SRDEntity), ModuleType.SRD);
             InitialModuleList(ReservoirItemManager.Instance.InstalledModules, typeof(ReservoirEntity), ModuleType.Reservoir);
+            InitialModuleList(PlatingCellItemManager.Instance.InstalledModules, typeof(PlatingCellEntity), ModuleType.PlatingCell);
 
             fsm = new StateMachine<RouteManager>(Name, (int)RtState.Init, 200);
 

+ 7 - 8
PunkHPX8_Themes/UserControls/PlatingCellStatusControl.xaml

@@ -57,12 +57,11 @@
         <Grid Grid.Row="6" Grid.Column="0">
             <Label Content="Rotation" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
         </Grid>
-        <Border Grid.Row="1" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+        <Border Grid.Row="1" Grid.Column="1"  Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black"  VerticalAlignment="Center" >
             <TextBlock  Text="{Binding ElementName=self,Path=VerticalStation}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
-        <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 Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="2" Height="25" Width="80" ItemsSource="{Binding WaferSizeList}" SelectedItem="{Binding SelectedWaferSize,Mode=TwoWay}"/>
 
         <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>
@@ -111,20 +110,20 @@
             <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
               Fill="{Binding IsAngleVertical, Converter={StaticResource boolToColor}, ElementName=self}"/>
         </Grid>
-        <Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black">
+        <Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black" VerticalAlignment="Center">
             <TextBlock  Text="{Binding ElementName=self,Path=Chemistry}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
         <Border Grid.Row="2" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
-            <TextBlock  Text="{Binding ElementName=self,Path=WaferSize}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+            <TextBlock  Text="{Binding ElementName=self,Path=SelectedWaferSize,Mode=TwoWay}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
         <Border Grid.Row="2" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
-            <TextBlock  Text="Psi" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+            <TextBlock  Text="mm" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
         <Border Grid.Row="3" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
             <TextBlock  Text="{Binding ElementName=self,Path=ClamshellSensor}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
         <Border Grid.Row="3" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
-            <TextBlock  Text="Psi" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+            <TextBlock  Text="mm" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
         </Border>
     </Grid>
 </UserControl>

+ 20 - 18
PunkHPX8_Themes/UserControls/PlatingCellStatusControl.xaml.cs

@@ -1,7 +1,9 @@
 using Aitex.Core.Common;
+using MECF.Framework.Common.OperationCenter;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
@@ -77,37 +79,37 @@ namespace PunkHPX8_Themes.UserControls
             }
         }
 
-        public static readonly DependencyProperty WaferSizeProperty = DependencyProperty.Register(
-            "WaferSize", typeof(int), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));
+        public static readonly DependencyProperty WaferSizeListProperty = DependencyProperty.Register(
+            "WaferSizeList", typeof(List<int>), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
         /// <summary>
-        ///WaferSize
+        ///WaferSizeList
         /// </summary>
-        public double WaferSize
+        public List<int> WaferSizeList
         {
             get
             {
-                return (double)this.GetValue(WaferSizeProperty);
+                return (List<int>)this.GetValue(WaferSizeListProperty);
             }
             set
             {
-                this.SetValue(WaferSizeProperty, value);
+                this.SetValue(WaferSizeListProperty, value);
             }
         }
 
-        public static readonly DependencyProperty WaferSizeListProperty = DependencyProperty.Register(
-            "WaferSizeList", typeof(List<int>), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
+        public static readonly DependencyProperty SelectedWaferSizeProperty = DependencyProperty.Register(
+         "SelectedWaferSize", typeof(int), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(150, FrameworkPropertyMetadataOptions.AffectsRender));
         /// <summary>
-        ///WaferSizeList
+        ///SelectedWaferSize
         /// </summary>
-        public List<int> WaferSizeList
+        public int SelectedWaferSize
         {
             get
             {
-                return (List<int>)this.GetValue(WaferSizeListProperty);
+                return (int)this.GetValue(SelectedWaferSizeProperty);
             }
             set
             {
-                this.SetValue(WaferSizeListProperty, value);
+                this.SetValue(SelectedWaferSizeProperty, value);
             }
         }
 
@@ -233,32 +235,32 @@ namespace PunkHPX8_Themes.UserControls
 
         private void ClamshellOpen_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClamShellOpen");
         }
 
         private void ClamshellClose_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClamShellClose");
         }
 
         private void AngleTilt_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeadtTilt");
         }
 
         private void AngleVertical_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeadVertical");
         }
 
         private void RotationStart_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartRotation", InputRotationSpeed, InputRotationTime);
         }
 
         private void RotationStop_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopRotation");
         }
     }
 }

+ 3 - 3
PunkHPX8_Themes/UserControls/PlatingCellUIControl.xaml

@@ -87,9 +87,9 @@
             </Grid.RowDefinitions>
             <Grid Grid.Row="0">
                 <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-         Status="{Binding ElementName=self,Path=CAIsolationValve}"  
-         IsCanEdit="True" 
-         ContextMenu="{StaticResource CAIsolationValve}"/>
+                        Status="{Binding ElementName=self,Path=CAIsolationValve}"  
+                        IsCanEdit="True" 
+                        ContextMenu="{StaticResource CAIsolationValve}"/>
             </Grid>
             <Grid Grid.Row="1" >
                 <Label Margin="13,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="CA Isolation" />

+ 24 - 5
PunkHPX8_Themes/UserControls/PlatingCellUIControl.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using MECF.Framework.Common.OperationCenter;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -43,6 +44,24 @@ namespace PunkHPX8_Themes.UserControls
             }
         }
 
+        public static readonly DependencyProperty ReservoirNameProperty = DependencyProperty.Register(
+        "ReservoirName", typeof(string), typeof(PlatingCellUIControl),
+            new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// ReservoirName
+        /// </summary>
+        public string ReservoirName
+        {
+            get
+            {
+                return (string)this.GetValue(ReservoirNameProperty);
+            }
+            set
+            {
+                this.SetValue(ReservoirNameProperty, value);
+            }
+        }
+
         public static readonly DependencyProperty CCRValveProerty = DependencyProperty.Register(
             "CCRValve", typeof(bool), typeof(PlatingCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
         /// <summary>
@@ -133,22 +152,22 @@ namespace PunkHPX8_Themes.UserControls
 
         private void OpenCAIsolationValve_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ReservoirName}.CAIsolationOn");
         }
 
         private void CloseCAIsolationValve_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ReservoirName}.CAIsolationOff");
         }
 
         private void OpenANIsolationValve_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ReservoirName}.ANIsolationOn");
         }
 
         private void CloseANIsolationValve_Click(object sender, RoutedEventArgs e)
         {
-
+            InvokeClient.Instance.Service.DoOperation($"{ReservoirName}.ANIsolationOff");
         }
 
        

+ 0 - 1
PunkHPX8_Themes/UserControls/SRDUIControl.xaml

@@ -44,7 +44,6 @@
                     </TransformGroup>
                 </local:Blower.RenderTransform>
             </local:Blower>
-            <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/DoubleChamber.png" Canvas.Left="0" Canvas.Top="0" />
             <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/SRDDevice.png" Canvas.Left="19" Canvas.Top="31" />
 
             <Ellipse Width="45" Height="45" Fill="#F8F8F8" Stroke="Transparent" StrokeThickness="2" Canvas.Left="105" Canvas.Top="50" HorizontalAlignment="Center" VerticalAlignment="Top"/>