From e5fa774d622d6852fe8e1f033045aed221649108 Mon Sep 17 00:00:00 2001 From: LYW <leeyeanwoo@diteam.co.kr> Date: 금, 15 10월 2021 13:24:54 +0900 Subject: [PATCH] Ongoing80 #3662 CF AOI Review 전설비 알람 발생 조치 --- ReviewSystem/ReviewSystem/ReviewInterface.cpp | 156 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 141 insertions(+), 15 deletions(-) diff --git a/ReviewSystem/ReviewSystem/ReviewInterface.cpp b/ReviewSystem/ReviewSystem/ReviewInterface.cpp index 8fcf05d..6f42812 100644 --- a/ReviewSystem/ReviewSystem/ReviewInterface.cpp +++ b/ReviewSystem/ReviewSystem/ReviewInterface.cpp @@ -1,6 +1,7 @@ 癤�#include "StdAfx.h" #include <math.h> #include "crtdbg.h" +#include <experimental/filesystem> #include "ReviewInterface.h" #include "MainFrm.h" @@ -123,6 +124,13 @@ m_bIsOffSetOn = 0; m_bIsSimulation = 0; + m_bFirstReviewLeft = 0; + m_bFirstReviewRight = 0; + + /*< LYW 20211014 - #3671 ADD Start >*/ + m_daccumulate = 0; + /*< LYW 20211014 - #3671 ADD End >*/ + // cs init InitializeCriticalSection(&m_csReviewResult); InitializeCriticalSection(&m_csReviewSignal); @@ -143,6 +151,13 @@ CreateDirectory(_REVIEW_SERVER_BASE_PATH_, NULL); CreateDirectory(_REVIEW_SERVER_LOG_PATH_, NULL); CreateDirectory(_REVIEW_SERVER_CONFIG_PATH_, NULL); + //LYW_#3344_CF AOI Review Config File 諛깆뾽 湲곕뒫 媛쒖꽑 ADD START + //�떆�옉�븷�븣 �떎 吏��슦怨� �떎�떆 蹂듭궗媛� �븘�슂�븷吏� + //std::experimental::filesystem::remove_all(_REVIEW_SERVER_SYSTEM_SETTING_BACKUP_PATH_CPJT); + //std::experimental::filesystem::remove_all(_REVIEW_RECIPE_BACKUP_PATH_CPJT); + ISP2P_CopyFolder(_REVIEW_SERVER_CONFIG_PATH_, _REVIEW_SERVER_SYSTEM_SETTING_BACKUP_PATH_CPJT); + ISP2P_CopyFolder(_REVIEW_RECIPE_PATH_, _REVIEW_RECIPE_BACKUP_PATH_CPJT); + //LYW_#3344_CF AOI Review Config File 諛깆뾽 湲곕뒫 媛쒖꽑 ADD END SetProgramVersion(); // init review data @@ -1261,7 +1276,7 @@ // process status observer AddObserverUpdateProcessStatus(static_cast<IUpdateProcessStatus*>(m_pAlignCameraControl)); - m_pAlignCameraControl->Camera_Control(CameraControlLive); + /*m_pAlignCameraControl->Camera_Control(CameraControlLive);*/ // 210805 Align Camera Sequence 蹂�寃� } else { @@ -2866,24 +2881,36 @@ double dAccdata = measureResut.dAccuracy; double dRbtdata = measureResut.dRepeatability; + double dDiagnosisHeight[10]; + + for (int i = 0; i < 10; i++) + { + dDiagnosisHeight[i] = measureResut.dDiagnosisHeight[i]; + } + if (nModuleIndex == 0) { m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->SetACC(dAccdata); m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->SetRTB(dRbtdata); + for (int i = 0; i < 10; i++) + { + m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->SetDiagnosisHeight(dDiagnosisHeight[i], i); + } m_vecWSIControl[0]->SendWsiAfmSafePosMove(); } else if (nModuleIndex == 1) { m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->SetACC(dAccdata); m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->SetRTB(dRbtdata); + for (int i = 0; i < 10; i++) + { + m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->SetDiagnosisHeight(dDiagnosisHeight[i], i); + } m_vecWSIControl[1]->SendWsiAfmSafePosMove(); } m_pDlgDiagnosis->m_pDlgWsi->UpdateWSIResult(nModuleIndex,dAccdata, dAccdata, dRbtdata, dRbtdata); - - - m_pDlgDiagnosis->m_pDiagnosisManager->setWSIVLSIEnd(true); } @@ -3092,6 +3119,16 @@ return AlignLight_GetLightLevel(nCameraIndex, nValue); } +int CReviewInterface::IACC2P_GetAccumaulate() +{ + return m_daccumulate; +} + +void CReviewInterface::IACC2P_SetAccumaulate(int dValue) +{ + m_daccumulate = dValue; +} + BOOL CReviewInterface::IRCC2P_GetCurrentFrame(int nModuleIndex, int nCameraIndex, int nFrameWidth, int nFrameHeight, int nFrameChannels, CCHImageData* pImageData) { if (m_pVirtualGlassMap==NULL) return FALSE; @@ -3297,6 +3334,12 @@ return m_pDoc->System_GetSystemInfo(); } +const CSignalControlInfo* CReviewInterface::IRP2P_GetReviewSignalinfo() +{ + if (m_pDoc == NULL) return NULL; + return m_pDoc->System_GetSignalInfo(); +} + CGlassResult* CReviewInterface::IRP2P_GetCurrentGlassResult() { if (m_pDoc==NULL) return NULL; @@ -3305,14 +3348,23 @@ void CReviewInterface::IRP2P_DisplayMessage(const TCHAR* lpstrFormat, ...) { - va_list list; - TCHAR strText[2000] = {0}; + try + { + va_list list; + TCHAR strText[2000] = { 0 }; - va_start(list, lpstrFormat); - _vstprintf_s(strText, lpstrFormat, list); - va_end(list); + va_start(list, lpstrFormat); + _vstprintf_s(strText, lpstrFormat, list); + va_end(list); - g_pLog->DisplayMessage(strText); + g_pLog->DisplayMessage(strText); + } + + catch (...) + { + return ; + } + } CResultServerControl* CReviewInterface::IRP2P_GetResultServerControl() @@ -3348,6 +3400,26 @@ CRecipeManager* CReviewInterface::IRP2P_GetEdgeRecipeManager() { return m_pEdgeRecipeManager; +} + +BOOL CReviewInterface::IRP2P_GetFirstReviewLeft() +{ + return m_bFirstReviewLeft; +} + +BOOL CReviewInterface::IRP2P_GetFirstReviewRight() +{ + return m_bFirstReviewRight; +} + +void CReviewInterface::IRP2P_SetFirstReviewLeft(BOOL b_Check) +{ + m_bFirstReviewLeft = b_Check; +} + +void CReviewInterface::IRP2P_SetFirstReviewRight(BOOL b_Check) +{ + m_bFirstReviewRight = b_Check; } @@ -3489,6 +3561,16 @@ return m_pMotorControl->IsGantryMotionEnd(nModuleIdx); +} + +BOOL CReviewInterface::IDP2P_CheckManualMode() +{ + if (IsManualProcessMode() == TRUE) + { + return TRUE; + } + + return FALSE; } int CReviewInterface::IDP2P_GetSelectedModuleIndex() @@ -3671,6 +3753,7 @@ //return pAFMControl->MoveToHomePosition(nHomePosition); } +//#3407 KYH �옄媛�吏꾨떒 Judge �뙋�젙 諛� �븣�엺 諛쒖깮 湲곕뒫 ADD START BOOL CReviewInterface::IDP2P_DiagnosisSendJudgeAlarm() // 0412 �옄媛�吏꾨떒 JudgeAlarm 異붽� { @@ -3678,6 +3761,7 @@ //return pAFMControl->MoveToHomePosition(nHomePosition); } +//#3407 KYH �옄媛�吏꾨떒 Judge �뙋�젙 諛� �븣�엺 諛쒖깮 湲곕뒫 ADD END BOOL CReviewInterface::IDP2P_SetDlgFlatness(int nIndex) { @@ -3757,12 +3841,15 @@ if (m_SequenceProcessor == NULL) return; m_SequenceProcessor->SetWsiType(9); - if (!m_SequenceProcessor->WSIAllReadySignal(1)) + if (nModuleIdx == 0) { - g_pLog->DisplayMessage(_T("[WSI] Send Ready Signal to All WIS Fail")); + if (!m_SequenceProcessor->WSIAllReadySignal(1)) + { + g_pLog->DisplayMessage(_T("[WSI] Send Ready Signal to All WIS Fail")); + return; + } } - else - { + SetCurrentWsiMode(WsiMeasureType_VLSI); CWsiControl* pWsiControl = ISP2P_GetWSIControl(nModuleIdx); @@ -3776,7 +3863,6 @@ pWsiControl->SetWsiStart(1, vectorPosX, vectorPosY, 0); - } } void CReviewInterface::IDP2P_WsiMotorMotionEnd(int nModuleIdx, double dPosX, double dPosY) @@ -5700,6 +5786,12 @@ pGlassResult->m_AlignRecipe.dMatchingRate = pRsRcpAlignInfo->m_dMatchingRate; pGlassResult->m_AlignRecipe.strFirstImageFile = pRsRcpAlignInfo->m_strFirstImageFile; pGlassResult->m_AlignRecipe.strSecondImageFile = pRsRcpAlignInfo->m_strSecondImageFile; + /*< LYW 20211012 - #3671 ADD Start >*/ + pGlassResult->m_AlignRecipe.strFirstAssistantImageFile = pRsRcpAlignInfo->m_strFirstAssistantImageFile; + pGlassResult->m_AlignRecipe.strSecondAssistantImageFile = pRsRcpAlignInfo->m_strSecondAssistantImageFile; + pGlassResult->m_AlignRecipe.strMatchingPixelStandard = pRsRcpAlignInfo->m_strMatchingPixelStandard; + pGlassResult->m_AlignRecipe.strMatchingAlarmCondition = pRsRcpAlignInfo->m_strMatchingAlarmCondition; + /*< LYW 20211012 - #3671 ADD End >*/ pGlassResult->m_AlignRecipe.strTotalPitchImageFile = pRsRcpAlignInfo->m_strTotalPitchImageFile; // edge find param @@ -6461,6 +6553,7 @@ m_pDlgDiagnosis->ShowWindow(SW_SHOW); + return; /* if (m_pSignalControl) { @@ -6478,6 +6571,14 @@ { g_pLog->DisplayMessage(_T("Machine Mode is not Manual or Review Mode!")); return; + } + + else + { + //#3584 210923 LYW CF AOI Review �떆裕щ젅�씠�뀡 湲곕뒫 �젙�긽�솕 ADD START + m_pSequenceProcessor->SetSimulationMode(TRUE); + g_pLog->DisplayMessage(_T("Set User Command = %d"),nCommand); + //#3584 210923 LYW CF AOI Review �떆裕щ젅�씠�뀡 湲곕뒫 �젙�긽�솕 ADD END } m_pSequenceProcessor->RecvSignalToSignalControl(PCControlRecvSignalIndex_Seq, nCommand); @@ -8338,6 +8439,26 @@ return m_pDlgHistoryTool; } +BOOL CReviewInterface::ISP2P_GetFirstReviewLeft() +{ + return m_bFirstReviewLeft; +} + +BOOL CReviewInterface::ISP2P_GetFirstReviewRight() +{ + return m_bFirstReviewRight; +} + +void CReviewInterface::ISP2P_SetFirstReviewLeft(BOOL b_Check) +{ + m_bFirstReviewLeft = b_Check; +} + +void CReviewInterface::ISP2P_SetFirstReviewRight(BOOL b_Check) +{ + m_bFirstReviewRight = b_Check; +} + void CReviewInterface::ILCC2P_DisplayMessage( int nIndex, const TCHAR* lpstrFormat, ... ) { @@ -8838,6 +8959,11 @@ SetCurrentWsiMode(nMode); } +void CReviewInterface::ISP2P_InitAlignCamera() +{ + InitAlignCamera(); +} + int CReviewInterface::IWC2P_GetWsiType() { return GetCurrentWsiMode(); -- Gitblit v1.9.3