feat : 오차 추적 메소드 추가 - 추후 필요할 것 같아서 Fov필드의 오차범위 세팅해서 FOV 0,0 기준으로 85% 또는 90% 등 벗어난 Bits 위치값으로 벗어나면 막아주는 기능 추가함.

RTC6만 추가함.
This commit is contained in:
노도연 2026-04-08 18:33:50 +09:00
parent 525339a262
commit 75eeb62af3
3 changed files with 53 additions and 0 deletions

View File

@ -75,6 +75,18 @@ namespace AuroraLaserScanner
public double RotaryEncoderOffset { get; set; }
public double MOTFStageSpeed { get; set; }
#region 26.04.08 NDY MOTF Limit(추적 오차 한계) 변수 추가 --- RTC5에 있는 보드num 과 x,y,z에 대한 limit bit수를 입력하면 해당 오차 벗어나면 알려주는 메소드가 존재합니다. 현재는 stop을 직접하니깐 변수 추가하고 메소드 추가추가해서 사용하는 방식으로 확인 부탁드립니다.
[DisplayName("Tracking Error Limit X (mm)")]
public double FlyLimitXmm { get; set; } = 28.0; // 60 FOV 기준 약 90% 지점 - bit로 자동 변환되는지를 확인 해야함.
[DisplayName("Tracking Error Limit Y (mm)")]
public double FlyLimitYmm { get; set; } = 28.0;
[DisplayName("Tracking Error Limit Z (mm)")]
public double FlyLimitZmm { get; set; } = 10.0; // 3D 모드 사용 시
#endregion
[Category("Scan Area Size")]
public double ScanXSize { get; set; }
public double ScanYSize { get; set; }

View File

@ -337,5 +337,10 @@ namespace AuroraLaserScanner
}
#region 26.04.08 NDY 오차 추적 메소드 OVERRIDE 추가 RTC6 (부모클래스 -자식클래스에서 override 가능하도록 abstract 처리 )
public abstract void SetFlyLimit(uint portNo, int xMin, int xMax, int yMin, int yMax);
public abstract void SetFlyLimitZ(uint portNo, int zMin, int zMax);
#endregion
}
}

View File

@ -152,6 +152,28 @@ namespace AuroraLaserScanner
}
#region 좌표 변환 작업 수행
// 26.04.08 NDY - MOTF Tracking Error Limit 설정 추가 - 요기서 처리해야 한다고 한다.
// 하드웨어 보호를 위해 실제 좌표 변환 및 가공 시작 전 울타리를 칩니다.
if (config.UseMarkingOnTheFly)
{
// 1. mm 단위를 bits 단위로 변환
int xLimitBits = Convert.ToInt32(config.FlyLimitXmm * m_ScaleXYFactor);
int yLimitBits = Convert.ToInt32(config.FlyLimitYmm * m_ScaleXYFactor);
// 2. 오버라이드된 메서드 호출 (중앙 0 기준 +- 범위 설정)
this.SetFlyLimit(m_deviceNo, -xLimitBits, xLimitBits, -yLimitBits, yLimitBits);
Log.D($"[RTC6ScannerUnit] MOTF Limit 적용: ±{config.FlyLimitXmm}mm (±{xLimitBits} bits)");
if (config.Use3DMode)
{
int zLimitBits = Convert.ToInt32(config.FlyLimitZmm * m_ScaleZFactor);
this.SetFlyLimitZ(m_deviceNo, -zLimitBits, zLimitBits);
Log.D($"[RTC6ScannerUnit] MOTF Z-Limit 적용: ±{config.FlyLimitZmm}mm (±{zLimitBits} bits)");
}
}
SetOffset(config.TranslationXOffset, config.TranslationYOffset, 1);
SetAngle(config.TranslationAngle, 1);
Log.D(string.Format($"[RTC6ScannerUnit] 스캐너 좌표 변화값 설정(X,Y,Θ:{config.TranslationXOffset},{config.TranslationYOffset},{config.TranslationAngle})"));
@ -1099,5 +1121,19 @@ namespace AuroraLaserScanner
{
return RTC6Wrap.get_last_error();
}
#region 26.04.08 NDY - 오차 추적 메소드 OVERRIDE 추가 RTC6 (자식클래스 -실제 RTC6Wrap전달 지점)
public override void SetFlyLimit(uint portNo,int xMin, int xMax , int yMin,int yMax )
{
// mm 를 bits로 처리해줘야한다.
RTC6Wrap.n_set_fly_limits(portNo, xMin, xMax, yMin, yMax);
}
public override void SetFlyLimitZ(uint portNo, int zMin, int zMax)
{
RTC6Wrap.n_set_fly_limits_z(portNo, zMin, zMax);
}
#endregion
}
}