From c963bc21698dcdc77952055ca6f1c4b548014157 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Thu, 27 Jun 2024 15:26:59 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=97=B6=E6=B8=85=E6=A5=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=202=E3=80=81=E5=A2=9E=E5=8A=A0=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=AE=BE=E5=A4=87=E6=97=B6log=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Flow/NormalFlow/DischargeFlow.cs | 42 ++++++++++++++++++- Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs | 12 ++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs index 35d6298..d54c5a2 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs @@ -140,7 +140,47 @@ namespace Rs.MotionPlat.Flow switch (flowStep) { case EDischargeFlowStep.等待启动: - flowStep = EDischargeFlowStep.工作前准备; + { + //EButtonType button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "清除 NG料盘 数据 确定清除 选择OK 保留 选择否Cancel"); + //if(button== EButtonType.Ok) + //{ + // GlobalTray.NgTray.ChangeStatus(ESlotStatus.NotHave); + //} + //button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "清除 OK料盘 数据 确定清除 选择OK 保留 选择否Cancel"); + //if (button == EButtonType.Ok) + //{ + // GlobalTray.NgTray.ChangeStatus(ESlotStatus.NotHave); + //} + //EButtonType button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "请确认 LOT 信息 信息正确 选择OK 信息错误退出重写 选择Cancel"); + EButtonType button =Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "请确认 LOT信息\r\n信息正确 选择OK\r\n信息错误退出重写 选择Cancel"); + if(button== EButtonType.Ok) + { + button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "是否清除之前数据?\r\n清除点击OK\r\n不清楚点击Cancel"); + if(button== EButtonType.Ok) + { + TestFixtureManager.Instance.GetTestFixture(1).ClearData(); + TestFixtureManager.Instance.GetTestFixture(2).ClearData(); + TestFixtureManager.Instance.GetTestFixture(3).ClearData(); + TestFixtureManager.Instance.GetTestFixture(4).ClearData(); + TestFixtureManager.Instance.GetTestFixture(5).ClearData(); + TestFixtureManager.Instance.GetTestFixture(6).ClearData(); + GlobalTray.NgTray.ChangeStatus(ESlotStatus.NotHave); + GlobalTray.RetestTray.ChangeStatus(ESlotStatus.NotHave); + GlobalTray.OkTary.ChangeStatus(ESlotStatus.NotHave); + flowStep = EDischargeFlowStep.工作前准备; + } + else if(button== EButtonType.Cancel) + { + flowStep = EDischargeFlowStep.工作前准备; + } + + } + else if(button== EButtonType.Cancel) + { + Ops.Stop(); + } + } + //flowStep = EDischargeFlowStep.判断是否需要从料仓取料; break; #region 临时屏蔽 diff --git a/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs b/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs index e75c863..d76990e 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs @@ -56,7 +56,11 @@ namespace Rs.MotionPlat.Flow.NormalFlow switch (prepareTrayStep) { case EPrepareTray2FlowStep.弹出料仓上料: + logInfo = GetClassName() + "准备出仓"; + MessageQueue.Instance.Insert(logInfo); OutStock(); + logInfo = GetClassName() + "准备等待进仓"; + MessageQueue.Instance.Insert(logInfo); InStock(); prepareTrayStep = EPrepareTray2FlowStep.上升一层; break; @@ -70,6 +74,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow { if(HasTray()) { + logInfo = GetClassName() + $"当前层:{GetCurrentLayer()}检测到料盘"; + MessageQueue.Instance.Insert(logInfo); Status = EStockStatus.Ready; MessageQueue.Instance.Insert("ready"); //夹紧料盘 @@ -79,6 +85,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { + logInfo = GetClassName() + $"当前层:{GetCurrentLayer()}未检测到料盘"; + MessageQueue.Instance.Insert(logInfo); prepareTrayStep = EPrepareTray2FlowStep.上升一层; } } @@ -86,6 +94,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow { if (HasTray()) { + logInfo = GetClassName() + $"当前层:{GetCurrentLayer()}检测到料盘"; + MessageQueue.Instance.Insert(logInfo); HoldTray(); GlobalTray.InputTray.ChangeStatus(Controls.ESlotStatus.Have); Status = EStockStatus.Ready; @@ -94,6 +104,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { + logInfo = GetClassName() + $"当前层:{GetCurrentLayer()}未检测到料盘"; + MessageQueue.Instance.Insert(logInfo); Msgbox.ShowDialog(EButtonType.Retry, "Input料仓处料盘少于2盘,选择重试后弹出料仓", "error", true); OutStock(); InStock();