فهرست منبع

机器人手动界面优化,支持实时显示当前位置

优化Jog按钮布局,统一样式,增加机器人当前位置(X/Y/Z/U)实时显示;完善点位命令可用性判断,提升操作流畅度和界面一致性;实现IRobot及各机器人CurrentPosition属性,支持PLC/指令实时更新;校准中心点/避让点显示增加Z轴,细化UI细节。
孝锋 徐 9 ماه پیش
والد
کامیت
6d728151cf

+ 24 - 8
TeamAAS-VM/Controls/RobotManual.xaml

@@ -117,14 +117,30 @@
                                 Value="10" />
                     </Style>
                 </Grid.Resources>
-                <ComboBox Grid.ColumnSpan="3"
-                          Grid.Row="0"
-                          Margin="10,5"
-                          HorizontalAlignment="Left"
-                          materialDesign:HintAssist.Hint="{lex:Loc 选择Tool}"
-                          materialDesign:HintAssist.HelperText="{lex:Loc 选择Tool}"
-                          SelectedItem="{Binding SelectTool,Mode=TwoWay}"
-                          ItemsSource="{Binding Tools}" />
+                <StackPanel Grid.ColumnSpan="4"
+                            Grid.Row="0"
+                            Grid.Column="0"
+                            VerticalAlignment="Center"
+                            Orientation="Horizontal">
+                    <ComboBox Grid.ColumnSpan="3"
+                              Grid.Row="0"
+                              Margin="10,5"
+                              HorizontalAlignment="Left"
+                              materialDesign:HintAssist.Hint="{lex:Loc 选择Tool}"
+                              SelectedItem="{Binding SelectTool,Mode=TwoWay}"
+                              ItemsSource="{Binding Tools}" />
+                    <TextBlock VerticalAlignment="Center"
+                               Margin="10,0">
+                        <TextBlock.Text>
+                            <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                                <Binding Path="Robot.CurrentPosition.X" />
+                                <Binding Path="Robot.CurrentPosition.Y" />
+                                <Binding Path="Robot.CurrentPosition.Z" />
+                                <Binding Path="Robot.CurrentPosition.U" />
+                            </MultiBinding>
+                        </TextBlock.Text>
+                    </TextBlock>
+                </StackPanel>
                 <Button Grid.Row="2"
                         Grid.Column="0"
                         Command="{Binding JogCommand}"

+ 1 - 1
TeamAAS-VM/Controls/RobotManual.xaml.cs

@@ -203,7 +203,7 @@ namespace TeamAAS_VP.Controls
                 null,
                 false,
                 true,
-                TimeSpan.FromSeconds(1));
+                TimeSpan.FromSeconds(0.4));
         }
         /// <summary>
         /// 连接机器人

+ 5 - 0
TeamAAS-VM/Core/Management.cs

@@ -1035,6 +1035,11 @@ namespace TeamAAS_VP.Core
         {
             try
             {
+                if (tuple.key!= "AutoSensor")
+                {
+                    return;
+                }
+
                 var addressConfig = _configService.GetPlcAddresses();
                 var plc = _plcService.GetPlcByNumber(addressConfig.PlcNo) as OpcUaClientPLC;
                 if (plc == null || !plc.IsConnected) return;

+ 12 - 0
TeamAAS-VM/Core/Robots/EpsonRobot.cs

@@ -182,6 +182,16 @@ namespace TeamAAS_VP.Core.Robots
         /// </summary>
         /// <returns></returns>
         public bool EnterDebugMode { get; set; }
+
+        private RPoint _CurrentPosition=new RPoint();
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        public RPoint CurrentPosition
+        {
+            get { return _CurrentPosition; }
+            set { SetProperty(ref _CurrentPosition, value); }
+        }
         #endregion
 
         #region 事件接收
@@ -809,6 +819,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     point.Local = Convert.ToInt32(items[8]);
                     point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else
@@ -845,6 +856,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     point.Local = Convert.ToInt32(items[8]);
                     point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else

+ 14 - 0
TeamAAS-VM/Core/Robots/FanucRobot.cs

@@ -186,6 +186,16 @@ namespace TeamAAS_VP.Core.Robots
         /// </summary>
         /// <returns></returns>
         public bool EnterDebugMode { get; set; }
+
+        private RPoint _CurrentPosition = new RPoint();
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        public RPoint CurrentPosition
+        {
+            get { return _CurrentPosition; }
+            set { SetProperty(ref _CurrentPosition, value); }
+        }
         #endregion
 
         #region 事件接收
@@ -815,6 +825,7 @@ namespace TeamAAS_VP.Core.Robots
                     //point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     //point.Local = Convert.ToInt32(items[8]);
                     //point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                 }
                 else
                     return null;
@@ -832,6 +843,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[3]);
                     point.Local = Convert.ToInt32(items[4]);
                     point.Tool = Convert.ToInt32(items[5]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else
@@ -869,6 +881,7 @@ namespace TeamAAS_VP.Core.Robots
                     //point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     //point.Local = Convert.ToInt32(items[8]);
                     //point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                 }
                 else
                     return null;
@@ -887,6 +900,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[3]);
                     point.Local = Convert.ToInt32(items[4]);
                     point.Tool = Convert.ToInt32(items[5]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else

+ 12 - 0
TeamAAS-VM/Core/Robots/SchneiderRobot.cs

@@ -181,6 +181,16 @@ namespace TeamAAS_VP.Core.Robots
         /// </summary>
         /// <returns></returns>
         public bool EnterDebugMode { get; set; }
+
+        private RPoint _CurrentPosition = new RPoint();
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        public RPoint CurrentPosition
+        {
+            get { return _CurrentPosition; }
+            set { SetProperty(ref _CurrentPosition, value); }
+        }
         #endregion
 
         #region 事件接收
@@ -808,6 +818,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     point.Local = Convert.ToInt32(items[8]);
                     point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else
@@ -844,6 +855,7 @@ namespace TeamAAS_VP.Core.Robots
                     point.Hand = (RobotHand)Convert.ToInt32(items[7]);
                     point.Local = Convert.ToInt32(items[8]);
                     point.Tool = Convert.ToInt32(items[9]);
+                    CurrentPosition = point.Clone();
                     return point;
                 }
                 else

+ 35 - 0
TeamAAS-VM/Core/Robots/XYZU_Robot.cs

@@ -87,6 +87,31 @@ namespace TeamAAS_VP.Core.Robots
                 Axes.Add(au);
                 Brand = RobotBrand.XYZU_Platform;
             }
+
+            //所有轴的位置节点
+            
+            var nodeIds = Axes.Where(a => !string.IsNullOrWhiteSpace(a.State.ActPositionNode)).Select(a => a.State.ActPositionNode).ToArray();
+            List<string> positionNodes = new List<string>(nodeIds);
+            pLC.SubscribeNodes("AxisPosition",positionNodes, (res) =>
+            {
+                if (res.key!= "AxisPosition") return;
+
+                for (int i = 0; i < Axes.Count; i++)
+                {
+                    var axis = Axes[i];
+                    if (axis.State.ActPositionNode.Contains(res.nodeId))
+                    {
+                        float v = Convert.ToSingle(res.value);
+                        switch (axis.Name)
+                        {
+                            case "X": CurrentPosition.X = v; break;
+                            case "Y": CurrentPosition.Y = v; break;
+                            case "Z": CurrentPosition.Z = v; break;
+                            case "U": CurrentPosition.U = v; break;
+                        }
+                    }
+                }
+            });
         }
 
         private void Plc_ConnectChangedEvent(object arg1, bool arg2)
@@ -163,6 +188,16 @@ namespace TeamAAS_VP.Core.Robots
         /// <returns></returns>
         public bool EnterDebugMode { get; set; }
 
+        private RPoint _CurrentPosition = new RPoint();
+        /// <summary>
+        /// 当前位置
+        /// </summary>
+        public RPoint CurrentPosition
+        {
+            get { return _CurrentPosition; }
+            set { SetProperty(ref _CurrentPosition, value); }
+        }
+
         #endregion
 
         #region 连接

+ 3 - 0
TeamAAS-VM/Interfaces/IRobot.cs

@@ -73,6 +73,9 @@ namespace TeamAAS_VP.Interfaces
         /// <returns></returns>
         bool EnterDebugMode { get; set; }
 
+        //当前位置
+        RPoint CurrentPosition { get; }
+
         #endregion
 
         #region 连接通讯

+ 17 - 4
TeamAAS-VM/ViewModels/Product/PlcPointParamsViewModel.cs

@@ -201,7 +201,7 @@ namespace TeamAAS_VP.ViewModels.Product
 
         private DelegateCommand<object> _ExecuteMotion;
         public DelegateCommand<object> ExecuteMotion =>
-            _ExecuteMotion ?? (_ExecuteMotion = new DelegateCommand<object>(ExecuteExecuteMotion).ObservesCanExecute(() => CanExecute).ObservesProperty(() => Robot).ObservesProperty(() => Robot.CanExecute).ObservesProperty(() => SelectedPointInDataGrid));
+            _ExecuteMotion ?? (_ExecuteMotion = new DelegateCommand<object>(ExecuteExecuteMotion).ObservesCanExecute(() => CanExecutePointCommand).ObservesProperty(() => Robot).ObservesProperty(() => Robot.CanExecute).ObservesProperty(() => SelectedPointInDataGrid));
 
         private DelegateCommand<object> _JogCommand;
         public DelegateCommand<object> JogCommand =>
@@ -209,7 +209,7 @@ namespace TeamAAS_VP.ViewModels.Product
 
         private DelegateCommand _TechPointCommand;
         public DelegateCommand TechPointCommand =>
-            _TechPointCommand ?? (_TechPointCommand = new DelegateCommand(ExecuteTechPointCommand).ObservesCanExecute(() => CanExecute).ObservesProperty(() => Robot).ObservesProperty(() => Robot.CanExecute).ObservesProperty(() => SelectedPointInDataGrid));
+            _TechPointCommand ?? (_TechPointCommand = new DelegateCommand(ExecuteTechPointCommand).ObservesCanExecute(() => CanExecutePointCommand).ObservesProperty(() => Robot).ObservesProperty(() => Robot.CanExecute).ObservesProperty(() => SelectedPointInDataGrid));
 
         private DelegateCommand<string> _MotorCommand;
         public DelegateCommand<string> MotorCommand =>
@@ -250,7 +250,6 @@ namespace TeamAAS_VP.ViewModels.Product
         public DelegateCommand ImportCadPointCommand =>
             _ImportCadPointCommand ?? (_ImportCadPointCommand = new DelegateCommand(ExecuteImportCadPointCommand));
 
-        
         #endregion
 
         #region 事件
@@ -526,7 +525,20 @@ namespace TeamAAS_VP.ViewModels.Product
             get
             {
                 // 命令可执行仅当机器人可执行且已选择点位
-                if (Robot != null && Robot.CanExecute)
+                if (Robot != null && Robot.IsConnected && Robot.CanExecute)
+                {
+                    return true;
+                }
+                return false;
+            }
+        }
+
+        //是否可以示教或者执行点位
+        private bool CanExecutePointCommand
+        {
+            get
+            {
+                if (Robot != null && Robot.IsConnected && Robot.CanExecute)
                 {
                     return SelectedPointInDataGrid != null;
                 }
@@ -773,6 +785,7 @@ namespace TeamAAS_VP.ViewModels.Product
                 SelectProduct = navigationContext.Parameters.GetValue<ProductModel>("SelectProduct");
 
                 SelectedIndex = 0;
+                PickPoints = SelectProduct.PickPoints;
                 Points = SelectProduct.PickCameraPoints;
 
                 if (Robot == null)

+ 8 - 2
TeamAAS-VM/Views/Calibration/CalibrationTeachCenterPoint.xaml

@@ -132,13 +132,16 @@
                            Grid.ColumnSpan="2"
                            Foreground="{DynamicResource PrimaryHueMidForegroundBrush}">
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}X:{0:F3} Y:{1:F3}">
+                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{1:F3} mm">
                             <Binding Path="SelectCalibration.CenterPoint.X"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
                             <Binding Path="SelectCalibration.CenterPoint.Y"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
+                            <Binding Path="SelectCalibration.CenterPoint.Z"
+                                     TargetNullValue="0.000"
+                                     FallbackValue="0.000" />
                         </MultiBinding>
                     </TextBlock.Text>
                 </TextBlock>
@@ -164,13 +167,16 @@
                            Grid.ColumnSpan="2"
                            Visibility="{Binding IsShowTechHome,Converter={StaticResource BooleanToVisibilityConverter}}">
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}X:{0:F3} Y:{1:F3}">
+                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{1:F3} mm">
                             <Binding Path="SelectCalibration.HomePoint.X"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
                             <Binding Path="SelectCalibration.HomePoint.Y"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
+                            <Binding Path="SelectCalibration.HomePoint.Z"
+                                     TargetNullValue="0.000"
+                                     FallbackValue="0.000" />
                         </MultiBinding>
                     </TextBlock.Text>
                 </TextBlock>

+ 225 - 210
TeamAAS-VM/Views/DebugMod/RobotManualStep.xaml

@@ -86,220 +86,235 @@
                     Style="{StaticResource MaterialDesignRaisedDarkButton}"
                     Command="{Binding SLockCommand}" />
         </Grid>
-        <Grid Grid.Column="1"
-              Margin="20">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-                <ColumnDefinition Width="auto" />
-            </Grid.ColumnDefinitions>
+        <Grid Grid.Column="1">
             <Grid.RowDefinitions>
                 <RowDefinition Height="auto" />
-                <RowDefinition Height="auto" />
-                <RowDefinition Height="auto" />
-                <RowDefinition Height="auto" />
+                <RowDefinition Height="*" />
             </Grid.RowDefinitions>
-            <Button Grid.Row="1"
-                    Grid.Column="0"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowLeftBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-X"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="1"
-                    Grid.Column="2"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowRightBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+X"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="0"
-                    Grid.Column="1"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowTopBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+Y"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="2"
-                    Grid.Column="1"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowBottomBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-Y"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="0"
-                    Grid.Column="3"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowTopBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+Z"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="2"
-                    Grid.Column="3"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="ArrowBottomBold"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-Z"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="0"
-                    Grid.Column="4"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+U"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="2"
-                    Grid.Column="4"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisZRotateClockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-U"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="0"
-                    Grid.Column="5"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=V+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisYRotateCounterclockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+V"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="2"
-                    Grid.Column="5"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=V-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisYRotateClockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-V"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="0"
-                    Grid.Column="6"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=W+}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisXRotateCounterclockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="+W"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <Button Grid.Row="2"
-                    Grid.Column="6"
-                    Margin="10,10,10,10"
-                    materialDesign:ButtonAssist.CornerRadius="10"
-                    Style="{StaticResource MaterialDesignRaisedDarkButton}"
-                    Command="{Binding JogCommand}"
-                    CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=W-}">
-                <StackPanel Orientation="Vertical">
-                    <materialDesign:PackIcon Kind="AxisXRotateClockwise"
-                                             Width="26"
-                                             Height="26" />
-                    <TextBlock Text="-W"
-                               HorizontalAlignment="Center" />
-                </StackPanel>
-            </Button>
-            <StackPanel Grid.Row="3"
-                        Grid.ColumnSpan="7"
-                        Margin="50,10,0,0"
+            <TextBlock VerticalAlignment="Center"
+                       HorizontalAlignment="Center"
+                       Margin="10,0">
+                <TextBlock.Text>
+                    <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                        <Binding Path="Robot.CurrentPosition.X" />
+                        <Binding Path="Robot.CurrentPosition.Y" />
+                        <Binding Path="Robot.CurrentPosition.Z" />
+                        <Binding Path="Robot.CurrentPosition.U" />
+                    </MultiBinding>
+                </TextBlock.Text>
+            </TextBlock>
+            <Grid Grid.Row="1"
+                  Margin="20">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                    <ColumnDefinition Width="auto" />
+                </Grid.ColumnDefinitions>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="auto" />
+                    <RowDefinition Height="auto" />
+                    <RowDefinition Height="auto" />
+                    <RowDefinition Height="auto" />
+                </Grid.RowDefinitions>
+                <Grid.Resources>
+                    <Style TargetType="Button"
+                           BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
+                        <Setter Property="Width"
+                                Value="60" />
+                        <Setter Property="Height"
+                                Value="60" />
+                        <Setter Property="FontSize"
+                                Value="13" />
+                        <Setter Property="Padding"
+                                Value="0" />
+                        <Setter Property="HorizontalAlignment"
+                                Value="Center" />
+                        <Setter Property="VerticalAlignment"
+                                Value="Center" />
+                        <Setter Property="Margin"
+                                Value="2" />
+                        <Setter Property="materialDesign:ButtonAssist.CornerRadius"
+                                Value="10" />
+                    </Style>
+                </Grid.Resources>
+                <Button Grid.Row="1"
                         Grid.Column="0"
-                        VerticalAlignment="Center"
-                        Orientation="Horizontal">
-                <TextBlock Text="{lex:Loc 步进距离}"
-                           VerticalAlignment="Center" />
-                <uControl:myNumericUpDowm x:Name="txtDistance"
-                                          MinWidth="100"
-                                          Value="{Binding Distance,Mode=TwoWay}"
-                                          Interval="0.1"
-                                          Minimum="0"
-                                          Maximum="100"
-                                          StringFormat="{}{0:N3} mm"
-                                          Margin="10,0" />
-            </StackPanel>
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowLeftBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-X"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="1"
+                        Grid.Column="2"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowRightBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+X"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="0"
+                        Grid.Column="1"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowTopBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+Y"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="2"
+                        Grid.Column="1"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowBottomBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-Y"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="0"
+                        Grid.Column="3"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowTopBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+Z"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="2"
+                        Grid.Column="3"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="ArrowBottomBold"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-Z"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="0"
+                        Grid.Column="4"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+U"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="2"
+                        Grid.Column="4"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisZRotateClockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-U"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="0"
+                        Grid.Column="5"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=V+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisYRotateCounterclockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+V"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="2"
+                        Grid.Column="5"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=V-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisYRotateClockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-V"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="0"
+                        Grid.Column="6"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=W+}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisXRotateCounterclockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="+W"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <Button Grid.Row="2"
+                        Grid.Column="6"
+                        materialDesign:ButtonAssist.CornerRadius="10"
+                        Command="{Binding JogCommand}"
+                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=W-}">
+                    <StackPanel Orientation="Vertical">
+                        <materialDesign:PackIcon Kind="AxisXRotateClockwise"
+                                                 Width="26"
+                                                 Height="26" />
+                        <TextBlock Text="-W"
+                                   HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+                <StackPanel Grid.Row="3"
+                            Grid.ColumnSpan="7"
+                            Margin="50,10,0,0"
+                            Grid.Column="0"
+                            VerticalAlignment="Center"
+                            Orientation="Horizontal">
+                    <TextBlock Text="{lex:Loc 步进距离}"
+                               VerticalAlignment="Center" />
+                    <uControl:myNumericUpDowm x:Name="txtDistance"
+                                              MinWidth="100"
+                                              Value="{Binding Distance,Mode=TwoWay}"
+                                              Interval="0.1"
+                                              Minimum="0"
+                                              Maximum="100"
+                                              StringFormat="{}{0:N3} mm"
+                                              Margin="10,0" />
+                </StackPanel>
+            </Grid>
         </Grid>
     </Grid>
 </UserControl>

+ 267 - 250
TeamAAS-VM/Views/Product/PlcPointParams.xaml

@@ -852,270 +852,287 @@
                                         Command="{Binding DataContext.SLockCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
                             </Grid>
                             <Grid Grid.Column="1">
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="auto" />
-                                    <ColumnDefinition Width="auto" />
-                                    <ColumnDefinition Width="auto" />
-                                    <ColumnDefinition Width="auto" />
-                                    <ColumnDefinition Width="auto" />
-                                    <ColumnDefinition Width="auto" />
-                                </Grid.ColumnDefinitions>
                                 <Grid.RowDefinitions>
                                     <RowDefinition Height="auto" />
-                                    <RowDefinition Height="auto" />
-                                    <RowDefinition Height="auto" />
-                                    <RowDefinition Height="auto" />
-                                    <RowDefinition Height="auto" />
-                                    <RowDefinition Height="auto" />
+                                    <RowDefinition Height="*" />
                                 </Grid.RowDefinitions>
-                                <Grid.Resources>
-                                    <Style TargetType="Button"
-                                           BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
-                                        <Setter Property="Width"
-                                                Value="60" />
-                                        <Setter Property="Height"
-                                                Value="60" />
-                                        <Setter Property="FontSize"
-                                                Value="13" />
-                                        <Setter Property="Padding"
-                                                Value="0" />
-                                        <Setter Property="HorizontalAlignment"
-                                                Value="Center" />
-                                        <Setter Property="VerticalAlignment"
-                                                Value="Center" />
-                                        <Setter Property="Margin"
-                                                Value="2" />
-                                        <Setter Property="materialDesign:ButtonAssist.CornerRadius"
-                                                Value="10" />
-                                    </Style>
-                                </Grid.Resources>
-
-                                <Button x:Name="btn_x"
-                                        Grid.Row="1"
-                                        Grid.Column="0"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowLeftBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="-X"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="1"
-                                        Grid.Column="2"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowRightBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="+X"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="0"
-                                        Grid.Column="1"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowTopBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="+Y"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="2"
-                                        Grid.Column="1"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowBottomBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="-Y"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="0"
-                                        Grid.Column="3"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowTopBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="+Z"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="2"
-                                        Grid.Column="3"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="ArrowBottomBold"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="-Z"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="3"
-                                        Grid.Column="0"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="+U"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="4"
-                                        Grid.Column="0"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="AxisZRotateClockwise"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="-U"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="3"
-                                        Grid.Column="1"
-                                        Grid.ColumnSpan="2"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R+}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="+R"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-                                <Button Grid.Row="4"
-                                        Grid.Column="1"
-                                        Grid.ColumnSpan="2"
-                                        Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
-                                        CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R-}">
-                                    <StackPanel Orientation="Vertical">
-                                        <materialDesign:PackIcon Kind="AxisZRotateClockwise"
-                                                                 Width="26"
-                                                                 Height="26" />
-                                        <TextBlock Text="-R"
-                                                   HorizontalAlignment="Center" />
-                                    </StackPanel>
-                                </Button>
-
-                                <Grid Grid.Row="5"
-                                      Grid.ColumnSpan="7"
-                                      Margin="10">
+                                <TextBlock VerticalAlignment="Center"
+                                           Margin="10,0">
+                                    <TextBlock.Text>
+                                        <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                                            <Binding Path="Robot.CurrentPosition.X" />
+                                            <Binding Path="Robot.CurrentPosition.Y" />
+                                            <Binding Path="Robot.CurrentPosition.Z" />
+                                            <Binding Path="Robot.CurrentPosition.U" />
+                                        </MultiBinding>
+                                    </TextBlock.Text>
+                                </TextBlock>
+                                <Grid Grid.Row="1">
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition Width="auto" />
+                                        <ColumnDefinition Width="auto" />
+                                        <ColumnDefinition Width="auto" />
+                                        <ColumnDefinition Width="auto" />
+                                        <ColumnDefinition Width="auto" />
+                                        <ColumnDefinition Width="auto" />
+                                    </Grid.ColumnDefinitions>
                                     <Grid.RowDefinitions>
                                         <RowDefinition Height="auto" />
                                         <RowDefinition Height="auto" />
                                         <RowDefinition Height="auto" />
                                         <RowDefinition Height="auto" />
+                                        <RowDefinition Height="auto" />
+                                        <RowDefinition Height="auto" />
                                     </Grid.RowDefinitions>
-                                    <Grid.ColumnDefinitions>
-                                        <ColumnDefinition Width="auto" />
-                                        <ColumnDefinition Width="auto" />
-                                        <ColumnDefinition Width="auto" />
-                                    </Grid.ColumnDefinitions>
-                                    <TextBlock Grid.Row="0"
-                                               Grid.Column="0"
-                                               Text="{lex:Loc 步进距离,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
-                                               Margin="10"
-                                               VerticalAlignment="Center"
-                                               HorizontalAlignment="Right" />
-                                    <uControl:myNumericUpDowm x:Name="txtDistance"
-                                                              Grid.Row="0"
-                                                              Grid.Column="1"
-                                                              MinWidth="100"
-                                                              Value="{Binding DataContext.Distance,RelativeSource={RelativeSource AncestorType={x:Type UserControl}},Mode=TwoWay}"
-                                                              Interval="0.1"
-                                                              Minimum="0"
-                                                              Maximum="100"
-                                                              StringFormat="{}{0:N3} mm"
-                                                              Margin="10"
-                                                              materialDesign:HintAssist.Hint="{lex:Loc 步进距离}" />
-
-                                    <TextBlock Grid.Row="1"
-                                               Grid.Column="0"
-                                               Text="{lex:Loc 点编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
-                                               Margin="10"
-                                               VerticalAlignment="Center" />
-                                    <ComboBox x:Name="cmbSelectPoint"
-                                              Grid.Row="2"
-                                              Grid.Column="0"
-                                              MinWidth="80"
-                                              materialDesign:HintAssist.Hint="{lex:Loc 选择点}"
-                                              Margin="10,5"
-                                              ItemsSource="{Binding Points}"
-                                              SelectedItem="{Binding SelectedPointInComboBox,Mode=TwoWay}">
-                                        <ComboBox.ItemTemplate>
-                                            <DataTemplate>
-                                                <StackPanel HorizontalAlignment="Left"
-                                                            Orientation="Horizontal">
-                                                    <TextBlock Text="{Binding Number,StringFormat={}{0}:}" />
-                                                    <TextBlock Text="{Binding Label}" />
-                                                </StackPanel>
-                                            </DataTemplate>
-                                        </ComboBox.ItemTemplate>
-                                    </ComboBox>
-
-                                    <TextBlock Grid.Row="1"
-                                               Grid.Column="1"
-                                               Text="{lex:Loc 动作指令,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
-                                               Margin="10"
-                                               VerticalAlignment="Center" />
-                                    <ComboBox x:Name="cmbSelectMotioncmd"
-                                              Grid.Row="2"
-                                              Grid.Column="1"
-                                              MinWidth="80"
-                                              Margin="10,5"
-                                              materialDesign:HintAssist.Hint="{lex:Loc 动作指令}"
-                                              ItemsSource="{ext:EnumBindingSource EnumType=enums:MotionCommand}"
-                                              SelectedItem="{Binding DataContext.SelectMotionCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+                                    <Grid.Resources>
+                                        <Style TargetType="Button"
+                                               BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
+                                            <Setter Property="Width"
+                                                    Value="60" />
+                                            <Setter Property="Height"
+                                                    Value="60" />
+                                            <Setter Property="FontSize"
+                                                    Value="13" />
+                                            <Setter Property="Padding"
+                                                    Value="0" />
+                                            <Setter Property="HorizontalAlignment"
+                                                    Value="Center" />
+                                            <Setter Property="VerticalAlignment"
+                                                    Value="Center" />
+                                            <Setter Property="Margin"
+                                                    Value="2" />
+                                            <Setter Property="materialDesign:ButtonAssist.CornerRadius"
+                                                    Value="10" />
+                                        </Style>
+                                    </Grid.Resources>
 
-                                    <Button Grid.Row="2"
+                                    <Button x:Name="btn_x"
+                                            Grid.Row="1"
+                                            Grid.Column="0"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowLeftBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-X"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="1"
                                             Grid.Column="2"
-                                            Content="{lex:Loc 执行动作}"
-                                            Margin="10,5"
-                                            Command="{Binding DataContext.ExecuteMotion,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
-                                        <Button.CommandParameter>
-                                            <MultiBinding Converter="{StaticResource MultiParameterConverter}">
-                                                <Binding ElementName="cmbSelectPoint"
-                                                         Path="SelectedItem" />
-                                                <Binding ElementName="cmbSelectMotioncmd"
-                                                         Path="SelectedItem" />
-                                            </MultiBinding>
-                                        </Button.CommandParameter>
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowRightBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+X"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="0"
+                                            Grid.Column="1"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowTopBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+Y"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="2"
+                                            Grid.Column="1"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowBottomBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-Y"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="0"
+                                            Grid.Column="3"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowTopBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+Z"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="2"
+                                            Grid.Column="3"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowBottomBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-Z"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
                                     </Button>
-
                                     <Button Grid.Row="3"
                                             Grid.Column="0"
-                                            Content="{lex:Loc 示教}"
-                                            Margin="10"
-                                            HorizontalAlignment="Right"
-                                            Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
-                                    <!--<ToggleButton Grid.Row="3"
-                                                  Grid.Column="2"
-                                                  HorizontalAlignment="Right"
-                                                  VerticalAlignment="Center"
-                                                  Visibility="{Binding IsHaveRobot,Converter={StaticResource BooleanToVisibilityConverter}}"
-                                                  materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
-                                                  Content="{materialDesign:PackIcon Kind=ProgressWrench}"
-                                                  Style="{StaticResource MaterialDesignActionToggleButton}"
-                                                  ToolTip="{lex:Loc 手动验证流程}"
-                                                  Margin="5,0"
-                                                  IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />-->
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+U"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="4"
+                                            Grid.Column="0"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="AxisZRotateClockwise"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-U"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="3"
+                                            Grid.Column="1"
+                                            Grid.ColumnSpan="2"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R+}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+R"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button Grid.Row="4"
+                                            Grid.Column="1"
+                                            Grid.ColumnSpan="2"
+                                            Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
+                                            CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R-}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="AxisZRotateClockwise"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-R"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+
+                                    <Grid Grid.Row="5"
+                                          Grid.ColumnSpan="7"
+                                          Margin="10">
+                                        <Grid.RowDefinitions>
+                                            <RowDefinition Height="auto" />
+                                            <RowDefinition Height="auto" />
+                                            <RowDefinition Height="auto" />
+                                            <RowDefinition Height="auto" />
+                                        </Grid.RowDefinitions>
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition Width="auto" />
+                                            <ColumnDefinition Width="auto" />
+                                            <ColumnDefinition Width="auto" />
+                                        </Grid.ColumnDefinitions>
+                                        <TextBlock Grid.Row="0"
+                                                   Grid.Column="0"
+                                                   Text="{lex:Loc 步进距离,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
+                                                   Margin="10"
+                                                   VerticalAlignment="Center"
+                                                   HorizontalAlignment="Right" />
+                                        <uControl:myNumericUpDowm x:Name="txtDistance"
+                                                                  Grid.Row="0"
+                                                                  Grid.Column="1"
+                                                                  MinWidth="100"
+                                                                  Value="{Binding DataContext.Distance,RelativeSource={RelativeSource AncestorType={x:Type UserControl}},Mode=TwoWay}"
+                                                                  Interval="0.1"
+                                                                  Minimum="0"
+                                                                  Maximum="100"
+                                                                  StringFormat="{}{0:N3} mm"
+                                                                  Margin="10"
+                                                                  materialDesign:HintAssist.Hint="{lex:Loc 步进距离}" />
+
+                                        <TextBlock Grid.Row="1"
+                                                   Grid.Column="0"
+                                                   Text="{lex:Loc 点编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
+                                                   Margin="10"
+                                                   VerticalAlignment="Center" />
+                                        <ComboBox x:Name="cmbSelectPoint"
+                                                  Grid.Row="2"
+                                                  Grid.Column="0"
+                                                  MinWidth="80"
+                                                  materialDesign:HintAssist.Hint="{lex:Loc 选择点}"
+                                                  Margin="10,5"
+                                                  ItemsSource="{Binding Points}"
+                                                  SelectedItem="{Binding SelectedPointInComboBox,Mode=TwoWay}">
+                                            <ComboBox.ItemTemplate>
+                                                <DataTemplate>
+                                                    <StackPanel HorizontalAlignment="Left"
+                                                                Orientation="Horizontal">
+                                                        <TextBlock Text="{Binding Number,StringFormat={}{0}:}" />
+                                                        <TextBlock Text="{Binding Label}" />
+                                                    </StackPanel>
+                                                </DataTemplate>
+                                            </ComboBox.ItemTemplate>
+                                        </ComboBox>
+
+                                        <TextBlock Grid.Row="1"
+                                                   Grid.Column="1"
+                                                   Text="{lex:Loc 动作指令,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
+                                                   Margin="10"
+                                                   VerticalAlignment="Center" />
+                                        <ComboBox x:Name="cmbSelectMotioncmd"
+                                                  Grid.Row="2"
+                                                  Grid.Column="1"
+                                                  MinWidth="80"
+                                                  Margin="10,5"
+                                                  materialDesign:HintAssist.Hint="{lex:Loc 动作指令}"
+                                                  ItemsSource="{ext:EnumBindingSource EnumType=enums:MotionCommand}"
+                                                  SelectedItem="{Binding DataContext.SelectMotionCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+
+                                        <Button Grid.Row="2"
+                                                Grid.Column="2"
+                                                Content="{lex:Loc 执行动作}"
+                                                Margin="2"
+                                                Command="{Binding DataContext.ExecuteMotion,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
+                                            <Button.CommandParameter>
+                                                <MultiBinding Converter="{StaticResource MultiParameterConverter}">
+                                                    <Binding ElementName="cmbSelectPoint"
+                                                             Path="SelectedItem" />
+                                                    <Binding ElementName="cmbSelectMotioncmd"
+                                                             Path="SelectedItem" />
+                                                </MultiBinding>
+                                            </Button.CommandParameter>
+                                        </Button>
+
+                                        <Button Grid.Row="3"
+                                                Grid.Column="0"
+                                                Content="{lex:Loc 示教}"
+                                                Margin="2"
+                                                HorizontalAlignment="Right"
+                                                Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+                                        <!--<ToggleButton Grid.Row="3"
+                      Grid.Column="2"
+                      HorizontalAlignment="Right"
+                      VerticalAlignment="Center"
+                      Visibility="{Binding IsHaveRobot,Converter={StaticResource BooleanToVisibilityConverter}}"
+                      materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
+                      Content="{materialDesign:PackIcon Kind=ProgressWrench}"
+                      Style="{StaticResource MaterialDesignActionToggleButton}"
+                      ToolTip="{lex:Loc 手动验证流程}"
+                      Margin="5,0"
+                      IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />-->
+                                    </Grid>
                                 </Grid>
                             </Grid>
                         </Grid>