From 83628dc289c7b175a7668ec4fa6bb935d03ad9ee Mon Sep 17 00:00:00 2001 From: lhiven <2366881222@qq.com> Date: Sat, 27 Jan 2024 07:14:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8A=E7=9B=B8=E6=9C=BA?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E7=9B=B8=E6=9C=BA=E4=B8=8D=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs | 6 +++--- Rs.SkyLine/Flow/SubFlow/UpCameraScanBarCodeFlow.cs | 13 +++++++++++-- Rs.SkyLine/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs index 26c64d9..32b714b 100644 --- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs @@ -1928,12 +1928,12 @@ namespace Rs.MotionPlat.Flow else { alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.扫码失败), vr.SlotIndex); - box = MsgBox.ShowDialog(AlarmConstID.扫码失败, alarmInfo, ETipButton.Retry | ETipButton.Cancel); + box = MsgBox.ShowDialog(AlarmConstID.扫码失败, alarmInfo, ETipButton.Retry | ETipButton.Skip); if (box.Button == ETipButton.Retry) { failNum = 1; } - else + else if(box.Button== ETipButton.Skip) { //OnShowGrabResult?.Invoke(vrsigle, true); //复制二维码 @@ -2031,7 +2031,7 @@ namespace Rs.MotionPlat.Flow { //box = MsgBox.ShowDialog(AlarmConstID.ScanBarCodeFailAlarm, $"{vr.SlotIndex}穴位扫码失败", ETipButton.Retry | ETipButton.Skip); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.扫码失败), vr.SlotIndex); - box = MsgBox.ShowDialog(AlarmConstID.扫码失败, alarmInfo, ETipButton.Retry | ETipButton.Cancel); + box = MsgBox.ShowDialog(AlarmConstID.扫码失败, alarmInfo, ETipButton.Retry | ETipButton.Skip); if (box.Button == ETipButton.Retry) { failNum = 1; diff --git a/Rs.SkyLine/Flow/SubFlow/UpCameraScanBarCodeFlow.cs b/Rs.SkyLine/Flow/SubFlow/UpCameraScanBarCodeFlow.cs index cd7425e..2dd070b 100644 --- a/Rs.SkyLine/Flow/SubFlow/UpCameraScanBarCodeFlow.cs +++ b/Rs.SkyLine/Flow/SubFlow/UpCameraScanBarCodeFlow.cs @@ -60,7 +60,7 @@ namespace Rs.MotionPlat.Flow.SubFlow HObject[] grabImages= null; Stopwatch timeout = new Stopwatch(); string logInfo = string.Empty; - + Stopwatch scanBarCodeWait= new Stopwatch(); bool exit = true; //ManualResetEvent grabFinishedEvent = new ManualResetEvent(true); @@ -325,16 +325,25 @@ namespace Rs.MotionPlat.Flow.SubFlow AxisControl.LoadX.ComparePulse(2, false); logInfo = GetClassName() + $"已运动到扫码起始位"; MessageQueue.Instance.Insert(logInfo); + scanBarCodeWait.Restart(); fixedStep = EUpCameraFixedScanBarCodeFlowStep.等待扫码结束; } break; case EUpCameraFixedScanBarCodeFlowStep.等待扫码结束: + if(scanBarCodeWait.ElapsedMilliseconds<3000) + { HObject image = ImageProcess.GetManualImage(); - if(image!=null) + if (image != null) { imageSingle = ImageRotate.Rotate(image, "upCamera"); fixedStep = EUpCameraFixedScanBarCodeFlowStep.拍照结果处理; } + } + else + { + fixedStep = EUpCameraFixedScanBarCodeFlowStep.到扫码位上方; + } + break; case EUpCameraFixedScanBarCodeFlowStep.拍照结果处理: singleResult = VisionManager.TurnoverTrayDumpProductOK(imageSingle, bNeedLocate, bNeedScanBarcode, SlotIndex); diff --git a/Rs.SkyLine/Properties/AssemblyInfo.cs b/Rs.SkyLine/Properties/AssemblyInfo.cs index efff60a..910f893 100644 --- a/Rs.SkyLine/Properties/AssemblyInfo.cs +++ b/Rs.SkyLine/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ using System.Runtime.InteropServices; // //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: - [assembly: AssemblyVersion("2.20.24.4")] + [assembly: AssemblyVersion("2.20.24.5")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]