202 lines
5.8 KiB
C#
202 lines
5.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ILSOS_KS.Sequences
|
|
{
|
|
/*
|
|
용접검사 내용
|
|
|
|
Ring #1 _ BeadWidthLowerLimit
|
|
Ring #1 _ BeadWidthUpperLimit
|
|
Ring #1 _ BeadWidthResult
|
|
Ring #1 _ BeadWidthOK_NG
|
|
Ring #2 _ BeadWidthLowerLimit
|
|
Ring #2 _ BeadWidthUpperLimit
|
|
Ring #2 _ BeadWidthResult
|
|
Ring #2 _ BeadWidthOK_NG
|
|
Ring #3 _ BeadWidthLowerLimit
|
|
Ring #3 _ BeadWidthUpperLimit
|
|
Ring #3 _ BeadWidthResult
|
|
Ring #3 _ BeadWidthOK_NG
|
|
Ring #4 _ BeadWidthLowerLimit
|
|
Ring #4 _ BeadWidthUpperLimit
|
|
Ring #4 _ BeadWidthResult
|
|
Ring #4 _ BeadWidthOK_NG
|
|
Ring #5 _ BeadWidthLowerLimit
|
|
Ring #5 _ BeadWidthUpperLimit
|
|
Ring #5 _ BeadWidthResult
|
|
Ring #5 _ BeadWidthOK_NG
|
|
Ring #6 _ BeadWidthLowerLimit
|
|
Ring #6 _ BeadWidthUpperLimit
|
|
Ring #6 _ BeadWidthResult
|
|
Ring #6 _ BeadWidthOK_NG
|
|
Spiral #1 _ HorizontalLowerLimit
|
|
Spiral #1 _ HorizontalUpperLimit
|
|
Spiral #1 _ HorizontalResult
|
|
Spiral #1 _ VerticalLowerLimit
|
|
Spiral #1 _ VerticalUpperLimit
|
|
Spiral #1 _ VerticalUpperResult
|
|
Spiral #1 _ WidthOK_NG
|
|
Spiral #2 _ HorizontalLowerLimit
|
|
Spiral #2 _ HorizontalUpperLimit
|
|
Spiral #2 _ HorizontalResult
|
|
Spiral #2 _ VerticalLowerLimit
|
|
Spiral #2 _ VerticalUpperLimit
|
|
Spiral #2 _ VerticalUpperResult
|
|
Spiral #2 _ WidthOK_NG
|
|
Spiral #3 _ HorizontalLowerLimit
|
|
Spiral #3 _ HorizontalUpperLimit
|
|
Spiral #3 _ HorizontalResult
|
|
Spiral #3 _ VerticalLowerLimit
|
|
Spiral #3 _ VerticalUpperLimit
|
|
Spiral #3 _ VerticalUpperResult
|
|
Spiral #3 _ WidthOK_NG
|
|
|
|
Ring #1 _ BeadWidthLowerLimit
|
|
Ring #1 _ BeadWidthUpperLimit
|
|
Ring #1 _ BeadWidthResult
|
|
Ring #1 _ BeadWidthOK_NG
|
|
Ring #2 _ BeadWidthLowerLimit
|
|
Ring #2 _ BeadWidthUpperLimit
|
|
Ring #2 _ BeadWidthResult
|
|
Ring #2 _ BeadWidthOK_NG
|
|
Ring #3 _ BeadWidthLowerLimit
|
|
Ring #3 _ BeadWidthUpperLimit
|
|
Ring #3 _ BeadWidthResult
|
|
Ring #3 _ BeadWidthOK_NG
|
|
Ring #4 _ BeadWidthLowerLimit
|
|
Ring #4 _ BeadWidthUpperLimit
|
|
Ring #4 _ BeadWidthResult
|
|
Ring #4 _ BeadWidthOK_NG
|
|
Ring #5 _ BeadWidthLowerLimit
|
|
Ring #5 _ BeadWidthUpperLimit
|
|
Ring #5 _ BeadWidthResult
|
|
Ring #5 _ BeadWidthOK_NG
|
|
Ring #6 _ BeadWidthLowerLimit
|
|
Ring #6 _ BeadWidthUpperLimit
|
|
Ring #6 _ BeadWidthResult
|
|
Ring #6 _ BeadWidthOK_NG
|
|
Spiral #1 _ HorizontalLowerLimit
|
|
Spiral #1 _ HorizontalUpperLimit
|
|
Spiral #1 _ HorizontalResult
|
|
Spiral #1 _ VerticalLowerLimit
|
|
Spiral #1 _ VerticalUpperLimit
|
|
Spiral #1 _ VerticalUpperResult
|
|
Spiral #1 _ WidthOK_NG
|
|
Spiral #2 _ HorizontalLowerLimit
|
|
Spiral #2 _ HorizontalUpperLimit
|
|
Spiral #2 _ HorizontalResult
|
|
Spiral #2 _ VerticalLowerLimit
|
|
Spiral #2 _ VerticalUpperLimit
|
|
Spiral #2 _ VerticalUpperResult
|
|
Spiral #2 _ WidthOK_NG
|
|
Spiral #3 _ HorizontalLowerLimit
|
|
Spiral #3 _ HorizontalUpperLimit
|
|
Spiral #3 _ HorizontalResult
|
|
Spiral #3 _ VerticalLowerLimit
|
|
Spiral #3 _ VerticalUpperLimit
|
|
Spiral #3 _ VerticalUpperResult
|
|
Spiral #3 _ WidthOK_NG
|
|
Line_LaserPower1
|
|
Line_LaserPower2
|
|
Line_MarkSpeed
|
|
Arc_LaserPower1
|
|
Arc_LaserPower2
|
|
Arc_MarkSpeed
|
|
Spline_LaserPower1
|
|
Spline_LaserPower2
|
|
Spline_MarkSpeed
|
|
LBAD OK/NG
|
|
Welding OK/NG
|
|
|
|
|
|
*/
|
|
public class RingInspection
|
|
{
|
|
public double BeadWidthLower { get; set; } // 하한
|
|
public double BeadWidthUpper { get; set; } // 상한
|
|
public bool IsBeadWidthOk { get; set; } // OK/NG
|
|
}
|
|
|
|
public class SpiralInspection
|
|
{
|
|
public double HorizontalLower { get; set; } // 가로 하한
|
|
public double HorizontalUpper { get; set; } // 가로 상한
|
|
public double VerticalLower { get; set; } // 세로 하한
|
|
public double VerticalUpper { get; set; } // 세로 상한
|
|
public bool IsBeadWidthOk { get; set; } // OK/NG
|
|
}
|
|
|
|
public class StepInspection
|
|
{
|
|
public RingInspection[] Rings { get; set; }
|
|
public SpiralInspection[] Spirals { get; set; }
|
|
public bool LBADResultOk { get; set; }
|
|
|
|
public StepInspection()
|
|
{
|
|
Rings = new RingInspection[6];
|
|
for (int i = 0; i < Rings.Length; i++)
|
|
Rings[i] = new RingInspection();
|
|
|
|
Spirals = new SpiralInspection[3];
|
|
for (int i = 0; i < Spirals.Length; i++)
|
|
Spirals[i] = new SpiralInspection();
|
|
}
|
|
}
|
|
|
|
public class WeldingInspection
|
|
{
|
|
public StepInspection[] Steps { get; set; }
|
|
|
|
public WeldingInspection()
|
|
{
|
|
Steps = new StepInspection[2]; // Step1, Step2
|
|
for (int i = 0; i < Steps.Length; i++)
|
|
Steps[i] = new StepInspection();
|
|
}
|
|
|
|
public void init()
|
|
{
|
|
// === Step1 데이터 입력 예시 ===
|
|
// Ring 데이터
|
|
Steps[0].Rings[0].BeadWidthLower = 1.2;
|
|
Steps[0].Rings[0].BeadWidthUpper = 2.5;
|
|
Steps[0].Rings[0].IsBeadWidthOk = true;
|
|
|
|
Steps[0].Rings[1].BeadWidthLower = 1.3;
|
|
Steps[0].Rings[1].BeadWidthUpper = 2.6;
|
|
Steps[0].Rings[1].IsBeadWidthOk = false;
|
|
|
|
// Spiral 데이터
|
|
Steps[0].Spirals[0].HorizontalLower = 0.8;
|
|
Steps[0].Spirals[0].HorizontalUpper = 1.5;
|
|
Steps[0].Spirals[0].VerticalLower = 0.7;
|
|
Steps[0].Spirals[0].VerticalUpper = 1.4;
|
|
Steps[0].Spirals[0].IsBeadWidthOk = true;
|
|
|
|
Steps[0].LBADResultOk = true;
|
|
|
|
// === Step2 데이터 입력 예시 ===
|
|
Steps[1].Rings[0].BeadWidthLower = 1.1;
|
|
Steps[1].Rings[0].BeadWidthUpper = 2.3;
|
|
Steps[1].Rings[0].IsBeadWidthOk = true;
|
|
|
|
Steps[1].Spirals[1].HorizontalLower = 0.85;
|
|
Steps[1].Spirals[1].HorizontalUpper = 1.55;
|
|
Steps[1].Spirals[1].VerticalLower = 0.75;
|
|
Steps[1].Spirals[1].VerticalUpper = 1.45;
|
|
Steps[1].Spirals[1].IsBeadWidthOk = false;
|
|
|
|
Steps[1].LBADResultOk = false;
|
|
|
|
// === 출력 예시 ===
|
|
Console.WriteLine("Step1 Ring#1 상한: " + Steps[0].Rings[0].BeadWidthUpper);
|
|
Console.WriteLine("Step2 Spiral#2 OK/NG: " + Steps[1].Spirals[1].IsBeadWidthOk);
|
|
}
|
|
}
|
|
}
|