Explorar el Código

add platingcell setup view

chenzk hace 1 mes
padre
commit
90051f8533

+ 1 - 0
Framework/Common/Device/PowerSupplier/PowerSupplierModbusDevice.cs

@@ -17,6 +17,7 @@ namespace MECF.Framework.Common.Device.PowerSupplier
     public class PowerSupplierModbusDevice : JetMessageTcpClient<PowerSupplierTcpModbusMessage, PowerSupplierCommand>,IPowerSupplierDevice
     {
         #region 常量 
+        private const short VOLTAGE_SETTING_ADDRESS = 0x0100;
         private const short CURRENT_SETTING_ADDRESS = 0x0101;
         private const short OUTPUT_CONTROL_ADDRESS = 0x0110;
         private const short STEP_PERIOD_ADDRESS = 0x1400;

+ 8 - 0
PunkHPX8_MainPages/PunkHPX8_MainPages.csproj

@@ -175,6 +175,7 @@
     <Compile Include="ViewModels\OperationOverViewModel.cs" />
     <Compile Include="ViewModels\PlatingCellHomePageViewModel.cs" />
     <Compile Include="ViewModels\PlatingCellMotionViewModel.cs" />
+    <Compile Include="ViewModels\PlatingCellSetupViewModel.cs" />
     <Compile Include="ViewModels\PMCounterViewModel.cs" />
     <Compile Include="ViewModels\CMMPowerSupplierViewModel.cs" />
     <Compile Include="ViewModels\PowerSupplierViewModel.cs" />
@@ -260,6 +261,9 @@
     <Compile Include="Views\PlatingCellMotionView.xaml.cs">
       <DependentUpon>PlatingCellMotionView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\PlatingCellSetupView.xaml.cs">
+      <DependentUpon>PlatingCellSetupView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\PMCounterView.xaml.cs">
       <DependentUpon>PMCounterView.xaml</DependentUpon>
     </Compile>
@@ -500,6 +504,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PlatingCellSetupView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\PMCounterView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 36 - 1
PunkHPX8_MainPages/ViewModels/PlatingCellHomePageViewModel.cs

@@ -5,6 +5,7 @@ using Caliburn.Micro;
 using MECF.Framework.Common.CommonData.Metal;
 using MECF.Framework.Common.CommonData.PlatingCell;
 using MECF.Framework.Common.CommonData.PowerSupplier;
+using MECF.Framework.Common.CommonData.PUF;
 using MECF.Framework.Common.CommonData.Reservoir;
 using MECF.Framework.Common.CommonData.SRD;
 using MECF.Framework.Common.DataCenter;
@@ -84,9 +85,17 @@ namespace PunkHPX8_MainPages.ViewModels
         /// 对应reservoir的name
         /// </summary>
         private string _reservoirName;
+        /// <summary>
+        /// vertical 电机数据
+        /// </summary>
+        private CommandMotionData _verticalMotionData;
+        /// <summary>
+        /// vertical name
+        /// </summary>
+        private string _verticalName;
         #endregion
 
-    
+
         /// <summary>
         /// SeqRecipe
         /// </summary>
@@ -265,6 +274,22 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _reservoirName; }
             set { SetProperty(ref _reservoirName, value); }
         }
+        /// <summary>
+        /// vertical电机数据
+        /// </summary>
+        public CommandMotionData VerticalMotionData 
+        { 
+            get { return _verticalMotionData; } 
+            set { SetProperty(ref _verticalMotionData, value); } 
+        }
+        /// <summary>
+        /// vertical Name
+        /// </summary>
+        public string VerticalName
+        {
+            get { return _verticalName; }
+            set { SetProperty(ref _verticalName, value); }
+        }
         #endregion
 
 
@@ -423,6 +448,14 @@ namespace PunkHPX8_MainPages.ViewModels
             {
                 IsLeftEnabled= false;
             }
+            if (!String.IsNullOrEmpty(Module) && ("PlatingCell1".Equals(Module) || "PlatingCell2".Equals(Module)))
+            {
+                VerticalName = "PlatingCell1_2.Vertical";
+            }
+            else
+            {
+                VerticalName = "PlatingCell3_4.Vertical";
+            }
             RecipeModuleName = "DEP Recipe";
             RecipeType = "dep";
             _rtDataKeys.Clear();
@@ -436,6 +469,7 @@ namespace PunkHPX8_MainPages.ViewModels
             _rtDataKeys.Add($"{Module}.ReservoirName");
             _rtDataKeys.Add($"{Module}.Chemistry");
             _rtDataKeys.Add($"{Module}.PowerSupplierData");
+            _rtDataKeys.Add($"{VerticalName}.MotionData");
             if (_timer == null)
             {
                 _timer = new DispatcherTimer();
@@ -465,6 +499,7 @@ namespace PunkHPX8_MainPages.ViewModels
                     PlatingCellCommonData = CommonFunction.GetValue<PlatingCellData>(_rtDataValueDic, $"{Module}.{PLATINGCELLDATA}");
                     ReservoirCommonData = CommonFunction.GetValue<ReservoirData>(_rtDataValueDic, $"{Module}.ReservoirCommonData");
                     Chemistry = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.Chemistry");
+                    VerticalMotionData = CommonFunction.GetValue<CommandMotionData>(_rtDataValueDic, $"${VerticalName}.MotionData");
                     ReservoirName = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.ReservoirName");
                     if ("Manual".Equals(PlatingCellPersistent.OperatingMode))
                     {

+ 223 - 0
PunkHPX8_MainPages/ViewModels/PlatingCellSetupViewModel.cs

@@ -0,0 +1,223 @@
+using MECF.Framework.Common.CommonData.PUF;
+using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.Equipment;
+using MECF.Framework.Common.Utilities;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+
+namespace PunkHPX8_MainPages.ViewModels
+{
+    public class PlatingCellSetupViewModel : BindableBase
+    {
+        #region 常量
+        private const string MOTION_DATA = "MotionData";
+        private const string IS_SWITCH_ON = "IsSwitchOn";
+        private const string CURRENT_STATION = "CurrentStation";
+        #endregion
+
+        #region 内部变量
+
+        #region PlatingCell1_2Vertical
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        private string _platingCell1_2VerticalName;
+        /// <summary>
+        /// 运动数据
+        /// </summary>
+        private CommandMotionData _platingCell1_2VerticalMotionData;
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        private string _platingCell1_2VerticalCurrentStation;
+
+        #endregion
+
+        #region PlatingCell3_4Vertical
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        private string _platingCell3_4VerticalName;
+        /// <summary>
+        /// 运动数据
+        /// </summary>
+        private CommandMotionData _platingCell3_4VerticalMotionData;
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        private string _platingCell3_4VerticalCurrentStation;
+
+        #endregion
+
+
+
+
+        #endregion
+
+        #region 系统数据
+        /// <summary>
+        /// 定时器
+        /// </summary>
+        DispatcherTimer _timer;
+        /// <summary>
+        /// 查询后台数据集合
+        /// </summary>
+        private List<string> _rtDataKeys = new List<string>();
+        /// <summary>
+        /// rt查询key数值字典
+        /// </summary>
+        private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
+
+        #endregion
+
+
+
+
+        #region 属性
+
+        #region PlatingCell1_2Vertical
+        /// <summary>
+        ///名称
+        /// </summary>
+        public string PlatingCell1_2VerticalName
+        {
+            get { return _platingCell1_2VerticalName; }
+            set { SetProperty(ref _platingCell1_2VerticalName, value); }
+        }
+        /// <summary>
+        /// SRD1Arm运动数据
+        /// </summary>
+        public CommandMotionData PlatingCell1_2VerticalMotionData
+        {
+            get { return _platingCell1_2VerticalMotionData; }
+            set { SetProperty(ref _platingCell1_2VerticalMotionData, value); }
+        }
+        /// <summary>
+        /// SRD1Arm当前位置
+        /// </summary>
+        public string PlatingCell1_2VerticalCurrentStation
+        {
+            get { return _platingCell1_2VerticalCurrentStation; }
+            set { SetProperty(ref _platingCell1_2VerticalCurrentStation, value); }
+        }
+        #endregion
+
+        #region PlatingCell3_4Vertical
+        /// <summary>
+        ///名称
+        /// </summary>
+        public string PlatingCell3_4VerticalName
+        {
+            get { return _platingCell3_4VerticalName; }
+            set { SetProperty(ref _platingCell3_4VerticalName, value); }
+        }
+        /// <summary>
+        /// SRD1Arm运动数据
+        /// </summary>
+        public CommandMotionData PlatingCell3_4VerticalMotionData
+        {
+            get { return _platingCell3_4VerticalMotionData; }
+            set { SetProperty(ref _platingCell3_4VerticalMotionData, value); }
+        }
+        /// <summary>
+        /// SRD1Arm当前位置
+        /// </summary>
+        public string PlatingCell3_4VerticalCurrentStation
+        {
+            get { return _platingCell3_4VerticalCurrentStation; }
+            set { SetProperty(ref _platingCell3_4VerticalCurrentStation, value); }
+        }
+        #endregion
+
+
+
+        #endregion
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public PlatingCellSetupViewModel()
+        {
+
+        }
+        /// <summary>
+        /// 加载数据
+        /// </summary>
+        public void LoadData(string systemName)
+        {
+            PlatingCell1_2VerticalName = $"PlatingCell1_2.Vertical";
+            PlatingCell3_4VerticalName = $"PlatingCell3_4.Vertical";
+            AddDataKeys();
+            if (_timer == null)
+            {
+                _timer = new DispatcherTimer();
+                _timer.Interval = TimeSpan.FromMilliseconds(200);
+                _timer.Tick += Timer_Tick; ;
+            }
+            _timer.Start();
+
+        }
+        /// <summary>
+        /// 定时器执行
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Timer_Tick(object sender, EventArgs e)
+        {
+            OnTimer();
+        }
+        /// <summary>
+        /// 隐藏
+        /// </summary>
+        public void Hide()
+        {
+            if (_timer != null)
+            {
+                _timer.Stop();
+            }
+        }
+        /// <summary>
+        /// 初始化查询数据集合
+        /// </summary>
+        private void AddDataKeys()
+        {
+            _rtDataKeys.Clear();
+            _rtDataKeys.Add($"{PlatingCell1_2VerticalName}.{MOTION_DATA}");
+            _rtDataKeys.Add($"{PlatingCell1_2VerticalName}.{IS_SWITCH_ON}");
+            _rtDataKeys.Add($"{PlatingCell1_2VerticalName}.{CURRENT_STATION}");
+
+            _rtDataKeys.Add($"{PlatingCell3_4VerticalName}.{MOTION_DATA}");
+            _rtDataKeys.Add($"{PlatingCell3_4VerticalName}.{IS_SWITCH_ON}");
+            _rtDataKeys.Add($"{PlatingCell3_4VerticalName}.{CURRENT_STATION}");
+
+
+        }
+        /// <summary>
+        /// 定时器
+        /// </summary>
+        /// <returns></returns>
+        private Boolean OnTimer()
+        {
+            if (_rtDataKeys.Count != 0)
+            {
+                _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
+                if (_rtDataValueDic != null)
+                {
+                    PlatingCell1_2VerticalMotionData = CommonFunction.GetValue<CommandMotionData>(_rtDataValueDic, $"{PlatingCell1_2VerticalName}.{MOTION_DATA}");
+                    PlatingCell1_2VerticalCurrentStation = CommonFunction.GetCurrentStationLastContent(CommonFunction.GetValue<string>(_rtDataValueDic, $"{PlatingCell1_2VerticalName}.{CURRENT_STATION}"), PlatingCell1_2VerticalName);
+
+                    PlatingCell3_4VerticalMotionData = CommonFunction.GetValue<CommandMotionData>(_rtDataValueDic, $"{PlatingCell3_4VerticalName}.{MOTION_DATA}");
+                    PlatingCell3_4VerticalCurrentStation = CommonFunction.GetCurrentStationLastContent(CommonFunction.GetValue<string>(_rtDataValueDic, $"{PlatingCell3_4VerticalName}.{CURRENT_STATION}"), PlatingCell3_4VerticalName);
+
+                }
+            }
+            return true;
+        }
+
+    }
+}

+ 1 - 1
PunkHPX8_MainPages/Views/PlatingCellHomePageView.xaml

@@ -174,7 +174,7 @@
                                                 IsEnabled="True"
                                                 ModuleName="{Binding Module}"
                                                 Chemistry="{Binding Chemistry}"
-                                                VerticalStation="{Binding }"
+                                                VerticalStation="{Binding VerticalMotionData.MotorPosition}"
                                                 SelectedWaferSize="{Binding SelectedWaferSize,Mode=TwoWay}"
                                                 WaferSizeList="{Binding WaferSizeList}"
                                                 ClamshellSensor="{Binding PlatingCellCommonData.ClamShellDistance}"

+ 54 - 0
PunkHPX8_MainPages/Views/PlatingCellSetupView.xaml

@@ -0,0 +1,54 @@
+<UserControl x:Class="PunkHPX8_MainPages.Views.PlatingCellSetupView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PunkHPX8_MainPages.Views"
+             xmlns:prism="http://prismlibrary.com/"
+             xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls;assembly=PunkHPX8_Themes"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" Name="self"
+             d:DesignHeight="600" d:DesignWidth="1500">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="200"/>
+            <RowDefinition Height="200"/>
+            <RowDefinition Height="200"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="500"></ColumnDefinition>
+            <ColumnDefinition Width="500"></ColumnDefinition>
+            <ColumnDefinition Width="500"></ColumnDefinition>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid Grid.Row="0" Grid.Column="0">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="380"></ColumnDefinition>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <UserControls:SrdStationPositionControl HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Grid.ColumnSpan="2" Width="430" Height="175"
+                               ModuleTitle="{Binding PlatingCell1_2VerticalName}" 
+                               ModuleName="{Binding PlatingCell1_2VerticalName}" 
+                               CurrentPosition="{Binding PlatingCell1_2VerticalMotionData.MotorPosition}" 
+                               Torque="{Binding PlatingCell1_2VerticalMotionData.Torque}" 
+                               CurrentStation="{Binding PlatingCell1_2VerticalCurrentStation}"
+                               Unit="mm"
+                                />
+        </Grid>
+        <Grid Grid.Row="0" Grid.Column="2">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="380"></ColumnDefinition>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <UserControls:SrdStationPositionControl HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Grid.ColumnSpan="2" Width="430" Height="175"
+                                ModuleTitle="{Binding PlatingCell3_4VerticalName}" 
+                                ModuleName="{Binding PlatingCell3_4VerticalName}" 
+                                CurrentPosition="{Binding PlatingCell3_4VerticalMotionData.MotorPosition}" 
+                                Torque="{Binding PlatingCell3_4VerticalMotionData.Torque}" 
+                                CurrentStation="{Binding PlatingCell3_4VerticalCurrentStation}"
+                                Unit="mm"
+                                     />
+        </Grid>
+    </Grid>
+</UserControl>

+ 28 - 0
PunkHPX8_MainPages/Views/PlatingCellSetupView.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_MainPages.Views
+{
+    /// <summary>
+    /// PlatingCellSetupView.xaml 的交互逻辑
+    /// </summary>
+    public partial class PlatingCellSetupView : UserControl
+    {
+        public PlatingCellSetupView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 0 - 27
PunkHPX8_MainPages/Views/SRDStationSetupView.xaml

@@ -22,30 +22,6 @@
             <ColumnDefinition Width="500"></ColumnDefinition>
             <ColumnDefinition/>
         </Grid.ColumnDefinitions>
-        <!--<Grid Grid.Row="0" Grid.Column="0">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="380"></ColumnDefinition>
-                <ColumnDefinition/>
-            </Grid.ColumnDefinitions>
-            <UserControls:SrdStationPositionControl HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Grid.ColumnSpan="2" Width="430" Height="175"
-                                                       ModuleTitle="{Binding SRD1ArmModuleName}" 
-                                                       ModuleName="{Binding SRD1ArmModuleName}" 
-                                                       CurrentPosition="{Binding SRD1ArmMotionData.MotorPosition}" 
-                                                       Torque="{Binding SRD1ArmMotionData.Torque}" 
-                                                       CurrentStation="{Binding SRD1ArmCurrentStation}"/>
-        </Grid>-->
-        <!--<Grid Grid.Row="0" Grid.Column="2">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="380"></ColumnDefinition>
-                <ColumnDefinition/>
-            </Grid.ColumnDefinitions>
-            <UserControls:SrdStationPositionControl HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Grid.ColumnSpan="2" Width="430" Height="175"
-                                           ModuleTitle="{Binding SRD2ArmModuleName}" 
-                                           ModuleName="{Binding SRD2ArmModuleName}" 
-                                           CurrentPosition="{Binding SRD2ArmMotionData.MotorPosition}" 
-                                           Torque="{Binding SRD2ArmMotionData.Torque}" 
-                                           CurrentStation="{Binding SRD2ArmCurrentStation}"/>
-        </Grid>-->
         <Grid Grid.Row="0" Grid.Column="0">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="380"></ColumnDefinition>
@@ -70,8 +46,5 @@
                                Torque="{Binding SRD2RotationMotionData.Torque}" 
                                CurrentStation="{Binding SRD2RotationCurrentStation}"/>
         </Grid>
-        <!--<Grid Grid.Row="2" Grid.Column="1">
-            <UserControls:SrdAwcCycleControl Visibility="Collapsed" IsEnabled="False" SRDModuleName="{Binding AWCModuleName,Mode=TwoWay}" IsRunning="{Binding IsAWCCycling}" HorizontalAlignment="Center"  VerticalAlignment="Center" Width="495" Height="180"/>
-        </Grid>-->
     </Grid>
 </UserControl>

+ 5 - 18
PunkHPX8_RT/Devices/Reservoir/ReservoirDevice.cs

@@ -119,13 +119,9 @@ namespace PunkHPX8_RT.Devices.Reservoir
         /// </summary>
         private DateTime _adjustReturnvalveStartTime = DateTime.Now;
         /// <summary>
-        /// 首次发现ca flow 满足条件的时间,用于自动打开degas valve
+        /// 检查ca flow 的时间,用于自动打开degas valve
         /// </summary>
-        private DateTime _caFlowOKTime = DateTime.Now;
-        /// <summary>
-        /// ca flow 是否首次达到条件
-        /// </summary>
-        private bool _isFirstCaFlowOK = false;
+        private DateTime _caFlowCheckTime = DateTime.Now;
 
         /// <summary>
         /// ca泵速Helper
@@ -495,23 +491,14 @@ namespace PunkHPX8_RT.Devices.Reservoir
             if(Recipe!= null && ReservoirData.CaFlow >= Recipe.CAFlowSetPoint) //缺了safety的条件,待补充
             {
                 int degasValveOpenIdlePeriod = SC.GetValue<int>($"Reservoir.DegasValveOpenIdlePeriod");
-                if (!_isFirstCaFlowOK)
+                if(DateTime.Now.Subtract(_caFlowCheckTime).TotalMinutes >= degasValveOpenIdlePeriod && !ReservoirData.DegasEnable)
                 {
-                    _isFirstCaFlowOK = true;
-                    _caFlowOKTime = DateTime.Now;
-                }
-                else
-                {
-                    if(DateTime.Now.Subtract(_caFlowOKTime).TotalMinutes >= degasValveOpenIdlePeriod && !ReservoirData.DegasEnable)
-                    {
-                        DegasValveOn();
-                        _caFlowOKTime = DateTime.Now;//开启后重置一下检测到ca flow ok的时间
-                    }
+                    DegasValveOn();
                 }
             }
             else
             {
-                _isFirstCaFlowOK = false;
+                _caFlowCheckTime = DateTime.Now;
             }
         }
         /// <summary>

+ 3 - 3
PunkHPX8_Themes/UserControls/SrdStationPositionControl.xaml

@@ -38,21 +38,21 @@
                 <Label Grid.Row="1" Grid.Column="0" Content="Saved Position" VerticalAlignment="Center" Margin="2" FontSize="14" FontWeight="Bold"/>
                 <WrapPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                     <TextBlock Width="80" Text="{Binding SavedPosition, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
-                    <TextBlock Margin="2,0" Width="45" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
+                    <TextBlock Margin="2,0" Width="45" Text="{Binding ElementName=self,Path=Unit}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                 </WrapPanel>
                 <Button Style="{StaticResource SysBtnStyle}"  Content="Goto Saved Pos" Grid.Column="2" Grid.Row="1" Height="25" FontSize="13" Click="SavedPos_Click" Margin="0,2,0,3"/>
 
                 <Label Grid.Row="2" Grid.Column="0" Content="Current Position" VerticalAlignment="Center" Margin="2" FontSize="14" FontWeight="Bold"/>
                 <WrapPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                     <TextBlock Width="80" Text="{Binding CurrentPosition, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
-                    <TextBlock Margin="2,0" Width="45" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
+                    <TextBlock Margin="2,0" Width="45" Text="{Binding ElementName=self,Path=Unit}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                 </WrapPanel>
 
                 <Button Style="{StaticResource SysBtnStyle}"  Content="Save Motor Pos" Grid.Column="2" Grid.Row="2" Height="25" FontSize="13" Click="MotorPos_Click" Margin="0,3,0,2"/>
                 <customControls:PathButton Grid.Row="3" Grid.Column="0" PathData="{StaticResource Ico_LeftDbArrow}"  DefaultFillBrush="White"  Click="LeftCommand_Click"  Width="40" Height="25" Margin="80,2,10,2" />
                 <WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                     <Control:NumbericUpDown Height="30" Width="80" Value="{Binding ElementName=self,Path=DegValue,Mode=TwoWay}" IncrementValue="{Binding ElementName=self,Path=IncrementValue}"/>
-                    <TextBlock Margin="2,0" Width="45" Height="22" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
+                    <TextBlock Margin="2,0" Width="45" Height="22" Text="{Binding ElementName=self,Path=Unit}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
 
                 </WrapPanel>
                 <customControls:PathButton Grid.Row="3" Grid.Column="2" PathData="{StaticResource Ico_RightDbArrow}"  DefaultFillBrush="White"   Click="RightCommand_Click"  Width="40" Height="25" Margin="0,2,80,2" />

+ 18 - 0
PunkHPX8_Themes/UserControls/SrdStationPositionControl.xaml.cs

@@ -82,6 +82,24 @@ namespace PunkHPX8_Themes.UserControls
                 this.SetValue(ModuleNameProperty, value);
             }
         }
+        
+        public static readonly DependencyProperty UnitProperty = DependencyProperty.Register(
+           "Unit", typeof(string), typeof(SrdStationPositionControl),
+           new FrameworkPropertyMetadata("deg", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string Unit
+        {
+            get
+            {
+                return (string)this.GetValue(UnitProperty);
+            }
+            set
+            {
+                this.SetValue(UnitProperty, value);
+            }
+        }
 
         public List<string> ModuleItemSource
         {

+ 8 - 0
PunkHPX8_UI/Config/UIMenu.json

@@ -120,6 +120,14 @@
 						"View": "PlatingCellHomePageView"
 					},
 					{
+						"Id": "PltSetup",
+						"ModuleName": "PltSetup",
+						"Name": "PltSetup",
+						"IsInit": "true",
+						"IsShow": "true",
+						"View": "PlatingCellSetupView"
+					},
+					{
 						"Id": "PltMotion",
 						"ModuleName": "PltMotion",
 						"Name": "PltMotion",

+ 17 - 1
PunkHPX8_UI/Config/UIMenu_permission.json

@@ -78,7 +78,11 @@
 								"Permission": 2
 							},
 							{
-								"MenuName": "Motion",
+								"MenuName": "PltMotion",
+								"Permission": 2
+							},
+							{
+								"MenuName": "PltSetup",
 								"Permission": 2
 							}
 						]
@@ -432,6 +436,10 @@
 							{
 								"MenuName": "PltMotion",
 								"Permission": 2
+							},
+							{
+								"MenuName": "PltSetup",
+								"Permission": 2
 							}
 						]
 					},
@@ -780,6 +788,10 @@
 							{
 								"MenuName": "PltMotion",
 								"Permission": 2
+							},
+							{
+								"MenuName": "PltSetup",
+								"Permission": 2
 							}
 						]
 					},
@@ -1104,6 +1116,10 @@
 							{
 								"MenuName": "PltMotion",
 								"Permission": 2
+							},
+							{
+								"MenuName": "PltSetup",
+								"Permission": 2
 							}
 						]
 					},