刘锦天 пре 8 месеци
родитељ
комит
75c24a0da6

+ 16 - 8
TeamAAS-VM/Core/Management.cs

@@ -1024,6 +1024,14 @@ namespace TeamAAS_VP.Core
                     await item.WriteToPlcAddress(addressConfig.Out_CheckCamera, plc);
                 }
             }
+
+            if (current.AoiPoints != null && current.AoiPoints.Count > 0)
+            {
+                foreach (var item in current.AoiPoints)
+                {
+                    await item.WriteToPlcAddress(addressConfig.Out_AoiCamera, plc);
+                }
+            }
         }
 
         PointF[] DowmCameraResults= new PointF[10];
@@ -1368,8 +1376,8 @@ namespace TeamAAS_VP.Core
                             //拍1打1 
                             if (systemConfig.WorkMode == 1)
                             {
-                                currentProduct.ScrewPoints[0].X_Position = UpCameraPutResults[1].X+ DowmCameraResults[0].X;
-                                currentProduct.ScrewPoints[0].Y_Position = UpCameraPutResults[1].Y + DowmCameraResults[0].Y;
+                                currentProduct.ScrewPoints[0].X_Position_Start = UpCameraPutResults[1].X+ DowmCameraResults[0].X;
+                                currentProduct.ScrewPoints[0].Y_Position_Start = UpCameraPutResults[1].Y + DowmCameraResults[0].Y;
                                 await currentProduct.ScrewPoints[0].WriteToPlcAddress(addressConfig.Out_Screw, plc);
                             }
                             //拍1打所有
@@ -1378,18 +1386,18 @@ namespace TeamAAS_VP.Core
                                 //根据UpCameraPutResults[]中的索引1、2,和拍照点对应的Local下的坐标,从创建Local坐标系
                                 PointF worldP1=new PointF(UpCameraPutResults[1].X, UpCameraPutResults[1].Y);
                                 PointF worldP2= new PointF(UpCameraPutResults[2].X, UpCameraPutResults[2].Y);
-                                PointF localP1= new PointF(currentProduct.ScrewCameraLocalPos1.X_Position, currentProduct.ScrewCameraLocalPos1.Y_Position);
-                                PointF localP2= new PointF(currentProduct.ScrewCameraLocalPos2.X_Position, currentProduct.ScrewCameraLocalPos2.Y_Position);
+                                PointF localP1= new PointF(currentProduct.ScrewCameraLocalPos1.X_Position_Start, currentProduct.ScrewCameraLocalPos1.Y_Position_Start);
+                                PointF localP2= new PointF(currentProduct.ScrewCameraLocalPos2.X_Position_Start, currentProduct.ScrewCameraLocalPos2.Y_Position_Start);
                                 CoordinateTransformer local= new CoordinateTransformer(worldP1, worldP2, localP1, localP2);
 
                                 for (int i = 0; i < currentProduct.ScrewPoints.Count; i++)
                                 {
-                                    var localPoint = new PointF(currentProduct.ScrewPoints[i].X_Position, currentProduct.ScrewPoints[i].Y_Position);
+                                    var localPoint = new PointF(currentProduct.ScrewPoints[i].X_Position_Start, currentProduct.ScrewPoints[i].Y_Position_Start);
                                     var worldPoint= local.ToOldCoord(localPoint.X, localPoint.Y);
                                     var point = currentProduct.ScrewPoints[i].Clone();
-                                    point.X_Position = (float)worldPoint[0];
-                                    point.Y_Position = (float)worldPoint[1];
-                                    SendTaskMessage($"点:{i},{point.X_Position:F3},{point.Y_Position:F4}", MessageLevel.Info);
+                                    point.X_Position_Start = (float)worldPoint[0];
+                                    point.Y_Position_Start = (float)worldPoint[1];
+                                    SendTaskMessage($"点:{i},{point.X_Position_Start:F3},{point.Y_Position_Start:F4}", MessageLevel.Info);
                                     await point.WriteToPlcAddress(addressConfig.Out_Screw, plc);
                                 }
                                 await plc.WriteNodeAsync(addressConfig.Out_WorkNum.Address, (Int16)currentProduct.ScrewPoints.Count);

+ 113 - 69
TeamAAS-VM/Models/PLC/PlcAddressConfig.cs

@@ -267,6 +267,15 @@ namespace TeamAAS_VP.Models.PLC
             get { return _CheckCamera; }
             set { SetProperty(ref _CheckCamera, value); }
         }
+        private PlcPointAddress _AoiCamera = new PlcPointAddress();
+        /// <summary>
+        /// AOI点位参数
+        /// </summary>
+        public PlcPointAddress Out_AoiCamera
+        {
+            get { return _AoiCamera; }
+            set { SetProperty(ref _AoiCamera, value); }
+        }
         #endregion
 
         #region 从PLC读取的地址
@@ -598,119 +607,154 @@ namespace TeamAAS_VP.Models.PLC
             // Out_PickCamera 初始化并赋地址
             Out_PickCamera = EnsurePoint(Out_PickCamera);
             Out_PickCamera.Description = "取料拍照点位参数";
-            Out_PickCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Position";
-            Out_PickCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Velocity";
-            Out_PickCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Position";
-            Out_PickCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Velocity";
+            Out_PickCamera.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Position";
+            Out_PickCamera.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Velocity";
+            Out_PickCamera.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Position";
+            Out_PickCamera.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Velocity";
             Out_PickCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Start";
             Out_PickCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Start";
             Out_PickCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Stop";
             Out_PickCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Stop";
-            Out_PickCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Position";
-            Out_PickCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Velocity";
-            Out_PickCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Position";
-            Out_PickCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Velocity";
-            Out_PickCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Torque";
-            Out_PickCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Feeder";
-            Out_PickCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].ScrewProNum";
+            Out_PickCamera.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Position";
+            Out_PickCamera.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Velocity";
+            //Out_PickCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Position";
+            //Out_PickCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Velocity";
+            //Out_PickCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Torque";
+            //Out_PickCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Feeder";
+            //Out_PickCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].ScrewProNum";
 
             // Out_Pick(取料点位)初始化并赋地址
             Out_Pick = EnsurePoint(Out_Pick);
             Out_Pick.Description = "取料点位参数";
-            Out_Pick.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Position";
-            Out_Pick.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Velocity";
-            Out_Pick.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Position";
-            Out_Pick.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Velocity";
+            Out_Pick.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Position";
+            Out_Pick.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Velocity";
+            Out_Pick.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Position";
+            Out_Pick.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Velocity";
             Out_Pick.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Start";
             Out_Pick.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Start";
             Out_Pick.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Stop";
             Out_Pick.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Stop";
-            Out_Pick.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Position";
-            Out_Pick.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Velocity";
-            Out_Pick.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Position";
-            Out_Pick.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Velocity";
-            Out_Pick.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Torque";
-            Out_Pick.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Feeder";
-            Out_Pick.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].ScrewProNum";
+            Out_Pick.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Position";
+            Out_Pick.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Velocity";
+            //Out_Pick.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Position";
+            //Out_Pick.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Velocity";
+            //Out_Pick.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Torque";
+            //Out_Pick.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Feeder";
+            //Out_Pick.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].ScrewProNum";
 
             // Out_SecPosCamera(下相机二次定位)初始化并赋地址
             Out_SecPosCamera = EnsurePoint(Out_SecPosCamera);
             Out_SecPosCamera.Description = "下相机二次定位点位参数";
-            Out_SecPosCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Position";
-            Out_SecPosCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Velocity";
-            Out_SecPosCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Position";
-            Out_SecPosCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Velocity";
+            Out_SecPosCamera.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Position";
+            Out_SecPosCamera.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Velocity";
+            Out_SecPosCamera.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Position";
+            Out_SecPosCamera.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Velocity";
             Out_SecPosCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Start";
             Out_SecPosCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Start";
             Out_SecPosCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Stop";
             Out_SecPosCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Stop";
-            Out_SecPosCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Position";
-            Out_SecPosCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Velocity";
-            Out_SecPosCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Position";
-            Out_SecPosCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Velocity";
-            Out_SecPosCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Torque";
-            Out_SecPosCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Feeder";
-            Out_SecPosCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].ScrewProNum";
+            Out_SecPosCamera.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Position";
+            Out_SecPosCamera.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Velocity";
+            //Out_SecPosCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Position";
+            //Out_SecPosCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Velocity";
+            //Out_SecPosCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Torque";
+            //Out_SecPosCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Feeder";
+            //Out_SecPosCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].ScrewProNum";
 
             // Out_ScrewCamera(锁附拍照点位)初始化并赋地址
             Out_ScrewCamera = EnsurePoint(Out_ScrewCamera);
             Out_ScrewCamera.Description = "锁附拍照点位参数";
-            Out_ScrewCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Position";
-            Out_ScrewCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Velocity";
-            Out_ScrewCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Position";
-            Out_ScrewCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Velocity";
+            Out_ScrewCamera.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Position";
+            Out_ScrewCamera.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Velocity";
+            Out_ScrewCamera.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Position";
+            Out_ScrewCamera.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Velocity";
             Out_ScrewCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Start";
             Out_ScrewCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Start";
             Out_ScrewCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Stop";
             Out_ScrewCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Stop";
-            Out_ScrewCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Position";
-            Out_ScrewCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Velocity";
-            Out_ScrewCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Position";
-            Out_ScrewCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Velocity";
-            Out_ScrewCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Torque";
-            Out_ScrewCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Feeder";
-            Out_ScrewCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].ScrewProNum";
+            Out_ScrewCamera.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Position";
+            Out_ScrewCamera.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Velocity";
+            //Out_ScrewCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Position";
+            //Out_ScrewCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Velocity";
+            //Out_ScrewCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Torque";
+            //Out_ScrewCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Feeder";
+            //Out_ScrewCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].ScrewProNum";
 
             // Out_Screw(锁附点位)初始化并赋地址
             Out_Screw = EnsurePoint(Out_Screw);
             Out_Screw.Description = "锁附点位参数";
-            Out_Screw.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Position";
-            Out_Screw.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Velocity";
-            Out_Screw.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Position";
-            Out_Screw.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Velocity";
+            Out_Screw.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Position";
+            Out_Screw.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Velocity";
+            Out_Screw.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Position";
+            Out_Screw.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Velocity";
             Out_Screw.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Start";
             Out_Screw.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Start";
             Out_Screw.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Stop";
             Out_Screw.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Stop";
-            Out_Screw.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Position";
-            Out_Screw.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Velocity";
-            Out_Screw.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Position";
-            Out_Screw.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Velocity";
-            Out_Screw.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Torque";
-            Out_Screw.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Feeder";
-            Out_Screw.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].ScrewProNum";
+            Out_Screw.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Position";
+            Out_Screw.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Velocity";
+            //Out_Screw.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Position";
+            //Out_Screw.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Velocity";
+            //Out_Screw.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Torque";
+            //Out_Screw.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Feeder";
+            //Out_Screw.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].ScrewProNum";
 
             // Out_CheckCamera(复检点位)初始化并赋地址
             Out_CheckCamera = EnsurePoint(Out_CheckCamera);
             Out_CheckCamera.Description = "复检点位参数";
-            Out_CheckCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Position";
-            Out_CheckCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Velocity";
-            Out_CheckCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Position";
-            Out_CheckCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Velocity";
+            Out_CheckCamera.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Position";
+            Out_CheckCamera.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Velocity";
+            Out_CheckCamera.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Position";
+            Out_CheckCamera.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Velocity";
             Out_CheckCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Start";
             Out_CheckCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Start";
             Out_CheckCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Stop";
             Out_CheckCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Stop";
-            Out_CheckCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Position";
-            Out_CheckCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Velocity";
-            Out_CheckCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Position";
-            Out_CheckCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Velocity";
-            Out_CheckCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Torque";
-            Out_CheckCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Feeder";
-            Out_CheckCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].ScrewProNum";
-
-            // 4. In_* 默认(假定从 PLC 读到 PC,使用 ToPC 前缀)
-            In_Code = Ensure(In_Code);
+            Out_CheckCamera.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Position";
+            Out_CheckCamera.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Velocity";
+            //Out_CheckCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Position";
+            //Out_CheckCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Velocity";
+            //Out_CheckCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Torque";
+            //Out_CheckCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Feeder";
+            //Out_CheckCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].ScrewProNum";
+
+            // Out_AoiCamera(AOI点位)初始化并赋地址
+            Out_AoiCamera = EnsurePoint(Out_AoiCamera);
+
+            Out_AoiCamera.Description = "AOI点位参数";
+            Out_AoiCamera.X_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].X_Position_Start";
+            Out_AoiCamera.X_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].X_Velocity_Start";
+            Out_AoiCamera.X_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].X_Position_Stop";
+            Out_AoiCamera.X_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].X_Velocity_Stop";
+
+            Out_AoiCamera.Y_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Y_Position_Start";
+            Out_AoiCamera.Y_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Y_Velocity_Start";
+            Out_AoiCamera.Y_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Y_Position_Stop";
+            Out_AoiCamera.Y_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Y_Velocity_Stop";
+
+            Out_AoiCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Z_Position_Start";
+            Out_AoiCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Z_Velocity_Start";
+            Out_AoiCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Z_Position_Stop";
+            Out_AoiCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Z_Velocity_Stop";
+
+            Out_AoiCamera.U_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].U_Position_Start";
+            Out_AoiCamera.U_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].U_Velocity_Start";
+            Out_AoiCamera.U_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].U_Position_Stop";
+            Out_AoiCamera.U_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].U_Velocity_Stop";
+
+            Out_AoiCamera.Enable_Start_Node.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Start_Node";
+            Out_AoiCamera.Enable_Pulse.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Pulse";
+            Out_AoiCamera.Enable_3D.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_3D";
+            Out_AoiCamera.Enable_Wait_Finish.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Wait_Finish";
+
+            Out_AoiCamera.Enable_Light1.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Light1";
+            Out_AoiCamera.Enable_Light2.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Light2";
+            Out_AoiCamera.Enable_Light3.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Light3";
+            Out_AoiCamera.Enable_Light4.Address = "ns=4;s=DB_Communication|FromPC.point_AOI[{0}].Enable_Light4";
+
+
+        // 4. In_* 默认(假定从 PLC 读到 PC,使用 ToPC 前缀)
+        In_Code = Ensure(In_Code);
             In_Code.Address = "ns=4;s=DB_Communication|ToPC.Mes[0].Code";
             In_Code.DataType = "string";
             In_Code.Description = "产品编码";

+ 203 - 58
TeamAAS-VM/Models/PLC/PlcPoint.cs

@@ -26,32 +26,60 @@ namespace TeamAAS_VP.Models.PLC
             set { SetProperty(ref _Label, value); }
         }
 
-        private float _X_Position;
-        public float X_Position
+        private float _X_Position_Start;
+        public float X_Position_Start
         {
-            get { return _X_Position; }
-            set { SetProperty(ref _X_Position, value); }
+            get { return _X_Position_Start; }
+            set { SetProperty(ref _X_Position_Start, value); }
         }
 
-        private float _X_Velocity;
-        public float X_Velocity
+        private float _X_Velocity_Start;
+        public float X_Velocity_Start
         {
-            get { return _X_Velocity; }
-            set { SetProperty(ref _X_Velocity, value); }
+            get { return _X_Velocity_Start; }
+            set { SetProperty(ref _X_Velocity_Start, value); }
         }
 
-        private float _Y_Position;
-        public float Y_Position
+        private float _X_Position_Stop;
+        public float X_Position_Stop
         {
-            get { return _Y_Position; }
-            set { SetProperty(ref _Y_Position, value); }
+            get { return _X_Position_Stop; }
+            set { SetProperty(ref _X_Position_Stop, value); }
         }
 
-        private float _Y_Velocity;
-        public float Y_Velocity
+        private float _X_Velocity_Stop;
+        public float X_Velocity_Stop
         {
-            get { return _Y_Velocity; }
-            set { SetProperty(ref _Y_Velocity, value); }
+            get { return _X_Velocity_Stop; }
+            set { SetProperty(ref _X_Velocity_Stop, value); }
+        }
+
+        private float _Y_Position_Start;
+        public float Y_Position_Start
+        {
+            get { return _Y_Position_Start; }
+            set { SetProperty(ref _Y_Position_Start, value); }
+        }
+
+        private float _Y_Velocity_Start;
+        public float Y_Velocity_Start
+        {
+            get { return _Y_Velocity_Start; }
+            set { SetProperty(ref _Y_Velocity_Start, value); }
+        }
+
+        private float _Y_Position_Stop;
+        public float Y_Position_Stop
+        {
+            get { return _Y_Position_Stop; }
+            set { SetProperty(ref _Y_Position_Stop, value); }
+        }
+
+        private float _Y_Velocity_Stop;
+        public float Y_Velocity_Stop
+        {
+            get { return _Y_Velocity_Stop; }
+            set { SetProperty(ref _Y_Velocity_Stop, value); }
         }
 
         private float _Z_Position_Start;
@@ -82,18 +110,87 @@ namespace TeamAAS_VP.Models.PLC
             set { SetProperty(ref _Z_Velocity_Stop, value); }
         }
 
-        private float _U_Position;
-        public float U_Position
+        private float _U_Position_Start;
+        public float U_Position_Start
         {
-            get { return _U_Position; }
-            set { SetProperty(ref _U_Position, value); }
+            get { return _U_Position_Start; }
+            set { SetProperty(ref _U_Position_Start, value); }
         }
 
-        private float _U_Velocity;
-        public float U_Velocity
+        private float _U_Velocity_Start;
+        public float U_Velocity_Start
         {
-            get { return _U_Velocity; }
-            set { SetProperty(ref _U_Velocity, value); }
+            get { return _U_Velocity_Start; }
+            set { SetProperty(ref _U_Velocity_Start, value); }
+        }
+        private float _U_Position_Stop;
+        public float U_Position_Stop
+        {
+            get { return _U_Position_Stop; }
+            set { SetProperty(ref _U_Position_Stop, value); }
+        }
+
+        private float _U_Velocity_Stop;
+        public float U_Velocity_Stop
+        {
+            get { return _U_Velocity_Stop; }
+            set { SetProperty(ref _U_Velocity_Stop, value); }
+        }
+
+        private Int16 _Enable_Start_Node;
+        public Int16 Enable_Start_Node
+        {
+            get { return _Enable_Start_Node; }
+            set { SetProperty(ref _Enable_Start_Node, value); }
+        }
+
+        private Int16 _Enable_Pulse;
+        public Int16 Enable_Pulse
+        {
+            get { return _Enable_Pulse; }
+            set { SetProperty(ref _Enable_Pulse, value); }
+        }
+
+        private Int16 _Enable_3D;
+        public Int16 Enable_3D
+        {
+            get { return _Enable_3D; }
+            set { SetProperty(ref _Enable_3D, value); }
+        }
+
+        private Int16 _Enable_Wait_Finish;
+        public Int16 Enable_Wait_Finish
+        {
+            get { return _Enable_Wait_Finish; }
+            set { SetProperty(ref _Enable_Wait_Finish, value); }
+        }
+
+        private Int16 _Enable_Light1;
+        public Int16 Enable_Light1
+        {
+            get { return _Enable_Light1; }
+            set { SetProperty(ref _Enable_Light1, value); }
+        }
+
+        private Int16 _Enable_Light2;
+        public Int16 Enable_Light2
+        {
+            get { return _Enable_Light2; }
+            set { SetProperty(ref _Enable_Light2, value); }
+        }
+
+        private Int16 _Enable_Light3;
+        public Int16 Enable_Light3
+        {
+            get { return _Enable_Light3; }
+            set { SetProperty(ref _Enable_Light3, value); }
+        }
+
+        private Int16 _Enable_Light4;
+        public Int16 Enable_Light4
+        {
+            get { return _Enable_Light4; }
+            set { SetProperty(ref _Enable_Light4, value); }
         }
 
         private float _R_Position;
@@ -142,21 +239,38 @@ namespace TeamAAS_VP.Models.PLC
         public PlcPoint()
         {
             Number = 0;
-            X_Position = 0;
-            X_Velocity = 0;
-            Y_Position = 0;
-            Y_Velocity = 0;
+            X_Position_Start = 0;
+            X_Velocity_Start = 0;
+            X_Position_Stop = 0;
+            X_Velocity_Stop = 0;
+            Y_Position_Start = 0;
+            Y_Velocity_Start = 0;
+            Y_Position_Stop = 0;
+            Y_Velocity_Stop = 0;
             Z_Position_Start = 0;
             Z_Velocity_Start = 0;
             Z_Position_Stop = 0;
             Z_Velocity_Stop = 0;
-            U_Position = 0;
-            U_Velocity = 0;
-            R_Position = 0;
-            R_Velocity = 0;
-            Torque = 0;
-            Feeder = 0;
-            ScrewProNum = 0;
+            U_Position_Start = 0;
+            U_Velocity_Start = 0;
+            U_Position_Stop = 0;
+            U_Velocity_Stop = 0;
+            Enable_Start_Node = 0;
+            Enable_Pulse = 0;
+            Enable_3D = 0;
+            Enable_Wait_Finish = 0;
+            Enable_Light1 = 0;
+            Enable_Light2 = 0;
+            Enable_Light3 = 0;
+            Enable_Light4 = 0;
+
+
+
+            //R_Position = 0;
+            //R_Velocity = 0;
+            //Torque = 0;
+            //Feeder = 0;
+            //ScrewProNum = 0;
         }
 
         public PlcPoint Clone()
@@ -165,22 +279,36 @@ namespace TeamAAS_VP.Models.PLC
             {
                 Number = this.Number,
                 Label = this.Label,
-                X_Position = this.X_Position,
-                X_Velocity = this.X_Velocity,
-                Y_Position = this.Y_Position,
-                Y_Velocity = this.Y_Velocity,
+                X_Position_Start = this.X_Position_Start,
+                X_Velocity_Start= this.X_Velocity_Start,
+                X_Position_Stop = this.X_Position_Stop,
+                X_Velocity_Stop = this.X_Velocity_Stop,
+                Y_Position_Start = this.Y_Position_Start,
+                Y_Velocity_Start = this.Y_Velocity_Start,
+                Y_Position_Stop = this.Y_Position_Stop,
+                Y_Velocity_Stop = this.Y_Velocity_Stop,
                 Z_Position_Start = this.Z_Position_Start,
                 Z_Velocity_Start = this.Z_Velocity_Start,
                 Z_Position_Stop = this.Z_Position_Stop,
                 Z_Velocity_Stop = this.Z_Velocity_Stop,
-                U_Position = this.U_Position,
-                U_Velocity = this.U_Velocity,
-                R_Position = this.R_Position,
-                R_Velocity = this.R_Velocity,
-                Torque = this.Torque,
-                Feeder = this.Feeder,
-                ScrewProNum = this.ScrewProNum,
-                Description = this.Description
+                U_Position_Start = this.U_Position_Start,
+                U_Velocity_Start = this.U_Velocity_Start,
+                U_Position_Stop = this.U_Position_Stop,
+                U_Velocity_Stop = this.U_Velocity_Stop,
+                Enable_Start_Node = this.Enable_Start_Node,
+                Enable_Pulse = this.Enable_Pulse,
+                Enable_3D = this.Enable_3D,
+                Enable_Wait_Finish = this.Enable_Wait_Finish,
+                Enable_Light1 = this.Enable_Light1,
+                Enable_Light2 = this.Enable_Light2,
+                Enable_Light3 = this.Enable_Light3,
+                Enable_Light4 = this.Enable_Light4,
+                //R_Position = this.R_Position,
+                //R_Velocity = this.R_Velocity,
+                //Torque = this.Torque,
+                //Feeder = this.Feeder,
+                //ScrewProNum = this.ScrewProNum,
+                //Description = this.Description
             };
         }
 
@@ -193,21 +321,38 @@ namespace TeamAAS_VP.Models.PLC
         public async Task<bool> WriteToPlcAddress(PlcPointAddress plcAddress, OpcUaClientPLC pLC)
         {
             Dictionary<string, object> nodeValues = new Dictionary<string, object>();
-            nodeValues.Add(string.Format(plcAddress.X_Position.Address, Number), X_Position);
-            nodeValues.Add(string.Format(plcAddress.X_Velocity.Address, Number), X_Velocity);
-            nodeValues.Add(string.Format(plcAddress.Y_Position.Address, Number), Y_Position);
-            nodeValues.Add(string.Format(plcAddress.Y_Velocity.Address, Number), Y_Velocity);
+            nodeValues.Add(string.Format(plcAddress.X_Position_Start.Address, Number), X_Position_Start);
+            nodeValues.Add(string.Format(plcAddress.X_Velocity_Start.Address, Number), X_Velocity_Start);
+            nodeValues.Add(string.Format(plcAddress.X_Position_Stop.Address, Number), X_Position_Stop);
+            nodeValues.Add(string.Format(plcAddress.X_Velocity_Stop.Address, Number), X_Velocity_Stop);
+            nodeValues.Add(string.Format(plcAddress.Y_Position_Start.Address, Number), Y_Position_Start);
+            nodeValues.Add(string.Format(plcAddress.Y_Velocity_Start.Address, Number), Y_Velocity_Start);
+            nodeValues.Add(string.Format(plcAddress.Y_Position_Stop.Address, Number), Y_Position_Stop);
+            nodeValues.Add(string.Format(plcAddress.Y_Velocity_Stop.Address, Number), Y_Velocity_Stop);
             nodeValues.Add(string.Format(plcAddress.Z_Position_Start.Address, Number), Z_Position_Start);
             nodeValues.Add(string.Format(plcAddress.Z_Velocity_Start.Address, Number), Z_Velocity_Start);
             nodeValues.Add(string.Format(plcAddress.Z_Position_Stop.Address, Number), Z_Position_Stop);
             nodeValues.Add(string.Format(plcAddress.Z_Velocity_Stop.Address, Number), Z_Velocity_Stop);
-            nodeValues.Add(string.Format(plcAddress.U_Position.Address, Number), U_Position);
-            nodeValues.Add(string.Format(plcAddress.U_Velocity.Address, Number), U_Velocity);
-            nodeValues.Add(string.Format(plcAddress.R_Position.Address, Number), R_Position);
-            nodeValues.Add(string.Format(plcAddress.R_Velocity.Address, Number), R_Velocity);
-            nodeValues.Add(string.Format(plcAddress.Torque.Address, Number), Torque);
-            nodeValues.Add(string.Format(plcAddress.Feeder.Address, Number), Feeder);
-            nodeValues.Add(string.Format(plcAddress.ScrewProNum.Address, Number), ScrewProNum);
+            nodeValues.Add(string.Format(plcAddress.U_Position_Start.Address, Number), U_Position_Start);
+            nodeValues.Add(string.Format(plcAddress.U_Velocity_Start.Address, Number), U_Velocity_Start);
+            nodeValues.Add(string.Format(plcAddress.U_Position_Stop.Address, Number), U_Position_Stop);
+            nodeValues.Add(string.Format(plcAddress.U_Velocity_Stop.Address, Number), U_Velocity_Stop);
+
+            nodeValues.Add(string.Format(plcAddress.Enable_Start_Node.Address, Number), Enable_Start_Node);
+            nodeValues.Add(string.Format(plcAddress.Enable_Pulse.Address, Number), Enable_Pulse);
+            nodeValues.Add(string.Format(plcAddress.Enable_3D.Address, Number), Enable_3D);
+            nodeValues.Add(string.Format(plcAddress.Enable_Wait_Finish.Address, Number), Enable_Wait_Finish);
+            nodeValues.Add(string.Format(plcAddress.Enable_Light1.Address, Number), Enable_Light1);
+            nodeValues.Add(string.Format(plcAddress.Enable_Light2.Address, Number), Enable_Light2);
+            nodeValues.Add(string.Format(plcAddress.Enable_Light3.Address, Number), Enable_Light3);
+            nodeValues.Add(string.Format(plcAddress.Enable_Light4.Address, Number), Enable_Light4);
+
+
+            //nodeValues.Add(string.Format(plcAddress.R_Position.Address, Number), R_Position);
+            //nodeValues.Add(string.Format(plcAddress.R_Velocity.Address, Number), R_Velocity);
+            //nodeValues.Add(string.Format(plcAddress.Torque.Address, Number), Torque);
+            //nodeValues.Add(string.Format(plcAddress.Feeder.Address, Number), Feeder);
+            //nodeValues.Add(string.Format(plcAddress.ScrewProNum.Address, Number), ScrewProNum);
             return await pLC.WriteNodesAsync(nodeValues);
         }
     }

+ 50 - 17
TeamAAS-VM/Models/PLC/PlcPointAddress.cs

@@ -10,16 +10,35 @@ namespace TeamAAS_VP.Models.PLC
     {
         //描述
         public string Description { get; set; }
-        public PlcAddress X_Position { get; set; }
-        public PlcAddress X_Velocity { get;set; }
-        public PlcAddress Y_Position { get; set; }
-        public PlcAddress Y_Velocity { get; set; }
+        public PlcAddress X_Position_Start { get; set; }
+        public PlcAddress X_Velocity_Start { get;set; }
+        public PlcAddress X_Position_Stop { get; set; }
+        public PlcAddress X_Velocity_Stop { get; set; }
+        public PlcAddress Y_Position_Start { get; set; }
+        public PlcAddress Y_Velocity_Start { get; set; }
+        public PlcAddress Y_Position_Stop { get; set; }
+        public PlcAddress Y_Velocity_Stop { get; set; }
         public PlcAddress Z_Position_Start { get; set; }
         public PlcAddress Z_Velocity_Start { get; set; }
         public PlcAddress Z_Position_Stop { get; set; }
         public PlcAddress Z_Velocity_Stop { get; set; }
-        public PlcAddress U_Position { get; set; }
-        public PlcAddress U_Velocity { get; set; }
+        public PlcAddress U_Position_Start { get; set; }
+        public PlcAddress U_Velocity_Start { get; set; }
+        public PlcAddress U_Position_Stop { get; set; }
+        public PlcAddress U_Velocity_Stop { get; set; }
+        public PlcAddress Enable_Start_Node { get; set; }
+        public PlcAddress Enable_Pulse { get; set; }
+        public PlcAddress Enable_3D { get; set; }
+        public PlcAddress Enable_Wait_Finish { get; set; }
+        public PlcAddress Enable_Light1 { get; set; }
+        public PlcAddress Enable_Light2 { get; set; }
+        public PlcAddress Enable_Light3 { get; set; }
+        public PlcAddress Enable_Light4 { get; set; }
+
+
+        
+
+
         public PlcAddress R_Position { get; set; }
         public PlcAddress R_Velocity { get; set; }
         public PlcAddress Torque { get; set; }
@@ -29,21 +48,35 @@ namespace TeamAAS_VP.Models.PLC
         public PlcPointAddress()
         {
             Description = "点位地址";
-            X_Position = new PlcAddress() { Description = "X轴位置地址",DataType="float" };
-            X_Velocity = new PlcAddress() { Description = "X轴速度地址", DataType = "float" };
-            Y_Position = new PlcAddress() { Description = "Y轴位置地址", DataType = "float" };
-            Y_Velocity = new PlcAddress() { Description = "Y轴速度地址", DataType = "float" };
+            X_Position_Start = new PlcAddress() { Description = "X轴位置起始地址",DataType="float" };
+            X_Velocity_Start = new PlcAddress() { Description = "X轴速度起始地址", DataType = "float" };
+            X_Position_Stop = new PlcAddress() { Description = "X轴位置终点地址", DataType = "float" };
+            X_Velocity_Stop = new PlcAddress() { Description = "X轴速度终点地址", DataType = "float" };
+            Y_Position_Start = new PlcAddress() { Description = "Y轴位置起始地址", DataType = "float" };
+            Y_Velocity_Start = new PlcAddress() { Description = "Y轴速度起始地址", DataType = "float" };
+            Y_Position_Stop = new PlcAddress() { Description = "Y轴位置终点地址", DataType = "float" };
+            Y_Velocity_Stop = new PlcAddress() { Description = "Y轴速度终点地址", DataType = "float" };
             Z_Position_Start = new PlcAddress() { Description = "Z轴起始位置地址", DataType = "float" };
             Z_Velocity_Start = new PlcAddress() { Description = "Z轴起始速度地址", DataType = "float" };
             Z_Position_Stop = new PlcAddress() { Description = "Z轴停止位置地址", DataType = "float" };
             Z_Velocity_Stop = new PlcAddress() { Description = "Z轴停止速度地址", DataType = "float" };
-            U_Position = new PlcAddress() { Description = "U轴位置地址", DataType = "float" };
-            U_Velocity = new PlcAddress() { Description = "U轴速度地址", DataType = "float" };
-            R_Position = new PlcAddress() { Description = "R轴位置地址", DataType = "float" };
-            R_Velocity = new PlcAddress() { Description = "R轴速度地址", DataType = "float" };
-            Torque = new PlcAddress() { Description = "扭矩地址", DataType = "float" };
-            Feeder = new PlcAddress() { Description = "送料器地址", DataType = "int16" };
-            ScrewProNum = new PlcAddress() { Description = "螺杆程序号地址", DataType = "int16" };
+            U_Position_Start = new PlcAddress() { Description = "U轴位置起始地址", DataType = "float" };
+            U_Velocity_Start = new PlcAddress() { Description = "U轴速度起始地址", DataType = "float" };
+            U_Position_Stop = new PlcAddress() { Description = "U轴位置终点地址", DataType = "float" };
+            U_Velocity_Stop = new PlcAddress() { Description = "U轴速度终点地址", DataType = "float" };
+            Enable_Start_Node = new PlcAddress() { Description = "启用本起始位节点地址", DataType = "int16" };
+            Enable_Pulse = new PlcAddress() { Description = "使能脉冲地址", DataType = "int16" };
+            Enable_3D = new PlcAddress() { Description = "使能3D地址", DataType = "int16" };
+            Enable_Wait_Finish = new PlcAddress() { Description = "使能等待完成地址", DataType = "int16" };
+            Enable_Light1 = new PlcAddress() { Description = "使能灯1地址", DataType = "int16" };
+            Enable_Light2 = new PlcAddress() { Description = "使能灯2地址", DataType = "int16" };
+            Enable_Light3 = new PlcAddress() { Description = "使能灯3地址", DataType = "int16" };
+            Enable_Light4 = new PlcAddress() { Description = "使能灯4地址", DataType = "int16" };
+            //R_Position = new PlcAddress() { Description = "R轴位置地址", DataType = "float" };
+            //R_Velocity = new PlcAddress() { Description = "R轴速度地址", DataType = "float" };
+            //Torque = new PlcAddress() { Description = "扭矩地址", DataType = "float" };
+            //Feeder = new PlcAddress() { Description = "送料器地址", DataType = "int16" };
+            //ScrewProNum = new PlcAddress() { Description = "螺杆程序号地址", DataType = "int16" };
         }
     }
 }

+ 9 - 0
TeamAAS-VM/Models/Product/ProductModel.cs

@@ -276,6 +276,15 @@ namespace TeamAAS_VP.Models
             set { SetProperty(ref _CheckCameraPoints, value); }
         }
 
+        private ObservableCollection<PlcPoint> _AoiPoints = new ObservableCollection<PlcPoint>();
+        /// <summary>
+        /// AOI点位集合
+        /// </summary>
+        public ObservableCollection<PlcPoint> AoiPoints
+        {
+            get { return _AoiPoints; }
+            set { SetProperty(ref _AoiPoints, value); }
+        }
 
         private bool _IsLoad;
         /// <summary>

+ 18 - 18
TeamAAS-VM/ViewModels/Product/AutoCorrectLockPointViewModel.cs

@@ -223,10 +223,10 @@ namespace TeamAAS_VP.ViewModels.Product
                 //移动机器人至拍照点位,拍照
                 var rpoint = new RPoint()
                 {
-                    X = screwCameraPoint[0].X_Position,
-                    Y = screwCameraPoint[0].Y_Position,
+                    X = screwCameraPoint[0].X_Position_Start,
+                    Y = screwCameraPoint[0].Y_Position_Start,
                     Z = screwCameraPoint[0].Z_Position_Start,
-                    U = screwCameraPoint[0].U_Position,
+                    U = screwCameraPoint[0].U_Position_Start,
                     V = screwCameraPoint[0].R_Position,
                 };
                 await Robot.CalibMotionAsync(rpoint, 0);
@@ -246,10 +246,10 @@ namespace TeamAAS_VP.ViewModels.Product
                 //移动机器人至拍照点位,拍照
                 rpoint = new RPoint()
                 {
-                    X = screwCameraPoint[1].X_Position,
-                    Y = screwCameraPoint[1].Y_Position,
+                    X = screwCameraPoint[1].X_Position_Start,
+                    Y = screwCameraPoint[1].Y_Position_Start,
                     Z = screwCameraPoint[1].Z_Position_Start,
-                    U = screwCameraPoint[1].U_Position,
+                    U = screwCameraPoint[1].U_Position_Start,
                     V = screwCameraPoint[1].R_Position,
                 };
                 await Robot.CalibMotionAsync(rpoint, 0);
@@ -283,32 +283,32 @@ namespace TeamAAS_VP.ViewModels.Product
 
 
                 //根据UpCameraPutResults[]中的索引1、2,和拍照点对应的Local下的坐标,从创建Local坐标系
-                PointF localP1 = new PointF(screwCameraLocalPoint1.X_Position, screwCameraLocalPoint1.Y_Position);
-                PointF localP2 = new PointF(screwCameraLocalPoint2.X_Position, screwCameraLocalPoint2.Y_Position);
+                PointF localP1 = new PointF(screwCameraLocalPoint1.X_Position_Start, screwCameraLocalPoint1.Y_Position_Start);
+                PointF localP2 = new PointF(screwCameraLocalPoint2.X_Position_Start, screwCameraLocalPoint2.Y_Position_Start);
                 CoordinateTransformer local = new CoordinateTransformer(worldP1, worldP2, localP1, localP2);
 
                 for (int i = 0; i < product.ScrewPoints.Count; i++)
                 {
-                    var localPoint = new PointF(product.ScrewPoints[i].X_Position, product.ScrewPoints[i].Y_Position);
+                    var localPoint = new PointF(product.ScrewPoints[i].X_Position_Start, product.ScrewPoints[i].Y_Position_Start);
                     var worldPoint = local.ToOldCoord(localPoint.X, localPoint.Y);
                     var point = product.ScrewCameraPoints[0].Clone();
-                    point.X_Position = (float)worldPoint[0];
-                    point.Y_Position = (float)worldPoint[1];
+                    point.X_Position_Start = (float)worldPoint[0];
+                    point.Y_Position_Start = (float)worldPoint[1];
                     //计算当前点的高度与screwCameraLocalPoint1的Z轴之间的偏差
                     var deltaZ = product.ScrewPoints[i].Z_Position_Start - screwCameraLocalPoint1.Z_Position_Start;
 
                     //计算相机去拍照点位
-                    point.X_Position-= cameraOffsetX;
-                    point.Y_Position-= cameraOffsetY;
+                    point.X_Position_Start-= cameraOffsetX;
+                    point.Y_Position_Start-= cameraOffsetY;
                     point.Z_Position_Start= screwCameraPoint[0].Z_Position_Start + deltaZ;
 
                     //移动机器人至拍照点位,拍照
                     rpoint = new RPoint()
                     {
-                        X = point.X_Position,
-                        Y = point.Y_Position,
+                        X = point.X_Position_Start,
+                        Y = point.Y_Position_Start,
                         Z = point.Z_Position_Start,
-                        U = screwCameraPoint[0].U_Position,
+                        U = screwCameraPoint[0].U_Position_Start,
                         V = screwCameraPoint[0].R_Position,
                     };
                     await Robot.CalibMotionAsync(rpoint, 0);
@@ -454,8 +454,8 @@ namespace TeamAAS_VP.ViewModels.Product
             {
                 Number = point.Number;
                 Label = point.Label;
-                PreX = point.X_Position;
-                PreY = point.Y_Position;
+                PreX = point.X_Position_Start;
+                PreY = point.Y_Position_Start;
             }
         }
     }

+ 49 - 35
TeamAAS-VM/ViewModels/Product/PlcPointParamsViewModel.cs

@@ -238,6 +238,17 @@ namespace TeamAAS_VP.ViewModels.Product
             set { SetProperty(ref _LockZSpeed, value); }
         }
 
+        private float _LockUSpeed;
+        /// <summary>
+        /// 批量设置锁付点U轴速度
+        /// </summary>
+        public float LockUSpeed
+        {
+            get { return _LockUSpeed; }
+            set { SetProperty(ref _LockUSpeed, value); }
+        }
+
+
         private float _LockZDescendSpeed;
         /// <summary>
         /// 批量设置锁付点Z轴下降速度
@@ -484,10 +495,10 @@ namespace TeamAAS_VP.ViewModels.Product
             var values = (object[])parameter;
             var point = new RPoint()
             {
-                X= SelectedPoint.X_Position,
-                Y= SelectedPoint.Y_Position,
+                X= SelectedPoint.X_Position_Start,
+                Y= SelectedPoint.Y_Position_Start,
                 Z= SelectedPoint.Z_Position_Start,
-                U=SelectedPoint.U_Position,
+                U=SelectedPoint.U_Position_Start,
                 V= SelectedPoint.R_Position,
             };
             MotionCommand motionCmd = (MotionCommand)values[1];
@@ -529,10 +540,10 @@ namespace TeamAAS_VP.ViewModels.Product
             try
             {
                 var curpos = await Robot.GetRobotPosAsync();
-                SelectedPoint.X_Position = curpos.X;
-                SelectedPoint.Y_Position = curpos.Y;
+                SelectedPoint.X_Position_Start = curpos.X;
+                SelectedPoint.Y_Position_Start = curpos.Y;
                 SelectedPoint.Z_Position_Start = curpos.Z;
-                SelectedPoint.U_Position = curpos.U;
+                SelectedPoint.U_Position_Start = curpos.U;
                 SelectedPoint.R_Position = curpos.V;
                 _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = $"{Lang.完成}!", Duration = 0.4 });
             }
@@ -681,6 +692,9 @@ namespace TeamAAS_VP.ViewModels.Product
                 case 5:
                     Points = SelectProduct.CheckCameraPoints;
                     break;
+                case 6:
+                    Points = SelectProduct.AoiPoints;
+                    break;
                 default:
                     break;
             }
@@ -695,11 +709,11 @@ namespace TeamAAS_VP.ViewModels.Product
             Points.Add(new PlcPoint()
             {
                 Number = Points.Count + 1,
-                X_Velocity = 100,
-                Y_Velocity = 100,
+                X_Velocity_Start = 100,
+                Y_Velocity_Start = 100,
                 Z_Velocity_Start = 100,
                 Z_Velocity_Stop = 100,
-                U_Velocity = 100,
+                U_Velocity_Start = 100,
                 R_Velocity = 100,
             });
             // update commands
@@ -834,8 +848,8 @@ namespace TeamAAS_VP.ViewModels.Product
                             var existingPoint = Points.FirstOrDefault(p => p.Number == startNumber + i);
                             if (existingPoint != null)
                             {
-                                existingPoint.X_Position = point.X;
-                                existingPoint.Y_Position = point.Y;
+                                existingPoint.X_Position_Start = point.X;
+                                existingPoint.Y_Position_Start = point.Y;
 
                             }
                             else
@@ -843,13 +857,13 @@ namespace TeamAAS_VP.ViewModels.Product
                                 Points.Add(new PlcPoint()
                                 {
                                     Number = startNumber + i,
-                                    X_Position = point.X,
-                                    Y_Position = point.Y,
-                                    X_Velocity=100,
-                                    Y_Velocity=100,
+                                    X_Position_Start = point.X,
+                                    Y_Position_Start = point.Y,
+                                    X_Velocity_Start=100,
+                                    Y_Velocity_Start=100,
                                     Z_Velocity_Start=100,
                                     Z_Velocity_Stop=100,
-                                    U_Velocity=100,
+                                    U_Velocity_Start=100,
                                     R_Velocity=100,
                                 });
                             }
@@ -898,13 +912,13 @@ namespace TeamAAS_VP.ViewModels.Product
                         //导入点位
                         //起始点
                         var startPoint = cadPoints[0];
-                        SelectProduct.ScrewCameraLocalPos1.X_Position = startPoint.X;
-                        SelectProduct.ScrewCameraLocalPos1.Y_Position = startPoint.Y;
+                        SelectProduct.ScrewCameraLocalPos1.X_Position_Start = startPoint.X;
+                        SelectProduct.ScrewCameraLocalPos1.Y_Position_Start = startPoint.Y;
 
                         //结束点
                         var endPoint = cadPoints[1];
-                        SelectProduct.ScrewCameraLocalPos2.X_Position = endPoint.X;
-                        SelectProduct.ScrewCameraLocalPos2.Y_Position = endPoint.Y;
+                        SelectProduct.ScrewCameraLocalPos2.X_Position_Start = endPoint.X;
+                        SelectProduct.ScrewCameraLocalPos2.Y_Position_Start = endPoint.Y;
 
                         _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = $"{Lang.完成}!", Duration = 0.4 });
                     }
@@ -950,7 +964,7 @@ namespace TeamAAS_VP.ViewModels.Product
         void ExecuteApplyLockPointSpeedCommand()
         {
             //检查速度是否大于0,如果小于等于0,则提示用户速度是否正确,是否继续写入
-            if (LockXSpeed <= 0 || LockYSpeed <= 0 || LockZSpeed <= 0 || LockZDescendSpeed <= 0)
+            if (LockXSpeed <= 0 || LockYSpeed <= 0 || LockZSpeed <= 0 || LockZSpeed <= 0)
             {
                 var result = MessageBox.Show("速度小于等于0,是否继续写入?", "确认", MessageBoxButton.YesNo, MessageBoxImage.Question);
                 if (result != MessageBoxResult.Yes)
@@ -962,10 +976,10 @@ namespace TeamAAS_VP.ViewModels.Product
             //遍历所有点位,设置速度
             foreach (var point in Points)
             {
-                point.X_Velocity = LockXSpeed;
-                point.Y_Velocity = LockYSpeed;
+                point.X_Velocity_Start = LockXSpeed;
+                point.Y_Velocity_Start = LockYSpeed;
                 point.Z_Velocity_Start = LockZSpeed;
-                point.Z_Velocity_Stop = LockZDescendSpeed;
+                point.U_Velocity_Start = LockZSpeed;
             }
         }
 
@@ -1044,7 +1058,7 @@ namespace TeamAAS_VP.ViewModels.Product
                 //获取螺丝锁付点位
                 var screwLockPoints = SelectProduct.ScrewPoints;
                 //检查screwLockPoints中是否有和screwCameraLocalPos1的XY坐标相同的点位
-                var matchingPoint = screwLockPoints.FirstOrDefault(p => p.X_Position == screwCameraLocalPos1.X_Position && p.Y_Position == screwCameraLocalPos1.Y_Position);
+                var matchingPoint = screwLockPoints.FirstOrDefault(p => p.X_Position_Start == screwCameraLocalPos1.X_Position_Start && p.Y_Position_Start == screwCameraLocalPos1.Y_Position_Start);
                 if (matchingPoint != null)
                 {
                     //检查两个点位的Z是否一致?如果不一致,则提示用户锁付点位中有和锁付拍照引导起始点Local坐标相同的点位,且Z坐标不一致,是否将锁付拍照引导起始点Local坐标的Z轴坐标更新为锁付点位的Z坐标
@@ -1058,7 +1072,7 @@ namespace TeamAAS_VP.ViewModels.Product
                     }
                 }
                 //检查screwLockPoints中是否有和screwCameraLocalPos2的XY坐标相同的点位
-                matchingPoint = screwLockPoints.FirstOrDefault(p => p.X_Position == screwCameraLocalPos2.X_Position && p.Y_Position == screwCameraLocalPos2.Y_Position);
+                matchingPoint = screwLockPoints.FirstOrDefault(p => p.X_Position_Start == screwCameraLocalPos2.X_Position_Start && p.Y_Position_Start == screwCameraLocalPos2.Y_Position_Start);
                 if (matchingPoint != null)
                 {
                     //检查两个点位的Z是否一致?如果不一致,则提示用户锁付点位中有和锁付拍照引导结束点Local坐标相同的点位,且Z坐标不一致,是否将锁付拍照引导结束点Local坐标的Z轴坐标更新为锁付点位的Z坐标
@@ -1086,8 +1100,8 @@ namespace TeamAAS_VP.ViewModels.Product
                         var param = rst.Parameters.GetValue<ObservableCollection<PointEx>>("CorrectPoints");
                         for (int i = 0; i < SelectProduct.ScrewPoints.Count; i++)
                         {
-                            SelectProduct.ScrewPoints[i].X_Position = param[i].PostX;
-                            SelectProduct.ScrewPoints[i].Y_Position = param[i].PostY;
+                            SelectProduct.ScrewPoints[i].X_Position_Start = param[i].PostX;
+                            SelectProduct.ScrewPoints[i].Y_Position_Start = param[i].PostY;
                         }
 
                         _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = "完成!", Duration = 1 });
@@ -1155,8 +1169,8 @@ namespace TeamAAS_VP.ViewModels.Product
                 //对锁付点的批量设置进行初始化
                 LockPointStartZ = SelectProduct.ScrewPoints.FirstOrDefault()?.Z_Position_Start ?? 0;
                 LockZDepth= SelectProduct.ScrewPoints.FirstOrDefault() != null ? (SelectProduct.ScrewPoints.FirstOrDefault().Z_Position_Start - SelectProduct.ScrewPoints.FirstOrDefault().Z_Position_Stop) : 0;
-                LockXSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.X_Velocity ?? 100;
-                LockYSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.Y_Velocity ?? 100;
+                LockXSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.X_Velocity_Start ?? 100;
+                LockYSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.Y_Velocity_Start ?? 100;
                 LockZSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.Z_Velocity_Start ?? 100;
                 LockZDescendSpeed= SelectProduct.ScrewPoints.FirstOrDefault()?.Z_Velocity_Stop ?? 100;
                 LockFeederNumber= SelectProduct.ScrewPoints.FirstOrDefault()?.Feeder ?? 1;
@@ -1263,10 +1277,10 @@ namespace TeamAAS_VP.ViewModels.Product
                 // 1. 控制机器人移动至拍照点位
                 var rpoint = new RPoint()
                 {
-                    X = SelectedCameraForPickPoint.X_Position,
-                    Y = SelectedCameraForPickPoint.Y_Position,
+                    X = SelectedCameraForPickPoint.X_Position_Start,
+                    Y = SelectedCameraForPickPoint.Y_Position_Start,
                     Z = SelectedCameraForPickPoint.Z_Position_Start,
-                    U = SelectedCameraForPickPoint.U_Position,
+                    U = SelectedCameraForPickPoint.U_Position_Start,
                     V = SelectedCameraForPickPoint.R_Position,
                 };
                 await Robot.CalibMotionAsync(rpoint, 0);
@@ -1286,8 +1300,8 @@ namespace TeamAAS_VP.ViewModels.Product
                 }
 
                 // 3. 根据识别结果更新取料点位坐标
-                SelectedPickPoint.X_Position = (float)recognitionResult.X;
-                SelectedPickPoint.Y_Position = (float)recognitionResult.Y;
+                SelectedPickPoint.X_Position_Start = (float)recognitionResult.X;
+                SelectedPickPoint.Y_Position_Start = (float)recognitionResult.Y;
 
                 if (DialogHost.IsDialogOpen("RootDialog"))
                 {

+ 357 - 115
TeamAAS-VM/Views/Product/PlcPointParams.xaml

@@ -221,6 +221,18 @@
                                 </ListBoxItem.Style>
                                 <TextBlock Text="复检点位" />
                             </ListBoxItem>
+                            <ListBoxItem>
+                                <ListBoxItem.Style>
+                                    <Style TargetType="ListBoxItem"
+                                        BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
+                                        <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
+                                            Value="Circle" />
+                                        <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
+                                            Value="CircleOutline" />
+                                    </Style>
+                                </ListBoxItem.Style>
+                                <TextBlock Text="AOI点位" />
+                            </ListBoxItem>
                         </ListBox>
                         <!--点位列表操作按钮面板-->
                         <StackPanel DockPanel.Dock="Bottom"
@@ -568,7 +580,7 @@
                                             <Style.Triggers>
                                                 <!-- 当 SelectedIndex == 4 时显示此面板 -->
                                                 <DataTrigger Binding="{Binding SelectedIndex}"
-                                                             Value="4">
+                                                             Value="6">
                                                     <Setter Property="Visibility"
                                                             Value="Visible" />
                                                 </DataTrigger>
@@ -581,7 +593,7 @@
 
                                             <StackPanel Orientation="Horizontal"
                                                         HorizontalAlignment="Left">
-                                                <TextBlock Text="批量设置所有锁付点的起始Z轴高度:"
+                                                <TextBlock Text="批量设置所有AOI点的起始Z轴高度:"
                                                            VerticalAlignment="Center" />
                                                 <TextBlock Text="起始Z轴高度:"
                                                            Margin="5,0,0,0"
@@ -607,7 +619,7 @@
                                                         materialDesign:ButtonAssist.CornerRadius="5"
                                                         Command="{Binding ApplyLockPointStartZCommand}" />
                                             </StackPanel>
-                                            <StackPanel Orientation="Horizontal"
+                                            <!--<StackPanel Orientation="Horizontal"
                                                         HorizontalAlignment="Left">
                                                 <TextBlock Text="批量设置所有锁付点的锁付深度:"
                                                            VerticalAlignment="Center" />
@@ -627,17 +639,19 @@
                                                 <TextBlock Margin="0"
                                                            VerticalAlignment="Center"
                                                            Text="mm" />
-                                                <!--应用按钮-->
+                                                -->
+                                            <!--应用按钮-->
+                                            <!--
                                                 <Button Content="应用"
                                                         Margin="10,0,0,0"
                                                         MinWidth="60"
                                                         HorizontalAlignment="Left"
                                                         materialDesign:ButtonAssist.CornerRadius="5"
                                                         Command="{Binding ApplyLockPointDepthCommand}" />
-                                            </StackPanel>
+                                            </StackPanel>-->
                                             <StackPanel Orientation="Horizontal"
                                                         HorizontalAlignment="Left">
-                                                <TextBlock Text="批量设置所有锁付点的各轴速度:"
+                                                <TextBlock Text="批量设置AOI的X Y Z U的各轴速度:"
                                                            VerticalAlignment="Center" />
                                                 <TextBlock Text="X轴速度:"
                                                            Margin="5,0,0,0"
@@ -687,10 +701,10 @@
                                                 <TextBlock Margin="0"
                                                            VerticalAlignment="Center"
                                                            Text="mm/s" />
-                                                <TextBlock Text="Z轴锁付下降速度:"
+                                                <TextBlock Text="U轴速度:"
                                                            Margin="5,0,0,0"
                                                            VerticalAlignment="Center" />
-                                                <mah:NumericUpDown Value="{Binding LockZDescendSpeed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding LockUSpeed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="0"
                                                                    Maximum="20000"
                                                                    Interval="1"
@@ -711,7 +725,7 @@
                                                         materialDesign:ButtonAssist.CornerRadius="5"
                                                         Command="{Binding ApplyLockPointSpeedCommand}" />
                                             </StackPanel>
-                                            <!--批量设置所有锁付点的供料器编号和电批程序编号-->
+                                            <!--批量设置所有锁付点的供料器编号和电批程序编号--><!--
                                             <StackPanel Orientation="Horizontal"
                                                         HorizontalAlignment="Left">
                                                 <TextBlock Text="批量设置所有锁付点的供料器编号和电批程序编号:"
@@ -742,14 +756,14 @@
                                                                    VerticalAlignment="Center"
                                                                    Margin="0"
                                                                    Padding="2" />
-                                                <!--应用按钮-->
+                                                --><!--应用按钮--><!--
                                                 <Button Content="应用"
                                                         Margin="10,0,0,0"
                                                         MinWidth="60"
                                                         HorizontalAlignment="Left"
                                                         materialDesign:ButtonAssist.CornerRadius="5"
                                                         Command="{Binding ApplyLockPointFeederAndScrewProgramCommand}" />
-                                            </StackPanel>
+                                            </StackPanel>-->
 
                                         </StackPanel>
                                     </ScrollViewer>
@@ -821,20 +835,20 @@
                                                         MinWidth="100"
                                                         Width="Auto"
                                                         Binding="{Binding Label, Mode=TwoWay}" />
-                                    <!--X 坐标-->
-                                    <DataGridTemplateColumn Header="X位置"
+                                    <!--X 起点坐标-->
+                                    <DataGridTemplateColumn Header="X起点位置"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding X_Position, StringFormat={}{0:F3}}"
+                                                <TextBlock Text="{Binding X_Position_Start, StringFormat={}{0:F3}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding X_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding X_Position_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="-9999.000"
                                                                    Maximum="9999.000"
                                                                    Interval="0.1"
@@ -846,20 +860,20 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--X 速度-->
-                                    <DataGridTemplateColumn Header="X速度"
+                                    <!--X 起点速度-->
+                                    <DataGridTemplateColumn Header="X起点速度"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding X_Velocity, StringFormat={}{0:F0}}"
+                                                <TextBlock Text="{Binding X_Velocity_Start, StringFormat={}{0:F0}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding X_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding X_Velocity_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="0"
                                                                    Maximum="9999.000"
                                                                    Interval="1"
@@ -871,20 +885,70 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--Y 坐标-->
-                                    <DataGridTemplateColumn Header="Y位置"
+                                    <!--X 终点坐标-->
+                                    <DataGridTemplateColumn Header="X终点位置"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding X_Position_Stop, StringFormat={}{0:F3}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding X_Position_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="-9999.000"
+                                                    Maximum="9999.000"
+                                                    Interval="0.1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--X 终点速度-->
+                                    <DataGridTemplateColumn Header="X终点速度"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding X_Velocity_Stop, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding X_Velocity_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--Y 起点坐标-->
+                                    <DataGridTemplateColumn Header="Y起点位置"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding Y_Position, StringFormat={}{0:F3}}"
+                                                <TextBlock Text="{Binding Y_Position_Start, StringFormat={}{0:F3}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding Y_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding Y_Position_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="-9999.000"
                                                                    Maximum="9999.000"
                                                                    Interval="0.1"
@@ -896,20 +960,20 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--Y 速度-->
-                                    <DataGridTemplateColumn Header="Y速度"
+                                    <!--Y 起点速度-->
+                                    <DataGridTemplateColumn Header="Y起点速度"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding Y_Velocity, StringFormat={}{0:F0}}"
+                                                <TextBlock Text="{Binding Y_Velocity_Start, StringFormat={}{0:F0}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding Y_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding Y_Velocity_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="0"
                                                                    Maximum="9999.000"
                                                                    Interval="1"
@@ -921,6 +985,56 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
+                                    <!--Y 终点坐标-->
+                                    <DataGridTemplateColumn Header="Y终点位置"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Y_Position_Stop, StringFormat={}{0:F3}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Y_Position_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="-9999.000"
+                                                    Maximum="9999.000"
+                                                    Interval="0.1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--Y 终点速度-->
+                                    <DataGridTemplateColumn Header="Y终点速度"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Y_Velocity_Stop, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Y_Velocity_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
                                     <!--Z 起点坐标-->
                                     <DataGridTemplateColumn Header="Z起点位置"
                                                             MinWidth="60"
@@ -1021,20 +1135,20 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--U 坐标-->
-                                    <DataGridTemplateColumn Header="U位置"
+                                    <!--U 起点坐标-->
+                                    <DataGridTemplateColumn Header="U起点位置"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding U_Position, StringFormat={}{0:F3}}"
+                                                <TextBlock Text="{Binding U_Position_Start, StringFormat={}{0:F3}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding U_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding U_Position_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="-9999.000"
                                                                    Maximum="9999.000"
                                                                    Interval="0.1"
@@ -1046,20 +1160,20 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--U 速度-->
-                                    <DataGridTemplateColumn Header="U速度"
+                                    <!--U 起点速度-->
+                                    <DataGridTemplateColumn Header="U起点速度"
                                                             MinWidth="60"
                                                             Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding U_Velocity, StringFormat={}{0:F0}}"
+                                                <TextBlock Text="{Binding U_Velocity_Start, StringFormat={}{0:F0}}"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding U_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                <mah:NumericUpDown Value="{Binding U_Velocity_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                    Minimum="0"
                                                                    Maximum="9999.000"
                                                                    Interval="1"
@@ -1071,131 +1185,259 @@
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--R 坐标-->
-                                    <DataGridTemplateColumn Header="R位置"
-                                                            MinWidth="60"
-                                                            Width="Auto">
+                                    <!--U 终点坐标-->
+                                    <DataGridTemplateColumn Header="U终点位置"
+                                        MinWidth="60"
+                                        Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding R_Position, StringFormat={}{0:F3}}"
-                                                           HorizontalAlignment="Center"
-                                                           VerticalAlignment="Center" />
+                                                <TextBlock Text="{Binding U_Position_Stop, StringFormat={}{0:F3}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding R_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                                                   Minimum="-9999.000"
-                                                                   Maximum="9999.000"
-                                                                   Interval="0.1"
-                                                                   StringFormat="F3"
-                                                                   HorizontalAlignment="Stretch"
-                                                                   VerticalAlignment="Center"
-                                                                   Margin="0"
-                                                                   Padding="2" />
+                                                <mah:NumericUpDown Value="{Binding U_Position_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="-9999.000"
+                                                    Maximum="9999.000"
+                                                    Interval="0.1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--R 速度-->
-                                    <DataGridTemplateColumn Header="R速度"
-                                                            MinWidth="60"
-                                                            Width="Auto">
+                                    <!--U 终点速度-->
+                                    <DataGridTemplateColumn Header="U终点速度"
+                                        MinWidth="60"
+                                        Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding R_Velocity, StringFormat={}{0:F0}}"
-                                                           HorizontalAlignment="Center"
-                                                           VerticalAlignment="Center" />
+                                                <TextBlock Text="{Binding U_Velocity_Stop, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding R_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                                                   Minimum="0"
-                                                                   Maximum="9999.000"
-                                                                   Interval="1"
-                                                                   StringFormat="F3"
-                                                                   HorizontalAlignment="Stretch"
-                                                                   VerticalAlignment="Center"
-                                                                   Margin="0"
-                                                                   Padding="2" />
+                                                <mah:NumericUpDown Value="{Binding U_Velocity_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--扭矩-->
-                                    <DataGridTemplateColumn Header="扭矩"
-                                                            MinWidth="60"
-                                                            Width="Auto">
+                                    <!--启用本起始位节点-->
+                                    <DataGridTemplateColumn Header="启用本起始位节点"
+                                        MinWidth="60"
+                                        Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding Torque, StringFormat={}{0:F3}}"
-                                                           HorizontalAlignment="Center"
-                                                           VerticalAlignment="Center" />
+                                                <TextBlock Text="{Binding Enable_Start_Node, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding Torque, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                                                   Minimum="-9999.000"
-                                                                   Maximum="9999.000"
-                                                                   Interval="0.1"
-                                                                   StringFormat="F3"
-                                                                   HorizontalAlignment="Stretch"
-                                                                   VerticalAlignment="Center"
-                                                                   Margin="0"
-                                                                   Padding="2" />
+                                                <mah:NumericUpDown Value="{Binding Enable_Start_Node, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--供料器-->
-                                    <DataGridTemplateColumn Header="供料器"
-                                                            MinWidth="60"
-                                                            Width="Auto">
+                                    <!--启用脉冲-->
+                                    <DataGridTemplateColumn Header="启用脉冲"
+                                        MinWidth="60"
+                                        Width="Auto">
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding Feeder, StringFormat={}{0:F0}}"
-                                                           HorizontalAlignment="Center"
-                                                           VerticalAlignment="Center" />
+                                                <TextBlock Text="{Binding Enable_Pulse, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding Feeder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                                                   Minimum="0"
-                                                                   Maximum="9999.000"
-                                                                   Interval="1"
-                                                                   StringFormat="F0"
-                                                                   HorizontalAlignment="Stretch"
-                                                                   VerticalAlignment="Center"
-                                                                   Margin="0"
-                                                                   Padding="2" />
+                                                <mah:NumericUpDown Value="{Binding Enable_Pulse, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />  
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
-                                    <!--电批程序号-->
-                                    <DataGridTemplateColumn Header="电批程序号"
-                                                            MinWidth="60"
-                                                            Width="Auto">
+                                    <!--启用3D-->
+                                    <DataGridTemplateColumn Header="启用3D"
+                                        MinWidth="60"
+                                        Width="Auto">       
                                         <DataGridTemplateColumn.CellTemplate>
                                             <DataTemplate>
-                                                <TextBlock Text="{Binding ScrewProNum, StringFormat={}{0:F0}}"
-                                                           HorizontalAlignment="Center"
-                                                           VerticalAlignment="Center" />
+                                                <TextBlock Text="{Binding Enable_3D, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />       
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellTemplate>
                                         <DataGridTemplateColumn.CellEditingTemplate>
                                             <DataTemplate>
-                                                <mah:NumericUpDown Value="{Binding ScrewProNum, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                                                   Minimum="0"
-                                                                   Maximum="9999.000"
-                                                                   Interval="1"
-                                                                   StringFormat="F0"
-                                                                   HorizontalAlignment="Stretch"
-                                                                   VerticalAlignment="Center"
-                                                                   Margin="0"
-                                                                   Padding="2" />
+                                                <mah:NumericUpDown Value="{Binding Enable_3D, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />  
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--启用等待完成-->
+                                    <DataGridTemplateColumn Header="启用等待完成"
+                                        MinWidth="60"
+                                        Width="Auto">           
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Enable_Wait_Finish, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />       
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Enable_Wait_Finish, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />      
                                             </DataTemplate>
                                         </DataGridTemplateColumn.CellEditingTemplate>
                                     </DataGridTemplateColumn>
+                                    <!--启用Light1-->
+                                    <DataGridTemplateColumn Header="启用Light1"
+                                        MinWidth="60"
+                                        Width="Auto">   
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Enable_Light1, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />       
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Enable_Light1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />  
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--启用Light2-->
+                                    <DataGridTemplateColumn Header="启用Light2"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Enable_Light2, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Enable_Light2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--启用Light3-->
+                                    <DataGridTemplateColumn Header="启用Light3"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Enable_Light3, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Enable_Light3, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+                                    <!--启用Light4-->
+                                    <DataGridTemplateColumn Header="启用Light4"
+                                        MinWidth="60"
+                                        Width="Auto">
+                                        <DataGridTemplateColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <TextBlock Text="{Binding Enable_Light4, StringFormat={}{0:F0}}"
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellTemplate>
+                                        <DataGridTemplateColumn.CellEditingTemplate>
+                                            <DataTemplate>
+                                                <mah:NumericUpDown Value="{Binding Enable_Light4, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                    Minimum="0"
+                                                    Maximum="9999.000"
+                                                    Interval="1"
+                                                    StringFormat="F3"
+                                                    HorizontalAlignment="Stretch"
+                                                    VerticalAlignment="Center"
+                                                    Margin="0"
+                                                    Padding="2" />
+                                            </DataTemplate>
+                                        </DataGridTemplateColumn.CellEditingTemplate>
+                                    </DataGridTemplateColumn>
+
+
+
 
                                     <DataGridTextColumn Header="{lex:Loc 描述}"
                                                         MinWidth="100"