choieigun 1ec5b0750f [Add Func] RMS Parameter
- Ring Power >> SystemParameter OPTION

[Bug Fix] RingPower Ramping
- Delete Ramping Param3
2026-02-27 22:04:23 +09:00

511 lines
19 KiB
C#

using Aurora.Api;
using CoreUnit.Common;
using PropertyTools.DataAnnotations;
using System;
using System.Drawing;
using static CoreUnit.Common.UtilUnit;
namespace WeldingCommon.Settings
{
public enum eSequenceType { Normal, RCC, CellCenterOffset };
public enum eRCCAlgorithmType { OnlyGenObject, OnlyOffsetObject, All };
public enum eScoutType { Normal, FlyingVision }
public enum eLaserType { RnD, IPG };
public enum eRTCBoardType { RTC5, RTC6 };
public enum eOffsetType { manual, CSV };
public enum eObjectGenType { ArcByAngle, FitArcsAndLines };
public enum eImageType { Full, ThreeFourth };
public enum eArcCount { FirstArc = 1, SecondArc };
public class SystemParamPath
{
public const string SCANNER_FIELD_IMAGE_FILE_PATH = "D:\\ILSOSConfig\\_vision\\FieldScanImage\\Default\\DefaultFieldScanImage.Jpeg";
public const string WORK_RECIPE_FILE = "D:\\ILSOSConfig\\_config_recipe\\recipe#1\\TeachingEditor.json";
}
public class SystemParameter : ISettingItem
{
//Browable False 항목은 ILSOS에서 필요없으나 LASA MainPage 로드를 위해 선언해둠.. 정리가 필요할 듯
[Browsable(false)]
[ReadOnly(false)]
[Category("Log")]
[DisplayName("LogLevel")]
public LogUnit.eLogLevel LogLevel { get; set; } = LogUnit.eLogLevel.HIGH;
//Product Category는 양산 시 필요하면 Broawsable True로 설정함.
[Browsable(true)]
[ReadOnly(true)]
[Category("Product")]
[DisplayName("TotalProductCount")]
public uint TotalProductCount { get; set; } = 0;
[Browsable(true)]
[ReadOnly(true)]
[Category("Product")]
[DisplayName("TodayProductCount")]
public uint TodayProductCount { get; set; } = 0;
[Browsable(true)]
[ReadOnly(false)]
[Category("Product")]
[DisplayName("OCT_QA_Error_Alarm_Count")]
public uint OCT_QA_Error_Count { get; set; } = 2;
[Browsable(false)]
[ReadOnly(true)]
[Category("Product")]
[DisplayName("LastProductTime")]
public DateTime LastProductTime { get; set; }
[Browsable(false)]
[ReadOnly(true)]
[Category("Product")]
[DisplayName("CurrentDate")]
public string CurrentDate { get; set; } = "0001-01-01";
[Browsable(false)]
[ReadOnly(true)]
[Category("Product")]
[DisplayName("LastResetTime")]
public DateTime LastResetTime { get; set; } = DateTime.MinValue;
[Browsable(true)]
[ReadOnly(false)]
[Category("Laser Recipe Parameter Display Type")]
[DisplayName("MachineType")]
public eMachineName MachineType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("SequenceType")]
public eSequenceType SequenceType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("RCCAlgorithmType")]
public eRCCAlgorithmType RCCAlgorithmType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("ScoutType")]
public eScoutType ScoutType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("BypassModeLBAD")]
public bool BypassModeLBAD { get; set; } = false;
[Browsable(false)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("RTCBoardType")]
public eRTCBoardType RTCBoardType { get; set; }
[Browsable(false)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("LaserType")]
public eLaserType LaserType { get; set; }
[InputFilePath]
[Browsable(true)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("WorkRecipeFile")]
public string WorkRecipeFile { get; set; } = SystemParamPath.WORK_RECIPE_FILE;
//LanguageType은 ILSOS의 언어 설정을 사용해야하나.. LASA 윈폼은 아래 LanguageType을 사용해서 변경해야할것으로 보임
[Browsable(false)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("LanguageType(Teaching)")]
public UtilUnit.eLanguage LanguageType { get; set; } = UtilUnit.eLanguage.English;
[Browsable(false)]
[ReadOnly(false)]
[Category("System")]
[DisplayName("LogOnUserAccount")]
public string LogOnUserAccount { get; set; } = "PRI";
[Browsable(false)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("CanvasBackgroundSize")]
public double CanvasBackgroundSize { get; set; } = 120.0;
[Browsable(false)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("Canvas Image Resolution Ratio")]
public double CanvasImageResolutionRatio { get; set; } = 1;
[Browsable(true)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("Scan Field Size(Init)")]
public ILSOSSizeF ScoutField { get; set; } = new ILSOSSizeF(50.0f, 50.0f);
[Browsable(false)]
[ReadOnly(true)]
[Category("Scout")]
[DisplayName("Scan Field Size(Real)")]
public ILSOSSizeF ScoutFieldCal { get; set; } = new ILSOSSizeF(50.0f, 50.0f);
[Browsable(false)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("EnableCanvasFieldImage")]
public bool EnableCanvasFieldImage { get; set; } = true;
[Browsable(true)]
[ReadOnly(false)]
[Category("Scout")]
[InputFilePath]
[DisplayName("ScoutImage File")]
public string ScannerFieldImageFile { get; set; } = SystemParamPath.SCANNER_FIELD_IMAGE_FILE_PATH;
[Browsable(true)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("ScoutJumpSpeed")]
public double FieldScanJumpSpeed { get; set; } = 4000;
[Browsable(true)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("ScoutJumpDelay")]
public uint ScoutJumpDelay { get; set; } = 500;
[Browsable(true)]
[ReadOnly(false)]
[Category("Scout")]
[DisplayName("CameraExposureDelay")]
public uint CameraExposureDelay { get; set; } = 5; //msec
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVScannerOffsetX")]
public double CVScannerOffsetX { get; set; } = 0;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVScannerOffsetY")]
public double CVScannerOffsetY { get; set; } = 0;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVThreshold")]
public double CVThreshold { get; set; } = 37;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVJigSize")]
public int CVJigSize { get; set; } = 70;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("OffsetType")]
public eOffsetType OffsetType { get; set; } = eOffsetType.manual;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Enable MissAlign AutoCorrection")]
public bool EnableAutoMissAlign { get; set; } = false;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVShrinkPixel(1)")]
public int CVShrinkPixel { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVShrinkPixel(2)")]
public int CVShrinkPixel2 { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVShrinkPixel(3)")]
public int CVShrinkPixel3 { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVShrinkPixel(4)")]
public int CVShrinkPixel4 { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[InputFilePath]
[DisplayName("OffsetCSVFile")]
public string OffsetCSVFile { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Radius")]
public double Radius { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Margin")]
public int Margin { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("PointNum")]
public int PointNum { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("DetectPointPercent")]
public double DetectPointPercent { get; set; }
[Browsable(false)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVMorpIterations")]
public int CVMorpIterations { get; set; } = 23;
[Browsable(false)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("CVMorpMaskSize")]
public int CVMorpMaskSize { get; set; } = 5;
// ----------- RCC Offset용 Reference Paramter ----------------
//pixel
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Reference X")]
public double ReferenceX { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Reference Y")]
public double ReferenceY { get; set; }
//radian
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Reference Theta")]
public double ReferenceTh { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Search Min (LFW)")]
public int Serach_Min { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Search Max (LFW)")]
public int Serach_Max { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Edge Parameter")]
[DisplayName("Interlock OffsetTh (deg)")]
public double InterlockOffsetTh { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("ObjectGenType")]
public eObjectGenType ObjectGenType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("ImageType")]
public eImageType ImageType { get; set; }
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("ObjectNumber")]
public int ObjectNumber { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("MergeDist")]
public double dMergeDist { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("MaxArcRadius")]
public uint nMaxArcRadius { get; set; } = 1000;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("LineTolerance")]
public uint nLineTolerance { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("ArcTolerance")]
public uint nArcTolerance { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("LineDefualtWidth")]
public float fLineDefualtWidth { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("DrawingImageCenterOffsetX")]
public double DrawingImageCenterOffsetX { get; set; } = 0;
[Browsable(false)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("DrawingImageCenterOffsetY")]
public double DrawingImageCenterOffsetY { get; set; } = 0;
[Browsable(false)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("CVInnerCircleSize")]
public double CVInnerCircleSize { get; set; } = 21;
[Browsable(false)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("CVOuterCircleSize")]
public double CVOuterCircleSize { get; set; } = 25;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("DrawObjectDistanceRange")]
public double DrawObjectDistanceRange { get; set; } = 0.5;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("MaxMinDiffHigh")]
public int MaxMinDiffHigh { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("MaxMinDiffLow")]
public int MaxMinDiffLow { get; set; } = 5;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("CheckCenterDiff")]
public int CheckCenterDiff { get; set; } = 10;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("DistortionCenterDiff")]
public int DistortionCenterDiff { get; set; } = 5;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("AutoMissAlignHigh")]
public float AutoMissAlignHigh { get; set; } = 4f;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC Check Edge Parameter")]
[DisplayName("AutoMissAlignLow")]
public float AutoMissAlignLow { get; set; } = 2.5f;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("DrawObjectLengthSumDiffRange")]
public double DrawObjectLengthSumDiffRange { get; set; } = 3.0;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("DrawObjectArcLengthMax")]
public double DrawObjectArcLengthMax { get; set; } = 40;
[Browsable(true)]
[ReadOnly(false)]
[Category("RCC GenObject Parameter")]
[DisplayName("CenterXYDiffRange")]
public double DrawObjectCenterXYDiffRange { get; set; } = 0.5;
[Browsable(true)]
[ReadOnly(false)]
[Category("Camera")]
[DisplayName("CameraPixelSize")]
public double CameraPixelSize { get; set; } = 6.9;
[Browsable(true)]
[ReadOnly(false)]
[Category("Camera")]
[DisplayName("LensMagnification")]
public double LensMagnification { get; set; } = 0.3461;
[Browsable(false)]
[ReadOnly(false)]
[Category("Calibration")]
[InputFilePath]
[DisplayName("PowerCalibrationCenterBeamCSVFile")]
public string PowerCalibrationCenterBeamCSVFile { get; set; } = " ";
[Browsable(false)]
[ReadOnly(false)]
[Category("Calibration")]
[InputFilePath]
[DisplayName("PowerCalibrationCenterBeamCSVFile")]
public string PowerCalibrationRingBeamCSVFile { get; set; } = " ";
[Browsable(true)]
[ReadOnly(false)]
[Category("Weld")]
[DisplayName("WeldLinesTaskTimeOut[sec]")]
public int WeldLinesTaskTimeOut { get; set; } = 120;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasBackgroundColor")]
public Color CanvasBackgroundColor { get; set; } = Color.White;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasFieldColor")]
public Color CanvasFieldColor { get; set; } = Color.Gray;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasGridColor")]
public Color CanvasGridColor { get; set; } = Color.White;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasGridSpace")]
public double CanvasGridSpace { get; set; } = 10;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasZoomMin")]
public double CanvasZoomMin { get; set; } = 0.1;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("CanvasZoomMax")]
public double CanvasZoomMax { get; set; } = 10;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("Canvas 격자 유무")]
public bool EnableCanvasGrid { get; set; } = true;
[Browsable(false)]
[ReadOnly(false)]
[Category("Canvas")]
[DisplayName("EnableCanvasColor")]
public bool EnableCanvasColor { get; set; } = true;
[Browsable(true)]
[ReadOnly(true)]
[Category("LBAD")]
[DisplayName("LBAD_Count_OK")]
public uint LBAD_Count_OK { get; set; } = 0;
[Browsable(true)]
[ReadOnly(true)]
[Category("LBAD")]
[DisplayName("LBAD_Count_NG")]
public uint LBAD_Count_NG { get; set; } = 0;
[Browsable(true)]
[ReadOnly(false)]
[Category("CellPosMeasure")]
[DisplayName("CellCenterOffsetX")]
public double CellPosMeasureCenterOffsetX { get; set; } = 0;
[Browsable(true)]
[ReadOnly(false)]
[Category("CellPosMeasure")]
[DisplayName("CellCenterOffsetY")]
public double CellPosMeasureCenterOffsetY { get; set; } = 0;
// 260227 Laser 개조 후 파라미터 추가
[Browsable(true)]
[ReadOnly(false)]
[Category("RMS")]
[DisplayName("Use RingPower RMS")]
public bool UseRingPowerRMS { get; set; } = false;
}
public class ILSOSSizeF
{
private float width;
private float height;
public ILSOSSizeF(float width, float height)
{
this.Width = width;
this.Height = height;
}
public float Width {
get { return width; }
set { width = value; }
}
public float Height {
get { return height; }
set { height = value; }
}
}
}