Commit 83e4ac3e LN

入料条码错乱修改。

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