Commit 8a501738 LN

1

1 个父辈 b933db27
......@@ -96,6 +96,18 @@ namespace OnlineStore.AssemblyLine
text += param.ToStr() + "\r";
}
}
else
{
ps = new List<InOutParam>(moveEquip.waitOutStoreList);
if (ps.Count > 0)
{
text = "等待出库列表:\r";
foreach (InOutParam param in ps)
{
text += param.ToStr() + "\r";
}
}
}
if (!lblInstoreList.Text.Equals(text))
{
lblInstoreList.Text = text;
......
......@@ -124,19 +124,25 @@ namespace OnlineStore.DeviceLibrary
string posId = param != null ? param.PosId : "";
if (moveEquip.IsDebug)
{
LogUtil.error( param.ToStr() + " 已经完成出库," + moveEquip.Name + "当前正在调试中,不继续操作!");
LogUtil.error(param.ToStr() + " 已经完成出库," + moveEquip.Name + "当前正在调试中,不继续操作!");
return;
}
//料仓出库完成,移栽装置开始出库检测
if (moveEquip.IsDebug == false && moveEquip.MoveInfo.MoveType == LineMoveType.None && moveEquip.runStatus == LineRunStatus.Runing)
{
LogUtil.info( param.ToStr() + " 已经完成出库,开始" + moveEquip.Name + "出库!");
moveEquip.StartOutStoreMove(param);
LogUtil.info(param.ToStr() + " 已经完成出库,开始" + moveEquip.Name + "出库!");
bool result = moveEquip.StartOutStoreMove(param);
if (!result)
{
LogUtil.info(Name + " 执行出库【" + param.ToStr() + "】失败, 加入等待队列");
moveEquip.AddWaitOutInfo(param);
}
}
else
{
LogUtil.info( param.ToStr() + "已经完成出库," + moveEquip.Name + "正在忙碌中!");
LogUtil.info(param.ToStr() + "已经完成出库," + moveEquip.Name + "正在忙碌中,把出库信息放入列表中!");
moveEquip.AddWaitOutInfo(param);
}
}
......
......@@ -202,7 +202,8 @@ namespace OnlineStore.DeviceLibrary
//若有移栽在出库过程中,则不能扫码
foreach (MoveEquip move in MoveEquipMap.Values)
{
if (move.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
List<InOutParam> ps = new List<InOutParam>(move.waitOutStoreList);
if (move.MoveInfo.MoveType.Equals(LineMoveType.OutStore) || ps.Count > 0)
{
return false;
}
......
......@@ -26,10 +26,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public LineMoveInfo SecondMoveInfo = null;
// public List<InOutParam> waitOutStoreList = new List<InOutParam>();
public List<InOutParam> waitOutStoreList = new List<InOutParam>();
public List<InOutParam> waitInStoreList = new List<InOutParam>();
public object waitInListLock = "";
// public object waitOutListLock = "";
public object waitOutListLock = "";
public MoveEquip(string cid, MoveEquip_Config config)
{
......@@ -206,6 +206,8 @@ namespace OnlineStore.DeviceLibrary
}
}
IOTimeOutProcess();
OutStoreListPro ();
}
catch (Exception ex)
{
......@@ -215,6 +217,44 @@ namespace OnlineStore.DeviceLibrary
isInPro = false;
}
/// <summary>
/// 出库队列处理
/// </summary>
private void OutStoreListPro()
{
//料仓出库完成,移栽装置开始出库检测
if (IsDebug.Equals(false) && MoveInfo.MoveType.Equals(LineMoveType.None) && runStatus.Equals(LineRunStatus.Runing))
{
InOutParam waitOutParma = null;
lock (waitOutListLock)
{
if (waitOutStoreList.Count > 0)
{
waitOutParma = waitOutStoreList[0];
waitOutStoreList.RemoveAt(0);
}
}
if (waitOutParma != null)
{
LogUtil.info(Name + "开始 执行排队中的出库【" + waitOutParma.ToStr() + "】");
//出库
bool result = StartOutStoreMove(waitOutParma);
if (!result)
{
LogUtil.info(Name + " 执行排队中的出库【" + waitOutParma.ToStr() + "】失败,重新加入等待队列");
AddWaitOutInfo(waitOutParma);
}
}
}
}
public void AddWaitOutInfo(InOutParam param)
{
lock (waitOutListLock)
{
waitOutStoreList.Add(param);
}
}
private DateTime preIoTimerOutTime = DateTime.Now;
private void IOTimeOutProcess()
{
......
......@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType == 8)
else if (wait.WaitType.Equals( 8))
{
string posId = moveInfo.MoveParam.PosId;
int id = moveInfo.MoveParam.GetStoreId();
......@@ -191,9 +191,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = param;
MoveInfo.NextMoveStep(LineMoveStep.MO_50_StartOutProcess);
TrayManager.AddNeedEmptyTrayNum();
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
//CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
// OutStoreLog(" 出库【" + posId + "】 叫托盘");
return true;
}
else
......@@ -415,16 +412,13 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:(MI_09_UpDownCylinderUp,上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp);
UpdownUpMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp))
{
int num = MoveInfo.MoveParam.TrayNumber;
InStoreLog("入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进),更新盘号【" + num + "】为空盘");
MoveInfo.NextMoveStep(LineMoveStep.MI_10_BeforeAfterCylinderBefore);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
// int num = TrayManager.GetNum(DeviceID);
//LogInfo("入库【" + posId + "】处理: 物品已移走,重新读取并更新盘号【" + num + "】为空盘");
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
LogInfo("入库【" + posId + "】处理(等待移栽):(判断box门口没有盘, 且可以入库),更新盘号【" + num + "】为空盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateFixtureValue(num, false, 0);
//阻挡气缸移动
......@@ -433,20 +427,17 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_09_TopCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_BeforeAfterCylinderBefore))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_WaitBox))
{
LogInfo("入库【" + posId + "】处理(等待移栽):(判断box门口没有盘, 且可以入库,才能把料盘放下)");
//此处需要等待box门口没有盘
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
InStoreLog("入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进)");
MoveInfo.NextMoveStep(LineMoveStep.MI_10_BeforeAfterCylinderBefore);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_WaitBox))
// else if (StoreMove.MoveStep .Equals( StoreMoveStep.MI_10_WaitBox && GetBox().CanStarInOut())
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_BeforeAfterCylinderBefore))
{
InStoreLog("入库:(MI_11_UpDownCylinderDown ,上下气缸1下降)");
MoveInfo.NextMoveStep(LineMoveStep.MI_11_UpDownCylinderDown);
UpdownDownBoxMove(MoveInfo.MoveParam.PlateH);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_11_UpDownCylinderDown))
{
......@@ -459,24 +450,20 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:(MI_13_UpdownCylinderUp,上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MI_13_UpdownCylinderUp);
UpdownUpMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_13_UpdownCylinderUp))
// else if (StoreMove.MoveStep .Equals( StoreMoveStep.MI_13_UpdownCylinderUp && GetBox().CanStarInOut())
{
InStoreLog("入库:(MI_14_BeforeAfterCylinderAfter,前后气缸1后退 )");
MoveInfo.NextMoveStep(LineMoveStep.MI_14_BeforeAfterCylinderAfter);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
//此时box就可以入库操作了 //触发事件,BOX入库
//MoveEndEvent.Invoke(DeviceID, MoveInfo.MoveType, MoveInfo.MoveParam);
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_14_BeforeAfterCylinderAfter))
{
InStoreLog("入库:(MI_15_SendEnd , 送料流程完成)");
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendEnd);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendEnd))
......
......@@ -297,7 +297,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (WaitType == 9)
{
return "入库BOX可以开始入库";
return "BOX可以开始入库";
}
else
{
......
......@@ -307,10 +307,7 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,检测 夹具编码
/// </summary>
MI_05_CodeCheck = 3005,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox=3006,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary>
......@@ -331,6 +328,11 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_10_BeforeAfterCylinderBefore = 3010,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox = 3006,
/// <summary>
///移载装置入库处理,上下气缸1下降
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!