비전 알고리즘 변경

용접 결과 보고 로직 수정
- LBAD 판정 결과를 리스트에 받아놓고 첫번째 판정 데이터만 사용하는데, 검사모드로 검사를 진행했을때
 리스트에 데이터가 쌓여서 다음 일반 용접을 진행했을때는 검사모드로 생성된 판정 데이터를 업로드 하도록 되어있음
- 검사모드에서 판정정보를 강제로 변경하는데(NG여도 OK로 보고) 강제로 변경된 데이터를 업로드 시키지 않음
This commit is contained in:
최이근 2026-02-06 19:05:23 +09:00
parent b1c35de770
commit d3a6541beb
3 changed files with 296 additions and 3356 deletions

View File

@ -2280,7 +2280,7 @@ namespace ILSOS_KS.Sequences
string LBADSendBcrId = _BcrID; string LBADSendBcrId = _BcrID;
if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null)) if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null))
LBADSendBcrId = T1.ToString("HH:mm:ss"); LBADSendBcrId = T1.ToString("HHmmss");
// 바코드가 안 읽히면 임의 값 보내기 // 바코드가 안 읽히면 임의 값 보내기
int sendresult = _LBAD.SendCellData("LBM" + s1, LBADSendBcrId, recipeNo, _ModelNo); int sendresult = _LBAD.SendCellData("LBM" + s1, LBADSendBcrId, recipeNo, _ModelNo);
@ -2293,7 +2293,7 @@ namespace ILSOS_KS.Sequences
string LBADSendBcrId = _BcrID; string LBADSendBcrId = _BcrID;
if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null)) if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null))
LBADSendBcrId = T1.ToString("HH:mm:ss"); LBADSendBcrId = T1.ToString("HHmmss");
// PLC 에 바코드 값이 있으면 // PLC 에 바코드 값이 있으면
int sendresult = _LBAD.SendCellData("LBM" + s1, LBADSendBcrId, recipeNo, _ModelNo); int sendresult = _LBAD.SendCellData("LBM" + s1, LBADSendBcrId, recipeNo, _ModelNo);
@ -3241,7 +3241,8 @@ namespace ILSOS_KS.Sequences
if (result == E1.OK) if (result == E1.OK)
{ {
stReceiveData tt = ResultList[0]; Log.I($"before Clear >> Result Item Count[{ResultList.Count}]");
stReceiveData tt = ResultList.Last();
// fixed double 배열에 접근하기 위해 unsafe 블록 사용 // fixed double 배열에 접근하기 위해 unsafe 블록 사용
unsafe unsafe
{ {
@ -3295,8 +3296,9 @@ namespace ILSOS_KS.Sequences
judgeFlag = 3; judgeFlag = 3;
judgeResult = "NG"; judgeResult = "NG";
} }
_LBAD.ClearResultDataList(); _LBAD.ClearResultDataList();
Log.I($"after Clear >> Result Item Count[{ResultList.Count}]");
// 경신 페이지 추가하여 검사 내용 추가 // 경신 페이지 추가하여 검사 내용 추가
//LBADResultPage[_PageNo - 1] = judgeFlag; //LBADResultPage[_PageNo - 1] = judgeFlag;
@ -3415,15 +3417,15 @@ namespace ILSOS_KS.Sequences
List<short> recipe = Get_Recipe_Info(); // Recipe : 9 List<short> recipe = Get_Recipe_Info(); // Recipe : 9
WeldingInfoSendPLC(recipe, StepLBAD, StepWELDING); WeldingInfoSendPLC(recipe, StepLBAD, StepWELDING);
if (strLBADJudge == "4" || StepWELDING.Contains("NG")) if (Status.GetProcessingWeldingData().LBAD_Judge == "4" || StepWELDING.Contains("NG"))
{ {
_PLC.WriteBit((int)eBitOutput.PC_LBAD_RESULT_NG, true); _PLC.WriteBit((int)eBitOutput.PC_LBAD_RESULT_NG, true);
Log.I(string.Format($"[PLCInterface]SET PC_LBAD_RESULT_NG True, LBAD Result : {strLBADJudge}")); Log.I(string.Format($"[PLCInterface]SET PC_LBAD_RESULT_NG True, LBAD Result : {Status.GetProcessingWeldingData().LBAD_Judge}"));
} }
else if (strLBADJudge != "4") else if (Status.GetProcessingWeldingData().LBAD_Judge != "4" || recipeRequestId == 21)
{ {
_PLC.WriteBit((int)eBitOutput.PC_LBAD_RESULT_OK, true); _PLC.WriteBit((int)eBitOutput.PC_LBAD_RESULT_OK, true);
Log.I(string.Format($"[PLCInterface]SET PC_LBAD_RESULT_OK True, LBAD Result : {strLBADJudge}")); Log.I(string.Format($"[PLCInterface]SET PC_LBAD_RESULT_OK True, LBAD Result : {Status.GetProcessingWeldingData().LBAD_Judge}"));
} }
bool[] Page = new bool[4]; bool[] Page = new bool[4];
@ -3512,7 +3514,7 @@ namespace ILSOS_KS.Sequences
DateTime T1 = DateTime.Now; DateTime T1 = DateTime.Now;
string LBADSendBcrId = _BcrID; string LBADSendBcrId = _BcrID;
if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null)) if (LBADSendBcrId == "" || LBADSendBcrId.Equals(null))
LBADSendBcrId = T1.ToString("HH:mm:ss"); LBADSendBcrId = T1.ToString("HHmmss");
Status.GetProcessingWeldingData().CellId = LBADSendBcrId; Status.GetProcessingWeldingData().CellId = LBADSendBcrId;
} }

File diff suppressed because it is too large Load Diff