Commit 003634a7 LN

1

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