From af57b0916909e1a3cb9452de0096cdd3300dccd3 Mon Sep 17 00:00:00 2001 From: lhiven Date: Mon, 19 May 2025 09:00:35 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0Input=E6=96=99?= =?UTF-8?q?=E4=BB=93=E5=8F=96=E6=96=99=E5=A4=B1=E8=B4=A5=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E5=8A=9F=E8=83=BD=E3=80=82=202=E3=80=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0Input=E6=96=99=E7=9B=98=E5=8F=96=E6=96=99?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=90=AC=E8=BF=90=E5=88=B0Empty=E5=89=8D?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E6=9C=89?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Commom/GlobalVar.cs | 14 +++- Rs.DeweyTester/Flow/AlarmConstID.cs | 6 ++ .../Flow/NormalFlow/DischargeFlow.cs | 5 ++ Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs | 83 +++++++++++-------- Rs.DeweyTester/Properties/AssemblyInfo.cs | 2 +- 5 files changed, 73 insertions(+), 37 deletions(-) diff --git a/Rs.DeweyTester/Commom/GlobalVar.cs b/Rs.DeweyTester/Commom/GlobalVar.cs index b63c6fb..d028dbb 100644 --- a/Rs.DeweyTester/Commom/GlobalVar.cs +++ b/Rs.DeweyTester/Commom/GlobalVar.cs @@ -22,7 +22,19 @@ namespace Rs.Framework { #region newpro - + /// + /// 料仓取料失败是否跳过 + /// + [ParameterInit("bool", "true", "system", "料仓取料失败是否跳过")] + public static bool BinTakeFailSkip + { + get + { + return SysConfigParam.GetValue(nameof(BinTakeFailSkip)); + } + } + + /// /// XY到位后延时 /// diff --git a/Rs.DeweyTester/Flow/AlarmConstID.cs b/Rs.DeweyTester/Flow/AlarmConstID.cs index 2e42bd2..cc6b4a8 100644 --- a/Rs.DeweyTester/Flow/AlarmConstID.cs +++ b/Rs.DeweyTester/Flow/AlarmConstID.cs @@ -244,5 +244,11 @@ namespace Rs.MotionPlat.Flow /// 二维码长度异常报警 /// public const int 二维码长度异常报警 = 1049; + + /// + /// Input料盘开始搬运到Empty前报警 + /// + public const int Input料盘开始搬运到Empty前报警 = 1050; + } } diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs index 68274bf..a49f12c 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs @@ -352,6 +352,11 @@ namespace Rs.MotionPlat.Flow { //先把轴移动到安全位 DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); + alarmEntity = AlarmCollection.Get(AlarmConstID.Input料盘开始搬运到Empty前报警); + if(alarmEntity!=null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + } TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty); //GlobalTray.InputTray.ChangeStatus(ESlotStatus.Have); takeSlotIndex = 1; diff --git a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs index ea035d9..14cd1f7 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs @@ -252,43 +252,56 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.排料吸嘴取料失败报警).Transform($"{curNozzle.NozzleIndex}",$"{waitTakeProductSlot.Row}",$"{waitTakeProductSlot.Column}",$"{waitTakeProductSlot.Index}"); - EButtonType btnSelect = Msgbox.ShowDialog(alarmEntity,EButtonType.EndInput | EButtonType.Retry | EButtonType.Skip | EButtonType.Recheck,true); - switch (btnSelect) + if(GlobalVar.BinTakeFailSkip && trayType== ETrayType.Input) { - case EButtonType.EndInput: - logInfo = GetClassName() + $"选择了结束上料"; - MessageQueue.Instance.Insert(logInfo); - GlobalVar.Clear = true; - finished = true; - flowStep = EStockTakeFlowStep.待触发; - break; - case EButtonType.Retry: - logInfo = GetClassName() + $"选择了重试"; - MessageQueue.Instance.Insert(logInfo); - curNozzle.VacBreak(EIoOperate.Close, GetClassName()); - curNozzle.VacSuction(EIoOperate.Close, GetClassName()); - //先把产品放下 - //StockPlaceFlow.Instance.Place(ETrayType.Input, waitTakeProductSlot.Index, curNozzle.NozzleIndex); - flowStep = EStockTakeFlowStep.到料仓取料位下方; - break; - case EButtonType.Recheck: - logInfo = GetClassName() + $"选择了重新检查真空"; - MessageQueue.Instance.Insert(logInfo); - flowStep = EStockTakeFlowStep.料仓取料真空吸检测; - break; - case EButtonType.Skip: - logInfo = GetClassName() + $"选择了跳过"; - curNozzle.VacBreak(EIoOperate.Close, GetClassName()); - curNozzle.VacSuction(EIoOperate.Close, GetClassName()); - MessageQueue.Instance.Insert(logInfo); - finished = true; - flowStep = EStockTakeFlowStep.待触发; - break; - - default: - break; + logInfo = GetClassName() + $"{trayType} bin {waitTakeProductSlot.Index} take fail auto skip"; + MessageQueue.Instance.Insert(logInfo); + curNozzle.VacBreak(EIoOperate.Close, GetClassName()); + curNozzle.VacSuction(EIoOperate.Close, GetClassName()); + finished = true; + flowStep = EStockTakeFlowStep.待触发; + } + else + { + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.排料吸嘴取料失败报警).Transform($"{curNozzle.NozzleIndex}", $"{waitTakeProductSlot.Row}", $"{waitTakeProductSlot.Column}", $"{waitTakeProductSlot.Index}"); + EButtonType btnSelect = Msgbox.ShowDialog(alarmEntity, EButtonType.EndInput | EButtonType.Retry | EButtonType.Skip | EButtonType.Recheck, true); + switch (btnSelect) + { + case EButtonType.EndInput: + logInfo = GetClassName() + $"选择了结束上料"; + MessageQueue.Instance.Insert(logInfo); + GlobalVar.Clear = true; + finished = true; + flowStep = EStockTakeFlowStep.待触发; + break; + case EButtonType.Retry: + logInfo = GetClassName() + $"选择了重试"; + MessageQueue.Instance.Insert(logInfo); + curNozzle.VacBreak(EIoOperate.Close, GetClassName()); + curNozzle.VacSuction(EIoOperate.Close, GetClassName()); + //先把产品放下 + //StockPlaceFlow.Instance.Place(ETrayType.Input, waitTakeProductSlot.Index, curNozzle.NozzleIndex); + flowStep = EStockTakeFlowStep.到料仓取料位下方; + break; + case EButtonType.Recheck: + logInfo = GetClassName() + $"选择了重新检查真空"; + MessageQueue.Instance.Insert(logInfo); + flowStep = EStockTakeFlowStep.料仓取料真空吸检测; + break; + case EButtonType.Skip: + logInfo = GetClassName() + $"选择了跳过"; + curNozzle.VacBreak(EIoOperate.Close, GetClassName()); + curNozzle.VacSuction(EIoOperate.Close, GetClassName()); + MessageQueue.Instance.Insert(logInfo); + finished = true; + flowStep = EStockTakeFlowStep.待触发; + break; + + default: + break; + } } + } break; } diff --git a/Rs.DeweyTester/Properties/AssemblyInfo.cs b/Rs.DeweyTester/Properties/AssemblyInfo.cs index 97808c4..bdcd4a7 100644 --- a/Rs.DeweyTester/Properties/AssemblyInfo.cs +++ b/Rs.DeweyTester/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ using System.Runtime.InteropServices; // //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: - [assembly: AssemblyVersion("20.25.34.2")] + [assembly: AssemblyVersion("20.25.35.1")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]