Commit 003634a7 LN

1

1 个父辈 5bf70668
...@@ -186,8 +186,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -186,8 +186,7 @@ namespace OnlineStore.DeviceLibrary
string canResult = LineManager.Line.CanStart(); string canResult = LineManager.Line.CanStart();
if (String.IsNullOrEmpty(canResult).Equals(false)) if (String.IsNullOrEmpty(canResult).Equals(false))
{ {
LogUtil.error(Name + "" + canResult); SetWarnMsg(canResult);
WarnMsg = canResult;
return false; return false;
} }
return true; return true;
...@@ -350,8 +349,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -350,8 +349,10 @@ namespace OnlineStore.DeviceLibrary
if (!msg.Equals("")) if (!msg.Equals(""))
{ {
isOk = false; isOk = false;
WarnMsg = msg; WarnMsg = Name + msg;
Alarm(LineAlarmType.AxisMoveError); Alarm(LineAlarmType.AxisMoveError);
LogUtil.error(WarnMsg, DeviceID + 18);
break; break;
} }
} }
......
...@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
msg = " storeMoveStep=" + MoveInfo.SLog + axis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount msg = " " + MoveInfo.SLog + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount
+ "],误差过大,需要报警"; + "],误差过大,需要报警";
LogUtil.error(msg,1034); LogUtil.error(msg,1034);
} }
...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
msg = " storeMoveStep=" + MoveInfo.SLog + axis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警"; msg = " " + MoveInfo.SLog + axis.DisplayStr + ",收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
LogUtil.error(msg); LogUtil.error(msg);
} }
} }
......
...@@ -22,9 +22,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,9 +22,8 @@ namespace OnlineStore.DeviceLibrary
ConfigIO configIo = GetDO(ioType, subType); ConfigIO configIo = GetDO(ioType, subType);
if (configIo!=null) if (configIo!=null)
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
Thread.Sleep(10);
Thread.Sleep(30);
} }
else else
{ {
......
...@@ -273,12 +273,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,12 +273,30 @@ namespace OnlineStore.DeviceLibrary
{ {
if (String.IsNullOrEmpty(WarnMsg).Equals(false)) if (String.IsNullOrEmpty(WarnMsg).Equals(false))
{ {
LogUtil.error(msg); if (WarnMsg.Equals(msg))
} {
if (WarnMsg.Equals(msg)) if (msg.StartsWith(Name))
{ {
LogUtil.error(msg,105); LogUtil.error(msg, 105);
}
else
{
LogUtil.error(Name + msg, 105);
}
}
else
{
if (msg.StartsWith(Name))
{
LogUtil.error(msg);
}
else
{
LogUtil.error(Name + msg);
}
}
} }
WarnMsg = msg; WarnMsg = msg;
} }
public static string GetRunStr(LineStatus ls, LineRunStatus runs) public static string GetRunStr(LineStatus ls, LineRunStatus runs)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!