Commit f4c7862c LN

接驳台bug修改

1 个父辈 3b3761ab
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E96448319),, PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E96448319),,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
PRO,0,对应的横移模块,SidesWayNum,0,, PRO,0,对应的横移模块,SidesWayNum,0,,
......
...@@ -311,11 +311,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,11 +311,19 @@ namespace OnlineStore.DeviceLibrary
JHY_11_TopDown(); JHY_11_TopDown();
} }
} }
private void JHY_10_ReelProEnd() private void TrayCanGo()
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_10_ReelProEnd); //更新托盘为空
LogUtil.info(Name + " 接驳台托盘" + SecondMoveInfo.SLog + ":料盘已移走,更新托盘[" + currTrayNum + "]为空"); if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
TrayManager.UpdateTrayInfo(currTrayNum); {
SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_10_ReelProEnd);
LogUtil.info(Name + " 接驳台托盘" + SecondMoveInfo.SLog + ":料盘已移走,更新托盘[" + currTrayNum + "]为空");
TrayManager.UpdateTrayInfo(currTrayNum);
}
else
{
OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd ");
}
} }
/// <summary> /// <summary>
...@@ -341,9 +349,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -341,9 +349,9 @@ namespace OnlineStore.DeviceLibrary
InOutParam inoup = trayInfo.InoutPar; InOutParam inoup = trayInfo.InoutPar;
if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false)) if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false))
{ {
LogInfo(" 料盘需要横移到出料线:工单出库料" + "" + inoup.ToStr()); LogInfo(" 工单料->接驳台:" + "" + inoup.ToStr());
SecondMoveInfo.MoveParam = inoup; SecondMoveInfo.MoveParam = inoup;
MoveInfo.MoveParam = inoup; //MoveInfo.MoveParam = inoup;
return true; return true;
} }
...@@ -376,7 +384,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -376,7 +384,7 @@ namespace OnlineStore.DeviceLibrary
InOutParam inoup = trayInfo.InoutPar; InOutParam inoup = trayInfo.InoutPar;
if (trayInfo.IsFull && trayInfo.InoutPar.InStoreNg && this.DeviceID.Equals(217)) if (trayInfo.IsFull && trayInfo.InoutPar.InStoreNg && this.DeviceID.Equals(217))
{ {
LogInfo(" 料盘需要移栽到NG箱:入料NG料" + "" + inoup.ToStr()); LogInfo(" NG料->NG箱" + "" + inoup.ToStr());
//如果分配了库位,需要调用取消 //如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "") if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "")
{ {
...@@ -388,7 +396,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -388,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel && this.DeviceID.Equals(217)) else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel && this.DeviceID.Equals(217))
{ {
LogInfo(" 料盘需要移栽到NG箱:紧急料" + "" + inoup.ToStr()); LogInfo(" 紧急料->NG箱" + "" + inoup.ToStr());
SecondMoveInfo.MoveParam = inoup; SecondMoveInfo.MoveParam = inoup;
MoveInfo.MoveParam = inoup; MoveInfo.MoveParam = inoup;
return true; return true;
...@@ -459,7 +467,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -459,7 +467,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.JM_02_CylinderTake); MoveInfo.NextMoveStep(LineMoveStep.JM_02_CylinderTake);
CylinderMove(MoveInfo, IO_Type.HY_MoveCylinder_Give, IO_Type.HY_MoveCylinder_Take); CylinderMove(MoveInfo, IO_Type.HY_MoveCylinder_Give, IO_Type.HY_MoveCylinder_Take);
if (IsNgPro()) if (IsNgPro())
{ {
OutLog(logName + MoveInfo.SLog + ":横移气缸取料端"); OutLog(logName + MoveInfo.SLog + ":横移气缸取料端");
} }
else else
...@@ -504,16 +512,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -504,16 +512,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck))
{ {
//更新托盘为空
if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
{
//托盘可以离开
JHY_10_ReelProEnd();
}
else
{
OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd ");
}
if (IsNgPro()) if (IsNgPro())
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_11_CylinderGive); MoveInfo.NextMoveStep(LineMoveStep.JM_11_CylinderGive);
...@@ -549,26 +548,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -549,26 +548,7 @@ namespace OnlineStore.DeviceLibrary
OutLog(logName + MoveInfo.SLog + ":夹料气缸放松 "); OutLog(logName + MoveInfo.SLog + ":夹料气缸放松 ");
CylinderMove(MoveInfo, IO_Type.HY_ClampCylinder_Work, IO_Type.HY_ClampCylinder_Relax); CylinderMove(MoveInfo, IO_Type.HY_ClampCylinder_Work, IO_Type.HY_ClampCylinder_Relax);
if (MoveInfo.MoveParam.urgentReel)
{
afterPutCutOK = false;
OutLog("紧急出料:" + MoveInfo.SLog + ",料盘已放入NG箱,发送 afterPutCut");
TaskData taskData;
string shefId = "BN";
int ShelfLoc = 1;
string msg = SServerManager.afterPutCut(Name, shefId, MoveInfo.MoveParam.WareCode, "", ShelfLoc, out taskData);
if (String.IsNullOrEmpty(msg).Equals(false))
{
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + shefId + "】【" + ShelfLoc.ToString() + "】afterPutCut 结果:" + msg);
taskData = null;
}
afterPutCutOK = true;
}
else
{
afterPutCutOK = true;
}
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax)) else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax))
{ {
...@@ -589,14 +569,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -589,14 +569,32 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_16_ReelArrive); MoveInfo.NextMoveStep(LineMoveStep.JM_16_ReelArrive);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); 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;
int robotIndex = GetRobotIndex(); if (MoveInfo.MoveParam.urgentReel)
LogUtil.info(Name + MoveInfo.SLog + logName + "送料,接驳台有料,调用arriveRobotLocation=" + robotIndex + "[" + code + "]"); {
string msg = SServerManager.arriveRobotLocation(Name, robotIndex, code); LogUtil.info(Name + MoveInfo.SLog + logName + ",紧急料已放入NG箱,发送 afterPutCut [" + code + "] ");
MoveInfo.EndMove(); TaskData taskData;
runStatus = LineRunStatus.Runing; string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData);
afterPutCutOK = true;
}
else if (!MoveInfo.MoveParam.InStoreNg)
{
int robotIndex = GetRobotIndex();
LogUtil.info(Name + MoveInfo.SLog + logName + ",工单料到达接驳台,发送 arriveRobotLocation=" + robotIndex + "[" + code + "]");
string msg = SServerManager.arriveRobotLocation(Name, robotIndex, code);
afterPutCutOK = true;
}
else
{
afterPutCutOK = true;
}
TrayCanGo();
//MoveInfo.EndMove();
//runStatus = LineRunStatus.Runing;
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_16_ReelArrive)) else if (MoveInfo.IsStep(LineMoveStep.JM_16_ReelArrive))
{ {
...@@ -606,16 +604,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -606,16 +604,21 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_17_CylinderTake)) else if (MoveInfo.IsStep(LineMoveStep.JM_17_CylinderTake))
{ {
string log = "arriveRobotLocation";
if (IsNgPro())
{
log = "afterPutCutTask";
}
if (afterPutCutOK) if (afterPutCutOK)
{ {
ClearTimeoutAlarm("给服务器发送afterPutCutTask完成"); ClearTimeoutAlarm("给服务器发送 "+ log + " 完成");
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
OutLog(logName + MoveInfo.SLog + ":结束 "); OutLog(logName + MoveInfo.SLog + ":结束 ");
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
MoveTimeOut(MoveInfo, "等待给服务器发送afterPutCutTask完成"); MoveTimeOut(MoveInfo, "等待给服务器发送 " + log + " 完成");
} }
} }
else else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!