From e263ab8a5a2a6e27da794e1c6d60b4065face782 Mon Sep 17 00:00:00 2001 From: to3796zw Date: Fri, 19 Jun 2026 15:25:53 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20ScoutNormal=20=ED=96=89=20=EC=A0=84?= =?UTF-8?q?=ED=99=98=20sleep=20=EB=B6=84=EB=A6=AC=20(SameRow/RowChange)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 같은 행 이동과 행 전환 이동(먼 거리)의 대기시간을 RowIdx 기준으로 분리. - SystemParameter: ScoutSameRowSleepMs(150)/ScoutRowChangeSleepMs(300) 추가 - Recipe View > Scout Image 그룹에 입력 UI 2줄 + 즉시 저장 - SeqScoutNormal.CaptureNextPosition: prevRowIdx 추적해 행 전환 시 분기 - 공유(WeldingCommon)라 같은행은 150(기존동일), 행전환 기본 300ms Co-Authored-By: Claude Opus 4.8 (1M context) --- .../Sequences/Main/SeqScoutNormal.cs | 11 ++++++++-- .../WeldingCommon/Settings/SystemParameter.cs | 10 ++++++++++ .../UCScannerObjectTeachingControlBox.xaml | 18 +++++++++++++++-- ...cannerObjectTeachingControlBoxViewModel.cs | 20 +++++++++++++++++++ 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/WeldingComponents/WeldingCommon/Sequences/Main/SeqScoutNormal.cs b/WeldingComponents/WeldingCommon/Sequences/Main/SeqScoutNormal.cs index 889537a..591c8fb 100644 --- a/WeldingComponents/WeldingCommon/Sequences/Main/SeqScoutNormal.cs +++ b/WeldingComponents/WeldingCommon/Sequences/Main/SeqScoutNormal.cs @@ -223,6 +223,7 @@ namespace WeldingCommon.Sequences private SequenceActionResult CaptureNextPosition(SequenceContext context, string id, SequenceActionResult param) { + int prevRowIdx = -1; // 직전 처리(Enabled)한 행 foreach (var scoutNo in _ScoutNoList) { if (_ChildBufRowCols[scoutNo].Enabled) { var stopWatchCapture = new Stopwatch(); @@ -237,8 +238,12 @@ namespace WeldingCommon.Sequences // 1. Scanner Jump _Scanner.JumpAbs(xPos, yPos); - // 2.SleepTime after Scanner Jump - int moveSleepTime = 150;//100;//50; //msec + // 2.SleepTime after Scanner Jump (행 전환=RowChange, 같은 행=SameRow) + int curRowIdx = _ChildBufRowCols[scoutNo].RowIdx; + bool isRowChange = (prevRowIdx != -1) && (curRowIdx != prevRowIdx); + int moveSleepTime = isRowChange + ? _SystemParameter.ScoutRowChangeSleepMs + : _SystemParameter.ScoutSameRowSleepMs; //원본: int moveSleepTime = 150;//100;//50; Thread.Sleep(moveSleepTime); Log.I(string.Format($"Complete No.{scoutNo + 1} ScannerMove Position")); @@ -264,6 +269,8 @@ namespace WeldingCommon.Sequences stopWatchCapture.Stop(); Log.I(string.Format($"Complete No.{scoutNo + 1} Field Scan, Time: {stopWatchCapture.ElapsedMilliseconds} msec")); + + prevRowIdx = curRowIdx; // 처리(Enabled)한 위치만 갱신 } } return SequenceAction.Ok(); diff --git a/WeldingComponents/WeldingCommon/Settings/SystemParameter.cs b/WeldingComponents/WeldingCommon/Settings/SystemParameter.cs index b3f69eb..7ea33a7 100644 --- a/WeldingComponents/WeldingCommon/Settings/SystemParameter.cs +++ b/WeldingComponents/WeldingCommon/Settings/SystemParameter.cs @@ -97,6 +97,16 @@ namespace WeldingCommon.Settings [Category("Scout")] [DisplayName("Scan Field Size(Init)")] public ILSOSSizeF ScoutField { get; set; } = new ILSOSSizeF(50.0f, 50.0f); + [Browsable(true)] + [ReadOnly(false)] + [Category("Scout")] + [DisplayName("Scout SameRow Sleep(ms)")] + public int ScoutSameRowSleepMs { get; set; } = 150; + [Browsable(true)] + [ReadOnly(false)] + [Category("Scout")] + [DisplayName("Scout RowChange Sleep(ms)")] + public int ScoutRowChangeSleepMs { get; set; } = 300; [Browsable(false)] [ReadOnly(true)] [Category("Scout")] diff --git a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml index 8be4b4f..0847463 100644 --- a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml +++ b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml @@ -35,6 +35,8 @@ + + @@ -50,7 +52,19 @@ - + + + + + + + + + + + + + @@ -59,7 +73,7 @@