Commit d0f34a9d LN

入料机构优化

1 个父辈 861a5db3
此文件类型无法预览
20200305 20210322
1.进仓阻挡1下降2秒后自动上升
2.入料机构点击暂停时只暂停入料,托盘继续处理。
3.入料机构提前获取库位号,提前拦截托盘。
20200305
进仓升降轴增加P3详细位置配置。需要修改配置文件。 进仓升降轴增加P3详细位置配置。需要修改配置文件。
扫码dll替换。 扫码dll替换。
......
...@@ -83,15 +83,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,15 +83,25 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
protected override void BusyMoveProcess() protected override void BusyMoveProcess()
{ {
if (!baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
if (MoveStop) if (MoveStop)
{ {
return; return;
} }
}
if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture)) if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture))
{ {
CheckFixtureProcess(); CheckFixtureProcess();
} }
if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
if (MoveStop)
{
return;
}
}
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) || this.SecondMoveInfo.MoveType.Equals(LineMoveType.InStore)) if (MoveInfo.MoveType.Equals(LineMoveType.InStore) || this.SecondMoveInfo.MoveType.Equals(LineMoveType.InStore))
{ {
InStoreProcess(); InStoreProcess();
......
...@@ -417,11 +417,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,11 +417,22 @@ namespace OnlineStore.DeviceLibrary
SMoveEnd(); SMoveEnd();
} }
#endregion #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)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_200_WaitInoutParam))
{ {
if ( StartTrayOut(SecondMoveInfo.MoveParam)) if (StartTrayOut(SecondMoveInfo.MoveParam))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd);
} }
...@@ -816,18 +827,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -816,18 +827,6 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_BatchAxisToP3)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_BatchAxisToP3))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize); 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)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
LastHeight = GetHeight(); LastHeight = GetHeight();
if (LastWidth.Equals(7)) if (LastWidth.Equals(7))
...@@ -846,6 +845,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -846,6 +845,37 @@ namespace OnlineStore.DeviceLibrary
LastHeight = 12; 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)) if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW))
{ {
...@@ -876,9 +906,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -876,9 +906,10 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveCylineIsUp()) if (MoveCylineIsUp())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive); //MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderGive);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL"); //InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
FI_21_CylinderGive();
} }
else else
{ {
...@@ -902,44 +933,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -902,44 +933,37 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_BatchAxisDown)) 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))
//{ //{
// MoveInfo.NextMoveStep(LineMoveStep.FI_23_WaitReelCheck); // FI_24_GetPosID();
// InLog(" " + MoveInfo.SLog + " 等待料盘检测信号:ReelCheck"); //}
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ReelCheck, IO_VALUE.HIGH)); //else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_GetPosID))
//{
// 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(120))
//{
// WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 "+ getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
// LogUtil.error(WarnMsg, DeviceID * 1000 + 30);
// Alarm(LineAlarmType.IoSingleTimeOut);
//}
//} //}
//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.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))//TODO else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray))//TODO
{ {
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
...@@ -1133,14 +1157,46 @@ namespace OnlineStore.DeviceLibrary ...@@ -1133,14 +1157,46 @@ namespace OnlineStore.DeviceLibrary
#endregion #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 Task getPosTask = null;
private InOutParam LastPosParam = null; private InOutParam LastPosParam = null;
private string getPosIdMsg = ""; private string getPosIdMsg = "";
private void FI_24_GetPosID() 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,从服务器获取入库库位"); InLog("清空LastPosResult,从服务器获取入库库位");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LastPosParam = null; LastPosParam = null;
string code = CodeManager.ProcessCode(LastCodeList); string code = CodeManager.ProcessCode(LastCodeList);
lastcode = code; lastcode = code;
...@@ -1596,10 +1652,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -1596,10 +1652,21 @@ namespace OnlineStore.DeviceLibrary
if (trayCanUse && runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore)) 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.Equals(LineMoveStep.FI_25_WaitTray) ||
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_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()) if (NeedEmptyTrayGo())
{ {
LogUtil.info(Name + "拦截到空托盘【" + trayNum + "】,后续料仓需要空托盘,放行托盘"); LogUtil.info(Name + "拦截到空托盘【" + trayNum + "】,后续料仓需要空托盘,放行托盘");
...@@ -1640,8 +1707,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -1640,8 +1707,19 @@ namespace OnlineStore.DeviceLibrary
if (runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore)) 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; return true;
} }
} }
......
...@@ -733,16 +733,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -733,16 +733,16 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
FI_22_BatchAxisDown, FI_22_BatchAxisDown,
/// <summary> ///// <summary>
/// 等待料盘检测信号 ///// 等待料盘检测信号
/// </summary> ///// </summary>
FI_23_WaitReelCheck, //FI_23_WaitReelCheck,
/// <summary> ///// <summary>
/// 料盘移栽:从服务器获取入库库位号 ///// 料盘移栽:从服务器获取入库库位号
/// </summary> ///// </summary>
FI_24_GetPosID, //FI_24_GetPosID,
/// <summary> /// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码 /// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!