Commit e7bf5bdb LN

错误日志类型修改

1 个父辈 0c465ecf
...@@ -23,3 +23,7 @@ IO模块更新。 ...@@ -23,3 +23,7 @@ IO模块更新。
复位时Z轴报94.0 复位时Z轴报94.0
尺寸信息传到出口 尺寸信息传到出口
复位是Xray入口若有料,入口皮带线不转。
出料料串最后一个料盘,没有贴标就把料串送出了。
...@@ -371,7 +371,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -371,7 +371,7 @@ namespace OnlineStore.DeviceLibrary
isOk = false; isOk = false;
WarnMsg = Name + msg; WarnMsg = Name + msg;
Alarm(AlarmType.AxisMoveError); Alarm(AlarmType.AxisMoveError);
LogUtil.error(WarnMsg, DeviceID * 1000 + 14); LogUtil.error(WarnMsg, moveInfo.ErrorLogType);
break; break;
} }
} }
...@@ -390,7 +390,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -390,7 +390,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO io = Robot.Config.getWaitIO(wait.IoType); ConfigIO io = Robot.Config.getWaitIO(wait.IoType);
WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒"; WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒";
LogUtil.error(MoveInfo.Name + WarnMsg, DeviceID * 1000 + 13); LogUtil.error( WarnMsg, moveInfo.ErrorLogType);
if (alarmType.Equals(AlarmType.None)) if (alarmType.Equals(AlarmType.None))
{ {
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
...@@ -492,7 +492,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -492,7 +492,7 @@ namespace OnlineStore.DeviceLibrary
{ {
second = 10; second = 10;
} }
LogUtil.error(WarnMsg, DeviceID * 1000 + 15, second); LogUtil.error(WarnMsg, moveInfo.ErrorLogType, second);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -329,7 +329,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -329,7 +329,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = Name + msg; WarnMsg = Name + msg;
Alarm(AlarmType.AxisMoveError); Alarm(AlarmType.AxisMoveError);
LogUtil.error(WarnMsg, DeviceID * 1000 + 14); LogUtil.error(WarnMsg, moveInfo.ErrorLogType);
break; break;
} }
} }
...@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO io = baseConfig.getWaitIO(wait.IoType); ConfigIO io = baseConfig.getWaitIO(wait.IoType);
WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒"; WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒";
LogUtil.error( WarnMsg, DeviceID * 1000 + 13); LogUtil.error( WarnMsg, moveInfo.ErrorLogType);
if (NoAlarm()) if (NoAlarm())
{ {
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
...@@ -424,7 +424,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -424,7 +424,7 @@ namespace OnlineStore.DeviceLibrary
{ {
second = 10; second = 10;
} }
LogUtil.error(WarnMsg, DeviceID * 1000 + 15, second); LogUtil.error(WarnMsg, moveInfo.ErrorLogType, second);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
if (!LeftBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.None)) if (!LeftBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.None))
{ {
WarnMsg =Name+ "等待" + LeftBatchMove.Name + "复位完成超时[" + MoveInfo.TimeOutSeconds + "]秒"; WarnMsg =Name+ "等待" + LeftBatchMove.Name + "复位完成超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error( WarnMsg); LogUtil.error( WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
else else
......
...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg =Name+ "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒"; WarnMsg =Name+ "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error(Name + WarnMsg); LogUtil.error( WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsTimeOut(120)) if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒"; WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error(Name + WarnMsg); LogUtil.error( WarnMsg,MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
return; return;
......
...@@ -55,6 +55,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,6 +55,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(MoveInfo.Name + "StartWorking 失败 , MoveInfo 忙碌中=" + MoveInfo.MoveType); LogUtil.error(MoveInfo.Name + "StartWorking 失败 , MoveInfo 忙碌中=" + MoveInfo.MoveType);
return false; return false;
} }
//如果料架在准备状态或送出过程中,不能开始取料
if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW))
{ {
MoveInfo.NewMove(RobotMoveType.Working, StepEnum.OT01_WaitCheck); MoveInfo.NewMove(RobotMoveType.Working, StepEnum.OT01_WaitCheck);
...@@ -144,8 +147,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -144,8 +147,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name + "等待贴标模块空闲 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "等待贴标模块空闲 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -207,8 +210,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,8 +210,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name + "等待出料料串准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "等待出料料串准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -224,8 +227,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -224,8 +227,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = MoveInfo.Name + "等待出料料串可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "等待出料料串可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -451,8 +454,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -451,8 +454,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsTimeOut(120)) else if (SecMoveInfo.IsTimeOut(120))
{ {
WarnMsg = SecMoveInfo.Name + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = SecMoveInfo.Name + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg,SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -257,8 +257,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,8 +257,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsTimeOut(120)) else if (SecMoveInfo.IsTimeOut(120))
{ {
WarnMsg = SecMoveInfo.Name + "等待 贴标结束 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = SecMoveInfo.Name + "等待 贴标结束 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -266,7 +266,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -266,7 +266,7 @@ namespace OnlineStore.DeviceLibrary
else if (span.TotalSeconds > 120) else if (span.TotalSeconds > 120)
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "][" + msg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "][" + msg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, 903); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -422,7 +422,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -422,7 +422,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO io = baseConfig.getWaitIO(wait.IoType); ConfigIO io = baseConfig.getWaitIO(wait.IoType);
WarnMsg = Name + "[" + checkWaitInfo.MoveStep + "]等待" + NotOkMsg + " 超时"; WarnMsg = Name + "[" + checkWaitInfo.MoveStep + "]等待" + NotOkMsg + " 超时";
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
LogUtil.error(MoveInfo.Name + WarnMsg, 901); LogUtil.error( WarnMsg, checkWaitInfo.ErrorLogType);
} }
//超过报警时长 //超过报警时长
else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < RobotManager.Config.IOSingle_TimerOut * 2) else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < RobotManager.Config.IOSingle_TimerOut * 2)
...@@ -483,7 +483,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -483,7 +483,7 @@ namespace OnlineStore.DeviceLibrary
else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds) else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds)
{ {
WarnMsg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, 900); LogUtil.error(WarnMsg, checkWaitInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
{ {
msg = " " + MoveInfo.MoveStep + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount msg = " " + MoveInfo.MoveStep + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount
+ "],误差过大,需要报警"; + "],误差过大,需要报警";
LogUtil.error(msg, 600); LogUtil.error(msg, MoveInfo.ErrorLogType);
} }
} }
return false; return false;
......
...@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary
//取料Z,贴标Z回原点,批量轴开始回原点 //取料Z,贴标Z回原点,批量轴开始回原点
// //
#region 取料模块复位 #region 取料模块复位3000开始
/// <summary> /// <summary>
/// 取料模块复位: 取料Z轴回原点 /// 取料模块复位: 取料Z轴回原点
...@@ -446,7 +446,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -446,7 +446,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 贴标模块复位 #region 贴标模块复位3100开始
/// <summary> /// <summary>
/// 贴标模块复位: 贴标Z轴回原点 /// 贴标模块复位: 贴标Z轴回原点
/// </summary> /// </summary>
...@@ -481,7 +481,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -481,7 +481,7 @@ namespace OnlineStore.DeviceLibrary
OLR08_LabelRToP1, OLR08_LabelRToP1,
#endregion #endregion
#region 料串批量轴模块复位 #region 料串批量轴模块复位 3200开始
/// <summary> /// <summary>
/// 出料模块复位: 阻挡气缸上升 /// 出料模块复位: 阻挡气缸上升
......
...@@ -11,13 +11,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,13 +11,15 @@ namespace OnlineStore.DeviceLibrary
{ {
public class RobotMoveInfo public class RobotMoveInfo
{ {
private static int MaxMoveId=1;
/// <summary> /// <summary>
/// 超时时间 /// 超时时间
/// </summary> /// </summary>
public int TimeOutSeconds = 60; public int TimeOutSeconds = 60;
public string Name = ""; public string Name = "";
public bool ShelfNoTray = false; public bool ShelfNoTray = false;
public RobotMoveInfo( string name) public int MoveID = 0;
public RobotMoveInfo(string name)
{ {
this.Name = name; this.Name = name;
moveType = RobotMoveType.None; moveType = RobotMoveType.None;
...@@ -25,8 +27,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,8 +27,12 @@ namespace OnlineStore.DeviceLibrary
this.moveStep = StepEnum.Wait; this.moveStep = StepEnum.Wait;
IsInWait = false; IsInWait = false;
MoveNum = 0; MoveNum = 0;
MoveID = MaxMoveId++;
}
public int ErrorLogType
{
get { return MaxMoveId * 100000 + (int)MoveStep; }
} }
public int MoveNum { get; set; } public int MoveNum { get; set; }
public DateTime LastSetpTime { get; set; } public DateTime LastSetpTime { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!