Commit d1aea8cb LN

托盘上的料盘检测信号需要在托盘顶升之后判断。

1 个父辈 3f682bc0
......@@ -36,8 +36,8 @@ DI,20,进仓20夹料夹紧料盘检测,ClampCylinder_Check,0,PRO_AOI_IP_38,0,进仓20夹料夹
DI,20,进仓20夹料放松端,ClampCylinder_Tighten,1,PRO_AOI_IP_38,0,进仓20夹料放松端,X592,X592
DI,20,进仓20升降上升端,UpDownCylinder_Up,2,PRO_AOI_IP_38,0,进仓20升降上升端,X593,X593
DI,20,进仓20升降下降端,UpDownCylinder_Down,3,PRO_AOI_IP_38,0,进仓20升降下降端,X594,X594
,,,,4,PRO_AOI_IP_38,0,,X595,X595
,,,,5,PRO_AOI_IP_38,0,,X596,X596
DI,19,进仓19料盘检测,TrayCheck,4,PRO_AOI_IP_38,0,进仓19料盘检测,X595,X595
DI,20,进仓20料盘检测,TrayCheck,5,PRO_AOI_IP_38,0,进仓20料盘检测,X596,X596
,,,,6,PRO_AOI_IP_38,0,,X597,X597
,,,,7,PRO_AOI_IP_38,0,,X598,X598
,,,,,,,,,
......
......@@ -132,12 +132,12 @@ namespace OnlineStore.DeviceLibrary
{
if (TrayIsOk())
{
MO_57_CylinderAfter();
MO_61_CylinderAfter();
}
}
else
{
MO_57_CylinderAfter();
MO_61_CylinderAfter();
}
}
}
......@@ -154,12 +154,12 @@ namespace OnlineStore.DeviceLibrary
{
if (TrayIsOk())
{
MO_57_CylinderAfter();
MO_61_CylinderAfter();
}
}
else
{
MO_57_CylinderAfter();
MO_61_CylinderAfter();
}
}
else
......@@ -260,7 +260,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升");
UpdownUpMove();
}
private void MO_57_CylinderAfter()
private void MO_61_CylinderAfter()
{
MoveInfo.NextMoveStep(LineMoveStep.MO_61_CylinderAfter);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
......@@ -298,10 +298,10 @@ namespace OnlineStore.DeviceLibrary
lineStatus = LineStatus.InStoreExecute;
MoveInfo.MoveParam = param;
MoveInfo.NewMove(LineMoveType.InStore);
LogInfo("入库【" + posId + "】处理(移栽):MI_01_ToLineUp, 前后气缸后退,等待夹爪无料");
LogInfo("入库【" + posId + "】处理(移栽):MI_02_ToLineUp, 前后气缸后退,等待夹爪无料");
MoveInfo.NextMoveStep(LineMoveStep.MI_02_ToLineUp);
MoveInfo.NextMoveStep(LineMoveStep.MI_01_ToLineUp);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
if (ClampNeedCheck)
......@@ -316,7 +316,14 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
private void MI_18_UpdownUp()
{
MoveInfo.NextMoveStep(LineMoveStep.MI_18_UpdownUp);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
protected override void InStoreProcess()
{
if (MoveInfo.IsInWait)
......@@ -339,26 +346,54 @@ namespace OnlineStore.DeviceLibrary
IOValue(IO_Type.UpDownCylinder_Up).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.UpDownCylinder_Down).Equals(IO_VALUE.LOW))
{
LogUtil.error(Name + "入库 [" + posId + "],升降气缸下降到托盘[" + currTrayNum + "]取料失败,升降轴上升,禁用托盘,同时放行托盘");
MoveInfo.NextMoveStep(LineMoveStep.MI_18_UpdownUp);
LogUtil.error(Name + "入库 [" + posId + "],升降气缸下降到托盘[" + currTrayNum + "]取料失败,升降轴上升,禁用托盘,同时放行托盘");
LogInfo("入库 [" + posId + "]" + MoveInfo.SLog + ": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
TrayDisableManager.AddDisable(currTrayNum, Name, "入库取料失败");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
MI_18_UpdownUp();
}
}
}
return;
}
if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_02_ToLineUp))
if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_01_ToLineUp))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_03_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
if (MoveInfo.MoveParam?.PlateH >= 30)
{
MoveInfo.NextMoveStep(LineMoveStep.MI_02_TopUP);
InLog("入库 " + MoveInfo.SLog + ": 顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_03_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_02_TopUP))
{
//判断料盘检测信号是否正确
if (CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) &&
LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
{
LogUtil.error(Name + "入库 [" + posId + "],托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,升降轴上升,禁用托盘,同时放行托盘");
LogInfo("入库 [" + posId + "]" + MoveInfo.SLog + ": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降");
TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮");
MI_18_UpdownUp();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_03_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_03_CylinderDown))
{
......@@ -502,7 +537,8 @@ namespace OnlineStore.DeviceLibrary
{
LogInfo("入库【" + posId + "】处理(移栽)全部完成!");
MoveEndS();
}else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_18_UpdownUp))
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_18_UpdownUp))
{
LogInfo("入库【" + posId + "】失败,自动复位完成");
MoveEndS();
......@@ -545,14 +581,14 @@ namespace OnlineStore.DeviceLibrary
{
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
{
if (LineManager.useTrayCheck.Contains(DeviceID) && IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
{
LogInfo(" 入库需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘");
TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮");
return false;
}
//if (LineManager.useTrayCheck.Contains(DeviceID) && IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
//{
// LogInfo(" 入库需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘");
// TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮");
// return false;
//}
//判断是否验证成功,如果验证失败,不入库
else if (LineServer.RightInPosId(StoreID, cc.PosId))
if (LineServer.RightInPosId(StoreID, cc.PosId))
{
SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW, cc.InStoreNg);
return true;
......@@ -595,7 +631,10 @@ namespace OnlineStore.DeviceLibrary
{
if (isFull.Equals(false))
{
if (LineManager.useTrayCheck.Contains(DeviceID) && IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.HIGH))
//顶升上升时才判断
if (CylinderIsOk(IO_Type.TopCylinder_Down,IO_Type.TopCylinder_UP)&&
LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.HIGH))
{
LogInfo(" 出库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮");
......@@ -671,7 +710,15 @@ namespace OnlineStore.DeviceLibrary
}
if (reIndex >= 0)
{
if (!LineServer.BoxCanInStore(StoreID))
if (CylinderIsOk(IO_Type.TopCylinder_Down,IO_Type.TopCylinder_UP)&&
LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
{
LogInfo(" 入库需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘");
TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮");
return false;
}
else if (!LineServer.BoxCanInStore(StoreID))
{
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过");
return false;
......@@ -891,16 +938,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
//if (isFull && LineManager.useTrayCheck.Contains(DeviceID))
//{
// CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200,等待料盘检测信号");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
//}
//else
//{
// CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
//}
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
}
else
{
......@@ -911,9 +949,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayNumError(-1, "");
}
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
//CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
}
}
......@@ -929,28 +965,36 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PlateH >= 30)
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>30,暂不顶升上升");
}
//出库托盘全部顶升,等会再下降
//if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PlateH >= 30)
//{
// CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>30,暂不顶升上升");
//}
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
else if (SecondMoveInfo.MoveParam != null)
else
{
if (!LineServer.RightInPosId(StoreID, SecondMoveInfo.MoveParam.PosId))
if (!LineServer.RightInPosId(StoreID, SecondMoveInfo.MoveParam?.PosId))
{
LogUtil.error(Name + " " + SecondMoveInfo.SLog + "[" + SecondMoveInfo.MoveParam.PosId + "]料仓未验证成功,等待9秒");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(9000));
}
if (SecondMoveInfo.MoveParam.PlateH >= 30)
if (SecondMoveInfo.MoveParam?.PlateH >= 30)
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>30,暂不顶升上升");
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>=30,暂不顶升上升");
}
else
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
}
else
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
//else
//{
// CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )");
// CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
//}
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp))
{
......@@ -964,9 +1008,20 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.MoveParam = new InOutParam(currTrayNum);
isNeedMove = true;
LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait();
//如果是>=30的盘,需要先下降顶升
if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PlateH >= 30)
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库>=30的盘中,顶升先下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_10_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
else
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait();
}
}
else if (CheckIsNeedInStore())
{
......@@ -998,7 +1053,12 @@ namespace OnlineStore.DeviceLibrary
CheckLog("托盘检测" + SecondMoveInfo.SLog + " ,托盘号【" + currTrayNum + "】,直接放盘通过,顶升气缸下降 ");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_10_TopDown))
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,顶升已下下降,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait();
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) )
{
......
......@@ -199,11 +199,15 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///移载装置入库处理,升降气缸上升
/// </summary>
MI_01_UpdownUp = 3001,
MI_00_UpdownUp = 3000,
/// <summary>
///移载装置入库处理,横移气缸后退
/// </summary>
MI_02_ToLineUp ,
MI_01_ToLineUp,
/// <summary>
///移载装置入库处理,如果是>=30的料,先顶升上升
/// </summary>
MI_02_TopUP,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary>
......@@ -313,10 +317,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
MIO_10_WaitProDisableTray=3090,
#endregion
#endregion
#region 移栽装置出库处理 3100-3200
/// <summary>
/// 移载(流水线)装置出库处理, 出库盘,高度>=30,需要先顶升下降
/// </summary>
MO_10_TopDown = 3100,
/// <summary>
/// 移载(流水线)装置出库处理, 检测夹具编码并记忆,托盘 是空盘,并且BOX在出库等待中,开始移栽料盘
/// </summary>
MO_11_CodeRember = 3101,
......@@ -387,7 +395,7 @@ namespace OnlineStore.DeviceLibrary
/// 移栽装置出库处理。 前后气缸1后退
/// </summary>
MO_61_CylinderAfter,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!