Commit 62d886d7 LN

提前获取库位号。抓料时托盘提前等待放料。发送是否紧急料给出料机构

1 个父辈 7874d5c5
......@@ -2,6 +2,7 @@
1.脆盘料号配置增加界面,修改后实时生效。
2.预扫码扫码失败照片保存到文件夹。
3.紧急料直接放入NG箱
4.入料优化:提前获取库位号。抓料时托盘提前等待放料。
20200426
......
......@@ -412,24 +412,22 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.FI_25_CheckTray))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_26_BatchAxisToP3);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//LastWidth = GetWidth();
//MoveInfo.MoveParam.PlateW = LastWidth;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InLog("料盘移栽" + MoveInfo.SLog + ":提升伺服运动到P3,横移气缸上升 ");
CylinderMove(null, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
BatchAxisToP3(false);
}
else if (MoveInfo.IsStep(LineMoveStep.FI_26_BatchAxisToP3))
{
FI_27_SaveSize();
MoveInfo.NextMoveStep(LineMoveStep.FI_27_CylinderGive);
MoveInfo.NextMoveStep(LineMoveStep.FI_28_CylinderGive);
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);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
LastHeight = GetHeight();
MoveInfo.MoveParam.PlateH = LastHeight;
//LastHeight = GetHeight();
//MoveInfo.MoveParam.PlateH = LastHeight;
FI_31_GetPosID();
//判断是否还有料盘
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW))
{
......@@ -454,56 +452,12 @@ namespace OnlineStore.DeviceLibrary
YuScanCode();
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_27_CylinderGive))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_28_SaveSize);
LastWidth = GetWidth();
MoveInfo.MoveParam.PlateW = LastWidth;
InLog("料盘移栽" + MoveInfo.SLog + ":获取到料盘尺寸 [" + LastWidth + "X" + LastHeight + "]");
if (LastWidth.Equals(7))
{
if (LastHeight > 30)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",七寸盘默认盘高最高=30,修改高度为30");
LastHeight = 30;
}
}
else if (LastWidth.Equals(13))
{
if (LastHeight < 16)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最低=16,修改高度为16");
LastHeight = 16;
}
else if (LastHeight > 36)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最高=36,修改高度为36");
LastHeight = 36;
}
}
else if (LastWidth.Equals(15))
{
if (LastHeight < 16)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最低=16,修改高度为16");
LastHeight = 16;
}
else if (LastHeight > 48)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最高=48,修改高度为48");
LastHeight = 48;
}
}
else
{
if (LastHeight < 12)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",非七寸盘默认盘高最低=12,修改高度为12");
LastHeight = 12;
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_28_SaveSize))
//else if (MoveInfo.IsStep(LineMoveStep.FI_28_CylinderGive))
//{
// FI_27_SaveSize();
//}
else if (MoveInfo.IsStep(LineMoveStep.FI_28_CylinderGive))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_29_BatchAxisDown);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
......@@ -515,38 +469,14 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.FI_29_BatchAxisDown))
{
FI_31_GetPosID();
}
else if (MoveInfo.IsStep(LineMoveStep.FI_31_GetPosID))
{
if (getPosTask.IsCompleted && LastPosParam != null)
{
MoveInfo.MoveParam = LastPosParam.Clone();
MoveInfo.NextMoveStep(LineMoveStep.FI_32_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;
}
if (LastResult.Equals(98))
{
InLog(" " + MoveInfo.SLog + " 出库料,开始拦截空托盘 ");
}
else
{
InLog(" " + MoveInfo.SLog + " 入库料,开始拦截空托盘 ");
}
getPosIdMsg = "";
ClearTimeoutAlarm("获取库位号超时");
}
else if (MoveInfo.IsTimeOut(120))
{
MoveTimeOut(MoveInfo, "获取库位号超时 " + getPosIdMsg);
}
FI_32_WaitTray();
//FI_31_GetPosID();
}
//else if (MoveInfo.IsStep(LineMoveStep.FI_31_GetPosID))
//{
// FI_32_WaitTray();
//}
else if (MoveInfo.IsStep(LineMoveStep.FI_32_WaitTray))//TODO
{
currTrayNum = -1;
......@@ -766,6 +696,91 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
private void FI_32_WaitTray()
{
if (getPosTask!=null&& getPosTask.IsCompleted && LastPosParam != null)
{
MoveInfo.MoveParam = LastPosParam.Clone();
MoveInfo.NextMoveStep(LineMoveStep.FI_32_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;
}
if (LastResult.Equals(98))
{
InLog(" " + MoveInfo.SLog + " 出库料,开始拦截空托盘 ");
}
else
{
InLog(" " + MoveInfo.SLog + " 入库料,开始拦截空托盘 ");
}
getPosIdMsg = "";
ClearTimeoutAlarm("获取库位号超时");
}
else if (MoveInfo.IsTimeOut(15))
{
MoveTimeOut(MoveInfo, "获取库位号超时 " + getPosIdMsg);
}
}
private void FI_27_SaveSize()
{
MoveInfo.MoveParam.PlateH = LastHeight; MoveInfo.NextMoveStep(LineMoveStep.FI_27_SaveSize);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
LastHeight = GetHeight();
LastWidth = GetWidth();
MoveInfo.MoveParam.PlateW = LastWidth;
InLog("料盘移栽" + MoveInfo.SLog + ":获取到料盘尺寸 [" + LastWidth + "X" + LastHeight + "]");
if (LastWidth.Equals(7))
{
if (LastHeight > 30)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",七寸盘默认盘高最高=30,修改高度为30");
LastHeight = 30;
}
}
else if (LastWidth.Equals(13))
{
if (LastHeight < 16)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最低=16,修改高度为16");
LastHeight = 16;
}
else if (LastHeight > 36)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最高=36,修改高度为36");
LastHeight = 36;
}
}
else if (LastWidth.Equals(15))
{
if (LastHeight < 16)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最低=16,修改高度为16");
LastHeight = 16;
}
else if (LastHeight > 48)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最高=48,修改高度为48");
LastHeight = 48;
}
}
else
{
if (LastHeight < 12)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",非七寸盘默认盘高最低=12,修改高度为12");
LastHeight = 12;
}
}
}
private void FI_37_TrayMoveOk()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_37_TrayMoveOk);
......@@ -780,9 +795,9 @@ namespace OnlineStore.DeviceLibrary
private string getPosIdMsg = "";
private void FI_31_GetPosID()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_31_GetPosID);
//MoveInfo.NextMoveStep(LineMoveStep.FI_31_GetPosID);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
InLog("清空LastPosResult,从服务器获取入库库位");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LastPosParam = null;
string code = CodeManager.ProcessCode(LastCodeList);
lastcode = code;
......@@ -1195,7 +1210,7 @@ namespace OnlineStore.DeviceLibrary
return true;
}
//入料执行中, 可以提前拦截托盘
else if (MoveInfo.MoveStep >= LineMoveStep.FI_26_BatchAxisToP3 && MoveInfo.MoveStep <= LineMoveStep.FI_32_WaitTray)
else if (MoveInfo.MoveStep >= LineMoveStep.FI_22_WaitTime && MoveInfo.MoveStep <= LineMoveStep.FI_32_WaitTray)
{
//如果报警直接离开
if ((!alarmType.Equals(LineAlarmType.None)) || WarnMsg.Contains("获取库位号超时"))
......
......@@ -584,16 +584,16 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:批量轴到P3点
/// </summary>
FI_26_BatchAxisToP3,
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// </summary>
FI_27_CylinderGive,
/// <summary>
/// 料盘移栽:记录高度尺寸
/// </summary>
FI_28_SaveSize,
FI_27_SaveSize,
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// </summary>
FI_28_CylinderGive,
/// <summary>
/// 提升轴下降到料盘不溢出的位置
/// </summary>
......
......@@ -321,6 +321,7 @@ namespace OnlineStore.DeviceLibrary
paramList.Add(S_WareCode, param.WareCode);
paramList.Add(S_RFID, param.rfid);
paramList.Add(S_NG, param.IsNG);
paramList.Add(S_urgentReel, param.urgentReel);
string msg = ToParamStr(paramList);
TcpClientBean client = ClientMap[id];
......@@ -512,6 +513,7 @@ namespace OnlineStore.DeviceLibrary
public static string S_IsDebug = "IsDebug";
public static string S_RFID = "rfid";
public static string S_NG = "IsNg";
public static string S_urgentReel = "urgentReel";
}
//public class StoreReviceBean
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!