diff --git a/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs b/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs index 0a500c2..452e183 100644 --- a/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs +++ b/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs @@ -1,4 +1,5 @@ using Rs.AutoDischarge.V3.Flow; +using Rs.Framework; using Rs.MotionPlat.Commom; using System; using System.Collections.Generic; @@ -31,20 +32,23 @@ namespace Rs.MotionPlat.Flow.SubFlow return instance; } } + string logInfo = string.Empty; public void MoveToInput() { if (Ops.IsOn("2号料仓料盘到位光电检测")) { + logInfo = $"检测到input料仓上料位有料,搬运到empty1料仓"; + MessageQueue.Instance.Insert(logInfo); TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1, null, null, () => { Task.Run(() => { + StockManager.Instance.GetStock(ETrayType.Input).ChangeStatus(EStockTrayStatus.Empty); StockManager.Instance.GetStock(ETrayType.Empty1).Unload(EStockTrayUnLoadMode.Whole, null); }); }); } while (true) { - if(Ops.IsOff("4号料仓料盘到位光电检测"))//如果ng料仓处没有料盘 { if(Ops.IsOn("4号料仓缺盘光电检测"))//如果还有需要搬运的料盘 @@ -54,13 +58,20 @@ namespace Rs.MotionPlat.Flow.SubFlow else { //没有料盘需要搬运了 + logInfo = $"check ng stock hasn't tray,stop load tray,take tray finished!"; + MessageQueue.Instance.Insert(logInfo); break; } } + logInfo = "start take ng tray to input stock"; + MessageQueue.Instance.Insert(logInfo ); TakeTrayFlow.Instance.Take(ETrayType.Ng, ETrayType.Input, null, null, () =>{ - StockManager.Instance.GetStock(ETrayType.Input).Unload(EStockTrayUnLoadMode.Whole, null); + Task.Run(() => { + StockManager.Instance.GetStock(ETrayType.Input).Unload(EStockTrayUnLoadMode.Whole, null); + }); }); } + Ops.Stop(); } } }