Commit 83e4ac3e LN

入料条码错乱修改。

1 个父辈 34609464
......@@ -887,28 +887,34 @@ namespace OnlineStore.DeviceLibrary
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息 ,");
}
Task.Factory.StartNew(delegate
{
//更新托盘条码信息
getPosTask = Task.Factory.StartNew(delegate
{ //更新托盘条码信息
string code = CodeManager.ProcessCode(LastCodeList);
lastcode = code;
// TrayManager.UpdateTrayInfo(currTrayNum, true, 1, code, "", LastHeight, LastWidth);
if (code.Equals(""))
{
InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, "扫码失败");
try
{
if (code.Equals(""))
{
InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, "扫码失败");
}
//从服务器获取库位号
string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth, CurrShelfId, DeviceID);
if (!result.Equals(""))
{
InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
param.rfid = CurrShelfId;
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, result);
// TrayManager.UpdateInStoreNG(currTrayNum, true, result);
LogUtil.error(Name + "托盘【" + currTrayNum + "】" + result);
}
}
//从服务器获取库位号
string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth, CurrShelfId, DeviceID);
if (!result.Equals(""))
catch (Exception ex)
{
InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
param.rfid = CurrShelfId;
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, result);
// TrayManager.UpdateInStoreNG(currTrayNum, true, result);
LogUtil.error(Name + "托盘【" + currTrayNum + "】" + result);
LogUtil.error(Name + "托盘【" + currTrayNum + "】【"+code+"】获取库位号报错:" + ex.ToString());
}
});
}
else if (MoveInfo.IsTimeOut(180))
{
......@@ -960,8 +966,15 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_28_UpDownAxisToP1))
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升已到位 ");
CheckHasTray();
if (getPosTask == null || getPosTask.IsCompleted)
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升已到位 ");
CheckHasTray();
}
else
{
LogUtil.error(Name + "["+MoveInfo.MoveType+"][" + MoveInfo.SLog + "] 获取库位号还未完成,状态:" + getPosTask.Status);
}
}
#endregion
......@@ -1044,7 +1057,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
private Task getPosTask = null;
private void FI_27_CylinderUp()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_27_CylinderUp);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!