|
|
@@ -1807,9 +1807,17 @@ namespace TeamAAS_VP.Core
|
|
|
//拍1打1
|
|
|
if (systemConfig.WorkMode == 1)
|
|
|
{
|
|
|
- var point = currentProduct.ScrewPoints[positionIndex].Clone();
|
|
|
+ var point=currentProduct.ScrewPoints.FirstOrDefault(p=>p.Number== positionIndex);
|
|
|
+ if (point==null)
|
|
|
+ {
|
|
|
+ SendTaskMessage($"点:{positionIndex}不存在", MessageLevel.Info);
|
|
|
+ await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ point = point.Clone();
|
|
|
point.X_Position = UpCameraPutResults[1].X + DowmCameraResults[1].X;
|
|
|
point.Y_Position = UpCameraPutResults[1].Y + DowmCameraResults[1].Y;
|
|
|
+ SendTaskMessage($"点:{positionIndex},{point.X_Position:F3},{point.Y_Position:F4}", MessageLevel.Info);
|
|
|
await point.WriteToPlcAddress(addressConfig.Out_Screw, plc);
|
|
|
}
|
|
|
//拍1打所有
|