From 9821250b66ec3f7285ff3d5a46805c906eb2f867 Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 21 Sep 2023 10:49:26 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96GRR=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Flow/Space/TrayTest.cs | 23 +++++++---- Rs.SkyLine/Flow/WorkFlow.cs | 68 +++++++++++++++++++++++-------- 2 files changed, 67 insertions(+), 24 deletions(-) diff --git a/Rs.SkyLine/Flow/Space/TrayTest.cs b/Rs.SkyLine/Flow/Space/TrayTest.cs index 434eaac..32b7fcd 100644 --- a/Rs.SkyLine/Flow/Space/TrayTest.cs +++ b/Rs.SkyLine/Flow/Space/TrayTest.cs @@ -117,14 +117,23 @@ namespace Rs.AutoDischarge.V3.Flow } else if (NeedLoad) { - //上料 - Status= ETrayStatus.Loading; - finished = false; - NeedLoad = false; - if (m_bWholeLoad) - Step = ETrayTestStep.到上料接料盘位; + if(!Ops.IsOn($"{stockNo}号料仓料盘到位光电检测")) + { + //上料 + Status = ETrayStatus.Loading; + finished = false; + NeedLoad = false; + if (m_bWholeLoad) + Step = ETrayTestStep.到上料接料盘位; + else + Step = ETrayTestStep.到上料终点位; + } else - Step = ETrayTestStep.到上料终点位; + { + Msg.ShowError($"检测到{stockNo}号料仓处有料盘,不能重复送料盘"); + MessageQueue.Instance.Warn($"检测到{stockNo}号料仓处有料盘,不能重复送料盘"); + LogHelper.Debug($"检测到{stockNo}号料仓处有料盘,不能重复送料盘"); + } } } diff --git a/Rs.SkyLine/Flow/WorkFlow.cs b/Rs.SkyLine/Flow/WorkFlow.cs index 4dbf560..7d11c57 100644 --- a/Rs.SkyLine/Flow/WorkFlow.cs +++ b/Rs.SkyLine/Flow/WorkFlow.cs @@ -464,7 +464,8 @@ namespace Rs.MotionPlat.Flow { foreach(Nozzle nl in NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload)) { - nl.SN = nl.FromIndex.ToString().PadLeft(18, '0'); + if(string.IsNullOrEmpty(nl.SN)) + nl.SN = nl.FromIndex.ToString().PadLeft(18, '0'); //nl.SN = GuidHelper.Create(); } flowStep = EWorkFlowStep.到放料位上方; @@ -558,6 +559,24 @@ namespace Rs.MotionPlat.Flow curSlotPoint = TrayPointManager.GetSlotPoint(GlobalVar.CurRecipe, "Turnover", curNozzle.ToIndex + 1, EPointType.RUN); turnoverOffsetPoint = TurnoverSlotOffset.GetOffsetPoint(curNozzle.ToIndex + 1); } + else if (curNozzle.ToType == TurnoverType.ToBeTested) + { + downSlot = GlobalTray.InputTray.GetSlot(ESlotStatus.NotHave); + if (downSlot != null) + { + curSlotPoint = TrayPointManager.GetSlotPoint(GlobalVar.CurRecipe, "Input", downSlot.Index, EPointType.RUN); + } + else + { + Msg.ShowInfo("Input已满,请手动切盘后点击确定!"); + GlobalTray.InputTray.ResetTray(); + GlobalTray.InputTray.Clear(); + + //StockManager.Instance.UnLoad(EStockType.Multi); + //restoreFlowStep = EWorkFlowStep.到放料位上方; + //flowStep = EWorkFlowStep.等待Multi料仓收料完成; + } + } else if (curNozzle.ToType == TurnoverType.Passed) { //OK料仓切盘 @@ -568,13 +587,16 @@ namespace Rs.MotionPlat.Flow } else { - //Msg.ShowInfo("tray has take over,please change tray"); - //GlobalTray.OkTary.ResetTray(); - //GlobalTray.OkTary.Clear(); + Msg.ShowInfo("OK料盘已满,请手动切盘后点击确定"); + GlobalTray.OkTary.ResetTray(); + GlobalTray.OkTary.Clear(); + //TakeTrayFlow.Instance.Take(EStockType.Input, EStockType.Empty1, ELoadUnloadType.Unload); - StockManager.Instance.UnLoad(EStockType.Ok); - restoreFlowStep = EWorkFlowStep.到放料位上方; - flowStep = EWorkFlowStep.等待Ok料仓收料完成; + + + //StockManager.Instance.UnLoad(EStockType.Ok); + //restoreFlowStep = EWorkFlowStep.到放料位上方; + //flowStep = EWorkFlowStep.等待Ok料仓收料完成; } } else if (curNozzle.ToType == TurnoverType.Failed) @@ -586,11 +608,14 @@ namespace Rs.MotionPlat.Flow } else { - //GlobalTray.NgTray.ResetTray(); - //GlobalTray.NgTray.Clear(); - StockManager.Instance.UnLoad(EStockType.Ng); - restoreFlowStep = EWorkFlowStep.到放料位上方; - flowStep = EWorkFlowStep.等待Ng料仓收料完成; + Msg.ShowInfo("NG料盘已满,请手动切盘后点击确定!"); + GlobalTray.NgTray.ResetTray(); + GlobalTray.NgTray.Clear(); + + + //StockManager.Instance.UnLoad(EStockType.Ng); + //restoreFlowStep = EWorkFlowStep.到放料位上方; + //flowStep = EWorkFlowStep.等待Ng料仓收料完成; } } else if (curNozzle.ToType == TurnoverType.Multifunction) @@ -602,13 +627,18 @@ namespace Rs.MotionPlat.Flow } else { - //GlobalTray.MultiTray.ResetTray(); - //GlobalTray.MultiTray.Clear(); - StockManager.Instance.UnLoad(EStockType.Multi); - restoreFlowStep = EWorkFlowStep.到放料位上方; - flowStep = EWorkFlowStep.等待Multi料仓收料完成; + Msg.ShowInfo("多功能料盘已满,请手动切盘后点击确定!"); + GlobalTray.MultiTray.ResetTray(); + GlobalTray.MultiTray.Clear(); + + + //StockManager.Instance.UnLoad(EStockType.Multi); + //restoreFlowStep = EWorkFlowStep.到放料位上方; + //flowStep = EWorkFlowStep.等待Multi料仓收料完成; } } + + } if (curSlotPoint!=null) @@ -769,6 +799,10 @@ namespace Rs.MotionPlat.Flow { GlobalTray.TurnoverTray.ChangeStatus(curNozzle.ToIndex + 1, ESlotStatus.Have); } + else if (curNozzle.ToType == TurnoverType.ToBeTested) + { + GlobalTray.InputTray.ChangeStatus(downSlot.Index, ESlotStatus.Have); + } else if (curNozzle.ToType == TurnoverType.Passed) { GlobalTray.OkTary.ChangeStatus(downSlot.Index, ESlotStatus.Have);