Commit 34d9498e 张东亮

添加轴误差打印

1 个父辈 78edc3d2
...@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//msg = " " + MoveInfo.SLog + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount //msg = " " + MoveInfo.SLog + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount
// + "],误差过大且轴报警"; // + "],误差过大且轴报警";
msg = $" {MoveInfo.SLog}{MoveInfo.Name}{axis.DisplayStr},目标位置[{targetPosition}]当前位置[{outCount}]规划位置[{targetCount}],误差过大且轴报警"; msg = $" {MoveInfo.SLog}{MoveInfo.Name}{axis.DisplayStr},目标位置[{targetPosition}]当前位置[{outCount}]误差[{errorCount}]规划位置[{targetCount}],误差过大且轴报警";
LogUtil.error(msg, 600); LogUtil.error(msg, 600);
} }
else if (MoveInfo.CanWhileCount > 0 && alarm.Equals(0)) else if (MoveInfo.CanWhileCount > 0 && alarm.Equals(0))
...@@ -187,14 +187,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -187,14 +187,14 @@ namespace OnlineStore.DeviceLibrary
AxisManager.instance.SuddenStop(axis.DeviceName, axis.GetAxisValue()); AxisManager.instance.SuddenStop(axis.DeviceName, axis.GetAxisValue());
Thread.Sleep(100); Thread.Sleep(100);
} }
LogUtil.error($"{MoveInfo.Name}{axis.DisplayStr}目标位置[{targetPosition}]当前位置[{outCount}]规划位置[{targetCount}],误差过大, {clearMsg}重新开始运动,剩余[{MoveInfo.CanWhileCount}]次"); LogUtil.error($"{MoveInfo.Name}{axis.DisplayStr}目标位置[{targetPosition}]当前位置[{outCount}]误差[{errorCount}]规划位置[{targetCount}],误差过大, {clearMsg}重新开始运动,剩余[{MoveInfo.CanWhileCount}]次");
AxisManager.instance.AbsMove(axis.DeviceName, axis.GetAxisValue(), targetPosition, targetSpeed, axis.AddSpeed, axis.DelSpeed); AxisManager.instance.AbsMove(axis.DeviceName, axis.GetAxisValue(), targetPosition, targetSpeed, axis.AddSpeed, axis.DelSpeed);
MoveInfo.CanWhileCount--; MoveInfo.CanWhileCount--;
Thread.Sleep(200); Thread.Sleep(200);
} }
else else
{ {
msg = $" {MoveInfo.SLog}{MoveInfo.Name}{axis.DisplayStr},目标位置[{targetPosition}]当前位置[{outCount}]规划位置[{targetCount}],误差过大,需要报警"; msg = $" {MoveInfo.SLog}{MoveInfo.Name}{axis.DisplayStr},目标位置[{targetPosition}]当前位置[{outCount}]误差[{errorCount}]规划位置[{targetCount}],误差过大,需要报警";
LogUtil.error(msg, 600); LogUtil.error(msg, 600);
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!