From 2d96a36538df7d59e831aef19622ad01e8b5c02b Mon Sep 17 00:00:00 2001
From: LYW <leeyeanwoo@diteam.co.kr>
Date: 금, 21 5월 2021 17:16:36 +0900
Subject: [PATCH] Ongoing90 #3361 CF AOI Review 전설비 Align Cam 비정상 연결 시 팝업 기능 추가 1) Align Cam, Review Cam 비정상 연결 시 팝업 기능 추가 2) 팝업 후 프로그램 종료 기능 추가 3) #3360_CF AOI QD Review WSI XY MotorMoving Error 알람 발생 원인 분석 및 조치     #3359_CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER 알람 발생 원인 분석    트러블 조치 포함

---
 ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
index aea1b64..14ac4c3 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
@@ -48,6 +48,7 @@
 
 #define AOIRAWBIN_PATH		"\\\\126.100.100.1\\d\\DIT_ResultData\\RawBin"
 #define AOIRAWBIN_TEST_PATH		"d:\\DIT_ResultData\\RawBin"
+#define AOIRAWBIN_NETWORK_DRIVE_PATH	"Y:\\RawBin"
 
 enum CPJT_MeasureMode { CPJT_ModeAuto = 0, CPJT_ModeManual };
 // [2017:4:18]-[WEZASW] : WSI Module 장착 설비의 경우 PlanType 번호 변경.
@@ -2635,11 +2636,22 @@
 	{
 		CTime tmReviewLoading = CTime::GetCurrentTime();
 		CString strWild;
-		strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
+		//strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
 		CakFileUtil akFileFinder;
 		while (nReTryTime--)
 		{
-			akFileFinder.FindFile(strWild.GetBuffer(0), FALSE);
+			//#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER 알람 발생 원인 분석 START
+			if (nReTryTime%2 == 0)
+			{
+				strFilePath = AOIRAWBIN_PATH;
+			}
+			else strFilePath = AOIRAWBIN_NETWORK_DRIVE_PATH;
+
+			strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
+			 akFileFinder.FindFile(strWild.GetBuffer(0), FALSE);
+			//LYW LOG추가
+			g_pLog->DisplayMessage(_T("[GlassLoading][FindRawBinFile] Find Path = %s, RetryCount = %d, ResultCode = [%d]"), strFilePath, 30-nReTryTime, GetLastError());
+			//#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER 알람 발생 원인 분석 END
 			VECFINDDATA* pFindData = akFileFinder.getFindData();
 			int nFileNamePos = strlen(akFileFinder.getProcessPath());
 			std::map<LONGLONG, CString> mapSpanFileName;
@@ -2684,6 +2696,7 @@
 					break;
 				}
 			}
+
 			akFileFinder.clear();
 			Sleep(100);
 		}
@@ -3108,7 +3121,7 @@
 					strReadData = pTransferData->strRerferData;
 					break;
 				}
-				m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData);
+				//m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData); //0517
 		}
 	}
 
@@ -4517,7 +4530,8 @@
 	strPath  = strPath + _T("\\WSI");
 	if(CreateDirectory(strPath,NULL)==FALSE)
 	{
-		g_pLog->DisplayMessage(_T("[MakeWSIUpLoadDirectory]Directory Create Fail %s "),strPath);
+		//LYW LOG추가
+		g_pLog->DisplayMessage(_T("[MakeWSIUpLoadDirectory]Directory Create Fail %s, ERROR CODE = %d "),strPath, GetLastError());
 	}
 	
 }
@@ -4673,9 +4687,11 @@
 		//보낼 포인트가 있는지 없는지 체크
 		if (vectorPosX.empty() == TRUE)
 		{
-			g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point "), vectorPosX.size());
+			//3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error 알람 발생 원인 분석 및 조치 START
+			g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point,TwoGantrySyncMode OFF!"), vectorPosX.size());
 			g_pLog->DisplayMessage(_T("[GantryAutoGo] (%d)Gantry Path Send Fail"), pModuleStatus->GetGantryIndex()); //taek 210128
-
+			pMotorControl->GantrySetTwoGantrySyncModeSend(1);
+			//3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error 알람 발생 원인 분석 및 조치 END
 		}
 		else
 		{

--
Gitblit v1.9.3