From b258f911b347427949d5346d8f17fd7c5b42987f Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 19 Jun 2025 09:58:10 +0800 Subject: [PATCH] =?UTF-8?q?XY=E8=BF=90=E5=8A=A8=E4=B8=8D=E5=88=B0=E4=BD=8D?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=8A=A5=E8=AD=A6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Flow/AlarmConstID.cs | 5 ++++ .../Flow/NormalFlow/CalibrationFlow.cs | 29 ++++++++++++++----- .../Flow/NormalFlow/DischargeFlow.cs | 9 +++++- Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs | 10 ++++++- .../Flow/NormalFlow/ThreePointLocationFlow.cs | 9 +++++- .../DischargeModuleGoSafePosFlow.cs | 19 ++++++++++-- .../Flow/SubFlow/FixedGrabProductFlow.cs | 7 ++++- .../Flow/SubFlow/FixturePlaceFlow.cs | 14 +++++++-- .../Flow/SubFlow/FixtureTakeFlow.cs | 7 ++++- .../Flow/SubFlow/ProductLocationFlow.cs | 18 ++++++++---- .../Flow/SubFlow/StockLocationFlow.cs | 18 ++++++++---- Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs | 14 +++++++-- Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs | 7 ++++- Rs.DeweyTester/Properties/AssemblyInfo.cs | 2 +- Rs.DeweyTester/TestFrm.cs | 1 + 15 files changed, 137 insertions(+), 32 deletions(-) diff --git a/Rs.DeweyTester/Flow/AlarmConstID.cs b/Rs.DeweyTester/Flow/AlarmConstID.cs index cc6b4a8..fadb0ed 100644 --- a/Rs.DeweyTester/Flow/AlarmConstID.cs +++ b/Rs.DeweyTester/Flow/AlarmConstID.cs @@ -250,5 +250,10 @@ namespace Rs.MotionPlat.Flow /// public const int Input料盘开始搬运到Empty前报警 = 1050; + /// + /// 轴未到位异常 + /// + public const int 轴未到位异常 = 1051; + } } diff --git a/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs index 1bb4e50..3126d83 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs @@ -180,7 +180,12 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { - + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if(alarmEntity!=null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + step = ECalibrationFlowStep.到取印尼位上方; + } } } break; @@ -346,9 +351,14 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { - logInfo = $"{GetClassName()}轴不在目标位置"; - MessageQueue.Instance.Warn(logInfo); - step = ECalibrationFlowStep.到拍照位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + step = ECalibrationFlowStep.到拍照位; + } } } break; @@ -516,9 +526,14 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { - logInfo = $"{GetClassName()}轴不在目标位置"; - MessageQueue.Instance.Warn(logInfo); - checkStep = ECalibrationCheckFlowStep.到拍照位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + checkStep = ECalibrationCheckFlowStep.到拍照位; + } } } break; diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs index 4f083eb..5fb22f2 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs @@ -632,7 +632,14 @@ namespace Rs.MotionPlat.Flow } else { - flowStep = EDischargeFlowStep.到治具取料等待位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + flowStep = EDischargeFlowStep.到治具取料等待位; + } } } break; diff --git a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs index 997b6fc..93dbfa5 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs @@ -263,7 +263,15 @@ namespace Rs.MotionPlat.Flow } else { - flowStep = EGrrFlowStep.到料仓拍照位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + flowStep = EGrrFlowStep.到料仓拍照位上方; + } + } } break; diff --git a/Rs.DeweyTester/Flow/NormalFlow/ThreePointLocationFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/ThreePointLocationFlow.cs index 6a14c96..0686579 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/ThreePointLocationFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/ThreePointLocationFlow.cs @@ -102,7 +102,14 @@ namespace Rs.MotionPlat.Flow.NormalFlow } else { - step = EThreePointLocationFlowStep.到拍照位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + step = EThreePointLocationFlowStep.到拍照位; + } } } break; diff --git a/Rs.DeweyTester/Flow/SafePosFlow/DischargeModuleGoSafePosFlow.cs b/Rs.DeweyTester/Flow/SafePosFlow/DischargeModuleGoSafePosFlow.cs index f223a14..591a98a 100644 --- a/Rs.DeweyTester/Flow/SafePosFlow/DischargeModuleGoSafePosFlow.cs +++ b/Rs.DeweyTester/Flow/SafePosFlow/DischargeModuleGoSafePosFlow.cs @@ -4,6 +4,7 @@ using Rs.Motion; using Rs.MotionPlat.Commom; using Rs.MotionPlat.Entitys; using Rs.MotionPlat.Flow.Common; +using Rs.MotionPlat.Flow.NormalFlow; using System; using System.Collections.Generic; using System.Linq; @@ -177,7 +178,14 @@ namespace Rs.MotionPlat.Flow.SafePosFlow } else { - moveXStep = EDischargeModuleGoSafePosFlowStep.到安全位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + moveXStep = EDischargeModuleGoSafePosFlowStep.到安全位; + } } } break; @@ -230,7 +238,14 @@ namespace Rs.MotionPlat.Flow.SafePosFlow } else { - moveY1Step = EDischargeModuleGoSafePosFlowStep.到安全位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + logInfo = $"{GetClassName()}轴不在目标位置"; + MessageQueue.Instance.Warn(logInfo); + moveY1Step = EDischargeModuleGoSafePosFlowStep.到安全位; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/FixedGrabProductFlow.cs b/Rs.DeweyTester/Flow/SubFlow/FixedGrabProductFlow.cs index c1b8151..69141e5 100644 --- a/Rs.DeweyTester/Flow/SubFlow/FixedGrabProductFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/FixedGrabProductFlow.cs @@ -114,7 +114,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - step = EFixedGrabProductFlowStep.到拍照位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + step = EFixedGrabProductFlowStep.到拍照位上方; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/FixturePlaceFlow.cs b/Rs.DeweyTester/Flow/SubFlow/FixturePlaceFlow.cs index 0d2fda9..7f92dbd 100644 --- a/Rs.DeweyTester/Flow/SubFlow/FixturePlaceFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/FixturePlaceFlow.cs @@ -109,7 +109,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EFixturePlaceFlowStep.到治具拍照位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EFixturePlaceFlowStep.到治具拍照位; + } } } break; @@ -187,7 +192,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EFixturePlaceFlowStep.到治具放料位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EFixturePlaceFlowStep.到治具放料位上方; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs index 3842175..e24197d 100644 --- a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs @@ -120,7 +120,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EFixtureTakeFlowStep.到治具取料位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EFixtureTakeFlowStep.到治具取料位上方; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs b/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs index 6e5b852..a5bd03d 100644 --- a/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs @@ -118,9 +118,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次"; - MessageQueue.Instance.Warn(logInfo); - flowStep = EProductLocationFlowStep.到料仓拍照起始位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EProductLocationFlowStep.到料仓拍照起始位; + } } } break; @@ -155,9 +158,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次"; - MessageQueue.Instance.Warn(logInfo); - flowStep = EProductLocationFlowStep.到料仓拍照结束位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EProductLocationFlowStep.到料仓拍照结束位; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/StockLocationFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockLocationFlow.cs index 1348da3..eeaeeb4 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockLocationFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockLocationFlow.cs @@ -107,9 +107,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次"; - MessageQueue.Instance.Warn(logInfo); - flowStep = EStockLocationFlowStep.到料仓拍照起始位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EStockLocationFlowStep.到料仓拍照起始位; + } } } break; @@ -143,9 +146,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次"; - MessageQueue.Instance.Warn(logInfo); - flowStep = EStockLocationFlowStep.到料仓拍照结束位; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EStockLocationFlowStep.到料仓拍照结束位; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs index b13a2b9..1da4ce9 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs @@ -160,7 +160,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EStockPlaceFlowStep.到料仓拍照位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EStockPlaceFlowStep.到料仓拍照位上方; + } } } break; @@ -250,7 +255,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EStockPlaceFlowStep.到料仓放料位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EStockPlaceFlowStep.到料仓放料位上方; + } } } break; diff --git a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs index e652111..02e1ec1 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs @@ -146,7 +146,12 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - flowStep = EStockTakeFlowStep.到料仓取料位上方; + AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.轴未到位异常); + if (alarmEntity != null) + { + Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true); + flowStep = EStockTakeFlowStep.到料仓取料位上方; + } } } break; diff --git a/Rs.DeweyTester/Properties/AssemblyInfo.cs b/Rs.DeweyTester/Properties/AssemblyInfo.cs index 385fcaa..1b72a71 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.39.1")] + [assembly: AssemblyVersion("20.25.40.1")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Rs.DeweyTester/TestFrm.cs b/Rs.DeweyTester/TestFrm.cs index 004d2ae..c1b7a60 100644 --- a/Rs.DeweyTester/TestFrm.cs +++ b/Rs.DeweyTester/TestFrm.cs @@ -147,6 +147,7 @@ namespace Rs.MotionPlat MessageQueue.Instance.Insert(logInfo); step++; } + //Thread.Sleep(1000); }