Commit f3609f30 张东亮

料盘夹取根据实际厚度

1 个父辈 7c540127
......@@ -272,7 +272,7 @@ namespace OnlineStore.DeviceLibrary
int pH = FormUtil.GetIntValue(serverResult.plateH);
int pW = FormUtil.GetIntValue(serverResult.plateW);
result.Param = new InOutPosInfo(serverResult.barcode, serverResult.posId, pW, pH, urgentReel, cutReel, smallReel, serverResult.rfid, rfidloc);
result.Param.PlateTotalH = pH;
LogUtil.error(deviceName + " 【" + codeStr + "】结果入库NG:收到出库信息: " + result.Param.ToStr() + " ");
result.Msg = "收到出库信息[" + serverResult.barcode + "][" + serverResult.posId + "] ";
......@@ -308,6 +308,7 @@ namespace OnlineStore.DeviceLibrary
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
result.Param = new InOutPosInfo(serverResult.barcode, posId, width, height);
result.Param.rfid = rfid;
result.Param.PlateTotalH = totalHeight;
BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(posId);
if (position == null)
{
......
......@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
public bool singleOut = false;
public string ToStr()
{
return $" NgMsg[{NgMsg}] [" + barcode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + "]"+ $" hSerial[{hSerial}]" +$" isNg[{IsNG}]"+ " singleOut[" + singleOut + "]";
return $" NgMsg[{NgMsg}] [" + barcode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + $"({PlateTotalH})]"+ $" hSerial[{hSerial}]" +$" isNg[{IsNG}]"+ " singleOut[" + singleOut + "]";
}
public string ToStr1()
{
......
......@@ -438,6 +438,7 @@ namespace OnlineStore.DeviceLibrary
InOutParam inoutParam = new InOutParam(new InOutPosInfo(barcode, posId, plateW, plateH, urgentReel));
inoutParam.PosInfo.hSerial = hSerials;
inoutParam.PosInfo.singleOut = singleOut;
inoutParam.PosInfo.PlateTotalH = plateH;
//根据发送的posId获取位置列表
BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(posId);
if (position == null)
......
......@@ -622,9 +622,10 @@ namespace OnlineStore.DeviceLibrary
BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(MoveInfo.MoveParam.PosInfo.PosId);
if (position != null)
{
diff = position.BagHigh - MoveInfo.MoveParam.PosInfo.PlateH;
var pH = MoveInfo.MoveParam.PosInfo.PlateTotalH==0? MoveInfo.MoveParam.PosInfo.PlateH: MoveInfo.MoveParam.PosInfo.PlateTotalH;
diff = position.BagHigh - pH;
if (diff < 0) diff = 0;
LogInfo($"{MoveInfo.MoveParam.PosInfo.PosId}库位高度:{position.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfo.PlateH},差值:{diff},系数:{comAxis_offset}," +
LogInfo($"{MoveInfo.MoveParam.PosInfo.PosId}库位高度:{position.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfo.PlateH},实际高度:{MoveInfo.MoveParam.PosInfo.PlateTotalH},差值:{diff},系数:{comAxis_offset}," +
$"实际值:{MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset}={MoveInfo.MoveParam.MoveP.ComAxis_AB_P3}加{diff * comAxis_offset}");
}
int target = MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!