Commit ca66a198 LN

1.HY15处,紧急料一盘去出料四,一盘去HY17

2.HY9处,如果进仓15和进仓16都有托盘,空托盘直接横移
1 个父辈 765dacc6

20230811
1.HY15处,紧急料一盘去出料四,一盘去HY17
2.HY9处,如果进仓15和进仓16都有托盘,空托盘直接横移
......
......@@ -934,6 +934,9 @@ namespace OnlineStore.DeviceLibrary
OL_StopCylinderUp(MoveInfo);
}
}
private bool preToOut4 = false;//HY15上盘分盘料去出料四,后面一盘分配料去NG箱
private bool TrayNeedHY(int trayNum)
{
try
......@@ -1028,7 +1031,18 @@ namespace OnlineStore.DeviceLibrary
}
}
}
else
{
//如果进仓15,进仓16有料,空料盘直接横移
MoveEquip move15 = LineManager.Line.MoveEquipMap[15];
MoveEquip move16 = LineManager.Line.MoveEquipMap[16];
if (move15.hasTray() && move16.hasTray())
{
return true;
}
}
}
else if (DeviceID.Equals(215))
{
......@@ -1041,21 +1055,42 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
if (tray.InOrOutStore.Equals(2) && (!tray.InoutPar.cutReel) && (!tray.InoutPar.urgentReel))
//if (tray.InOrOutStore.Equals(2) && (!tray.InoutPar.cutReel) && (!tray.InoutPar.urgentReel))
if (tray.InOrOutStore.Equals(2))
{
return true;
if (tray.InoutPar.cutReel || tray.InoutPar.urgentReel)
{
if (preToOut4)
{
LogUtil.info(Name + "分盘紧急料,上一盘去出料四,这一盘需要横移: " + tray.InoutPar.ToShortStr());
preToOut4 = false;
return true;
}
else
{
preToOut4 = true;
return false;
}
}
else
{
return true;
}
}
else if (tray.InOrOutStore.Equals(1))
{
{
int storeId = tray.InoutPar.GetStoreId();
List<int> instoreId = new List<int> { 11, 12, 23, 24 };
if (!instoreId.Contains(storeId))
{
return true;
}
}
}
else if(tray.InOrOutStore.Equals(2) && tray.InoutPar.urgentReel)
else if (tray.InOrOutStore.Equals(2) && tray.InoutPar.urgentReel)
{
pandianliao++;
if (pandianliao >= 2)
......@@ -1063,7 +1098,7 @@ namespace OnlineStore.DeviceLibrary
bool needhy = SServerManager.canReelToBelt(Name, tray.InoutPar.WareCode, false);
if (needhy)
{
LogUtil.info(Name + "盘点料["+ pandianliao + "]:需要横移 " + tray.InoutPar.ToShortStr());
LogUtil.info(Name + "盘点料[" + pandianliao + "]:需要横移 " + tray.InoutPar.ToShortStr());
pandianliao = 0;
return true;
}
......@@ -1163,16 +1198,25 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = param;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && (param.urgentReel || param.cutReel) && this.DeviceID.Equals(216))
{
string lName = param.urgentReel ? "紧急料" : "盘点料";
//盘点料或紧急料直接到NG箱
LogInfo($" C1->出料线, {lName} " + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
{
bool needToBielt = SServerManager.canReelToBelt(Name, trayInfo.InoutPar.WareCode,false);
bool needToBielt = SServerManager.canReelToBelt(Name, trayInfo.InoutPar.WareCode, false);
if (needToBielt)
{
//盘点料到NG箱
LogInfo($" C1->出料线,canReelToBelt={needToBielt} ,:盘点料" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
}
//else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
//{
......
......@@ -513,6 +513,13 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.MoveParam = inoup;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.cutReel && this.DeviceID.Equals(217))
{
//盘点料到NG箱
LogInfo(" 分盘料->NG箱" + "" + inoup.ToStr());
SecondMoveInfo.MoveParam = inoup;
return true;
}
else if (trayInfo.IsFull && trayInfo.InoutPar.IsNG && this.DeviceID.Equals(217) && trayInfo.InOrOutStore.Equals(2))
{
//工单料改为NG料
......@@ -801,6 +808,12 @@ namespace OnlineStore.DeviceLibrary
TaskData taskData;
string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData);
afterPutCutOK = true;
}else if (MoveInfo.MoveParam.cutReel)
{
OutLog(logName + MoveInfo.SLog + ",分盘料已放入NG箱,发送 afterPutCut ");
TaskData taskData;
string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData);
afterPutCutOK = true;
}
//else if (!MoveInfo.MoveParam.IsNG)
//{
......
......@@ -1164,5 +1164,27 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
internal bool hasTray()
{
if(SecondMoveInfo.MoveType == LineMoveType.Fixture)
{
//顶升上升端
if (IOManager.DOValue(IO_Type.TopCylinder_Up, DeviceID).Equals(IO_VALUE.HIGH))
{
return true;
}
}
//判断是否有托盘
if (IOValue(IO_Type.StopCheck1).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.StopCheck2).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!