feat: ScoutNormal 행 전환 sleep 분리 (SameRow/RowChange)
같은 행 이동과 행 전환 이동(먼 거리)의 대기시간을 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) <noreply@anthropic.com>
This commit is contained in:
parent
0e73086b14
commit
e263ab8a5a
@ -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();
|
||||
|
||||
@ -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")]
|
||||
|
||||
@ -35,6 +35,8 @@
|
||||
<GroupBox Header="Scout Image" Grid.Row="0" Margin="0 3 0 0" Style="{StaticResource StGroupBox2nd}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
@ -50,7 +52,19 @@
|
||||
<Border Grid.Row="0" Grid.Column="1" BorderThickness="1" BorderBrush="Gray">
|
||||
<TextBlock Margin="10 0" FontSize="12" Foreground="#FFBBBBBB" FontWeight="Bold" Text="{Binding IsSelectedScoutNormal, Converter={StaticResource convSelectedScoutType}}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
</Border>
|
||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Height="50" Margin="0 5 0 0" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}">
|
||||
<!-- Row 1 : Same Row Sleep -->
|
||||
<Border Grid.Row="1" Grid.Column="0" MinHeight="30" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}">
|
||||
<TextBlock Margin="10 0" FontSize="12" Foreground="#FFBBBBBB" FontWeight="Bold" Text="SameRow Sleep(ms)" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
</Border>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="10 3" VerticalAlignment="Center" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}" Text="{Binding ScoutSameRowSleepMs, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<!-- Row 2 : Row Change Sleep -->
|
||||
<Border Grid.Row="2" Grid.Column="0" MinHeight="30" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}">
|
||||
<TextBlock Margin="10 0" FontSize="12" Foreground="#FFBBBBBB" FontWeight="Bold" Text="RowChange Sleep(ms)" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
</Border>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Margin="10 3" VerticalAlignment="Center" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}" Text="{Binding ScoutRowChangeSleepMs, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Height="50" Margin="0 5 0 0" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convTrueVisible}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1*"></ColumnDefinition>
|
||||
@ -59,7 +73,7 @@
|
||||
<Button Grid.Column="1" Margin="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="auto" FontWeight="Bold" Style="{StaticResource StButtonAccentPurple}" Command="{Binding CMD_StopScoutNormal}" Content="Stop" IsEnabled="{Binding IsSequenceRunning_ScoutNormal}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Height="50" Margin="0" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convFalseVisible}}">
|
||||
<Grid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Height="50" Margin="0" Visibility="{Binding IsSelectedScoutNormal, Converter={StaticResource convFalseVisible}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1*"></ColumnDefinition>
|
||||
|
||||
@ -80,6 +80,24 @@ namespace WeldingCommon.Views
|
||||
private bool _IsObjectSelectAll;
|
||||
public bool IsObjectSelectAll { get => _IsObjectSelectAll; set => SetProperty(ref _IsObjectSelectAll, value); }
|
||||
|
||||
// ScoutNormal 행 전환 sleep 분리 (같은 행 / 행 전환)
|
||||
private int _ScoutSameRowSleepMs;
|
||||
public int ScoutSameRowSleepMs
|
||||
{
|
||||
get => _ScoutSameRowSleepMs;
|
||||
set { SetProperty(ref _ScoutSameRowSleepMs, value); _SystemParameter.ScoutSameRowSleepMs = value; SaveScoutSleep(); }
|
||||
}
|
||||
private int _ScoutRowChangeSleepMs;
|
||||
public int ScoutRowChangeSleepMs
|
||||
{
|
||||
get => _ScoutRowChangeSleepMs;
|
||||
set { SetProperty(ref _ScoutRowChangeSleepMs, value); _SystemParameter.ScoutRowChangeSleepMs = value; SaveScoutSleep(); }
|
||||
}
|
||||
private void SaveScoutSleep()
|
||||
{
|
||||
_Aurora.SettingEntry.Save(CommonSettingIds.SystemParameter, _SystemParameter, "ScoutSleep");
|
||||
}
|
||||
|
||||
private readonly DispatcherTimer _MonitorTimer;
|
||||
|
||||
private SequenceDialog _SequenceDialog;
|
||||
@ -94,6 +112,8 @@ namespace WeldingCommon.Views
|
||||
_Aurora = aurora;
|
||||
|
||||
_SystemParameter = aurora.SettingEntry[CommonSettingIds.SystemParameter] as SystemParameter;
|
||||
_ScoutSameRowSleepMs = _SystemParameter.ScoutSameRowSleepMs;
|
||||
_ScoutRowChangeSleepMs = _SystemParameter.ScoutRowChangeSleepMs;
|
||||
|
||||
_SeqScoutNormal = _Aurora.SequenceEntry[CommonSequenceIds.SeqScoutNormal];
|
||||
_SeqScoutFlyingVision = _Aurora.SequenceEntry[CommonSequenceIds.SeqScoutFlyingVision];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user