Commit f99082fd 刘韬

报警信息优化

1 个父辈 5bbd045b
......@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
///"出库未找库位:{0}"
/// </summary>
public static string OutStoreNoPosition = "OutStoreNoPosition";
public static string DoorIOError = "DoorIOError";
/// <summary>
///"绝对运动:"
......
......@@ -470,15 +470,15 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(60);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW, ResourceControl.GetString(ResourceControl.DoorIOError)));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH, ResourceControl.GetString(ResourceControl.DoorIOError)));
}
private void CloseDoorAndWait()
{
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH, ResourceControl.GetString(ResourceControl.DoorIOError)));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW, ResourceControl.GetString(ResourceControl.DoorIOError)));
}
/// <summary>
......
......@@ -759,7 +759,7 @@ namespace OnlineStore.DeviceLibrary
else
{
OutStoreLog("出库:SO_15_WaitTake 等待拿走物品 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW, ResourceControl.GetString(ResourceControl.TakeTrayGo)));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
}
}
......@@ -777,7 +777,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_16_CheckIsTake);
OutStoreLog("出库:SO_16_CheckIsTake 再次等待物品是否已拿走 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(200));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW, ResourceControl.GetString(ResourceControl.DoorIOError)));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
//需要等待光栅断开一次
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SafetyLightCurtains,IO_VALUE.LOW));
......@@ -801,7 +801,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW, ResourceControl.GetString(ResourceControl.TakeTrayGo)));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoorAndWait();
}
......
......@@ -313,7 +313,7 @@ namespace OnlineStore.DeviceLibrary
{
//msg = StoreName + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
SetWarnMsgAndLog(ResourceControl.AxisHomeMoveAlarm, StoreMove.MoveStep + "", moveAxis.GetNameStr(), outCount + "");
SetWarnMsgAndLog(ResourceControl.AxisHomeMoveAlarm, StoreMove.MoveStep + "", moveAxis.GetNameStr());
msg = WarnObj.WarnMsg;
LogUtil.error(LOGGER, msg);
}
......
......@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
{
}
public static WaitResultInfo WaitIO(string ioType, IO_VALUE ioValue)
public static WaitResultInfo WaitIO(string ioType, IO_VALUE ioValue, string mimo = "")
{
WaitResultInfo wait = new WaitResultInfo();
wait.CanWhileMoveCount = 0;
......@@ -154,6 +154,7 @@ namespace OnlineStore.DeviceLibrary
wait.IoType = ioType;
wait.IoValue = ioValue;
wait.IsEnd = false;
wait.Mimo = mimo;
return wait;
}
public static WaitResultInfo WaitAxis(ConfigMoveAxis axis,int targetPosition,int targetSpeed )
......@@ -256,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (WaitType == 2)
{
return ResourceControl.GetString(ResourceControl.WaitIo, "IO信号等待") + "【" + IoType + "】=【" + IoValue + "】";
return ResourceControl.GetString(ResourceControl.WaitIo, "IO信号等待") + "【" + Mimo + IoType + " " + StoreManager.Config.StoreDIList[IoType].ElectricalDefinition + "】=【" + IoValue + "】";
}
else if (WaitType == 3)
{
......@@ -332,6 +333,7 @@ namespace OnlineStore.DeviceLibrary
/// 高度
/// </summary>
public int HeightValue { get; set; }
public string Mimo { get; set; }
}
public enum StoreMoveType
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!