SDC C-Project CF Review 프로그램
LYW
2021-07-09 6bb39b058bce38f80645e1e54d03a172f74dba3b
Ongoing100 #3495 CF AOI Review[QD, Blue] GlassLoading 시 다운 현상 조치

1. QD User Review One 켄트리 모드사용시 DCOLL 현상 수정
2. QD, Blue 특정 물려테이터 로그 작성시 프로그램 다운 수정
9개 파일 변경됨
106 ■■■■ 파일 변경됨
Internal_Library/CHCameraControl_Pylon/CHCameraControlPylon.vcxproj 4 ●●●● 패치 | 보기 | raw | blame | 히스토리
Internal_Library/CHCameraControl_Pylon/CameraControl_Pylon.cpp 8 ●●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/CHAlignFinder/AlignFinder.cpp 1 ●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/DitGlassRawStruct.h 32 ●●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/MainFrm.cpp 4 ●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/ReviewInterface.cpp 21 ●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/ReviewProcessor_CPJT.cpp 11 ●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/ReviewSystem.cpp 1 ●●●● 패치 | 보기 | raw | blame | 히스토리
ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp 24 ●●●● 패치 | 보기 | raw | blame | 히스토리
Internal_Library/CHCameraControl_Pylon/CHCameraControlPylon.vcxproj
@@ -136,7 +136,7 @@
    <ClCompile>
      <Optimization>MaxSpeed</Optimization>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <AdditionalIncludeDirectories>$(MSBuildStartupDirectory)\Include;C:\Program Files\Basler\pylon 5\Development\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <AdditionalIncludeDirectories>$(MSBuildStartupDirectory)\Include;C:\Program Files\Basler\pylon 5\Development\include;C:\Program Files\Basler\pylon 4\pylon\include;C:\Program Files\Basler\pylon 4\genicam\library\cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_AFXEXT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -150,7 +150,7 @@
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
      <AdditionalLibraryDirectories>C:\Program Files\Basler\pylon 5\Development\lib\x64;$(MSBuildStartupDirectory)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalLibraryDirectories>C:\Program Files\Basler\pylon 5\Development\lib\x64;$(MSBuildStartupDirectory)\lib;C:\Program Files\Basler\pylon 4\genicam\library\cpp\lib\win64_x64;C:\Program Files\Basler\pylon 4\pylon\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <ModuleDefinitionFile>
      </ModuleDefinitionFile>
      <GenerateDebugInformation>true</GenerateDebugInformation>
Internal_Library/CHCameraControl_Pylon/CameraControl_Pylon.cpp
@@ -64,13 +64,15 @@
            //SetHeartbeatTimeout(10000); // set heartbeat
            //if (controlInfo.GetCameraReverseX() == TRUE)//210614���Ϸи� ������ ��� ����
            //{
            //    m_pCamera->ReverseX = TRUE;
            //    //m_pCamera->ReverseX = TRUE;
            //    m_pCamera->ReverseX.SetValue(TRUE);
            //}
            //else
            //{
            //    m_pCamera->ReverseX = FALSE;
            //    //m_pCamera->ReverseX = FALSE;
            //    m_pCamera->ReverseX.SetValue(FALSE);
            //}
            m_pCamera->SetCameraContext(m_nTotalIndex);///m_nCameraIndex); // set context
            m_pCamera->MaxNumBuffer = m_nGrabCount;
ReviewSystem/CHAlignFinder/AlignFinder.cpp
@@ -205,7 +205,6 @@
    CCHImageData tempImage;
    CCHImageProcess::ImageNormalize(&resultImage, &m_BlobImage, 0, 255);
    //테스트 필요
    if (findResult.dMatchValue<m_findParam.dMatchRate)
    {
        findResult.nResultCode = AlignMatch_LowScore;
ReviewSystem/ReviewSystem/DitGlassRawStruct.h
@@ -256,12 +256,43 @@
    char        m_strProImage[32];
    char        m_strAvgGray_0[12];
    char        m_strPortion_0[12];
    //kyh Mura Data 추가 0622
    char        m_strCorner_Gray_0[12];
    char        m_strAvgAmp_0[12];
    char        m_strFFTVar_0[12];
    char        m_strFFTVah_0[12];
    char        m_strFFTVaq_0[12];
    char        m_strFFTPK_0[12];
    char        m_strAvgGray_1[12];
    char        m_strPortion_1[12];
    //kyh Mura Data 추가 0622
    char        m_strCorner_Gray_1[12];
    char        m_strAvgAmp_1[12];
    char        m_strFFTVar_1[12];
    char        m_strFFTVah_1[12];
    char        m_strFFTVaq_1[12];
    char        m_strFFTPK_1[12];
    char        m_strAvgGray_2[12];
    char        m_strPortion_2[12];
    //kyh Mura Data 추가 0622
    char        m_strCorner_Gray_2[12];
    char        m_strAvgAmp_2[12];
    char        m_strFFTVar_2[12];
    char        m_strFFTVah_2[12];
    char        m_strFFTVaq_2[12];
    char        m_strFFTPK_2[12];
    char        m_strAvgGray_3[12];
    char        m_strPortion_3[12];
    //kyh Mura Data 추가 0622
    char        m_strCorner_Gray_3[12];
    char        m_strAvgAmp_3[12];
    char        m_strFFTVar_3[12];
    char        m_strFFTVah_3[12];
    char        m_strFFTVaq_3[12];
    char        m_strFFTPK_3[12];
    int            m_nDefectNumJudgeOKWhite;
    int            m_nDefectNumJudgeOKBlack;
@@ -379,6 +410,7 @@
    int                m_nPixelGlassStart;            // Glass 시작 픽셀
    short            m_sDefectLoc;
    short            m_sZoneClassPixelCount[16];
    short            m_sZonePixelCount[16];    // Zone별 결함 Pixel 수
    short            m_sZoneValueMin[16];    // Zone별 결함 Min
    short            m_sZoneValueMax[16];    // Zone별 결함 Max
ReviewSystem/ReviewSystem/MainFrm.cpp
@@ -88,8 +88,8 @@
    //LYW Align Reconnect
    //업데이트시
    //system("netsh interface set interface name = \"Align #1\" admin = disable&& netsh interface set interface name = \"Align #1\" admin = enable&& netsh interface set interface name = \"Align #2\" admin = disable&& netsh interface set interface name = \"Align #2\" admin = enable");
    //Sleep(2000);
    system("netsh interface set interface name = \"Align #1\" admin = disable&& netsh interface set interface name = \"Align #1\" admin = enable&& netsh interface set interface name = \"Align #2\" admin = disable&& netsh interface set interface name = \"Align #2\" admin = enable");
    Sleep(2000);
//    SetTimer(ID_TIMER_WSI_LONGRUN_TEST_TIME, 10000, NULL);
ReviewSystem/ReviewSystem/ReviewInterface.cpp
@@ -3313,14 +3313,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()
ReviewSystem/ReviewSystem/ReviewProcessor_CPJT.cpp
@@ -1181,25 +1181,24 @@
            // 업로드 이미지 경로 수정 20190917 chm
            strPath.Format(_T("%s\\%s"), m_strSaveImageUploadPath, pReviewResult->strUploadImgFileName);
            nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep);
            m_pRP2P->IRP2P_DisplayMessage(_T("Backup Review Image Save Success! Size: %d byte [%s]"), nSize, strPath);
            if (pGlassResult != NULL)
            {
            {
                pGlassResult->m_strUploadImgFileName = m_strSaveImageUploadPath;
                //taek 210203
                strRTMSPath.Format(_T("\\\\126.100.100.5\\Reviewimage\\%s\\%s\\%s"), pGlassResult->m_strRTMSStepID, pGlassResult->m_strGlassID, pReviewResult->strUploadImgFileName);
                int bRet = SaveReviewImage(&uploadImage, strRTMSPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); //Taek Rtms 210126
                if (bRet == 0)
                {
                    m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Fail [%s] index[%d]"), strRTMSPath, pReviewResult->nDefectIdx);
                    m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Fail!!"));
                }
                else m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Success! Size: %d byte [%s] index[%d]"), nSize, strRTMSPath, pReviewResult->nDefectIdx); //taek 210128 속도 문제로 임시로 로그 남기지 않음
                else m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Success! Size: %d byte [%s]"), nSize, strRTMSPath);
            }
            if (nSize > 0)
            {
                 int aoiindex = CDitGlassRawClient::GetInstance()->GetDefectData(pReviewResult->nDefectidx2)->m_nDefectIdx;
                m_pRP2P->IRP2P_DisplayMessage(_T("Upload Review Image Save Success! Size: %d byte [%s] index[%d] AOI NO[%d]"), nSize, strRTMSPath, pReviewResult->nDefectIdx, aoiindex); //taek 210128 속도 문제로 임시로 로그 남기지 않음
                m_pRP2P->IRP2P_DisplayMessage(_T("Upload Review Image Save Success! Size: %d byte [%s] index[%d] AOI NO[%d]"), nSize, pReviewResult->strUploadImgFileName, pReviewResult->nDefectIdx, aoiindex); //taek 210128 속도 문제로 임시로 로그 남기지 않음
                //m_pRP2P->IRP2P_DisplayMessage(_T("Upload Review Image Save Success! Size: %d byte [%s]"), nSize, pReviewResult->strUploadImgFileName);
            }
            else
ReviewSystem/ReviewSystem/ReviewSystem.cpp
@@ -254,6 +254,7 @@
    {
        if (g_pLog) 
        {
            //210617 TEST
            //delete g_pLog;
        }
    }
ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
@@ -788,6 +788,20 @@
            if (( nTotalCount += pGlassResult->GetTotalSReviewResultCount()) > 0)
            {
                m_pSP2P->ISP2P_DisplayMessage(_T("[Sequence Processor] Review Plan Start!"));
                //LYW DCOLL 임시조치
                CDitGlassRawClient *pDitRawClient = CDitGlassRawClient::GetInstance();
                if (pDitRawClient->isConnect() == TRUE)
                {
                    _grmDefectData* pSharedDefect = pDitRawClient->GetDefectData(0);//pReviewResult->nDefectidx2
                    _grmDefectReviewData * pSharedDefectReview = &pSharedDefect->m_ReviewDefect;
                    //size_t CharactersConverted;
                    //wcstombs_s(&CharactersConverted, pSharedDefectReview->m_strRevImageName, pReviewResult->strImgFileName, _TRUNCATE);
                    strcpy(pSharedDefectReview->m_strRevImageName, "");
                }
                //LYW DCOLL 임시조치
                ::Sleep(nWaitTime);
                m_pSP2P->ISP2P_GetReviewProcessor()->ResetGantryDone();
                bExcute = ReviewStartProcessing(pGlassResult, nPlanIdx);
@@ -1048,8 +1062,8 @@
            strFileName.Format(_T("%s_%s"), strGlassIDTemp, strGlassStepIdTemp);
            //업데이트시
            //bFileFind = FindRawBinFile(strFileName);
            bFileFind = TRUE;
            bFileFind = FindRawBinFile(strFileName);
            //bFileFind = TRUE;
            pDitRawClient->SetReviewStart();
            Sleep(1000);
@@ -1244,7 +1258,6 @@
            if(pAlignCameraControl->AlignCameraDisconnectCheck() == FALSE)
            {
                SendResultToSignalControl(PCControlSendData_AlignResult_CPJT, SIGNAL_SEND_RESULT_FAIL);
                m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Fail! Align Cam Disconnect"));
                m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Algin Camera Disconnect!!!!"));
            }
        }        
@@ -3128,7 +3141,7 @@
                    strReadData = pTransferData->strRerferData;
                    break;
                }
                m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData); //0517
            //    m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData); //0517
        }
    }
@@ -4581,7 +4594,6 @@
    //WSI 좌우 겐트리 동시이동 
    pMotorControl->GantrySetTwoGantrySyncModeSend(1);
    
    // WSI result count
    for (int nModuleIdx = 0; nModuleIdx < Module_GetModuleStatusCount(); nModuleIdx++)
    {
@@ -4627,7 +4639,6 @@
                return 0;
            }
        }
        // get result index
        int nStartIdx = pWsiResult->GetStartSReviewResultIndex();
@@ -6085,7 +6096,6 @@
    pReviewScheduler->GetPathSchedulerParam()->SetSelectModuleType(type);
    
    nSchedulingCount = pReviewScheduler->PathScheduling(vecPathData, vecStartPathData);
    if (nSchedulingCount>0)
    {