Commit 87ff0457 张东亮

库位调试完成出料盘撞料问题

1 个父辈 87fbca26
...@@ -132,12 +132,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,12 +132,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.BT_01_StartGetTray); MoveInfo.NextMoveStep(StoreMoveStep.BT_01_StartGetTray);
PosDebugInfo.AddTestReel(out string posId); PosDebugInfo.AddTestReel(out string posId);
MoveInfo.MoveParam.PosID = posId; MoveInfo.MoveParam.PosID = posId;
MoveInfo.MoveParam.CurShelfPosID = ShelfPosList[1];
if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this)) if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this))
{ {
InOutStoreLog("库位测试,加载库位位置失败"); InOutStoreLog("库位测试,加载库位位置失败");
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[1]);
} }
} }
...@@ -147,9 +147,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -147,9 +147,9 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_14_StartInOutTest)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_14_StartInOutTest))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BT_15_ToPosition); MoveInfo.NextMoveStep(StoreMoveStep.BT_15_ToPosition);
InOutStoreLog("库位测试,到库位点,旋转轴至P2( 库位点)轴2(上下) 至P3(库位入库前点)"); InOutStoreLog("库位测试,到库位点,旋转轴至P2( 库位点)轴2(上下) 至P5(库位出料前点)");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_15_ToPosition)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_15_ToPosition))
{ {
...@@ -174,7 +174,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -174,7 +174,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BT_20_SetInstoreParam); MoveInfo.NextMoveStep(StoreMoveStep.BT_20_SetInstoreParam);
MoveInfo.MoveParam.PosID = PosDebugInfo.ToPosId; MoveInfo.MoveParam.PosID = PosDebugInfo.ToPosId;
if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this)) if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, false, this))
{ {
InOutStoreLog("库位测试,加载库位位置失败"); InOutStoreLog("库位测试,加载库位位置失败");
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary
PosDebugInfo.MoveToNext(); PosDebugInfo.MoveToNext();
InOutStoreLog($"库位测试,变换位置:{PosDebugInfo.FrmPoId}-->{PosDebugInfo.ToPosId}"); InOutStoreLog($"库位测试,变换位置:{PosDebugInfo.FrmPoId}-->{PosDebugInfo.ToPosId}");
MoveInfo.MoveParam.PosID = PosDebugInfo.FrmPoId; MoveInfo.MoveParam.PosID = PosDebugInfo.FrmPoId;
if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this)) if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, false, this))
{ {
InOutStoreLog("库位测试,加载库位位置失败"); InOutStoreLog("库位测试,加载库位位置失败");
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -226,7 +226,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -226,7 +226,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("库位测试,无剩余库位,将料盘送出"); InOutStoreLog("库位测试,无剩余库位,将料盘送出");
PosDebugInfo.RemoveTestReel(out string posId); PosDebugInfo.RemoveTestReel(out string posId);
MoveInfo.MoveParam.PosID = posId; MoveInfo.MoveParam.PosID = posId;
MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[0]); MoveInfo.MoveParam.CurShelfPosID=(ShelfPosList[0]);
if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this)) if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this))
{ {
InOutStoreLog("库位测试,加载库位位置失败"); InOutStoreLog("库位测试,加载库位位置失败");
...@@ -240,9 +240,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -240,9 +240,9 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_25_StartPutTray)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_25_StartPutTray))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BT_26_ToPosition); MoveInfo.NextMoveStep(StoreMoveStep.BT_26_ToPosition);
InOutStoreLog("库位测试,到库位点,旋转轴至P2( 库位点)轴2(上下) 至P3(库位入库前点)"); InOutStoreLog("库位测试,到库位点,旋转轴至P2( 库位点)轴2(上下) 至P5(库位出料前点)");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_26_ToPosition)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_26_ToPosition))
{ {
...@@ -266,6 +266,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -266,6 +266,9 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_29_InoutBack)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BT_29_InoutBack))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BT_30_ToShelfPosition); MoveInfo.NextMoveStep(StoreMoveStep.BT_30_ToShelfPosition);
InOutStoreLog("库位测试,叉子已到P1,走到料架位置,旋转轴至P101[" + moveP.Middle_P101 + "],升降轴至P102[" + moveP.UpDown_HP102 + "] ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.BT_30_ToShelfPosition) else if (MoveInfo.MoveStep == StoreMoveStep.BT_30_ToShelfPosition)
{ {
...@@ -294,7 +297,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,7 +297,7 @@ namespace OnlineStore.DeviceLibrary
if (PosDebugInfo.RemoveTestReel(out string posId)) if (PosDebugInfo.RemoveTestReel(out string posId))
{ {
MoveInfo.MoveParam.PosID = posId; MoveInfo.MoveParam.PosID = posId;
MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[1]); MoveInfo.MoveParam.CurShelfPosID=(ShelfPosList[1]);
if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this)) if (!StoreManager.LoadInoutParam(MoveInfo.MoveParam, true, this))
{ {
InOutStoreLog("库位测试,加载库位位置失败"); InOutStoreLog("库位测试,加载库位位置失败");
...@@ -306,6 +309,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -306,6 +309,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
PosDebugInfo.StopAutoInOutTest(); PosDebugInfo.StopAutoInOutTest();
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
} }
...@@ -340,7 +344,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -340,7 +344,7 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
public bool IsReady() public bool IsReady()
{ {
return curPosIdxs.Count == 2; return curPosIdxs.Count >= 2;
} }
public void StopAutoInOutTest() public void StopAutoInOutTest()
{ {
...@@ -396,12 +400,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,12 +400,13 @@ namespace OnlineStore.DeviceLibrary
AddTestReel(out posId); AddTestReel(out posId);
InOutParam param = new InOutParam(); InOutParam param = new InOutParam();
param.PosID = posId; param.PosID = posId;
param.UpdateShelfPosId(box.ShelfPosList[0]); param.CurShelfPosID = box.ShelfPosList[0];
if (!StoreManager.LoadInoutParam(param, true, box)) if (!StoreManager.LoadInoutParam(param, true, box))
{ {
errmsg = "加载位置信息失败"; errmsg = "加载位置信息失败";
return false; return false;
} }
box.CylinderMove(box.MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
box.MoveInfo.NewMove(StoreMoveType.CheckPos, param); box.MoveInfo.NewMove(StoreMoveType.CheckPos, param);
box.MoveInfo.NextMoveStep(StoreMoveStep.BT_01_StartGetTray); box.MoveInfo.NextMoveStep(StoreMoveStep.BT_01_StartGetTray);
LogUtil.info($"调试的所有位置[{BoxPositions.Count}]:"); LogUtil.info($"调试的所有位置[{BoxPositions.Count}]:");
......
...@@ -204,7 +204,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,7 +204,8 @@ namespace OnlineStore.DeviceLibrary
param.PlateW = position.BagWidth; param.PlateW = position.BagWidth;
} }
//加载位置 //加载位置
if (param.MoveP == null) param.MoveP = new LineMoveP();
//if (param.MoveP == null)
{ {
LineMoveP p = new LineMoveP(); LineMoveP p = new LineMoveP();
if (sp != null) if (sp != null)
......
...@@ -167,7 +167,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -167,7 +167,6 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error( "GetPositon[" + CurShelfPosID + "]=null,没有库位不能执行出入库"); LogUtil.error( "GetPositon[" + CurShelfPosID + "]=null,没有库位不能执行出入库");
} }
if (MoveP == null) MoveP = new LineMoveP();
MoveP.InOut_P101 = sp.InoutAxis_P101; MoveP.InOut_P101 = sp.InoutAxis_P101;
MoveP.UpDown_LP101 = sp.UpDownAxis_LP101; MoveP.UpDown_LP101 = sp.UpDownAxis_LP101;
MoveP.UpDown_HP102 = sp.UpDownAxis_HP102; MoveP.UpDown_HP102 = sp.UpDownAxis_HP102;
......
...@@ -187,7 +187,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -187,7 +187,12 @@ namespace OnlineStore.LoadCSVLibrary
{ {
var result = AllPositionMap[tname][positionNum]; var result = AllPositionMap[tname][positionNum];
if (result == null) return null; if (result == null) return null;
var allPos = AllPositionMap[tname].Values.ToList().FindAll(s => s.BagWidth == result.BagWidth && s.BagHigh == result.BagHigh); int idx = AllPositionMap[tname].Values.ToList().FindIndex(s => s.PositionNum.Equals(positionNum));//s => s.BagWidth == result.BagWidth && s.BagHigh == result.BagHigh
List<T> allPos = new List<T>();
for (int i = idx; i < AllPositionMap[tname].Values.Count; i++)
{
allPos.Add(AllPositionMap[tname].Values.ToArray()[i]);
}
return allPos; return allPos;
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!