Commit c8293232 LN

紧急料分盘料优化

1 个父辈 55876bc1
......@@ -431,9 +431,16 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd);
}
else if (MoveInfo.IsTimeOut(180))
else if (MoveInfo.IsTimeOut(120))
{
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待出库移栽超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg + ",暂时放托盘离开");
TrayMoveOk();
}
else if (MoveInfo.IsTimeOut(60))
{
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveType + "][" + SecondMoveInfo.MoveStep + "] 等待开始紧急出料移栽超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待出库移栽超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 11);
Alarm(LineAlarmType.IoSingleTimeOut);
}
......@@ -1287,13 +1294,9 @@ namespace OnlineStore.DeviceLibrary
//此托盘是紧急出料盘,需要通过料架出库
bool debugNeed = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InOrOutStore.Equals(2);
debugNeed = false;
//if (param.PosId.Equals(""))
//{
// param = new InOutParam(trayNum, "紧急出料测试", "1#AC1_3_2", 12, 7);
//}
bool isJinji = (param.urgentReel || param.cutReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing;
//入料失败的盘也从此处出库
// bool instoeEnd = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InStoreNG;
if (debugNeed || isJinji)
{
......@@ -1301,21 +1304,29 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.LOW))
{
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,定位工位无料架,暂不处理", DeviceID + 16);
return false;
}
else if (OutStoreHeight < 0)
{
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,料架未准备好,暂不处理", DeviceID + 17);
return false;
}
else
//如果已经开始送出料架,暂不处理
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore)&& MoveInfo.MoveStep >= LineMoveStep.FO_30_BatchAxisToP2)
{
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,正在送出料架,暂不处理", DeviceID + 18);
return false;
}
if (NeedSaveParam)
{
LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 " );
LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 ");
CheckParam = param;
}
return true;
}
}
}
else
{
......
......@@ -149,6 +149,8 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
private void LineOutStoreProcess()
{
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
......@@ -187,6 +189,8 @@ namespace OnlineStore.DeviceLibrary
OutLog(" 未检测到料架, 准备出库料架结束");
}
}
protected override void OutStoreProcess()
{
if (MoveInfo.IsInWait)
......@@ -274,8 +278,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
//检测到料盘,需要下降指定高度,此处默认下降1cm
int tp = BatchAxis.GetAclPosition() - Config.Height_ChangeValue * 10;
//检测到料盘,需要下降指定高度,此处默认下降2cm
int tp = BatchAxis.GetAclPosition() - Config.Height_ChangeValue * 20;
if (tp < Config.BatchAxisP2)
{
OutLog("准备出库料架 " + MoveInfo.SLog + " :检测到料盘,下降的目标高度为【" + tp + "】<【" + Config.BatchAxisP2 + "】,料架已满,直接送出料架");
......@@ -380,6 +384,11 @@ namespace OnlineStore.DeviceLibrary
private void TrayOutProcess()
{
string outType = "紧急出料 ";
if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.cutReel)
{
outType = "分盘料 ";
}
if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_211_AxisDownMove))
{
//判断伺服检测信号是否亮
......@@ -408,13 +417,13 @@ namespace OnlineStore.DeviceLibrary
if (UpdownAxis.IsInPosition(targetP))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_214_CylinderDown);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构下降");
OutLog(outType + MoveInfo.SLog + ":上料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2);
OutLog("紧急出料" + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP);
OutLog(outType + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
if (MoveInfo.MoveParam.PlateW.Equals(7))
{
......@@ -429,13 +438,13 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FO_212_CylinderTake);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构取料端");
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
}
......@@ -447,32 +456,32 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2);
int targetP = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
OutLog("紧急出料" + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP);
OutLog(outType + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_212_CylinderTake);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构取料端");
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_213_UpdownAxisToP2))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_214_CylinderDown);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构下降");
OutLog(outType + MoveInfo.SLog + ":上料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_214_CylinderDown))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten);
OutLog("紧急出料" + MoveInfo.SLog + ":上料气缸夹紧");
OutLog(outType + MoveInfo.SLog + ":上料气缸夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_215_CylinderTighten))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_216_CylinderUp);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构上升");
OutLog(outType + MoveInfo.SLog + ":上料横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
if (Config.SidesWayNum.Equals(3) && MoveInfo.MoveParam.PlateW.Equals(7))
{
......@@ -487,7 +496,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
OutLog("紧急出料" + MoveInfo.SLog + ":升降伺服到P1");
OutLog(outType + MoveInfo.SLog + ":升降伺服到P1");
if (!UpdownAxis.IsInPosition(Config.UpDownAxisP1))
{
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
......@@ -504,13 +513,13 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FO_218_CylinderGive);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构到放料端");
OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构到放料端前,先上升横移气缸");
OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端前,先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
......@@ -518,7 +527,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_218_CylinderGive))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_219_UpdownAxisToP3);
OutLog("紧急出料 " + MoveInfo.SLog + ":移栽伺服到P3");
OutLog(outType + MoveInfo.SLog + ":移栽伺服到P3");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_219_UpdownAxisToP3))
......@@ -526,7 +535,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreHeight += MoveInfo.MoveParam.PlateH;
OutStoreCount++;
MoveInfo.NextMoveStep(LineMoveStep.FO_220_CylinderSlack);
OutLog("紧急出料 " + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm");
OutLog(outType + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
}
......@@ -534,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
OutLog("紧急出料 " + MoveInfo.SLog + ":移栽伺服上升到待机点P1,通知服务器PutShelfFinished");
OutLog(outType + MoveInfo.SLog + ":移栽伺服上升到待机点P1,通知服务器PutShelfFinished");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
Task.Factory.StartNew(delegate
{
......@@ -556,18 +565,18 @@ namespace OnlineStore.DeviceLibrary
int currPosition = BatchAxis.GetAclPosition();
if (currPosition <= (Config.BatchAxisP2 + Config.Height_ChangeValue * 40))
{
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]需要到P3");
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]需要到P3");
BatchAxisToP3();
}
else
{
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]不需要到P3");
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]不需要到P3");
}
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
OutLog("紧急出料" + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
}
......@@ -601,6 +610,8 @@ namespace OnlineStore.DeviceLibrary
}
}
}
private void SendOutShelfOut(string msg="")
{
MoveInfo.NextMoveStep(LineMoveStep.FO_30_BatchAxisToP2);
......
......@@ -34,7 +34,15 @@ namespace OnlineStore.DeviceLibrary
}
else if (InOrOutStore.Equals(2))
{
type = inoutPar.urgentReel ? "紧急出料:" + inoutPar.ToStr() + "" : "出料:" + inoutPar.ToStr() + " ";
string outType = "出料:";
if (inoutPar.urgentReel)
{
outType = "紧急料:";
}else if (inoutPar.cutReel)
{
outType = "分盘料:";
}
type = outType + inoutPar.ToStr();
}
//return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type +
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!