Commit 9211d903 LN

bug修改

1 个父辈 03579498
......@@ -65,6 +65,9 @@ namespace OnlineStore.Common
}
public ErrorLog(string deviceName, string errType, string errMsg, DateTime startTime, DateTime endTime, string operType = "", string posid = "", string barcode = "")
{
if (operType == null) { operType = ""; }
if (posid == null) { posid = ""; }
if (barcode == null) { barcode = ""; }
this.LogType = "Error";
this.DeviceName = deviceName.Trim();
this.ErrorType = errType.Trim();
......@@ -109,6 +112,8 @@ namespace OnlineStore.Common
}
public MoveLog(string deviceName, string moveType, string moveMsg, DateTime startTime, DateTime endTime, string posid = "", string barcode = "")
{
if (posid == null) { posid = ""; }
if (barcode == null) { barcode = ""; }
this.LogType = "Running";
this.DeviceName = deviceName.Replace("-Move", "").Replace("-SMove", "").Trim();
this.MoveType = moveType.Trim();
......@@ -150,6 +155,8 @@ namespace OnlineStore.Common
}
public MoveEndLog(string deviceName, string moveType, DateTime startTime, DateTime endTime, string posid = "", string barcode = "")
{
if (posid == null) { posid = ""; }
if (barcode == null) { barcode = ""; }
this.LogType = "InoutEnd";
this.DeviceName = deviceName.Replace("-Move", "").Replace("-SMove", "").Trim();
this.MoveType = moveType.Trim();
......@@ -189,6 +196,8 @@ namespace OnlineStore.Common
}
public AxisMoveLog(string deviceName, string axisName, string moveType, int targetP, int speed, DateTime startTime, DateTime endTime, string posid = "", string barcode = "")
{
if (posid == null) { posid = ""; }
if (barcode == null) { barcode = ""; }
this.LogType = "Axis";
this.DeviceName = deviceName.Replace("-Move", "").Replace("-SMove", "").Trim();
this.MoveType = moveType.Trim();
......
......@@ -579,6 +579,9 @@ namespace OnlineStore.DeviceLibrary
/// <param name="logseconds"></param>
public void SetWarnMsg(string msg = "", string alarmType = "", LineMoveInfo moveInfo = null, int logseconds = 10)
{
try
{
int logtype = 801;
if (moveInfo != null)
{
......@@ -586,7 +589,7 @@ namespace OnlineStore.DeviceLibrary
}
if (String.IsNullOrEmpty(msg).Equals(false))
{
if (WarnMsg.Equals(msg))
if (WarnMsg.Equals(msg) || warnParam.AlarmType.Equals(alarmType))
{
if (msg.StartsWith(Name))
{
......@@ -633,15 +636,26 @@ namespace OnlineStore.DeviceLibrary
warnParam.OperteType = "";
}
}
}
catch (Exception ex)
{
LogUtil.error("SetWarnMsg Error: " + ex.ToString());
}
WarnMsg = msg;
warnParam.AlarmType = alarmType;
}
protected void MoveTimeoutAlarm(LineMoveInfo move, string alarmType)
{
try
{
SetWarnMsg(move.Name + "[" + move.GetMoveType() + "][" + move.SLog + "] " + alarmType + " [" + FormUtil.GetSpanStr(move.StepSpan()) + "]", alarmType, move);
Alarm(LineAlarmType.IoSingleTimeOut);
}
catch (Exception ex)
{
}
}
protected void ClearTimeoutAlarm(string msg)
{
if (isInSuddenDown || isNoAirCheck)
......
......@@ -1017,7 +1017,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 紧急出料移栽:等待夹爪有料
/// </summary>
[Description("出料_取料完成_上料横移机构上升")]
[Description("出料_取料完成_等待夹爪有料")]
FO_217_ClampCheck,
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!