Commit d4dcd359 LN

D7与出料机构运动交互判断修改。料盘尺寸范围修改。

1 个父辈 8073de6f
......@@ -13,6 +13,7 @@ namespace OnlineStore.DeviceLibrary
{
public abstract class EquipBase : KTK_Store
{
public bool OnlyProOutTray = false;
public ClampJawBean ClampJwa = null;
public bool MoveStop = false;
......@@ -582,6 +583,10 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore))
{
int storeId = moveInfo.MoveParam.GetStoreId();
if (OnlyProOutTray)
{
storeId = 7;
}
wait.IsEnd = LineServer.BoxCanReviceTray(storeId,out NotOkMsg);
}
else
......
......@@ -455,6 +455,32 @@ namespace OnlineStore.DeviceLibrary
LastHeight = 16;
}
}
else if (LastWidth.Equals(13))
{
if (LastHeight < 28)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最低=28,修改高度为28");
LastHeight = 28;
}
else if (LastHeight > 36)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",13寸盘默认盘高最高=36,修改高度为36");
LastHeight = 36;
}
}
else if (LastWidth.Equals(15))
{
if (LastHeight < 28)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最低=28,修改高度为28");
LastHeight = 28;
}
else if (LastHeight > 48)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",15寸盘默认盘高最高=48,修改高度为48");
LastHeight = 48;
}
}
else
{
if (LastHeight < 12)
......
......@@ -283,7 +283,15 @@ namespace OnlineStore.DeviceLibrary
MoveEquip move = MoveEquipMap[id];
if (move.OnlyProOutTray)
{
return false;
//如果正在入库移栽不能操作,其他时候可以
if (move.MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
if (move.MoveInfo.MoveStep >= LineMoveStep.MI_09_CylinderBefore && move.MoveInfo.MoveStep <= LineMoveStep.MI_14_CylinderAfter)
{
return false;
}
}
return true;
}
if (!move.NoAlarm() || move.waitInStoreList.Count > 0 || move.IsDebug || move.waitOutStoreList.Count > 0)
{
......@@ -316,8 +324,8 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
}
}
}
}
return false;
}
/// <summary>
......
......@@ -14,7 +14,6 @@ namespace OnlineStore.DeviceLibrary
{
public MoveEquip_Config Config;
//public ClampJawBean ClampJwa = null;
public bool OnlyProOutTray = false;
public MoveEquip(string cid, MoveEquip_Config config,ConfigClampJaw jawconfig)
{
this.DeviceID = config.Id;
......
......@@ -568,7 +568,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp))
{
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateTrayInfo(num);
......@@ -582,22 +582,22 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_10_WaitBox))
else if (MoveInfo.IsStep(LineMoveStep.MI_08_WaitBox))
{
if (UpdownIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.MI_08_CylinderBefore);
MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderBefore);
InLog("入库: " + MoveInfo.SLog + " 前后气缸1前进");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
InLog("入库: " + MoveInfo.SLog + " 升降气缸上升");
UpdownUpMove();
}
}
else if (MoveInfo.IsStep(LineMoveStep.MI_08_CylinderBefore))
else if (MoveInfo.IsStep(LineMoveStep.MI_09_CylinderBefore))
{
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before))
{
......@@ -607,7 +607,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_08_CylinderBefore);
MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderBefore);
InLog("入库: " + MoveInfo.SLog + " 前后气缸1前进");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
......@@ -899,20 +899,27 @@ namespace OnlineStore.DeviceLibrary
bool isNeed = false;
UpdateTrayNum();
bool isFull = TrayManager.TrayIsFull(currTrayNum);
string targetP = "";
//出库中,需要拦盘
if (CheckIsNeedOutStore())
{
isNeed = true;
targetP = "【出库空托盘】";
}
else if (isFull && IsInStoreNeed())
{
isNeed = true;
targetP = "【入库托盘】";
}
else if (CheckIsNeedMove())
{
isNeed = true;
targetP = "【出料口托盘】";
}
if (isNeed)
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
CheckLog("托盘阻挡" + SecondMoveInfo.SLog +targetP+ " 等待200");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
}
else
......
......@@ -69,17 +69,31 @@ namespace OnlineStore.DeviceLibrary
public bool IsReached()
{
if (rmaxis != null && rmaxis.IsPortOpen)
try
{
if (rmaxis != null && rmaxis.IsPortOpen)
{
return rmaxis.IsReached;
}
}
catch (Exception ex)
{
return rmaxis.IsReached;
LogUtil.error(Name + " IsReached error :" + ex.ToString());
}
return false;
return false;
}
public bool HasReel()
{
if (rmaxis != null && rmaxis.IsPortOpen)
try
{
if (rmaxis != null && rmaxis.IsPortOpen)
{
return !rmaxis.IsPushEmpty;
}
}
catch (Exception ex)
{
return !rmaxis.IsPushEmpty;
LogUtil.error(Name + " IsReached error :" + ex.ToString());
}
return false;
}
......@@ -109,11 +123,27 @@ namespace OnlineStore.DeviceLibrary
public float GetPosition()
{
return rmaxis.GetPosition();
try
{
return rmaxis.GetPosition();
}
catch (Exception ex)
{
LogUtil.error(Name + " IsReached error :" + ex.ToString());
}
return -1;
}
public float GetTorque()
{
return rmaxis.GetTorque();
try
{
return rmaxis.GetTorque();
}
catch (Exception ex)
{
LogUtil.error(Name + " IsReached error :" + ex.ToString());
}
return -1;
}
public void PushTest(float force, float distance)
{
......
......@@ -165,15 +165,16 @@ namespace OnlineStore.DeviceLibrary
/// 移载装置入库处理,检测夹爪料盘检测信号
/// </summary>
MI_07_ClampCheck,
/// <summary>
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_08_CylinderBefore,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox,
MI_08_WaitBox,
/// <summary>
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_09_CylinderBefore,
/// <summary>
///移载装置入库处理,上下气缸1下降
/// </summary>
......
......@@ -164,7 +164,10 @@ namespace OnlineStore.DeviceLibrary
{
if (box.WaitInStoreList == null || box.WaitInStoreList.Count <= 0)
{
return true;
if (runs.Equals(LineRunStatus.Runing))
{
return true;
}
}
else
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!