Commit 130d6f3e LN

NeedLeave和NeedEnter级别修改

1 个父辈 53002f69
......@@ -146,22 +146,22 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public static bool NeedEnter(string id, string shelfId="")
public static bool NeedEnter(string id, string shelfId="", ClientLevel level = ClientLevel.Low)
{
ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
SetStatus(id, shelfId, ClientAction.NeedEnter,ClientLevel.Low);
SetStatus(id, shelfId, ClientAction.NeedEnter, level);
return true;
}
return false;
}
public static bool NeedLeave(string id, string shelfId="")
public static bool NeedLeave(string id, string shelfId="",ClientLevel level=ClientLevel.Low)
{
ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
SetStatus(id, shelfId, ClientAction.NeedLeave,ClientLevel.High);
SetStatus(id, shelfId, ClientAction.NeedLeave, level);
return true;
}
return false;
......
......@@ -272,8 +272,13 @@ namespace OnlineStore.DeviceLibrary
LogInfo("重置完成!");
if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
{
ClientLevel level = ClientLevel.Low;
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH))
{
level = ClientLevel.High;
}
LogInfo("重置完成,出口检测到有料架,调用 " + Config.AgvOutName + " AgvClient.NeedLeave");
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
}
MoveEndS();
break;
......@@ -399,8 +404,13 @@ namespace OnlineStore.DeviceLibrary
{
if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
{
ClientLevel level = ClientLevel.Low;
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH))
{
level = ClientLevel.High;
}
//线体出口检测到料架,需要通知AGV小车
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
// SendShelfToAGV();
}
else
......@@ -410,7 +420,16 @@ namespace OnlineStore.DeviceLibrary
//入口无料架,mayEnter
if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.LOW))
{
AgvClient.NeedEnter(Config.AgvInName);
ClientLevel level = ClientLevel.Low;
if (Config.IsCanOut.Equals(1))
{
//如果是出料模块且当前无料架
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.LOW))
{
level = ClientLevel.High;
}
}
AgvClient.NeedEnter(Config.AgvInName, "", level);
}
else
{
......
......@@ -648,7 +648,7 @@ namespace OnlineStore.DeviceLibrary
{
UpdateShelfId();
if (CurrShelfId.EndsWith("00"))
{
{
MoveInfo.NextMoveStep(LineMoveStep.FI_33_BatchAxisToP1);
InLog("料架号【" + CurrShelfId + "】无效,送出料架," + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
......@@ -757,10 +757,10 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(null, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
else
{
{
CylinderMove(null, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
}
BatchAxisToP3(false );
BatchAxisToP3(false);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_BatchAxisToP3))
{
......@@ -789,7 +789,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if (LastHeight <12)
if (LastHeight < 12)
{
LogUtil.error(Name + "计算后高度" + LastWidth + "X" + LastHeight + ",非七寸盘默认盘高最低=12,修改高度为12");
LastHeight = 12;
......@@ -820,7 +820,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_SaveSize))
{
{
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderGive);
......@@ -863,7 +863,7 @@ namespace OnlineStore.DeviceLibrary
FI_21_BatchAxisDown();
}
else
{
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息 ,");
}
Task.Factory.StartNew(delegate
......@@ -917,8 +917,8 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升,上料轴开始慢速上升到P3点,等待检测到料盘");
BatchAxisToP3(false );
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升,上料轴开始慢速上升到P3点,等待检测到料盘");
BatchAxisToP3(false);
}
else
{
......@@ -1032,7 +1032,7 @@ namespace OnlineStore.DeviceLibrary
// MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun);
LastOutShelfId = CurrShelfId;
InLog("上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId=" + LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, ClientLevel.Low);
}
#endregion
......
......@@ -452,7 +452,7 @@ namespace OnlineStore.DeviceLibrary
MoveEndS();
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutLog("送出料串: " + MoveInfo.SLog + ", 出口线体运转,料架到达出口处, 通知AGV取空料架, 出料结束");
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId,Asa.ClientLevel.Low);
}
else if (MoveInfo.MoveStep >= LineMoveStep.FO_211_AxisDownMove && MoveInfo.MoveStep < LineMoveStep.FO_30_BatchAxisToP2)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!