Commit 575b1e51 LN

1

1 个父辈 39059f5b
...@@ -158,8 +158,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,8 +158,8 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.DLine_SuddenStop).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.DLine_SuddenStop).Equals(IO_VALUE.LOW))
{ {
WarnMsg = Name + "收到急停信号"; SetWarnMsg( Name + "收到急停信号");
LogUtil.error(WarnMsg);
Alarm(LineAlarmType.SuddenStop); Alarm(LineAlarmType.SuddenStop);
return; return;
} }
......
...@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 "); LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 ");
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
WarnMsg = ""; SetWarnMsg("");
} }
} }
} }
...@@ -179,7 +179,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,7 +179,7 @@ namespace OnlineStore.DeviceLibrary
} }
protected void ResetClearData() protected void ResetClearData()
{ {
WarnMsg = ""; SetWarnMsg("");
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
preTrayNum = 0; preTrayNum = 0;
currTrayNum = 0; currTrayNum = 0;
......
...@@ -225,8 +225,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -225,8 +225,8 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.SL_SuddenStop_BTN).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SL_SuddenStop_BTN).Equals(IO_VALUE.LOW))
{ {
WarnMsg = Name + "收到急停信号"; SetWarnMsg( Name + "收到急停信号");
LogUtil.error(WarnMsg);
Alarm(LineAlarmType.SuddenStop); Alarm(LineAlarmType.SuddenStop);
return; return;
} }
......
...@@ -751,6 +751,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -751,6 +751,10 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
internal bool NeedCurrTray(bool checkAndMove = false ) internal bool NeedCurrTray(bool checkAndMove = false )
{ {
if (IsDebug || runStatus <= LineRunStatus.Wait)
{
return false;
}
int trayNum = TrayManager.GetTrayNum(Config.Id); int trayNum = TrayManager.GetTrayNum(Config.Id);
bool isFull = TrayManager.TrayIsFull(trayNum); bool isFull = TrayManager.TrayIsFull(trayNum);
TrayInfo info = TrayManager.GetTrayInfo(trayNum); TrayInfo info = TrayManager.GetTrayInfo(trayNum);
......
...@@ -240,7 +240,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -240,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
isNoAirCheck = false; isNoAirCheck = false;
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
TrayManager.TrayErrorMsg = ""; TrayManager.TrayErrorMsg = "";
WarnMsg = ""; SetWarnMsg("");
PreIsHasProcess = true; PreIsHasProcess = true;
if (TrayManager.ErrorStoreId > 0) if (TrayManager.ErrorStoreId > 0)
...@@ -802,7 +802,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -802,7 +802,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
WarnMsg = moveEquip.Name + "在复位过程中报警,需要重新复位"; SetWarnMsg( moveEquip.Name + "在复位过程中报警,需要重新复位");
} }
} }
} }
...@@ -838,10 +838,5 @@ namespace OnlineStore.DeviceLibrary ...@@ -838,10 +838,5 @@ namespace OnlineStore.DeviceLibrary
} }
private void SetWarnMsg(string msg)
{
WarnMsg = msg;
LogUtil.error(Name + WarnMsg);
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 "); LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 ");
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
WarnMsg = ""; SetWarnMsg( "");
} }
} }
} }
......
...@@ -72,8 +72,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,8 +72,8 @@ namespace OnlineStore.DeviceLibrary
InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW); InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW);
if (LineManager.Line.IsReviceInPosId(moveEquip, posId)) if (LineManager.Line.IsReviceInPosId(moveEquip, posId))
{ {
LineManager.Line.WarnMsg = "入库库位重复: " + param.ToStr() + " ,入库失败!"; LineManager.Line.SetWarnMsg( "入库库位重复: " + param.ToStr() + " ,入库失败!");
moveEquip.WarnMsg = "入库库位重复: " + param.ToStr() + " ,入库失败!"; moveEquip.SetWarnMsg( "入库库位重复: " + param.ToStr() + " ,入库失败!");
return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!"); return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!");
} }
LogUtil.info("更新盘空满信息,托盘号【" + trayNum + "】,是否有料盘【" + true + "】,出库入库【" + 1 + "】"); LogUtil.info("更新盘空满信息,托盘号【" + trayNum + "】,是否有料盘【" + true + "】,出库入库【" + 1 + "】");
......
...@@ -247,8 +247,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -247,8 +247,30 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
//若此横移对应的设备未启动,直接可处理
foreach(FeedingEquip equip in LineManager.Line.FeedingEquipMap.Values)
{
if (equip.Config.SidesWayNum.Equals(swNum))
{
if (equip.IsDebug || equip.runStatus <= LineRunStatus.Wait)
{
return true;
}
}
}
foreach (ProvidingEquip equip in LineManager.Line.ProvidingEquipMap.Values)
{
if (equip.Config.SidesWayNum.Equals(swNum))
{
if (equip.IsDebug || equip.runStatus <= LineRunStatus.Wait)
{
return true;
}
}
}
return false; return false;
} }
/// <summary> /// <summary>
/// 更新横移托盘的处理状态 /// 更新横移托盘的处理状态
/// </summary> /// </summary>
......
...@@ -246,7 +246,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -246,7 +246,15 @@ namespace OnlineStore.DeviceLibrary
public abstract bool StartInStoreMove(InOutParam param); public abstract bool StartInStoreMove(InOutParam param);
protected abstract void InStoreProcess(); protected abstract void InStoreProcess();
#endregion #endregion
public void SetWarnMsg(string msg="")
{
WarnMsg = msg;
if (String.IsNullOrEmpty(WarnMsg).Equals(false))
{
LogUtil.error(Name + WarnMsg);
}
}
public static string GetRunStr(LineStatus ls, LineRunStatus runs) public static string GetRunStr(LineStatus ls, LineRunStatus runs)
{ {
string sta = "运行中"; string sta = "运行中";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!