Commit 6083c6ac LN

未抓起料盘问题优化

1 个父辈 f5560e6b
...@@ -268,6 +268,10 @@ T5上料时,T4的托盘没有等待。 ...@@ -268,6 +268,10 @@ T5上料时,T4的托盘没有等待。
20221118:
出库仓门口抓料,夹爪未检测到料盘信号时不报警,只打印日志,正常走流程。
入库托盘抓料,夹爪未检测到料盘信号时,直接放料盘到托盘,并标记托盘NG,取消入库任务,到NG位取消入库任务
接驳台托盘上料未抓起来时,记录NG,继续放一遍。上升后接驳台若有料,发到达,清空托盘,若无料,标记托盘NG
...@@ -377,9 +377,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -377,9 +377,17 @@ namespace OnlineStore.DeviceLibrary
if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel)) if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_10_ReelProEnd); SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_10_ReelProEnd);
OutLog(Name + " 料盘已移走,更新托盘[" + currTrayNum + "]为空"); if (IsNgPro())
CheckLog(" 接驳台托盘" + SecondMoveInfo.SLog + ":料盘已移走,更新托盘[" + currTrayNum + "]为空"); {
TrayManager.UpdateTrayInfo(currTrayNum); OutLog(Name + " 料盘已移走,更新托盘[" + currTrayNum + "]为空");
CheckLog(" 接驳台托盘" + SecondMoveInfo.SLog + ":料盘已移走,更新托盘[" + currTrayNum + "]为空");
TrayManager.UpdateTrayInfo(currTrayNum);
}
else
{
OutLog(Name + " 料盘已移走,暂不更新托盘[" + currTrayNum + "],先放托盘离开");
CheckLog(" 接驳台托盘" + SecondMoveInfo.SLog + ":料盘已移走,暂不更新托盘[" + currTrayNum + "],先放托盘离开");
}
} }
else else
{ {
...@@ -522,6 +530,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -522,6 +530,10 @@ namespace OnlineStore.DeviceLibrary
/// 紧急料,afterPut是否发送完成 /// 紧急料,afterPut是否发送完成
/// </summary> /// </summary>
private bool afterPutCutOK = false; private bool afterPutCutOK = false;
/// <summary>
/// 从托盘上抓料是否正常抓起来
/// </summary>
private bool getTrayReelOk = true;
protected override void OutStoreProcess() protected override void OutStoreProcess()
{ {
...@@ -572,17 +584,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -572,17 +584,33 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.JM_05_ClampWork)) else if (MoveInfo.IsStep(LineMoveStep.JM_05_ClampWork))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1);
OutLog(logName + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "]"); OutLog(logName + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "],更新 getTrayReelOk=true");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
getTrayReelOk = true;
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_06_UpdownToP1)) else if (MoveInfo.IsStep(LineMoveStep.JM_06_UpdownToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_07_ClampCheck); MoveInfo.NextMoveStep(LineMoveStep.JM_07_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测有料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.HIGH));
if (IsNgPro())
{
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测有料 ");
}
else
{
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测有料,超时时间1000 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.OneWaitCanEndStep = true;
}
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck))
{ {
//判断是否正常抓取料
if(IOValue(IO_Type.HY_ClampCylinder_Check).Equals(IO_VALUE.LOW))
{
getTrayReelOk = false;
LogInfo("从托盘["+currTrayNum+"]上抓取无料失败,夹爪气缸料盘检测信号=LOW");
}
TrayCanGo(); TrayCanGo();
if (IsNgPro()) if (IsNgPro())
{ {
...@@ -621,19 +649,64 @@ namespace OnlineStore.DeviceLibrary ...@@ -621,19 +649,64 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax)) else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax))
{ {
afterPutCutOK = false;
MoveInfo.NextMoveStep(LineMoveStep.JM_14_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_14_UpdownToP1);
OutLog(logName + MoveInfo.SLog + ":升降轴上升到P1 [" + Config.UpDownAxisP1 + "] "); OutLog(logName + MoveInfo.SLog + ":升降轴上升到P1 [" + Config.UpDownAxisP1 + "] ");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_14_UpdownToP1)) else if (MoveInfo.IsStep(LineMoveStep.JM_14_UpdownToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料,接驳台有料 "); if (IsNgPro())
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
if (!IsNgPro())
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.HIGH)); MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料,接驳台有料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
} }
else
{
string code = MoveInfo.MoveParam.WareCode;
if (IOValue(IO_Type.HY_TrayCheck1).Equals(IO_VALUE.HIGH) &&(!getTrayReelOk))
{
//接驳台有料,直接发arrive
int robotIndex = GetRobotIndex();
string msg = SServerManager.arrive3fRobotLocation(Name, robotIndex, code);
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台,更新托盘[" + currTrayNum + "]为空 ,发送 arrive3fRobotLocation = "+ msg);
afterPutCutOK = true;
//清空托盘
TrayManager.UpdateTrayInfo(currTrayNum);
}
else
{
//无料发取消任务
int robotIndex = GetRobotIndex();
string msg = SServerManager.clearOutTask(Name, code);
afterPutCutOK = true;
if (getTrayReelOk)
{
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 ,更新托盘[" + currTrayNum + "]为NG ,发送 clearOutTask=" + msg);
//更新托盘为NG
TrayManager.UpdateInStoreNG(currTrayNum, true, "工单料放料到接驳台失败");
}
else
{
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 (未抓起料盘),更新托盘[" + currTrayNum + "]为NG ,发送 clearOutTask=" + msg);
//更新托盘为NG
TrayManager.UpdateInStoreNG(currTrayNum, true, "工单料放料到接驳台失败(未抓起料盘)");
}
}
MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
}
//MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
//OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料,接驳台有料 ");
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
//if (!IsNgPro())
//{
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.HIGH));
//}
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck))
{ {
...@@ -641,7 +714,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -641,7 +714,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(null, IO_Type.HY_MoveCylinder_Give, IO_Type.HY_MoveCylinder_Take); CylinderMove(null, IO_Type.HY_MoveCylinder_Give, IO_Type.HY_MoveCylinder_Take);
afterPutCutOK = false;
string code = MoveInfo.MoveParam.WareCode; string code = MoveInfo.MoveParam.WareCode;
if (MoveInfo.MoveParam.urgentReel) if (MoveInfo.MoveParam.urgentReel)
{ {
...@@ -650,17 +722,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -650,17 +722,17 @@ namespace OnlineStore.DeviceLibrary
string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData); string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData);
afterPutCutOK = true; afterPutCutOK = true;
} }
else if (!MoveInfo.MoveParam.IsNG) //else if (!MoveInfo.MoveParam.IsNG)
{ //{
int robotIndex = GetRobotIndex(); // int robotIndex = GetRobotIndex();
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation "); // OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation ");
string msg = SServerManager.arrive3fRobotLocation(Name, robotIndex, code); // string msg = SServerManager.arrive3fRobotLocation(Name, robotIndex, code);
afterPutCutOK = true; // afterPutCutOK = true;
} //}
else //else
{ //{
afterPutCutOK = true; // afterPutCutOK = true;
} //}
//TrayCanGo(); //TrayCanGo();
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_16_ReelArrive)) else if (MoveInfo.IsStep(LineMoveStep.JM_16_ReelArrive))
......
...@@ -138,7 +138,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,8 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH"); OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH ,超时200ms");
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
} }
} }
...@@ -146,6 +147,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -146,6 +147,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (UpdownIsUp()) if (UpdownIsUp())
{ {
//判断夹爪是否有料,无料打印日志
if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.LOW))
{
OutLog("出库 " + MoveInfo.SLog + ": 夹爪料盘检测信号=LOW");
}
if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH))
{ {
if (IsBigStore()) if (IsBigStore())
...@@ -387,20 +395,50 @@ namespace OnlineStore.DeviceLibrary ...@@ -387,20 +395,50 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
int num = MoveInfo.MoveParam.TrayNumber; //int num = MoveInfo.MoveParam.TrayNumber;
InLog("入库 " + MoveInfo.SLog + ":抓取料盘失败,取消入库任务,清空托盘[" + num + "]信息。报警:未抓起料盘,请取走料盘后复位。"); //InLog("入库 " + MoveInfo.SLog + ":抓取料盘失败,取消入库任务,清空托盘[" + num + "]信息。报警:未抓起料盘,请取走料盘后复位。");
//未抓起料盘,直接报警 ////未抓起料盘,直接报警
MoveInfo.NextMoveStep(LineMoveStep.MI_07_ClampCheck); //MoveInfo.NextMoveStep(LineMoveStep.MI_07_ClampCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitNoTrayAlarm()); //MoveInfo.WaitList.Add(WaitResultInfo.WaitNoTrayAlarm());
SetWarnMsg("未抓起料盘,请取走料盘后复位", MoveInfo.GetStepDes() + "_" + "未抓起料", MoveInfo); //SetWarnMsg("未抓起料盘,请取走料盘后复位", MoveInfo.GetStepDes() + "_" + "未抓起料", MoveInfo);
Alarm(LineAlarmType.IoSingleTimeOut); //Alarm(LineAlarmType.IoSingleTimeOut);
//TrayInfo tray = TrayManager.GetTrayInfo(num);
//LogUtil.error(Name + " 抓料失败自动清空入库任务 :" + tray.InoutPar.ToStr());
//TrayManager.ClearInstore(tray, "抓料失败自动清空入库任务");
//TrayManager.UpdateTrayInfo(num);
MoveInfo.NextMoveStep(LineMoveStep.MI_21_CylinderDown);
int num = MoveInfo.MoveParam.TrayNumber;
InLog("入库 " + MoveInfo.SLog + ":抓取料盘失败,取消入库任务,更新托盘[" + num + "]为NG ,将料再放到托盘上");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
TrayInfo tray = TrayManager.GetTrayInfo(num); TrayInfo tray = TrayManager.GetTrayInfo(num);
LogUtil.error(Name + " 抓料失败自动清空入库任务 :" + tray.InoutPar.ToStr());
TrayManager.ClearInstore(tray, "抓料失败自动清空入库任务"); TrayManager.ClearInstore(tray, "抓料失败自动清空入库任务");
TrayManager.UpdateTrayInfo(num); TrayManager.UpdateInStoreNG(num, true, "入库抓料失败");
InLog("入库: " + MoveInfo.SLog + " 抓料失败,升降气缸下降");
} }
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_21_CylinderDown))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_22_CylinderRelax);
InLog("入库: " + MoveInfo.SLog + " 抓料失败,夹爪放松");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_22_CylinderRelax))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_23_UpdownUp);
InLog("入库: " + MoveInfo.SLog + " 抓料失败,升降上升");
UpdownUpMove();
}
else if (MoveInfo.IsStep(LineMoveStep.MI_23_UpdownUp))
{
LogInfo("入库【" + posId + "】抓料失败,已放料回托盘,放托盘离开");
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
MoveEndS();
}
else if (MoveInfo.IsStep(LineMoveStep.MI_10_WaitBox)) else if (MoveInfo.IsStep(LineMoveStep.MI_10_WaitBox))
{ {
if (UpdownIsUp()) if (UpdownIsUp())
......
...@@ -255,6 +255,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -255,6 +255,23 @@ namespace OnlineStore.DeviceLibrary
///// </summary> ///// </summary>
//MI_23_StopCylinderReset, //MI_23_StopCylinderReset,
/// <summary>
///抓料失败:放料到托盘,升降气缸下降
/// </summary>
[Description("入库_抓料失败_升降气缸下降")]
MI_21_CylinderDown = 1121,
/// <summary>
///抓料失败:放料到托盘 夹爪放松
/// </summary>
[Description("入库_放料_夹料气缸放松")]
MI_22_CylinderRelax,
/// <summary>
///抓料失败:放料到托盘 升级气缸上升
/// </summary>
[Description("入库_放料完成_升降气缸上升")]
MI_23_UpdownUp,
#endregion #endregion
#region 移栽装置出入库共同模块 1180-1200 #region 移栽装置出入库共同模块 1180-1200
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!