Commit 575b1e51 LN

1

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