Commit d0f34a9d LN

入料机构优化

1 个父辈 861a5db3
此文件类型无法预览
20200305
20210322
1.进仓阻挡1下降2秒后自动上升
2.入料机构点击暂停时只暂停入料,托盘继续处理。
3.入料机构提前获取库位号,提前拦截托盘。
20200305
进仓升降轴增加P3详细位置配置。需要修改配置文件。
扫码dll替换。
......
......@@ -83,15 +83,25 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
protected override void BusyMoveProcess()
{
if (MoveStop)
if (!baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
return;
if (MoveStop)
{
return;
}
}
if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture))
{
CheckFixtureProcess();
}
if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
if (MoveStop)
{
return;
}
}
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) || this.SecondMoveInfo.MoveType.Equals(LineMoveType.InStore))
{
InStoreProcess();
......
......@@ -287,15 +287,15 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp))
{
// SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_07_LocationUp);
// CheckLog("托盘检测: " + SecondMoveInfo.SLog + " , 定位气缸上升 )");
// if (Config.SidesWayNum > 0)
// {
// CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
// }
//}
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_07_LocationUp))
//{
// SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_07_LocationUp);
// CheckLog("托盘检测: " + SecondMoveInfo.SLog + " , 定位气缸上升 )");
// if (Config.SidesWayNum > 0)
// {
// CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
// }
//}
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_07_LocationUp))
//{
CheckLog("托盘阻挡*************** 托盘号【" + currTrayNum + "】");
//判断盘是空盘,空盘并且编号正确才需要放料盘过去
......@@ -306,7 +306,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.EndStepWait();
if (Config.SidesWayNum > 0)
{
// CylinderMove(null, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
// CylinderMove(null, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
}
}
else
......@@ -417,16 +417,27 @@ namespace OnlineStore.DeviceLibrary
SMoveEnd();
}
#endregion
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
{
if (MoveInfo.MoveStep < LineMoveStep.FI_25_WaitTray)
{
if (SecondMoveInfo.IsTimeOut(30))
{
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待入库托盘超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg + ",暂时放托盘离开");
TrayMoveOk();
}
}
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_200_WaitInoutParam))
{
if ( StartTrayOut(SecondMoveInfo.MoveParam))
if (StartTrayOut(SecondMoveInfo.MoveParam))
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd);
}
//如果当前无料串,或者料串已离开,直接放行 托盘
//如果当前无料串,或者料串已离开,直接放行 托盘
else if (SecondMoveInfo.IsTimeOut(30))
{
......@@ -816,18 +827,6 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_BatchAxisToP3))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
LastHeight = GetHeight();
if (LastWidth.Equals(7))
......@@ -846,6 +845,37 @@ namespace OnlineStore.DeviceLibrary
LastHeight = 12;
}
}
if (MoveCylineIsUp())
{
//MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
//InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
//CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
FI_21_CylinderGive();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
//LastHeight = GetHeight();
//if (LastWidth.Equals(7))
//{
// if (LastHeight > 16)
// {
// LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",七寸盘默认盘高最高=16,修改高度为16");
// LastHeight = 16;
// }
//}
//else
//{
// if (LastHeight < 12)
// {
// LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",非七寸盘默认盘高最低=12,修改高度为12");
// LastHeight = 12;
// }
//}
//判断是否还有料盘
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW))
{
......@@ -876,9 +906,10 @@ namespace OnlineStore.DeviceLibrary
{
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
//MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
//InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
//CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
FI_21_CylinderGive();
}
else
{
......@@ -902,44 +933,37 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_BatchAxisDown))
{
//if (Config.DIList.ContainsKey(IO_Type.ReelCheck) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.LOW))
FI_25_WaitTray();
//FI_24_GetPosID();
}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_WaitReelCheck))
//{
// FI_24_GetPosID();
//}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_GetPosID))
//{
// FI_25_WaitTray();
//if (getPosTask.IsCompleted && LastPosParam != null)
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_23_WaitReelCheck);
// InLog(" " + MoveInfo.SLog + " 等待料盘检测信号:ReelCheck");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ReelCheck, IO_VALUE.HIGH));
// MoveInfo.NextMoveStep(LineMoveStep.FI_25_WaitTray);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
// if ((!LastPosParam.PlateH.Equals(LastHeight)) || (!LastPosParam.PlateW.Equals(LastWidth)))
// {
// InLog(" " + MoveInfo.SLog + " 原有料盘尺寸:【" + LastWidth + "X" + LastHeight + "】更改为服务器返回尺寸【" + LastPosParam.PlateW + "X" + LastPosParam.PlateH + "】 ");
// LastWidth = LastPosParam.PlateW;
// LastHeight = LastPosParam.PlateH;
// }
// InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 " + LastPosParam.ToStr() + "");
// getPosIdMsg = "";
// ClearTimeoutAlarm("获取库位号超时");
//}
//else
{
FI_24_GetPosID();
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_WaitReelCheck))
{
FI_24_GetPosID();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_GetPosID))
{
if (getPosTask.IsCompleted && LastPosParam != null)
{
MoveInfo.NextMoveStep(LineMoveStep.FI_25_WaitTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
if ((!LastPosParam.PlateH.Equals(LastHeight)) || (!LastPosParam.PlateW.Equals(LastWidth)))
{
InLog(" " + MoveInfo.SLog + " 原有料盘尺寸:【" + LastWidth + "X" + LastHeight + "】更改为服务器返回尺寸【" + LastPosParam.PlateW + "X" + LastPosParam.PlateH + "】 ");
LastWidth = LastPosParam.PlateW;
LastHeight = LastPosParam.PlateH;
}
InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 " + LastPosParam.ToStr() + "");
getPosIdMsg = "";
ClearTimeoutAlarm("获取库位号超时");
}
else if (MoveInfo.IsTimeOut(120))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 "+ getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 30);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
//else if (MoveInfo.IsTimeOut(120))
//{
// WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 "+ getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
// LogUtil.error(WarnMsg, DeviceID * 1000 + 30);
// Alarm(LineAlarmType.IoSingleTimeOut);
//}
//}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))//TODO
{
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
......@@ -1133,14 +1157,46 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
private void FI_25_WaitTray()
{
if (getPosTask.IsCompleted && LastPosParam != null)
{
MoveInfo.NextMoveStep(LineMoveStep.FI_25_WaitTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
if ((!LastPosParam.PlateH.Equals(LastHeight)) || (!LastPosParam.PlateW.Equals(LastWidth)))
{
InLog(" " + MoveInfo.SLog + " 原有料盘尺寸:【" + LastWidth + "X" + LastHeight + "】更改为服务器返回尺寸【" + LastPosParam.PlateW + "X" + LastPosParam.PlateH + "】 ");
LastWidth = LastPosParam.PlateW;
LastHeight = LastPosParam.PlateH;
}
InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 " + LastPosParam.ToStr() + "");
getPosIdMsg = "";
ClearTimeoutAlarm("获取库位号超时");
}
else if (MoveInfo.IsTimeOut(30))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 " + getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 30);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
private void FI_21_CylinderGive()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
FI_24_GetPosID();
}
private Task getPosTask = null;
private InOutParam LastPosParam = null;
private string getPosIdMsg = "";
private void FI_24_GetPosID()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_24_GetPosID);
//MoveInfo.NextMoveStep(LineMoveStep.FI_24_GetPosID);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
InLog("清空LastPosResult,从服务器获取入库库位");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LastPosParam = null;
string code = CodeManager.ProcessCode(LastCodeList);
lastcode = code;
......@@ -1186,7 +1242,7 @@ namespace OnlineStore.DeviceLibrary
break;
}
count++;
}
}
}
catch (Exception ex)
{
......@@ -1596,10 +1652,21 @@ namespace OnlineStore.DeviceLibrary
if (trayCanUse && runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
//入料执行中, 且需要空托盘
if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) && MoveInfo.IsInWait.Equals(false))
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) ||
MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_BatchAxisDown)||
MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_CylinderGive))
//if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) && MoveInfo.IsInWait.Equals(false))
{
if (!MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))
{
//如果报警直接离开
if ((!alarmType.Equals(LineAlarmType.None)) || WarnMsg.Contains("获取库位号超时"))
{
return false;
}
}
if (NeedEmptyTrayGo())
{
LogUtil.info(Name + "拦截到空托盘【" + trayNum + "】,后续料仓需要空托盘,放行托盘");
......@@ -1640,8 +1707,19 @@ namespace OnlineStore.DeviceLibrary
if (runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
//入料执行中, 且需要空托盘
if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) && MoveInfo.IsInWait.Equals(false))
if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) ||
MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_BatchAxisDown) ||
MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_CylinderGive))
//if ((MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))&& MoveInfo.IsInWait.Equals(false))
{
if (!MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))
{
//如果报警直接离开
if ((!alarmType.Equals(LineAlarmType.None)) || WarnMsg.Contains("获取库位号超时"))
{
return false;
}
}
return true;
}
}
......
......@@ -733,16 +733,16 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_22_BatchAxisDown,
/// <summary>
/// 等待料盘检测信号
/// </summary>
FI_23_WaitReelCheck,
///// <summary>
///// 等待料盘检测信号
///// </summary>
//FI_23_WaitReelCheck,
/// <summary>
/// 料盘移栽:从服务器获取入库库位号
/// </summary>
FI_24_GetPosID,
///// <summary>
///// 料盘移栽:从服务器获取入库库位号
///// </summary>
//FI_24_GetPosID,
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!