Commit 45eb003b LN

夹爪增加重抓功能

1 个父辈 feb7259e
......@@ -286,7 +286,7 @@ namespace OnlineStore.DeviceLibrary
//如果正在入库移栽不能操作,其他时候可以
if (move.MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
if (move.MoveInfo.MoveStep >= LineMoveStep.MI_09_CylinderBefore && move.MoveInfo.MoveStep <= LineMoveStep.MI_14_CylinderAfter)
if (move.MoveInfo.MoveStep >= LineMoveStep.MI_10_CylinderBefore && move.MoveInfo.MoveStep <= LineMoveStep.MI_14_CylinderAfter)
{
return false;
}
......
......@@ -532,8 +532,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " 启动一个 入库【" + posId + "】运动失败,当前状态,storeStatus=" + runStatus);
}
return false;
}
}
protected override void InStoreProcess()
{
if (MoveInfo.IsInWait)
......@@ -559,6 +558,8 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.MI_02_ToLineUp))
{
//重置夹料次数=0
ClampCount = 0;
MoveInfo.NextMoveStep(LineMoveStep.MI_03_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
......@@ -600,32 +601,50 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_07_WaitHasReel);
InLog("入库 " + MoveInfo.SLog + ": 等待夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
MoveInfo.TimeOutSeconds = 5;
//如果是第一次抓料,重复抓料一次
if (ClampCount <= 0)
{
MoveInfo.NextMoveStep(LineMoveStep.MI_07_ResetClamp);
InLog("入库 " + MoveInfo.SLog + ": 第一次未抓到料,重新抓一次,夹爪先放松");
ClampCount = 1;
ClampJwa.Relax(MoveInfo);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitHasReel);
InLog("入库 " + MoveInfo.SLog + ": 等待夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
MoveInfo.TimeOutSeconds = 5;
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.MI_07_WaitHasReel))
else if (MoveInfo.IsStep(LineMoveStep.MI_07_ResetClamp))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_03_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_08_WaitHasReel))
{
MI_08_WaitBox();
}
else if (MoveInfo.IsStep(LineMoveStep.MI_08_WaitBox))
else if (MoveInfo.IsStep(LineMoveStep.MI_09_WaitBox))
{
if (UpdownIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderBefore);
MoveInfo.NextMoveStep(LineMoveStep.MI_10_CylinderBefore);
InLog("入库: " + MoveInfo.SLog + " 前后气缸1前进");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
MoveInfo.NextMoveStep(LineMoveStep.MI_09_WaitBox);
InLog("入库: " + MoveInfo.SLog + " 升降气缸上升");
UpdownUpMove();
}
}
else if (MoveInfo.IsStep(LineMoveStep.MI_09_CylinderBefore))
else if (MoveInfo.IsStep(LineMoveStep.MI_10_CylinderBefore))
{
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before))
{
......@@ -635,7 +654,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderBefore);
MoveInfo.NextMoveStep(LineMoveStep.MI_10_CylinderBefore);
InLog("入库: " + MoveInfo.SLog + " 前后气缸1前进");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
......@@ -770,7 +789,7 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
MoveInfo.NextMoveStep(LineMoveStep.MI_09_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanInstore());
TrayManager.UpdateTrayInfo(num);
......
......@@ -162,20 +162,24 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,上下气缸1上升
/// </summary>
MI_06_CylinderUp,
/// <summary>
/// 入库处理:重新抓料一次,夹爪放松
/// </summary>
MI_07_ResetClamp,
/// <summary>
/// 移载装置入库处理,等待夹爪有料
/// </summary>
MI_07_WaitHasReel,
MI_08_WaitHasReel,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_08_WaitBox,
MI_09_WaitBox,
/// <summary>
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_09_CylinderBefore,
MI_10_CylinderBefore,
/// <summary>
///移载装置入库处理,上下气缸1下降
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!