Commit 45eb003b LN

夹爪增加重抓功能

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