From 577e898a065806dad83977e401b4f7d6fc2bfa84 Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 4 Jan 2024 14:42:04 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BB=8Eng=E6=96=99=E4=BB=93=E6=90=AC=E8=BF=90?= =?UTF-8?q?=E5=88=B0input=E6=96=99=E4=BB=93=E6=B5=81=E7=A8=8B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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(); } } }