Commit 3493e779 LN

入料T1托盘提前等待,超过15秒不可放料后自动离开

1 个父辈 664e6f40
......@@ -578,11 +578,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " 用户点击了:忽略夹爪有料信号,继续出入库动作");
wait.IsEnd = true;
}
//如果出力>=0.3
//如果出力>=0.3,且已等待5秒
float torque = ClampJwa.GetTorque();
if ((!wait.IsEnd) && torque>0.25)
if ((!wait.IsEnd) && torque > 0.25 && span.TotalSeconds > 5)
{
LogUtil.info(Name + " 无料,但力度为["+ torque + "]>=0.25认为有料");
LogUtil.info(Name + " 无料,但力度为[" + torque + "]>=0.25认为有料");
wait.IsEnd = true;
}
}
......@@ -690,7 +690,7 @@ namespace OnlineStore.DeviceLibrary
}
string posId = MoveInfo.MoveParam != null ? "[" + currTrayNum + "][" + MoveInfo.MoveParam.PosId + "][" + MoveInfo.MoveParam.WareCode + "]" : "";
//baseConfig.DType.Equals(DeviceType.HYEquip)
if (baseConfig.DType.Equals(DeviceType.MoveEquip))
if (baseConfig.DType.Equals(DeviceType.MoveEquip)&&(!OnlyProOutTray))
{
LogUtil.debug(Name + " " + posId + msg);
}
......
......@@ -831,10 +831,11 @@ namespace OnlineStore.DeviceLibrary
{
// MoveInfo.NextMoveStep(LineMoveStep.FI_21_BatchAxisDown);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
int maxtPosition = Config.BatchAxisP3 - Config.Height_ChangeValue * 30; //在上料位置基础上下降30mm
int h = 20;
int maxtPosition = Config.BatchAxisP3 - Config.Height_ChangeValue * h; //在上料位置基础上下降30mm
int currPositon = BatchAxis.GetAclPosition();
int targetPosition = currPositon - Config.Height_ChangeValue * 30;
int targetPosition = currPositon - Config.Height_ChangeValue * h;
if (targetPosition <= Config.BatchAxisP2)
{
targetPosition = Config.BatchAxisP2;
......@@ -1096,7 +1097,7 @@ namespace OnlineStore.DeviceLibrary
{
LineManager.Line.TrayCanLeave(DeviceID);
}
internal bool CurrTrayIsNeed(int trayNum, bool NeedSaveParam)
internal bool CurrTrayIsNeed(int trayNum )
{
try
{
......@@ -1157,10 +1158,10 @@ namespace OnlineStore.DeviceLibrary
return false;
}
}
if (NeedSaveParam)
{
LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 ");
}
//if (NeedSaveParam)
//{
// LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 ");
//}
return true;
}
......@@ -1172,26 +1173,34 @@ namespace OnlineStore.DeviceLibrary
{
//入料执行中, 且需要空托盘
if (MoveInfo.IsStep(LineMoveStep.FI_32_WaitTray) && MoveInfo.IsInWait.Equals(false))
{
return true;
}
//入料执行中, 可以提前拦截托盘
if (MoveInfo.MoveStep >= LineMoveStep.FI_27_CylinderGive && MoveInfo.MoveStep <= LineMoveStep.FI_32_WaitTray)
{
//if (NeedEmptyTrayGo())
//{
// LogUtil.info(Name + "拦截到空托盘【" + trayNum + "】,后续料仓需要空托盘,放行托盘");
// return false;
//}
if (NeedSaveParam)
//如果报警直接离开
if ((!alarmType.Equals(LineAlarmType.None)) || WarnMsg.Contains("获取库位号超时"))
{
LogUtil.info(Name + "拦截到空托盘【" + trayNum + "】,入料执行中,需要空托盘");
return false;
}
return true;
List<MoveEquip> equips = new List<MoveEquip>(LineManager.Line.MoveEquipMap.Values);
//如果有移栽在等待空托盘,需要放行
foreach(MoveEquip move in equips)
{
if (move.IsWaitEmptyTray())
{
return false;
}
}
return true;
}
}
}
if (NeedSaveParam && LineManager.Line.runStatus >= LineRunStatus.HomeMoving && LineManager.Line.CanProcessLine())
{
LogUtil.debug(" 【" + info.ToStr() + "】不需要出入库");
}
//if ( LineManager.Line.runStatus >= LineRunStatus.HomeMoving && LineManager.Line.CanProcessLine())
//{
// LogUtil.debug(" 【" + info.ToStr() + "】不需要出入库");
//}
}
catch (Exception ex)
{
......
......@@ -385,7 +385,16 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.HY08_SL_WaitProcessReel))
{
//如果超15秒,且入料机构还未开始拦截托盘,放托盘离开
if (Config.WorkDeviceId > 0&&MoveInfo.IsTimeOut(15))
{
FeedingEquip feedT = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId];
if (!feedT.WaitEmptyTray())
{
LogUtil.info(Name +" "+ MoveInfo.SLog + " 已等待15秒,且["+ feedT .Name+ "]未开始等待空托盘,先放托盘离开");
TrayCanLeave();
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY09_SL_ReelProEnd))
{
......@@ -527,6 +536,16 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.HY59_SL_WaitProcessReel))
{
//如果超15秒,且入料机构还未开始拦截托盘,放托盘离开
if (Config.WorkDeviceId > 0 && MoveInfo.IsTimeOut(15))
{
FeedingEquip feedT = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId];
if (!feedT.WaitEmptyTray())
{
LogUtil.info(Name + " " + MoveInfo.SLog + " 已等待15秒,且[" + feedT.Name + "]未开始等待空托盘,先放托盘离开");
TrayCanLeave();
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY60_SL_ReelProEnd))
{
......@@ -610,7 +629,7 @@ namespace OnlineStore.DeviceLibrary
//判断上料T是否在入库等待托盘
FeedingEquip feedT = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId];
if (feedT.CurrTrayIsNeed(currTrayNum, false))
if (feedT.CurrTrayIsNeed(currTrayNum ))
{
LogInfo(" " + feedT.Name + "拦截托盘【" + currTrayNum + "】");
return true;
......
......@@ -663,13 +663,13 @@ namespace OnlineStore.DeviceLibrary
string code = MoveInfo.MoveParam.WareCode;
if (MoveInfo.MoveParam.IsNG)
{
OutLog(MoveInfo.SLog + ",NG料已放到出料口,发送 cancelPutInTask ");
InLog(MoveInfo.SLog + ",NG料已放到出料口,发送 cancelPutInTask " );
string msg = SServerManager.cancelPutInTask(Name, code);
afterPutCutOK = true;
}
else
{
OutLog(MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation ");
InLog(MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation ");
string msg = SServerManager.arrive3fRobotLocation(Name, 1, code);
afterPutCutOK = true;
}
......
......@@ -600,10 +600,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_31_GetPosID,
/// <summary>
/// 料盘移栽:此料盘是出库料盘,获取出库信息
/// </summary>
FI_32_GetReelInfo,
///// <summary>
///// 料盘移栽:此料盘是出库料盘,获取出库信息
///// </summary>
//FI_32_GetReelInfo,
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!