| | |
| | | |
| | | CDitGlassRawServer::~CDitGlassRawServer(void) |
| | | { |
| | | delete m_pGlassRawData; |
| | | delete m_pGlassRawInfo; |
| | | |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | |
| | | |
| | | BOOL CDitGlassRawServer::CreateGlassRawInfo() |
| | | { |
| | | if(m_hMapBasicInfo == NULL) |
| | | { |
| | | BOOL bCreateMem = TRUE; |
| | | |
| | | m_hMapBasicInfo = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, sizeof(_grmDitGlassRawInfo), SHAREDMEMNAME_BASICINFO); |
| | | |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | m_hMapBasicInfo = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_BASICINFO); |
| | | bCreateMem = FALSE; |
| | | } |
| | | |
| | | if (m_hMapBasicInfo) |
| | | { |
| | | m_pGlassRawInfo = (_grmDitGlassRawInfo*)::MapViewOfFile(m_hMapBasicInfo, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(_grmDitGlassRawInfo)); |
| | | } |
| | | |
| | | if(m_hMapBasicInfo == NULL || m_pGlassRawInfo == NULL) |
| | | { |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | m_pGlassRawInfo = NULL; |
| | | } |
| | | m_pGlassRawInfo = NULL; |
| | | return FALSE; |
| | | } |
| | | // if(m_hMapBasicInfo == NULL) |
| | | // { |
| | | // BOOL bCreateMem = TRUE; |
| | | // |
| | | // m_hMapBasicInfo = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | // , 0, sizeof(_grmDitGlassRawInfo), SHAREDMEMNAME_BASICINFO); |
| | | // |
| | | // if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | // { |
| | | // m_hMapBasicInfo = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_BASICINFO); |
| | | // bCreateMem = FALSE; |
| | | // } |
| | | // |
| | | // if (m_hMapBasicInfo) |
| | | // { |
| | | // m_pGlassRawInfo = (_grmDitGlassRawInfo*)::MapViewOfFile(m_hMapBasicInfo, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(_grmDitGlassRawInfo)); |
| | | // } |
| | | // |
| | | // if(m_hMapBasicInfo == NULL || m_pGlassRawInfo == NULL) |
| | | // { |
| | | // if (m_hMapBasicInfo!=NULL) |
| | | // { |
| | | // ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | // m_pGlassRawInfo = NULL; |
| | | // } |
| | | // m_pGlassRawInfo = NULL; |
| | | // return FALSE; |
| | | // } |
| | | |
| | | //0으로 초기화 |
| | | if(bCreateMem && m_pGlassRawInfo) |
| | | //if(bCreateMem && m_pGlassRawInfo) |
| | | //_grmDitGlassRawInfo SemiServer; |
| | | m_pGlassRawInfo = new _grmDitGlassRawInfo; |
| | | if (m_pGlassRawInfo) |
| | | { |
| | | ZeroMemory(m_pGlassRawInfo,sizeof(_grmDitGlassRawInfo)); |
| | | |
| | |
| | | int bytealign = m_pGlassRawInfo->m_nSizeOfGlassData%4; |
| | | } |
| | | |
| | | } |
| | | //} |
| | | |
| | | |
| | | |
| | |
| | | |
| | | BOOL CDitGlassRawServer::CreateGlassRawData() |
| | | { |
| | | int nGlassRawSharedSize = (int)(m_pGlassRawInfo->m_nGlassRawDataSize); |
| | | |
| | | if(m_hMapGlassData == NULL) |
| | | { |
| | | BOOL bCreateMem = TRUE; |
| | | |
| | | m_hMapGlassData = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, nGlassRawSharedSize, SHAREDMEMNAME_GLASSDATA); |
| | | |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | m_hMapGlassData = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_GLASSDATA); |
| | | bCreateMem = FALSE; |
| | | } |
| | | |
| | | if (m_hMapGlassData) |
| | | { |
| | | m_pGlassRawData = (char*)::MapViewOfFile(m_hMapGlassData, FILE_MAP_ALL_ACCESS, 0, 0, nGlassRawSharedSize); |
| | | } |
| | | |
| | | if(m_hMapGlassData == NULL || m_pGlassRawData == NULL) |
| | | { |
| | | if (m_hMapGlassData != NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapGlassData); |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | m_pGlassRawData = NULL; |
| | | return FALSE; |
| | | } |
| | | |
| | | //0으로 초기화 |
| | | if(bCreateMem && m_pGlassRawData) ZeroMemory(m_pGlassRawData,sizeof(char)*nGlassRawSharedSize); |
| | | } |
| | | int nGlassRawSharedSize = (int)(m_pGlassRawInfo->m_nGlassRawDataSize); |
| | | // |
| | | // if(m_hMapGlassData == NULL) |
| | | // { |
| | | // BOOL bCreateMem = TRUE; |
| | | // |
| | | // m_hMapGlassData = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | // , 0, nGlassRawSharedSize, SHAREDMEMNAME_GLASSDATA); |
| | | // |
| | | // if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | // { |
| | | // m_hMapGlassData = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_GLASSDATA); |
| | | // bCreateMem = FALSE; |
| | | // } |
| | | // |
| | | // if (m_hMapGlassData) |
| | | // { |
| | | // m_pGlassRawData = (char*)::MapViewOfFile(m_hMapGlassData, FILE_MAP_ALL_ACCESS, 0, 0, nGlassRawSharedSize); |
| | | // } |
| | | // |
| | | // if(m_hMapGlassData == NULL || m_pGlassRawData == NULL) |
| | | // { |
| | | // if (m_hMapGlassData != NULL) |
| | | // { |
| | | // ::UnmapViewOfFile(m_hMapGlassData); |
| | | // m_pGlassRawData = NULL; |
| | | // } |
| | | // m_pGlassRawData = NULL; |
| | | // return FALSE; |
| | | // } |
| | | // |
| | | // //0으로 초기화 |
| | | // if(bCreateMem && m_pGlassRawData) ZeroMemory(m_pGlassRawData,sizeof(char)*nGlassRawSharedSize); |
| | | // } |
| | | |
| | | |
| | | //0으로 초기화 |
| | | m_pGlassRawData = new char[nGlassRawSharedSize]; |
| | | if(m_pGlassRawData) |
| | | ZeroMemory(m_pGlassRawData,sizeof(char)*nGlassRawSharedSize); |
| | | |
| | | m_pGlassData = (_grmGlassData*)&m_pGlassRawData[m_pGlassRawInfo->m_nGlassDataPoint]; |
| | | m_pBlockData = (_grmBlockData*)&m_pGlassRawData[m_pGlassRawInfo->m_nBlockDataPoint]; |
| | | m_pCellData = (_grmCellData*)&m_pGlassRawData[m_pGlassRawInfo->m_nCellDataPoint]; |
| | |
| | | ON_BN_CLICKED(IDC_CHK_REVIEW_DEFECT, &CReveiwHistoryDlg::OnClickedChkReviewDefect) |
| | | ON_BN_CLICKED(IDC_CHK_SINGLE, &CReveiwHistoryDlg::OnClickedChkSingle) |
| | | ON_EN_CHANGE(IDC_EDIT_FILE_COUNT, &CReveiwHistoryDlg::OnChangeEditFileCount) |
| | | ON_WM_KEYDOWN() |
| | | END_MESSAGE_MAP() |
| | | |
| | | // CReveiwHistoryDlg 메시지 처리기 |
| | |
| | | |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | else if (NM_CLICK == pDispInfo->hdr.code || LVN_ITEMCHANGING == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row == 0) |
| | | { |
| | |
| | | |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | else if (NM_CLICK == pDispInfo->hdr.code || LVN_ITEMCHANGING == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row == 0) |
| | | { |
| | |
| | | } |
| | | m_Formation.m_vecHeaderTemp.clear(); |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) |
| | | { |
| | | // TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다. |
| | | |
| | | CDialogEx::OnKeyDown(nChar, nRepCnt, nFlags); |
| | | } |
| | |
| | | void SetCellCount() { m_nCellCount = m_nCellCount + 1; } |
| | | int GetCellCount() { return m_nCellCount; } |
| | | |
| | | afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); |
| | | }; |
| | |
| | | |
| | | CString strDefectInfo; |
| | | COLORREF cl; |
| | | cl = RGB(39, 255, 39); |
| | | cl = RGB(0, 0, 0); |
| | | |
| | | pDC->SetTextAlign(TA_LEFT | TA_BASELINE); |
| | | pDC->SetTextColor(cl); |
| | | strDefectInfo.Format("%d : %.3lf, %.3lf Cam: %d, SCan : %d", m_pMouseOveredDefect->m_nDefectID, m_pMouseOveredDefect->dPositionX, m_pMouseOveredDefect->dPositionY, m_pMouseOveredDefect->m_nCameraID, m_pMouseOveredDefect->m_nScanIdx); |
| | | pDC->TextOut(GetWindowPosX(m_pMouseOveredDefect->dPositionX)+5, GetWindowPosY(m_pMouseOveredDefect->dPositionY) - 7, strDefectInfo); |
| | | strDefectInfo.Format("%dCam %dSCan, %d : %.3lf, %.3lf ", m_pMouseOveredDefect->m_nCameraID, m_pMouseOveredDefect->m_nScanIdx, m_pMouseOveredDefect->m_nDefectID, m_pMouseOveredDefect->dPositionX, m_pMouseOveredDefect->dPositionY); |
| | | pDC->TextOut(GetWindowPosX(m_pMouseOveredDefect->dPositionX)+5, GetWindowPosY(m_pMouseOveredDefect->dPositionY)+3, strDefectInfo); |
| | | |
| | | } |
| | | if (m_pSelectedFormation) |
| | |
| | | return findResult; |
| | | } |
| | | |
| | | /*< LYW 20211013 - #3671 Delete Start >*/ |
| | | // step2. edge find |
| | | if (FindAlignEdge(findResult)==1) |
| | | { |
| | | return findResult; |
| | | } |
| | | // if (FindAlignEdge(findResult) == 1) |
| | | // { |
| | | // return findResult; |
| | | // } |
| | | /*< LYW 20211013 - #3671 Delete End >*/ |
| | | |
| | | |
| | | return findResult; |
| | | } |
| | |
| | | CCHImageData tempImage; |
| | | CCHImageProcess::ImageNormalize(&resultImage, &m_BlobImage, 0, 255); |
| | | |
| | | if (findResult.dMatchValue<m_findParam.dMatchRate) |
| | | { |
| | | findResult.nResultCode = AlignMatch_LowScore; |
| | | return 0; |
| | | } |
| | | /*< LYW 20211013 - #3671 Delete Start >*/ |
| | | // if (findResult.dMatchValue < m_findParam.dMatchRate) |
| | | // { |
| | | // findResult.nResultCode = AlignMatch_LowScore; |
| | | // return 0; |
| | | // } |
| | | /*< LYW 20211013 - #3671 Delete End >*/ |
| | | |
| | | // step5. Make Result 이미지 |
| | | findResult.nResultCode = AlignMatch_Success; |
| | |
| | | m_ResultImage.DrawRectangle(CPoint((int)(dResultX+0.5), (int)(dResultY+0.5)), CPoint((int)(dResultX+m_pTempImage->GetWidth()+0.5), (int)(dResultY+m_pTempImage->GetHeight()+0.5)), RGB(255,255,255), 2); |
| | | } |
| | | |
| | | /*< LYW 20211013 - #3671 ADD Start >*/ |
| | | if (findResult.dMatchValue < m_findParam.dMatchRate) |
| | | { |
| | | findResult.nResultCode = AlignMatch_LowScore; |
| | | return 0; |
| | | } |
| | | /*< LYW 20211013 - #3671 ADD End >*/ |
| | | return 1; |
| | | } |
| | | |
| | |
| | | strItem.Format(_T("RCP_ALIGN_SECOND_IMAGE_FILE")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strSecondImageFile); |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | strItem.Format(_T("RCP_ALIGN_FIRST_ASSISTANT_IMAGE_FILE")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strFirstAssistantImageFile); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_SECOND_ASSISTANT_IMAGE_FILE")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strSecondAssistantImageFile); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_MATCHING_PIXEL_STANDARD")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strMatchingPixelStandard); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_MATCHING_ALARM_CONDITION")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strMatchingAlarmCondition); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_TOTAL_PITCH_IMAGE_FILE")); |
| | | macroFile.SetItem(strItem, m_rsRcpAlignInfo.m_strTotalPitchImageFile); |
| | | |
| | |
| | | strItem.Format(_T("RCP_ALIGN_SECOND_IMAGE_FILE")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strSecondImageFile, _T("")); |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | strItem.Format(_T("RCP_ALIGN_FIRST_ASSISTANT_IMAGE_FILE")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strFirstAssistantImageFile, _T("")); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_SECOND_ASSISTANT_IMAGE_FILE")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strSecondAssistantImageFile, _T("")); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_MATCHING_PIXEL_STANDARD")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strMatchingPixelStandard, _T("0")); |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_MATCHING_ALARM_CONDITION")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strMatchingAlarmCondition, _T("0")); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | strItem.Format(_T("RCP_ALIGN_TOTAL_PITCH_IMAGE_FILE")); |
| | | macroFile.GetItem(strItem, m_rsRcpAlignInfo.m_strTotalPitchImageFile, _T("")); |
| | | |
| | |
| | | m_dMatchingRate = 0.9; |
| | | m_strFirstImageFile = _T(""); |
| | | m_strSecondImageFile = _T(""); |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | m_strFirstAssistantImageFile = _T(""); |
| | | m_strSecondAssistantImageFile = _T(""); |
| | | m_strMatchingPixelStandard = _T(""); |
| | | m_strMatchingAlarmCondition = _T(""); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | m_strTotalPitchImageFile= _T(""); |
| | | // edge find param |
| | | m_bUseEdge = TRUE; |
| | |
| | | |
| | | //FDC보고용 Review Contrast |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD Start |
| | | nReview00ImageContrast = 50; |
| | | nReview01ImageContrast = 50; |
| | | nReview00ImageContrast = 5; |
| | | nReview01ImageContrast = 5; |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD End |
| | | |
| | | // defect result |
| | |
| | | |
| | | //FDC보고용 Review Contrast |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD Start |
| | | nReview00ImageContrast = 50; |
| | | nReview01ImageContrast = 50; |
| | | nReview00ImageContrast = 5; |
| | | nReview01ImageContrast = 5; |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD End |
| | | //// defect result |
| | | //for (MapDefectResultIt it = m_mapDefectResult.begin(); it != m_mapDefectResult.end(); it++) |
| | |
| | | file.GetItem(_T("FLATNESS_JUDGE_DATA_Z_RANGE"), m_dJudgeData_ZRange, 0); |
| | | file.GetItem(_T("FLATNESS_GLASS_X"), m_nGlassSizeX, 0); |
| | | file.GetItem(_T("FLATNESS_GLASS_Y"), m_nGlassSizeY, 0); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | file.GetItem(_T("FLATNESS_SKIPMODE"), m_nFlatnessSkipMode, 0); |
| | | file.GetItem(_T("SQUARENESS_STANDARD"), m_dSquarenessStandard, 0); |
| | | file.GetItem(_T("SQUARENESS_STANDARD2"), m_dSquarenessStandard2, 0); |
| | | file.GetItem(_T("WSI_STANDARD"), m_dWSIStandard, 0); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | file.GetItem(_T("FLATNESS_MODE"), m_nFlatnessMode, 0); |
| | | file.GetItem(_T("FLATNESS_RANGECOUNT"), m_nRangeCount_Flatness, 0); |
| | | file.GetItem(_T("WSI_PANEL_COUNT"), m_nPanelCount_Wsi, 0); |
| | |
| | | m_pManager->m_bProcessAll = true; |
| | | ProcessAll(); |
| | | break; |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | case DiagnosisMode_Review : |
| | | strMessage.Format(_T("[CDiagnosisProcessor] DiagnosisMode_Review START")); |
| | | m_pDP2P->IDP2P_DisplayMessage(0, strMessage); |
| | |
| | | m_pDP2P->IDP2P_DisplayMessage(0, strMessage); |
| | | } |
| | | break; |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | case DiagnosisMode_Flatness: |
| | | m_pManager->m_bProcessAll = false; |
| | | ProcessFlatness(); |
| | |
| | | m_pDP2P->IDP2P_SetDialogTap(1); |
| | | ProcessFlatness(); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //Sleep(2000); |
| | | Sleep(1000); |
| | | |
| | |
| | | strMessage.Format(_T("[CDiagnosisProcessor] DiagnosisJudge FAIL")); |
| | | m_pDP2P->IDP2P_DisplayMessage(0, strMessage); |
| | | } |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | |
| | | m_pManager->m_bProcessAll = false; |
| | | |
| | |
| | | int stTime = GetTickCount(); |
| | | while (1) |
| | | { |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //if (11000 <= GetTickCount() - stTime) |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | if (1500 <= GetTickCount() - stTime) |
| | | { |
| | | break; |
| | |
| | | |
| | | } |
| | | m_pDP2P->IDP2P_SetAFMTracking(nSelModuleIndex, TRUE); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //Sleep(1000); |
| | | Sleep(1000); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | CString strimagename; |
| | | strimagename.Format(_T("%s_Module[%d]Index[%d].bmp"), m_pManager->m_strResultImageFileName, nSelModuleIndex, nIdx); |
| | |
| | | } |
| | | m_pDP2P->IDP2P_SetWsiManualMeasure(nSelModuleIndex, dXpos, dYpos); |
| | | // move panel |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //Sleep(2000); |
| | | Sleep(1000); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | m_pDP2P->IDP2P_MotorGo(nSelModuleIndex, dXpos, dYpos); |
| | | |
| | | if (m_pDP2P->IDP2P_IsGantryMotionEnd(nSelModuleIndex) == FALSE) |
| | |
| | | int stTime = GetTickCount(); |
| | | while (1) |
| | | { |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //if (10000 <= GetTickCount() - stTime) |
| | | if (11000 <= GetTickCount() - stTime) |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | { |
| | | break; |
| | | } |
| | |
| | | |
| | | CDiagnosisInfo * pSettingInfo = m_pManager->GetDiagnosisInfo(); |
| | | if (pSettingInfo == NULL) return 0; |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | if (pSettingInfo->GetFlastnessSkipMode() == TRUE) { |
| | | strMessage.Format(_T("[CDiagnosisProcessor] FlastnessSkipMode!")); |
| | | m_pDP2P->IDP2P_DisplayMessage(0, strMessage); |
| | | return 0; |
| | | } |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | int nSelModuleIndex = m_pDP2P->IDP2P_GetSelectedModuleIndex(); |
| | | int nFlatnessMode = pSettingInfo->GetFlatnessMode(); |
| | |
| | | { |
| | | // AF Home |
| | | m_pDP2P->IDP2P_AFMHomePosition(0); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | //Sleep(5000); |
| | | Sleep(1000); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | m_pDP2P->IDP2P_SetAFMTracking(0, TRUE); |
| | | Sleep(500); |
| | | } |
| | |
| | | |
| | | CDlgAlign::CDlgAlign(CWnd* pParent /*=NULL*/) |
| | | : CDialog(CDlgAlign::IDD, pParent) |
| | | , m_dMatchingPixelStandard(0) |
| | | , m_dMatchingAlarmCondition(0) |
| | | { |
| | | m_pFirstView = new CCHImageView(this); |
| | | m_pSecondView = new CCHImageView(this); |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | m_pFirstAssistantView = new CCHImageView(this); |
| | | m_pSecondAssistantView = new CCHImageView(this); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | } |
| | | |
| | | CDlgAlign::~CDlgAlign() |
| | |
| | | delete m_pSecondView; |
| | | m_pSecondView = NULL; |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | if (m_pFirstAssistantView) |
| | | { |
| | | delete m_pFirstAssistantView; |
| | | m_pFirstAssistantView = NULL; |
| | | } |
| | | |
| | | if (m_pSecondAssistantView) |
| | | { |
| | | delete m_pSecondAssistantView; |
| | | m_pSecondAssistantView = NULL; |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | } |
| | | |
| | | void CDlgAlign::DoDataExchange(CDataExchange* pDX) |
| | |
| | | DDX_Control(pDX, IDC_CHECK_EDGEALIGN_PROCESS, m_ctrlCheckEdgeAlignProcess); |
| | | DDX_Control(pDX, IDC_CHECK_ALIGN_SKIP, m_ctrlCheckAlignSkip); |
| | | DDX_Control(pDX, IDC_CHECK_TOTALPITCHMEASRE, m_ctrlTotalPitchMeasure); |
| | | DDX_Text(pDX, IDC_EDIT_MATCHONG_PIXEL_STANDARD, m_dMatchingPixelStandard); |
| | | DDX_Text(pDX, IDC_EDIT_MATCHING_ALARM_CONDITION, m_dMatchingAlarmCondition); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | m_pSecondView->Invalidate(TRUE); |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | else if (nIdx == 2 && m_pFirstAssistantView->LoadImage(strFilepath)) |
| | | { |
| | | m_pFirstAssistantView->Invalidate(TRUE); |
| | | } |
| | | else if (nIdx == 3 && m_pSecondAssistantView->LoadImage(strFilepath)) |
| | | { |
| | | m_pSecondAssistantView->Invalidate(TRUE); |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | |
| | | m_ctrlGridAlignImageInfo.SetItemText(nIdx, 1, strFilename); |
| | |
| | | CRect rect; |
| | | rect.left = 10; |
| | | rect.top = 550; |
| | | rect.right = rect.left + 232; |
| | | rect.bottom = rect.top + 232; |
| | | rect.right = rect.left + 150; |
| | | rect.bottom = rect.top + 150; |
| | | |
| | | m_pFirstView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE | LBS_NOTIFY , rect, this, 0); |
| | | m_pFirstView->SetDrawType(DrawFit); |
| | |
| | | if (m_pSecondView) |
| | | { |
| | | CRect rect; |
| | | rect.left = 244; |
| | | rect.left = 161; |
| | | rect.top = 550; |
| | | rect.right = rect.left + 232; |
| | | rect.bottom = rect.top + 232; |
| | | rect.right = rect.left + 150; |
| | | rect.bottom = rect.top + 150; |
| | | |
| | | m_pSecondView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE | LBS_NOTIFY , rect, this, 0); |
| | | m_pSecondView->SetDrawType(DrawFit); |
| | | m_pSecondView->SetViewName(_T("Second")); |
| | | m_pSecondView->ShowWindow(SW_SHOW); |
| | | } |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | if (m_pFirstAssistantView) |
| | | { |
| | | CRect rect; |
| | | rect.left = 10; |
| | | rect.top = 701; |
| | | rect.right = rect.left + 150; |
| | | rect.bottom = rect.top + 150; |
| | | |
| | | m_pFirstAssistantView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE | LBS_NOTIFY, rect, this, 0); |
| | | m_pFirstAssistantView->SetDrawType(DrawFit); |
| | | m_pFirstAssistantView->SetViewName(_T("FirstAssistant")); |
| | | m_pFirstAssistantView->ShowWindow(SW_SHOW); |
| | | } |
| | | |
| | | if (m_pSecondAssistantView) |
| | | { |
| | | CRect rect; |
| | | rect.left = 161; |
| | | rect.top = 701; |
| | | rect.right = rect.left + 150; |
| | | rect.bottom = rect.top + 150; |
| | | |
| | | m_pSecondAssistantView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE | LBS_NOTIFY, rect, this, 0); |
| | | m_pSecondAssistantView->SetDrawType(DrawFit); |
| | | m_pSecondAssistantView->SetViewName(_T("SecondAssistant")); |
| | | m_pSecondAssistantView->ShowWindow(SW_SHOW); |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // 예외: OCX 속성 페이지는 FALSE를 반환해야 합니다. |
| | |
| | | nRowIdx++; |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strSecondImageFile = m_ctrlGridAlignImageInfo.GetItemText(nRowIdx, nColIdx); |
| | | nRowIdx++; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strFirstAssistantImageFile = m_ctrlGridAlignImageInfo.GetItemText(nRowIdx, nColIdx); |
| | | nRowIdx++; |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strSecondAssistantImageFile = m_ctrlGridAlignImageInfo.GetItemText(nRowIdx, nColIdx); |
| | | nRowIdx++; |
| | | |
| | | strItemText.Format(_T("%d"), m_dMatchingPixelStandard); |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strMatchingPixelStandard = strItemText; |
| | | |
| | | strItemText.Format(_T("%d"), m_dMatchingAlarmCondition); |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strMatchingAlarmCondition = strItemText; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | strItemText = m_ctrlGridAlignImageInfo.GetItemText(nRowIdx, nColIdx); |
| | | pRcpRsAlignManager->GetRsRcpAlignInfo()->m_dMatchingRate = _tcstod(strItemText, NULL); |
| | |
| | | Item.strText = strTemp; |
| | | m_ctrlGridAlignImageInfo.SetItem(&Item); |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | nRowIdx++; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("1st Assist Mark")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridAlignImageInfo.SetItem(&Item); |
| | | |
| | | nRowIdx++; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("2nd Assist Mark")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridAlignImageInfo.SetItem(&Item); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | nRowIdx++; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | |
| | | m_ctrlGridAlignImageInfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellButton)); |
| | | pCellButton = (CGridCellButton*)m_ctrlGridAlignImageInfo.GetCell(nRowIdx, nColIdx); |
| | | pCellButton->SetText(_T("Browser")); |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | // first Assistant |
| | | nRowIdx = 2; |
| | | nColIdx = 1; |
| | | strItemText = pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strFirstAssistantImageFile; |
| | | m_ctrlGridAlignImageInfo.SetItemText(nRowIdx, nColIdx, strItemText); |
| | | |
| | | strFilename = ALIGN_IMAGE_PATH; |
| | | strFilename = strFilename + _T("\\") + strItemText; |
| | | m_pFirstAssistantView->LoadImage(strFilename); |
| | | /*m_pFirstView->Invalidate(TRUE);*/ |
| | | |
| | | nColIdx = 2; |
| | | m_ctrlGridAlignImageInfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellButton)); |
| | | pCellButton = (CGridCellButton*)m_ctrlGridAlignImageInfo.GetCell(nRowIdx, nColIdx); |
| | | pCellButton->SetText(_T("Browser")); |
| | | |
| | | // second Assistant |
| | | nRowIdx = 3; |
| | | nColIdx = 1; |
| | | strItemText = pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strSecondAssistantImageFile; |
| | | m_ctrlGridAlignImageInfo.SetItemText(nRowIdx, nColIdx, strItemText); |
| | | strFilename = ALIGN_IMAGE_PATH; |
| | | strFilename = strFilename + _T("\\") + strItemText; |
| | | m_pSecondAssistantView->LoadImage(strFilename); |
| | | //m_pSecondView->Invalidate(TRUE); |
| | | |
| | | nColIdx = 2; |
| | | m_ctrlGridAlignImageInfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellButton)); |
| | | pCellButton = (CGridCellButton*)m_ctrlGridAlignImageInfo.GetCell(nRowIdx, nColIdx); |
| | | pCellButton->SetText(_T("Browser")); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | // |
| | | |
| | | nRowIdx = 2; |
| | | nRowIdx = 4; |
| | | nColIdx = 1; |
| | | strItemText.Format(_T("%.3lf"), pRcpRsAlignManager->GetRsRcpAlignInfo()->m_dMatchingRate); |
| | | m_ctrlGridAlignImageInfo.SetItemText(nRowIdx, nColIdx, strItemText); |
| | | |
| | | // |
| | | nRowIdx = 3; |
| | | nRowIdx = 5; |
| | | nColIdx = 1; |
| | | strItemText = pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strTotalPitchImageFile; |
| | | m_ctrlGridAlignImageInfo.SetItemText(nRowIdx, nColIdx, strItemText); |
| | |
| | | m_ctrlGridAlignImageInfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellButton)); |
| | | pCellButton = (CGridCellButton*)m_ctrlGridAlignImageInfo.GetCell(nRowIdx, nColIdx); |
| | | pCellButton->SetText(_T("Browser")); |
| | | |
| | | /*< LYW 20211014 - #3671 ADD Start >*/ |
| | | strItemText = pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strMatchingPixelStandard; |
| | | m_dMatchingPixelStandard = _tcstod(strItemText, NULL); |
| | | |
| | | strItemText = pRcpRsAlignManager->GetRsRcpAlignInfo()->m_strMatchingAlarmCondition; |
| | | m_dMatchingAlarmCondition = _tcstod(strItemText, NULL); |
| | | |
| | | /*< LYW 20211014 - #3671 ADD End >*/ |
| | | |
| | | |
| | | m_ctrlCheckImageProcess.SetCheck(pRcpRsAlignManager->GetRsRcpAlignInfo()->m_bUseImage); |
| | |
| | | FillAlignRotateInfo(); |
| | | FillAlignImageInfo(); |
| | | |
| | | /*< LYW 20211014 - #3671 ADD Start >*/ |
| | | UpdateData(FALSE); |
| | | /*< LYW 20211014 - #3671 ADD End >*/ |
| | | Invalidate(FALSE); |
| | | } |
| | | |
| | |
| | | class CCHImageData; |
| | | class CCHImageView; |
| | | |
| | | #define ALIGN_IMAGE_INFO_GRID_ROW_COUNT 4 |
| | | /*< LYW 20211012 - #3671 MOD Start >*/ |
| | | #define ALIGN_IMAGE_INFO_GRID_ROW_COUNT 6 |
| | | /*< LYW 20211012 - #3671 MOD End >*/ |
| | | /*< Origin Code >*/ |
| | | //#define ALIGN_IMAGE_INFO_GRID_ROW_COUNT 4 |
| | | #define ALIGN_IMAGE_INFO_GRID_COL_COUNT 3 |
| | | #define ALIGN_FIND_INFO_GRID_ROW_COUNT 2 |
| | | #define ALIGN_FIND_INFO_GRID_COL_COUNT 5 |
| | |
| | | |
| | | CCHImageView* m_pFirstView; |
| | | CCHImageView* m_pSecondView; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | CCHImageView* m_pFirstAssistantView; |
| | | CCHImageView* m_pSecondAssistantView; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | CCHImageView* m_pTotalPitchView; |
| | | |
| | | virtual BOOL OnInitDialog(); |
| | |
| | | CButton m_ctrlCheckAlignSkip; |
| | | CButton m_ctrlTotalPitchMeasure; |
| | | afx_msg void OnBnClickedButtonRcpFindTest(); |
| | | int m_dMatchingPixelStandard; |
| | | int m_dMatchingAlarmCondition; |
| | | }; |
| | |
| | | FONT 8, "MS Shell Dlg", 400, 0, 0x1 |
| | | BEGIN |
| | | PUSHBUTTON "Apply",IDC_BUTTON_RCP_ALIGN_APPLY,322,24,50,14 |
| | | LTEXT "Edge Find",IDC_STATIC,7,66,38,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_FIND_INFO,"MFCGridCtrl",WS_TABSTOP,7,82,311,30 |
| | | LTEXT "Light Setting",IDC_STATIC,9,143,49,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_LIGHT_INFO,"MFCGridCtrl",WS_TABSTOP,7,160,311,30 |
| | | LTEXT "Edge Find",IDC_STATIC,7,116,38,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_FIND_INFO,"MFCGridCtrl",WS_TABSTOP,7,128,311,30 |
| | | LTEXT "Light Setting",IDC_STATIC,9,170,49,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_LIGHT_INFO,"MFCGridCtrl",WS_TABSTOP,7,182,311,30 |
| | | PUSHBUTTON "Reset",IDC_BUTTON_RCP_ALIGN_RESET,322,7,50,14 |
| | | LTEXT "Auto Light Level",IDC_STATIC,7,195,52,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_AUTO_INFO,"MFCGridCtrl",WS_TABSTOP,7,212,311,44 |
| | | CONTROL "Operate",IDC_CHECK_AUTO_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,197,55,10 |
| | | CONTROL "Operate",IDC_CHECK_MANUAL_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,56,146,55,10 |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_ROTATE_INFO,"MFCGridCtrl",WS_DISABLED | WS_TABSTOP,7,277,311,30 |
| | | LTEXT "Rotation Correction",IDC_STATIC,7,263,64,14,SS_CENTERIMAGE | WS_DISABLED |
| | | CONTROL "Operate",IDC_CHECK_ROTATE_PROCESS,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,74,266,55,10 |
| | | LTEXT "Auto Light Level",IDC_STATIC,7,212,52,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_AUTO_INFO,"MFCGridCtrl",WS_TABSTOP,7,226,311,44 |
| | | CONTROL "Operate",IDC_CHECK_AUTO_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,216,55,10 |
| | | CONTROL "Operate",IDC_CHECK_MANUAL_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,56,173,55,10 |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_ROTATE_INFO,"MFCGridCtrl",WS_DISABLED | WS_TABSTOP,7,284,311,30 |
| | | LTEXT "Rotation Correction",IDC_STATIC,7,271,64,14,SS_CENTERIMAGE | WS_DISABLED |
| | | CONTROL "Operate",IDC_CHECK_ROTATE_PROCESS,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,74,273,55,10 |
| | | LTEXT "Image Matching",IDC_STATIC,7,7,53,14,SS_CENTERIMAGE |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_IMAGE_INFO,"MFCGridCtrl",WS_TABSTOP,7,22,311,44 |
| | | CONTROL "Custom1",IDC_GRID_RCP_ALIGN_IMAGE_INFO,"MFCGridCtrl",WS_TABSTOP,7,22,311,76 |
| | | CONTROL "Operate",IDC_CHECK_IMAGE_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,10,55,10 |
| | | CONTROL "Operate",IDC_CHECK_EDGE_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,69,55,10 |
| | | CONTROL "Operate",IDC_CHECK_EDGE_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,118,55,10 |
| | | LTEXT "Align Images",IDC_STATIC,7,315,48,14,SS_CENTERIMAGE |
| | | PUSHBUTTON "Find Test",IDC_BUTTON_RCP_FIND_TEST,55,316,50,14 |
| | | LTEXT "EdgeAlign ",IDC_STATIC,9,121,49,14,SS_CENTERIMAGE |
| | | CONTROL "Operate",IDC_CHECK_EDGEALIGN_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,124,55,10 |
| | | LTEXT "EdgeAlign ",IDC_STATIC,9,159,49,14,SS_CENTERIMAGE |
| | | CONTROL "Operate",IDC_CHECK_EDGEALIGN_PROCESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,162,55,10 |
| | | CONTROL "Align Skip",IDC_CHECK_ALIGN_SKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,274,10,43,10 |
| | | CONTROL "TotalPitchMeasure",IDC_CHECK_TOTALPITCHMEASRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,192,10,74,10 |
| | | LTEXT "main Templete",IDC_STATIC,226,370,53,14,SS_CENTERIMAGE |
| | | LTEXT "Assistant Templete",IDC_STATIC,226,463,84,14,SS_CENTERIMAGE |
| | | LTEXT "보조 매칭 pixel 기준값:",IDC_STATIC,8,99,74,14,SS_CENTERIMAGE |
| | | LTEXT "알람 조건:",IDC_STATIC,132,99,38,14,SS_CENTERIMAGE |
| | | LTEXT "회 연속 발생시 ",IDC_STATIC,184,99,51,14,SS_CENTERIMAGE |
| | | EDITTEXT IDC_EDIT_MATCHONG_PIXEL_STANDARD,86,100,32,11,ES_AUTOHSCROLL |
| | | EDITTEXT IDC_EDIT_MATCHING_ALARM_CONDITION,167,101,16,10,ES_AUTOHSCROLL |
| | | END |
| | | |
| | | IDD_DIALOG_REVIEW_RCP_EDITOR_DEFECT_FIND DIALOGEX 0, 0, 379, 526 |
| | |
| | | 0 |
| | | END |
| | | |
| | | IDD_DIALOG_REVIEW_RCP_EDITOR_ALIGN AFX_DIALOG_LAYOUT |
| | | BEGIN |
| | | 0 |
| | | END |
| | | |
| | | #endif // 한국어(대한민국) resources |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | #define IDC_EDIT_RRCP_REVIEW_USER_DEFECT_COUNT 1008 |
| | | #define IDC_EDIT_RCP_REVIEW_USER_DEFECT_COUNT 1008 |
| | | #define IDC_EDIT_WSI_COUNT 1008 |
| | | #define IDC_EDIT_MATCHING_ALARM_CONDITION 1008 |
| | | #define IDC_GRID_RRCP_REVIEW_USER_DEFECT_INFO 1009 |
| | | #define IDC_GRID_RCP_REVIEW_USER_DEFECT_INFO 1009 |
| | | #define IDC_EDIT_MAG_INDEX 1009 |
| | |
| | | #define IDC_REVIEW_DEFOCUS_VAL 1044 |
| | | #define IDC_REVIEW_DEFOCUS_VALUE 1044 |
| | | #define IDC_EDIT_RCP_JUDGE_CELL_JUDGE_COUNT 1044 |
| | | #define IDC_EDIT_MATCHONG_PIXEL_STANDARD 1044 |
| | | #define IDC_BUTTON_RCP_REVIEW_APPLY2 1045 |
| | | #define IDC_BUTTON_RCP_REVIEW_PRIORITY_APPLY 1045 |
| | | #define IDC_EDIT_RCP_MEASURE_COUNT 1045 |
| | |
| | | // |
| | | #ifdef APSTUDIO_INVOKED |
| | | #ifndef APSTUDIO_READONLY_SYMBOLS |
| | | #define _APS_NEXT_RESOURCE_VALUE 154 |
| | | #define _APS_NEXT_RESOURCE_VALUE 155 |
| | | #define _APS_NEXT_COMMAND_VALUE 32771 |
| | | #define _APS_NEXT_CONTROL_VALUE 1122 |
| | | #define _APS_NEXT_SYMED_VALUE 106 |
| | |
| | | |
| | | CString strFilename = _T(""); |
| | | CCHImageData tempImage; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | CCHImageData assistanttempImage; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | for (int i=0; i<2; i++) |
| | | { |
| | | if(m_vecCameraImage.size() <= i) continue; |
| | | (m_vecCameraImage[i]->GetImageData(View_Template))->ReleaseImage(); |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | (m_vecCameraImage[i]->GetImageData(View_AssistantTemplate))->ReleaseImage(); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | // load |
| | | CString strFilename = ALIGN_IMAGE_PATH; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | CString strAssistantFilename = ALIGN_IMAGE_PATH; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | if (i==0) |
| | | { |
| | | strFilename += _T("\\") + m_AlignRecipe.strFirstImageFile; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | strAssistantFilename += _T("\\") + m_AlignRecipe.strFirstAssistantImageFile; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | } |
| | | else if (i==1) |
| | | { |
| | | strFilename += _T("\\") + m_AlignRecipe.strSecondImageFile; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | strAssistantFilename += _T("\\") + m_AlignRecipe.strSecondAssistantImageFile; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | } |
| | | |
| | | //strFilename += m_AlignRecipe.strTemplateName[i]; |
| | |
| | | continue; |
| | | } |
| | | |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | if (assistanttempImage.LoadImage(strAssistantFilename) == FALSE) |
| | | { |
| | | bAllLoad = bAllLoad && FALSE; |
| | | continue; |
| | | } |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | |
| | | bAllLoad = bAllLoad && tempImage.GetBandImage(BandTypeGray, m_vecCameraImage[i]->GetImageData(View_Template)); |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | bAllLoad = bAllLoad && assistanttempImage.GetBandImage(BandTypeGray, m_vecCameraImage[i]->GetImageData(View_AssistantTemplate)); |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | } |
| | | |
| | | return bAllLoad; |
| | |
| | | CCameraImageData* pCameraImage = m_vecCameraImage[nCameraIdx]; |
| | | CAlignFinder* pAlignFinder = m_vecAlignFinder[nCameraIdx]; |
| | | |
| | | if (pCameraImage==NULL || pAlignFinder==NULL) return FALSE; |
| | | /*< LYW 20211014 - #index MOD Start >*/ |
| | | if (pCameraImage == NULL || pAlignFinder == NULL || m_pACC2P == NULL) return FALSE; |
| | | /*< LYW 20211014 - #index MOD End >*/ |
| | | /*< Origin Code >*/ |
| | | //if (pCameraImage == NULL || pAlignFinder == NULL) return FALSE; |
| | | |
| | | // set find param; |
| | | SAlignFindParam findParam; |
| | |
| | | findParam.nEdgeThreshold = m_AlignRecipe.nEdgeThreshold; |
| | | findParam.nMergeRange = m_AlignRecipe.nMergeRange; |
| | | findParam.dEdgeRate = m_AlignRecipe.dEdgeRate; |
| | | findParam.dMatchingPixelStandard = _tcstod(m_AlignRecipe.strMatchingPixelStandard,NULL); |
| | | findParam.dMatchingAlarmCondition = _tcstod(m_AlignRecipe.strMatchingAlarmCondition, NULL); |
| | | // findParam.m_nAlignMarkPos = m_AlignRecipe.nAlignMarkPosition; |
| | | |
| | | |
| | |
| | | wcstombs_s(&CharactersConverted,CDitGlassRawClient::GetInstance()->GetGlassData()->m_strAlignMarkSecond, uploadAlignimage, _TRUNCATE); |
| | | }*/ |
| | | // find process |
| | | |
| | | |
| | | // find process 바슬러 카메라가 3채널짜리라서 시퀀스 돌때는 1채널로 바꿔서 돔 ksm |
| | | CCHImageData camImage; |
| | | |
| | | //#3671 TEST CODE Start |
| | | // CCHImageData TestImage; |
| | | // |
| | | // (m_vecCameraImage[nCameraIdx]->GetImageData(View_Camera))->ReleaseImage(); |
| | | // CString strFilename = ALIGN_IMAGE_PATH; |
| | | // if (nCameraIdx == 0) |
| | | // { |
| | | // strFilename += _T("\\Test1.BMP"); |
| | | // } |
| | | // else |
| | | // { |
| | | // strFilename += _T("\\Test2.BMP"); |
| | | // } |
| | | // TestImage.LoadImage(strFilename); |
| | | // TestImage.GetBandImage(BandTypeGray, m_vecCameraImage[nCameraIdx]->GetImageData(View_Camera)); |
| | | // (m_vecCameraImage[nCameraIdx]->GetImageData(View_Camera))->GetBandImage(BandTypeGray, &camImage); |
| | | //#3671 TEST CODE End |
| | | // find process 바슬러 카메라가 3채널짜리라서 시퀀스 돌때는 1채널로 바꿔서 돔 ksm |
| | | if ((pCameraImage->GetImageData(View_Camera))->GetChannels() > 1) |
| | | (pCameraImage->GetImageData(View_Camera))->GetBandImage(BandTypeGray, &camImage); |
| | | else |
| | |
| | | |
| | | //SAlignFindResult findResult = pAlignFinder->FindAlign(pCameraImage->GetImageData(View_Matching), findParam, pCameraImage->GetImageData(View_Template)); |
| | | SAlignFindResult findResult = pAlignFinder->FindAlign(&camImage, findParam, pCameraImage->GetImageData(View_Template)); |
| | | g_pLog->DisplayMessage(_T("Main TempleteMatching Result : %d Cam ResultCode = %d, PixelX = %d, PixelY = %d, MatchingRate = %.3lf"), nCameraIdx, findResult.nResultCode, int(findResult.dPosX + 0.5), int(findResult.dPosY + 0.5), findResult.dMatchValue); |
| | | |
| | | // result process |
| | | if (findResult.nResultCode==AlignMatch_Success) |
| | | { |
| | | g_pLog->DisplayMessage(_T("Main TempleteMatching Success!")); |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 1; |
| | | m_AlignResult.dFindPixelX[nCameraIdx] = int(findResult.dPosX + 0.5); |
| | | m_AlignResult.dFindPixelY[nCameraIdx] = int(findResult.dPosY + 0.5); |
| | | m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | } |
| | | /*< LYW 20211013 - #3671 ADD Start >*/ |
| | | |
| | | else |
| | | { |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 0; |
| | | m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | SAlignFindResult findAssistantResult = pAlignFinder->FindAlign(&camImage, findParam, pCameraImage->GetImageData(View_AssistantTemplate)); |
| | | g_pLog->DisplayMessage(_T("Assistant TempleteMatching Result : %d Cam ResultCode = %d, PixelX = %d, PixelY = %d, MatchingRate = %.3lf"), nCameraIdx, findAssistantResult.nResultCode, int(findAssistantResult.dPosX + 0.5), int(findAssistantResult.dPosY + 0.5), findAssistantResult.dMatchValue); |
| | | if (findAssistantResult.nResultCode == AlignMatch_Success) |
| | | { |
| | | g_pLog->DisplayMessage(_T("Assistant TempleteMatching Success!")); |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 1; |
| | | m_AlignResult.dFindPixelX[nCameraIdx] = int(findAssistantResult.dPosX + 0.5); |
| | | m_AlignResult.dFindPixelY[nCameraIdx] = int(findAssistantResult.dPosY + 0.5); |
| | | m_AlignResult.dFindScore[nCameraIdx] = findAssistantResult.dMatchValue; |
| | | } |
| | | |
| | | else |
| | | { |
| | | int dffmain2assistanstX = int(findResult.dPosX) - int(findAssistantResult.dPosX); |
| | | int dffmain2assistanstY = int(findResult.dPosY) - int(findAssistantResult.dPosY); |
| | | g_pLog->DisplayMessage(_T("Main, Assistant TempleteMatching All Low Score! differenceX = %d, differenceY = %d"), dffmain2assistanstX, dffmain2assistanstY); |
| | | |
| | | if (abs(dffmain2assistanstX) <= findParam.dMatchingPixelStandard && abs(dffmain2assistanstY) <= findParam.dMatchingPixelStandard && findResult.dMatchValue != 0.0) |
| | | { |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 1; |
| | | m_AlignResult.dFindPixelX[nCameraIdx] = int(findResult.dPosX + 0.5); |
| | | m_AlignResult.dFindPixelY[nCameraIdx] = int(findResult.dPosY + 0.5); |
| | | m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | m_pACC2P->IACC2P_SetAccumaulate(m_pACC2P->IACC2P_GetAccumaulate() + 1); |
| | | g_pLog->DisplayMessage(_T("Main, Assistant Templete Find Same Point! Align Success! Accumaulate = %d"), m_pACC2P->IACC2P_GetAccumaulate()); |
| | | } |
| | | |
| | | else |
| | | { |
| | | g_pLog->DisplayMessage(_T("Main Assistant Templete Don`t Find Same Point! Align Fail!")); |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 0; |
| | | m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | } |
| | | |
| | | if (m_pACC2P->IACC2P_GetAccumaulate() > findParam.dMatchingAlarmCondition) |
| | | { |
| | | m_AlignResult.nFindAlign[nCameraIdx] = 0; |
| | | m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | m_pACC2P->IACC2P_SetAccumaulate(0); |
| | | g_pLog->DisplayMessage(_T("Low Matching, But Align Same Point, Count is more Than MatchingAlarmCondition , Accumaulate = %d Reset"), m_pACC2P->IACC2P_GetAccumaulate()); |
| | | } |
| | | } |
| | | } |
| | | /*< LYW 20211013 - #3671 ADD End >*/ |
| | | |
| | | /*< LYW 20211013 - #3671 Delete Start >*/ |
| | | // else |
| | | // { |
| | | // m_AlignResult.nFindAlign[nCameraIdx] = 0; |
| | | // m_AlignResult.dFindScore[nCameraIdx] = findResult.dMatchValue; |
| | | // } |
| | | /*< LYW 20211013 - #3671 Delete End >*/ |
| | | |
| | | // save threshold image |
| | | strPath.Format(_T("%s\\Cam%02d_AlignTH_%04d%02d%02d%02d%02d%02d.jpg"), m_strSaveImageBasePath, nCameraIdx, |
| | |
| | | typedef std::vector<SLightData*> VectorLightData; |
| | | typedef std::vector<SLightData*>::iterator VectorLightDataIt; |
| | | |
| | | |
| | | enum AlignViewMode { View_Camera=0, View_Result, View_Template, View_Matching }; |
| | | /*< LYW 20211012 - #3671 MOD Start >*/ |
| | | enum AlignViewMode { View_Camera = 0, View_Result, View_Template, View_AssistantTemplate, View_Matching }; |
| | | /*< LYW 20211012 - #3671 MOD End >*/ |
| | | /*< Origin Code >*/ |
| | | //enum AlignViewMode { View_Camera=0, View_Result, View_Template, View_Matching }; |
| | | enum AlignResult { Align_Fail=-2, Align_TempFail=-1, Align_None=0, Align_Success=1 }; |
| | | //#3357 KYH Align Image 초기화 ADD START |
| | | enum AlignFinderType { AlignFinderType_Normal = 0, AlignFinderType_Corner, AlignFinderType_Extend, AlignFinderType_count }; //210330 kyh 추가 |
| | |
| | | virtual void IACC2P_CameraControl(int nValue) = 0; |
| | | virtual BOOL IACC2P_SetLightLevel(int nCameraIndex, int nValue) = 0; |
| | | virtual BOOL IACC2P_GetLightLevel(int nCameraIndex, int& nValue) = 0; |
| | | /*< LYW 20211014 - #3671 ADD Start >*/ |
| | | virtual int IACC2P_GetAccumaulate() = 0; |
| | | virtual void IACC2P_SetAccumaulate(int dValue) = 0; |
| | | /*< LYW 20211014 - #3671 ADD End >*/ |
| | | }; |
| | | |
| | | class CCameraControlAlign : public CCameraController, |
| | |
| | | |
| | | for (VectorCameraControlIt it=m_vecCameraControl.begin(); it!=m_vecCameraControl.end(); it++) |
| | | { |
| | | (*it)->SetTriggerMode(ModeInternal); |
| | | |
| | | int nSub = (*it)->Grab(); |
| | | //#3561 210908 LYW ADD Start |
| | | int nSub; |
| | | try |
| | | { |
| | | (*it)->SetTriggerMode(ModeInternal); |
| | | nSub = (*it)->Grab(); |
| | | } |
| | | catch (...) |
| | | { |
| | | nSub = FALSE; |
| | | } |
| | | //#3561 210908 LYW ADD End |
| | | |
| | | if (nSub==1) |
| | | g_pLog->DisplayMessage(_T("[CameraController]Camera_Grab Success![ModeInternal]")); |
| | |
| | | |
| | | void CDlgDeffectHistroy::OnDblclkListHistoryDefect(NMHDR *pNMHDR, LRESULT *pResult) |
| | | { |
| | | LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR); |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | |
| | | int nPos = m_ctrlListDefectHistory.GetSelectionMark(); |
| | | if (nPos >= 0) |
| | | |
| | | /*< LYW 20211005 - #3662 ADD Start >*/ |
| | | try |
| | | { |
| | | CString strText; |
| | | strText = m_ctrlListDefectHistory.GetItemText(nPos, 0); |
| | | int nDefectIdx = _ttoi(strText); |
| | | if (nDefectIdx < 0) |
| | | return; |
| | | LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR); |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | |
| | | //History tool 에 인덱스 번호 넘기기 |
| | | m_pDDL2P->UpdateSelectDefectInfoMap2(nDefectIdx); |
| | | int nPos = m_ctrlListDefectHistory.GetSelectionMark(); |
| | | if (nPos >= 0) |
| | | { |
| | | CString strText; |
| | | strText = m_ctrlListDefectHistory.GetItemText(nPos, 0); |
| | | int nDefectIdx = _ttoi(strText); |
| | | if (nDefectIdx < 0) |
| | | return; |
| | | |
| | | //History tool 에 인덱스 번호 넘기기 |
| | | m_pDDL2P->UpdateSelectDefectInfoMap2(nDefectIdx); |
| | | } |
| | | |
| | | *pResult = 0; |
| | | } |
| | | catch (...) |
| | | { |
| | | return; |
| | | } |
| | | /*< LYW 20211005 - #3662 ADD End >*/ |
| | | |
| | | *pResult = 0; |
| | | } |
| | | |
| | | void CDlgDeffectHistroy::OnSize(UINT nType, int cx, int cy) |
| | |
| | | |
| | | void CDlgReviewHistoryTool::OnDblclkList1() |
| | | { |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | CString strSelect, strGlassID, strStepID, strStepTime; |
| | | int nTemp, nTemp2; |
| | | int nidx = 0; |
| | | /*< LYW 20211005 - #3662 ADD Start >*/ |
| | | try |
| | | { |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | CString strSelect, strGlassID, strStepID, strStepTime; |
| | | int nTemp, nTemp2; |
| | | int nidx = 0; |
| | | |
| | | nidx = m_ctrlHistoryList.GetCurSel(); |
| | | nidx = m_ctrlHistoryList.GetCurSel(); |
| | | |
| | | SetSelectIndex(nidx); |
| | | bool bSelect = false; |
| | | SetSelectIndex(nidx); |
| | | bool bSelect = false; |
| | | |
| | | CGlassResult* pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(0); |
| | | CGlassResult* pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(0); |
| | | |
| | | pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(GetSelectIndex()); |
| | | SetHistoryTemp(GetSelectIndex()); |
| | | const SDefectFilter *pDefectFilter = m_pDDL2P->ISP2P_GetDefectFilter(); //taek 210213 |
| | | pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(GetSelectIndex()); |
| | | SetHistoryTemp(GetSelectIndex()); |
| | | const SDefectFilter *pDefectFilter = m_pDDL2P->ISP2P_GetDefectFilter(); //taek 210213 |
| | | |
| | | if(pHistoryResult == NULL) return; |
| | | if(pDefectFilter == NULL) return; |
| | | if (pHistoryResult == NULL) return; |
| | | if (pDefectFilter == NULL) return; |
| | | |
| | | //디펙 맵 표현 및 그리드 표현 |
| | | m_pDlgDefectHistory->UpdateProcessStatus(pHistoryResult); //그리드 표현 |
| | | m_pDlgDefectHistoryMap->UpdateDefectFilter(pDefectFilter); |
| | | m_pDlgDefectHistoryMap->UpdateProcessStatus(pHistoryResult); //디펙 맵 표현 |
| | | UpdateProcess(pHistoryResult); |
| | | SetDefectImage(GetReviewName(), m_pHistoryTemp); |
| | | GetHistoryList(); //한번 갱신 해주고 처리하자 |
| | | m_bHistory = true; |
| | | //디펙 맵 표현 및 그리드 표현 |
| | | m_pDlgDefectHistory->UpdateProcessStatus(pHistoryResult); //그리드 표현 |
| | | m_pDlgDefectHistoryMap->UpdateDefectFilter(pDefectFilter); |
| | | m_pDlgDefectHistoryMap->UpdateProcessStatus(pHistoryResult); //디펙 맵 표현 |
| | | UpdateProcess(pHistoryResult); |
| | | SetDefectImage(GetReviewName(), m_pHistoryTemp); |
| | | GetHistoryList(); //한번 갱신 해주고 처리하자 |
| | | m_bHistory = true; |
| | | } |
| | | catch (...) |
| | | { |
| | | return; |
| | | } |
| | | /*< LYW 20211005 - #3662 ADD End >*/ |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | void CDlgReviewHistoryTool::OnBnClickedUseDefect() |
| | | { |
| | | /*< LYW 20211005 - #3662 ADD Start >*/ |
| | | try |
| | | { |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | BOOL bCheck = ((CButton*)GetDlgItem(IDC_USE_DEFECT))->GetCheck(); |
| | | // CGlassResult* pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(0); |
| | | // pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(GetSelectIndex()); |
| | | SetHistoryTemp(GetSelectIndex()); |
| | | SetAllDefect(bCheck); |
| | | m_pDlgDefectHistoryMap->SetHistoryDefect(bCheck); |
| | | m_pDlgDefectHistoryMap->UpdateProcessStatus(m_pHistoryTemp); //디펙 맵 표현 |
| | | m_pDlgDefectHistory->UpdateProcessStatus(m_pHistoryTemp); |
| | | BOOL bCheck = ((CButton*)GetDlgItem(IDC_USE_DEFECT))->GetCheck(); |
| | | // CGlassResult* pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(0); |
| | | // pHistoryResult = m_pDDL2P->ISP2P_GetHistoryResult(GetSelectIndex()); |
| | | SetHistoryTemp(GetSelectIndex()); |
| | | SetAllDefect(bCheck); |
| | | m_pDlgDefectHistoryMap->SetHistoryDefect(bCheck); |
| | | m_pDlgDefectHistoryMap->UpdateProcessStatus(m_pHistoryTemp); //디펙 맵 표현 |
| | | m_pDlgDefectHistory->UpdateProcessStatus(m_pHistoryTemp); |
| | | } |
| | | catch (...) |
| | | { |
| | | return; |
| | | } |
| | | /*< LYW 20211005 - #3662 ADD End >*/ |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | if (m_pDiagnosisManager->CheckManualMode() == FALSE) |
| | | { |
| | | CString strMessage; |
| | |
| | | return; |
| | | } |
| | | } |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | if (m_bState == FALSE) |
| | | { |
| | |
| | | |
| | | void CDlgSelfDiagnosis_Flatness::OnBnClickedButtonManual() |
| | | { |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | if (m_pDiagnosisManager->CheckManualMode() == FALSE) |
| | | { |
| | | CString strMessage; |
| | |
| | | return; |
| | | } |
| | | } |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | m_pDiagnosisManager->ManualMeasure_Flatness(); |
| | | } |
| | |
| | | DDX_Control(pDX, IDC_EDIT_WSI_PANEL_POS_Y, m_editPanelPosY); |
| | | DDX_Control(pDX, IDC_EDIT_WSI_PANEL_POS_X2, m_editPanelPosX2); |
| | | DDX_Control(pDX, IDC_EDIT_WSI_PANEL_POS_Y2, m_editPanelPosY2); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | DDX_Control(pDX, IDC_CHECK_SELF_DIAGNOSIS_FLATNESS_SKIP, m_CheckFlatnessSkip); |
| | | DDX_Control(pDX, IDC_EDIT_SQUARENESS_STANDARD, m_editSquarenessStandard); |
| | | DDX_Control(pDX, IDC_EDIT_SQUARENESS_STANDARD2, m_editSquarenessStandard2); |
| | | DDX_Control(pDX, IDC_EDIT_WSI_STANDARD, m_editWSIStandard); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | DDX_Text(pDX, IDC_EDIT_REVIEW_PANEL_POS_X, m_dEditReviewPanelPosX); |
| | | DDX_Text(pDX, IDC_EDIT_REVIEW_PANEL_POS_Y, m_dEditReviewPanelPosY); |
| | | DDX_Text(pDX, IDC_EDIT_REVIEW_PANEL_POS_X2, m_dEditReviewPanelPosX2); |
| | |
| | | |
| | | BOOL CDlgSelfDiagnosis_Setting::ReadAutoDiagnosisConfigFile() |
| | | { |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | CString strConfigFilePath = _T(""); |
| | | strConfigFilePath.Format(_T("%s\\%s"), REVIEW_AUTO_DIAGNOSIS_SETTING_FILE_PATH, REVIEW_AUTO_DIAGNOSIS_SETTING_FILE_NAME); |
| | | m_pDiagnosisManager->LoadSettingConfigFile(strConfigFilePath); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | CDiagnosisInfo* pSettingInfo = m_pDiagnosisManager->GetDiagnosisInfo(); |
| | | if (pSettingInfo == NULL) |
| | |
| | | strTemp.Format("%f", pSettingInfo->GetJudgeData_Degree()); |
| | | m_editJudgeData_Degree.SetWindowTextA(strTemp); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | strTemp.Format("%f", pSettingInfo->GetSquarenessStandard()); |
| | | m_editSquarenessStandard.SetWindowTextA(strTemp); |
| | | |
| | | strTemp.Format("%f", pSettingInfo->GetSquarenessStandard2()); |
| | | m_editSquarenessStandard2.SetWindowTextA(strTemp); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | strTemp.Format("%d", pSettingInfo->GetCameraFrameWidth()); |
| | | m_editFrameWidth.SetWindowTextA(strTemp); |
| | |
| | | strTemp.Format("%d", pSettingInfo->GetGlassSizeY_Flatness()); |
| | | m_editGlassSizeY.SetWindowTextA(strTemp); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | m_CheckFlatnessSkip.SetCheck(pSettingInfo->GetFlastnessSkipMode()); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | strTemp.Format("%d", pSettingInfo->GetPanelCount_Wsi()); |
| | | m_editPanelCount_Wsi.SetWindowTextA(strTemp); |
| | |
| | | strTemp.Format("%f", pSettingInfo->GetJudgeData_3Sigma()); |
| | | m_editJudgeData_3Sigma.SetWindowTextA(strTemp); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | strTemp.Format("%f", pSettingInfo->GetWSIStandard()); |
| | | m_editWSIStandard.SetWindowTextA(strTemp); |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | strTemp.Format("%f", pSettingInfo->GetPanelPosX_Wsi()); |
| | | m_editPanelPosX.SetWindowTextA(strTemp); |
| | |
| | | nTemp = atoi(strTemp); |
| | | macroFile.SetItem(strItem, nTemp); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | strItem.Format(_T("FLATNESS_SKIPMODE")); |
| | | nTemp = m_CheckFlatnessSkip.GetCheck(); |
| | | macroFile.SetItem(strItem, nTemp); |
| | |
| | | dTemp = atof(strTemp); |
| | | macroFile.SetItem(strItem, dTemp); |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | strItem.Format(_T("WSI_PANEL_COUNT")); |
| | | m_editPanelCount_Wsi.GetWindowTextA(strTemp); |
| | |
| | | |
| | | if (m_pDiagnosisManager == NULL) return; |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | if (m_pDiagnosisManager->CheckManualMode() == FALSE) |
| | | { |
| | | CString strMessage; |
| | |
| | | return; |
| | | } |
| | | } |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | GetDialogControls(); |
| | | |
| | |
| | | |
| | | if (m_pDiagnosisManager == NULL) return; |
| | | |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | if (m_pDiagnosisManager->CheckManualMode() == FALSE) |
| | | { |
| | | CString strMessage; |
| | |
| | | return; |
| | | } |
| | | } |
| | | //#3514_LYW_CF AOI Review 자가진단 기능 개선_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | //GetDialogControls(); |
| | | |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | { |
| | | if (m_pSequenceProcessor==NULL) return; |
| | | |
| | | //#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD START |
| | | m_pSequenceProcessor->SetSimulationMode(TRUE); |
| | | //#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD END |
| | | |
| | | if (nCommand == -1) // DBClick Date |
| | | { |
| | | |
| | |
| | | |
| | | |
| | | m_pDlgDiagnosis->ShowWindow(SW_SHOW); |
| | | return; |
| | | /* |
| | | if (m_pSignalControl) |
| | | { |
| | |
| | | { |
| | | 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); |
| | |
| | | SetCurrentWsiMode(nMode); |
| | | } |
| | | |
| | | void CReviewInterface::ISP2P_InitAlignCamera() |
| | | { |
| | | InitAlignCamera(); |
| | | } |
| | | |
| | | int CReviewInterface::IWC2P_GetWsiType() |
| | | { |
| | | return GetCurrentWsiMode(); |
| | |
| | | virtual void IACC2P_CameraControl(int nValue); |
| | | virtual BOOL IACC2P_SetLightLevel(int nCameraIndex, int nValue); |
| | | virtual BOOL IACC2P_GetLightLevel(int nCameraIndex, int& nValue); |
| | | /*< LYW 20211014 - #3671 ADD Start >*/ |
| | | virtual int IACC2P_GetAccumaulate(); |
| | | virtual void IACC2P_SetAccumaulate(int dValue); |
| | | /*< LYW 20211014 - #3671 ADD End >*/ |
| | | |
| | | // review camera control 2 parent |
| | | virtual BOOL IRCC2P_GetCurrentFrame(int nModuleIndex, int nCameraIndex, int nFrameWidth, int nFrameHeight, int nFrameChannels, CCHImageData *pImageData); |
| | |
| | | |
| | | BOOL m_bFirstReviewLeft; |
| | | BOOL m_bFirstReviewRight; |
| | | int m_daccumulate; |
| | | |
| | | virtual BOOL IRP2P_SaveDefectMap(const CString& strPath); |
| | | |
| | |
| | | |
| | | virtual void ISP2P_SetCurrentWsiMode(int nMode); |
| | | |
| | | //#3561 210908 LYW ADD Start |
| | | virtual void ISP2P_InitAlignCamera(); |
| | | //#3561 210908 LYW ADD End |
| | | |
| | | virtual CTotalPitchMeasure* ISP2P_GetTotalPitchMeasure(); |
| | | |
| | | // recipe info |
| | |
| | | BYTE *pImageBufferByte = (BYTE*)(pImageBuffer); |
| | | if (pImageBuffer==NULL) return 0.; |
| | | |
| | | //#3524_210902_LYW_MOD START |
| | | int nWidth = nImageWidth; |
| | | //int nWidthStep = nImageWidth; |
| | | int nHeight = nImageHeight; |
| | | int nCalWidth = nWidth/2; |
| | | int nCalHeight = nHeight/2; |
| | | // int nCalWidth = nWidth/2; |
| | | // int nCalHeight = nHeight/2; |
| | | // |
| | | // int nStartX = nWidth/2 - nCalWidth/2; |
| | | // int nStartY = nHeight/2 - nCalHeight/2; |
| | | |
| | | int nStartX = nWidth/2 - nCalWidth/2; |
| | | int nStartY = nHeight/2 - nCalHeight/2; |
| | | int nCalWidth = nWidth; |
| | | int nCalHeight = nHeight; |
| | | |
| | | // |
| | | double Focusvalue = 0; |
| | | double SumValue = 0; |
| | | double TempValue = 0; |
| | | double m_nResultFocusValue = 0; |
| | | int nStartX = 0; |
| | | int nStartY = 0; |
| | | |
| | | for (int y = 0; y < nHeight - 1; y++) |
| | | int nStep = 3; |
| | | |
| | | double dXValue = 0., dYValue = 0., dCurr = 0., dSum = 0., dFocus = 0.; |
| | | for (int nH = nStartY; nH < nStartY + nCalHeight - nStep; nH++) |
| | | { |
| | | for (int x = 0; x < nWidth - 1; x++) |
| | | for (int nW = nStartX; nW < nStartX + nCalWidth - nStep; nW++) |
| | | { |
| | | TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[y*nWidth + x + 1]); |
| | | SumValue = TempValue * TempValue; |
| | | TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[(y + 1)*nWidth + x]); |
| | | SumValue += TempValue * TempValue; |
| | | |
| | | Focusvalue += sqrt(SumValue); |
| | | //Focusvalue += SumValue; |
| | | } |
| | | } |
| | | |
| | | m_nResultFocusValue = int(Focusvalue / (double)(nWidth*nHeight)); |
| | | |
| | | double dXValue=0., dYValue=0., dCurr=0., dSum=0., dFocus=0.; |
| | | for(int nH=nStartY ; nH<nStartY+nCalHeight-1 ; nH++) |
| | | { |
| | | for(int nW=nStartX ; nW<nStartX+nCalWidth-1 ; nW++) |
| | | { |
| | | dXValue = float((pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])); |
| | | dYValue = float((pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])); |
| | | dXValue = float((pImageBufferByte[nH*nWidth + nW + nStep] - pImageBufferByte[nH*nWidth + nW])*(pImageBufferByte[nH*nWidth + nW + nStep] - pImageBufferByte[nH*nWidth + nW])); |
| | | dYValue = float((pImageBufferByte[(nH + nStep)*nWidth + nW] - pImageBufferByte[nH*nWidth + nW])*(pImageBufferByte[(nH + nStep)*nWidth + nW] - pImageBufferByte[nH*nWidth + nW])); |
| | | dCurr = sqrt(dXValue + dYValue); |
| | | //break; |
| | | |
| | | dSum += dCurr; |
| | | } |
| | | } |
| | | dFocus = dSum/double(nCalWidth*nCalHeight); |
| | | dFocus = dSum / double(nCalWidth*nCalHeight); |
| | | |
| | | if (dFocus >= 9.8) dFocus = 10.0; |
| | | else dFocus += 0.2; |
| | | |
| | | return dFocus; |
| | | //#3524_210902_LYW_MOD END |
| | | //Origin |
| | | // int nWidth = nImageWidth; |
| | | // int nHeight = nImageHeight; |
| | | // int nCalWidth = nWidth/2; |
| | | // int nCalHeight = nHeight/2; |
| | | // |
| | | // int nStartX = nWidth/2 - nCalWidth/2; |
| | | // int nStartY = nHeight/2 - nCalHeight/2; |
| | | // |
| | | // // |
| | | // double Focusvalue = 0; |
| | | // double SumValue = 0; |
| | | // double TempValue = 0; |
| | | // double m_nResultFocusValue = 0; |
| | | // |
| | | // for (int y = 0; y < nHeight - 1; y++) |
| | | // { |
| | | // for (int x = 0; x < nWidth - 1; x++) |
| | | // { |
| | | // TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[y*nWidth + x + 1]); |
| | | // SumValue = TempValue * TempValue; |
| | | // TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[(y + 1)*nWidth + x]); |
| | | // SumValue += TempValue * TempValue; |
| | | // |
| | | // Focusvalue += sqrt(SumValue); |
| | | // //Focusvalue += SumValue; |
| | | // } |
| | | // } |
| | | // |
| | | // m_nResultFocusValue = int(Focusvalue / (double)(nWidth*nHeight)); |
| | | // |
| | | // double dXValue=0., dYValue=0., dCurr=0., dSum=0., dFocus=0.; |
| | | // for(int nH=nStartY ; nH<nStartY+nCalHeight-1 ; nH++) |
| | | // { |
| | | // for(int nW=nStartX ; nW<nStartX+nCalWidth-1 ; nW++) |
| | | // { |
| | | // dXValue = float((pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])); |
| | | // dYValue = float((pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])); |
| | | // dCurr = sqrt(dXValue + dYValue); |
| | | // dSum += dCurr; |
| | | // } |
| | | // } |
| | | // dFocus = dSum/double(nCalWidth*nCalHeight); |
| | | // |
| | | // return dFocus; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | virtual void ISP2P_SetCurrentWsiMode(int nMode) = 0; |
| | | //#3561 210908 LYW ADD Start |
| | | virtual void ISP2P_InitAlignCamera() = 0; |
| | | //#3561 210908 LYW ADD End |
| | | |
| | | // system info |
| | | virtual const CSystemInfo* ISP2P_System_GetSystemInfo() = 0; |
| | |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::IN] AlignStart!")); |
| | | |
| | | |
| | | AlignCamera_CameraControl(CameraControlLive); // 210805 Align Camera Sequence ���� |
| | | Sleep(300); |
| | | |
| | | //#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 MOD START |
| | | if (GetSimulationMode() == FALSE) |
| | | { |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Start Ack!")); |
| | | } |
| | | //#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 MOD END |
| | | |
| | | //#3561 210908 LYW ADD Start |
| | | int nAlignReconnectRetryMaxCount = 3; |
| | | for (int i = 0; i < nAlignReconnectRetryMaxCount; i++) |
| | | { |
| | | if (AlignCamera_CameraControl(CameraControlLive) == FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[AlignStart] AlignConnect Fail! Reconect Start! ReconnectRetry count = %d"), nAlignReconnectRetryMaxCount + 1); |
| | | 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(10000); |
| | | m_pSP2P->ISP2P_InitAlignCamera(); |
| | | } |
| | | |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[AlignStart] AlignConnect Success! ")); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | //#3561 210908 LYW ADD End |
| | | |
| | | Sleep(300); |
| | | |
| | | //original |
| | | // if (SendSignalToSignalControl(PCControlSendSignalIndex_Ack, PCControlSend_AlignStartAck_CPJT)) |
| | | // m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Start Ack!")); |
| | |
| | | // m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] Send Review End Ack!")); |
| | | |
| | | CDitGlassRawClient* m_pDitGlassRaw = CDitGlassRawClient::GetInstance(); |
| | | if (m_pSP2P->ISP2P_GetWSIControl(0)!=NULL) |
| | | if (GetSimulationMode() == FALSE && m_pSP2P->ISP2P_GetWSIControl(0)!=NULL) |
| | | { |
| | | m_pSP2P->ISP2P_GetWSIControl(0)->SetWsiTimeOver(); |
| | | m_pSP2P->ISP2P_GetWSIControl(1)->SetWsiTimeOver(); |
| | | /*< LYW 20211015 - #3662 ADD Start >*/ |
| | | m_pSP2P->ISP2P_GetWSIControl(0)->SetWsiEnd(); |
| | | m_pSP2P->ISP2P_GetWSIControl(1)->SetWsiEnd(); |
| | | /*< LYW 20211015 - #3662 ADD End >*/ |
| | | } |
| | | if (GetLastPointCheck() == FALSE) |
| | | { |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::UpdateHistoryResultFromTransferData(CGlassResult *pHistoryResult, CGlassResult* pGlassResult) |
| | | { |
| | | if (pHistoryResult == NULL || pGlassResult == NULL) return; |
| | | try |
| | | { |
| | | if (pHistoryResult == NULL || pGlassResult == NULL) return; |
| | | |
| | | CTime time = CTime::GetCurrentTime(); |
| | | CTime time = CTime::GetCurrentTime(); |
| | | |
| | | CString strTime = _T(""); |
| | | strTime.Format(_T("%04d-%02d-%02d %02d:%02d:%02d"), time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); |
| | | CString strTime = _T(""); |
| | | strTime.Format(_T("%04d-%02d-%02d %02d:%02d:%02d"), time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); |
| | | |
| | | // update transfer data to glass result |
| | | pHistoryResult->m_nGlassSizeX = pGlassResult->m_nGlassSizeX; |
| | | pHistoryResult->m_nGlassSizeY = pGlassResult->m_nGlassSizeY; |
| | | pHistoryResult->m_nCollisionDistanceX = pGlassResult->m_nCollisionDistanceX; |
| | | pHistoryResult->m_nCollisionDistanceY = pGlassResult->m_nCollisionDistanceY; |
| | | pHistoryResult->m_nCollisionXPos1 = pGlassResult->m_nCollisionXPos1; |
| | | pHistoryResult->m_nCollisionXPos2 = pGlassResult->m_nCollisionXPos2; |
| | | pHistoryResult->m_nOriginDir = pGlassResult->m_nOriginDir; |
| | | pHistoryResult->m_strResultDate = pGlassResult->m_strResultDate; |
| | | pHistoryResult->m_vecReviewScheduleResult = pGlassResult->m_vecReviewScheduleResult; |
| | | pHistoryResult->m_nCornerCutDir = pGlassResult->m_nCornerCutDir; |
| | | pHistoryResult->m_bReadRawFile = pGlassResult->m_bReadRawFile; |
| | | pHistoryResult->m_vecReviewResult = pGlassResult->m_vecReviewResult; |
| | | pHistoryResult->m_strGlassLastName = pGlassResult->m_strGlassLastName; |
| | | pHistoryResult->m_strGlassID = pGlassResult->m_strGlassID; |
| | | pHistoryResult->m_strGlassCode = pGlassResult->m_strGlassCode; |
| | | pHistoryResult->m_strMode = pGlassResult->m_strMode; |
| | | pHistoryResult->m_strGlassType = pGlassResult->m_strGlassType; |
| | | pHistoryResult->m_strDummyType = pGlassResult->m_strDummyType; |
| | | pHistoryResult->m_strProdID = pGlassResult->m_strProdID; |
| | | pHistoryResult->m_strOperID = pGlassResult->m_strOperID; |
| | | pHistoryResult->m_strLotID = pGlassResult->m_strLotID; |
| | | pHistoryResult->m_strPPID = pGlassResult->m_strPPID; |
| | | pHistoryResult->m_strPPID_RC = pGlassResult->m_strPPID_RC; |
| | | pHistoryResult->m_strJobType = pGlassResult->m_strJobType; |
| | | pHistoryResult->m_strJobID = pGlassResult->m_strJobID; |
| | | pHistoryResult->m_strLotSeqNum = pGlassResult->m_strLotSeqNum; |
| | | pHistoryResult->m_strSlotSeqNum = pGlassResult->m_strSlotSeqNum; |
| | | pHistoryResult->m_strPropertyCode = pGlassResult->m_strPropertyCode; |
| | | pHistoryResult->m_strJobJudgeCode = pGlassResult->m_strJobJudgeCode; |
| | | pHistoryResult->m_strJobGradeCode = pGlassResult->m_strJobGradeCode; |
| | | pHistoryResult->m_strSubstrateType = pGlassResult->m_strSubstrateType; |
| | | pHistoryResult->m_strProcessingFlag = pGlassResult->m_strProcessingFlag; |
| | | pHistoryResult->m_strInspectionFlag = pGlassResult->m_strInspectionFlag; |
| | | pHistoryResult->m_strSkipFlag = pGlassResult->m_strSkipFlag; |
| | | pHistoryResult->m_strJobSize = pGlassResult->m_strJobSize; |
| | | pHistoryResult->m_strGlassThickness = pGlassResult->m_strGlassThickness; |
| | | pHistoryResult->m_strJobAngle = pGlassResult->m_strJobAngle; |
| | | pHistoryResult->m_strJobFlip = pGlassResult->m_strJobFlip; |
| | | pHistoryResult->m_strCuttingGlassType = pGlassResult->m_strCuttingGlassType; |
| | | pHistoryResult->m_strProcessingCount = pGlassResult->m_strProcessingCount; |
| | | pHistoryResult->m_strInspectionJudgeData = pGlassResult->m_strInspectionJudgeData; |
| | | pHistoryResult->m_strPairJobID = pGlassResult->m_strPairJobID; |
| | | pHistoryResult->m_strPairFlag = pGlassResult->m_strPairFlag; |
| | | pHistoryResult->m_strOptionValue = pGlassResult->m_strOptionValue; |
| | | pHistoryResult->m_strReserved = pGlassResult->m_strReserved; |
| | | pHistoryResult->strGlassScanSchedule = pGlassResult->strGlassScanSchedule;// cmark |
| | | pHistoryResult->m_strStepID = pGlassResult->m_strRTMSStepID; //taek 210126 |
| | | pHistoryResult->m_strEquipID = pGlassResult->m_strEquipID; |
| | | pHistoryResult->m_strProcessID = pGlassResult->m_strProcessID; |
| | | pHistoryResult->m_strUploadImgFileName = pGlassResult->m_strUploadImgFileName; |
| | | pHistoryResult->m_strUnLoadingTime = strTime; |
| | | pHistoryResult->m_mapDefectResult = pGlassResult->m_mapDefectResult; |
| | | pHistoryResult->m_AlignResult = pGlassResult->m_AlignResult; |
| | | // update transfer data to glass result |
| | | pHistoryResult->m_nGlassSizeX = pGlassResult->m_nGlassSizeX; |
| | | pHistoryResult->m_nGlassSizeY = pGlassResult->m_nGlassSizeY; |
| | | pHistoryResult->m_nCollisionDistanceX = pGlassResult->m_nCollisionDistanceX; |
| | | pHistoryResult->m_nCollisionDistanceY = pGlassResult->m_nCollisionDistanceY; |
| | | pHistoryResult->m_nCollisionXPos1 = pGlassResult->m_nCollisionXPos1; |
| | | pHistoryResult->m_nCollisionXPos2 = pGlassResult->m_nCollisionXPos2; |
| | | pHistoryResult->m_nOriginDir = pGlassResult->m_nOriginDir; |
| | | pHistoryResult->m_strResultDate = pGlassResult->m_strResultDate; |
| | | pHistoryResult->m_vecReviewScheduleResult = pGlassResult->m_vecReviewScheduleResult; |
| | | pHistoryResult->m_nCornerCutDir = pGlassResult->m_nCornerCutDir; |
| | | pHistoryResult->m_bReadRawFile = pGlassResult->m_bReadRawFile; |
| | | pHistoryResult->m_vecReviewResult = pGlassResult->m_vecReviewResult; |
| | | pHistoryResult->m_strGlassLastName = pGlassResult->m_strGlassLastName; |
| | | pHistoryResult->m_strGlassID = pGlassResult->m_strGlassID; |
| | | pHistoryResult->m_strGlassCode = pGlassResult->m_strGlassCode; |
| | | pHistoryResult->m_strMode = pGlassResult->m_strMode; |
| | | pHistoryResult->m_strGlassType = pGlassResult->m_strGlassType; |
| | | pHistoryResult->m_strDummyType = pGlassResult->m_strDummyType; |
| | | pHistoryResult->m_strProdID = pGlassResult->m_strProdID; |
| | | pHistoryResult->m_strOperID = pGlassResult->m_strOperID; |
| | | pHistoryResult->m_strLotID = pGlassResult->m_strLotID; |
| | | pHistoryResult->m_strPPID = pGlassResult->m_strPPID; |
| | | pHistoryResult->m_strPPID_RC = pGlassResult->m_strPPID_RC; |
| | | pHistoryResult->m_strJobType = pGlassResult->m_strJobType; |
| | | pHistoryResult->m_strJobID = pGlassResult->m_strJobID; |
| | | pHistoryResult->m_strLotSeqNum = pGlassResult->m_strLotSeqNum; |
| | | pHistoryResult->m_strSlotSeqNum = pGlassResult->m_strSlotSeqNum; |
| | | pHistoryResult->m_strPropertyCode = pGlassResult->m_strPropertyCode; |
| | | pHistoryResult->m_strJobJudgeCode = pGlassResult->m_strJobJudgeCode; |
| | | pHistoryResult->m_strJobGradeCode = pGlassResult->m_strJobGradeCode; |
| | | pHistoryResult->m_strSubstrateType = pGlassResult->m_strSubstrateType; |
| | | pHistoryResult->m_strProcessingFlag = pGlassResult->m_strProcessingFlag; |
| | | pHistoryResult->m_strInspectionFlag = pGlassResult->m_strInspectionFlag; |
| | | pHistoryResult->m_strSkipFlag = pGlassResult->m_strSkipFlag; |
| | | pHistoryResult->m_strJobSize = pGlassResult->m_strJobSize; |
| | | pHistoryResult->m_strGlassThickness = pGlassResult->m_strGlassThickness; |
| | | pHistoryResult->m_strJobAngle = pGlassResult->m_strJobAngle; |
| | | pHistoryResult->m_strJobFlip = pGlassResult->m_strJobFlip; |
| | | pHistoryResult->m_strCuttingGlassType = pGlassResult->m_strCuttingGlassType; |
| | | pHistoryResult->m_strProcessingCount = pGlassResult->m_strProcessingCount; |
| | | pHistoryResult->m_strInspectionJudgeData = pGlassResult->m_strInspectionJudgeData; |
| | | pHistoryResult->m_strPairJobID = pGlassResult->m_strPairJobID; |
| | | pHistoryResult->m_strPairFlag = pGlassResult->m_strPairFlag; |
| | | pHistoryResult->m_strOptionValue = pGlassResult->m_strOptionValue; |
| | | pHistoryResult->m_strReserved = pGlassResult->m_strReserved; |
| | | pHistoryResult->strGlassScanSchedule = pGlassResult->strGlassScanSchedule;// cmark |
| | | pHistoryResult->m_strStepID = pGlassResult->m_strRTMSStepID; //taek 210126 |
| | | pHistoryResult->m_strEquipID = pGlassResult->m_strEquipID; |
| | | pHistoryResult->m_strProcessID = pGlassResult->m_strProcessID; |
| | | pHistoryResult->m_strUploadImgFileName = pGlassResult->m_strUploadImgFileName; |
| | | pHistoryResult->m_strUnLoadingTime = strTime; |
| | | pHistoryResult->m_mapDefectResult = pGlassResult->m_mapDefectResult; |
| | | pHistoryResult->m_AlignResult = pGlassResult->m_AlignResult; |
| | | } |
| | | catch (...) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Review End] UpdateHistoryResultFromTransferData Error")); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | void CSequenceProcessor_CPJT::CreateResultDirectory(const CString& strGlassID, const CString& strDate) |
| | |
| | | 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 |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Review Start Ack! => %d"), 1); |
| | | break; |
| | | |
| | | case PCControlSend_ResultDataComplete_CPJT: |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Result Data Complete! => %d"), 1); |
| | | case PCControlSend_ReviewEndAck_CPJT: |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Review End Ack! => %d"), 1); |
| | | break; |
| | | } |
| | | } |
| | |
| | | case PCControlRecv_AutoMode_CPJT: // auto mode on |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Mode] Auto Mode")); |
| | | SetSimulationMode(FALSE); |
| | | bResult = SetProcessMode(ProcessAutoMode_CPJT); |
| | | if (bResult==FALSE) m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Mode] Auto Mode Error!")); |
| | | } |
| | |
| | | break; |
| | | case PCControlRecv_Autodiagnosis: |
| | | { |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | CSignalControl* pSignalControl = m_pSP2P->ISP2P_GetSignalControl(); |
| | | CString strDiagnosisMode; |
| | | pSignalControl->ReadData(_T("11160"), 2, strDiagnosisMode); |
| | | int nDiagnosisMode = atoi(strDiagnosisMode); |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Signal] Diagno start => %d, DiagnosisMode => %d"), bSignalOn, nDiagnosisMode); |
| | | if (bSignalOn) { |
| | |
| | | |
| | | m_pSP2P->ISP2P_GetDiagnosisManager()->RecvSignalToSignalControl(0, nDiagnosisMode); |
| | | } |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | else |
| | | bResult = SendSignalOffToSignalControl(PCControlSendSignalIndex_DiagnoAck, 0); |
| | | |
| | |
| | | // match |
| | | bMatchProcess = TRUE; |
| | | dMatchRate = 0.8; |
| | | dMatchingPixelStandard = 0; |
| | | dMatchingAlarmCondition = 0; |
| | | |
| | | // edge |
| | | bEdgeProcess = TRUE; |
| | |
| | | // match |
| | | BOOL bMatchProcess; |
| | | double dMatchRate; |
| | | /*< LYW 20211014 - #3671 ADD Start >*/ |
| | | int dMatchingPixelStandard; |
| | | int dMatchingAlarmCondition; |
| | | /*< LYW 20211014 - #3671 ADD End >*/ |
| | | |
| | | // edge |
| | | BOOL bEdgeProcess; |
| | |
| | | double m_dMatchingRate; |
| | | CString m_strFirstImageFile; |
| | | CString m_strSecondImageFile; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | CString m_strFirstAssistantImageFile; |
| | | CString m_strSecondAssistantImageFile; |
| | | CString m_strMatchingPixelStandard; |
| | | CString m_strMatchingAlarmCondition; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | CString m_strTotalPitchImageFile; |
| | | |
| | | // edge find param |
| | |
| | | double dMatchingRate; |
| | | CString strFirstImageFile; |
| | | CString strSecondImageFile; |
| | | /*< LYW 20211012 - #3671 ADD Start >*/ |
| | | CString strFirstAssistantImageFile; |
| | | CString strSecondAssistantImageFile; |
| | | CString strMatchingPixelStandard; |
| | | CString strMatchingAlarmCondition; |
| | | /*< LYW 20211012 - #3671 ADD End >*/ |
| | | CString strTotalPitchImageFile; |
| | | |
| | | // edge find param |
| | |
| | | m_dReviewPanelPosY2 = 0; |
| | | m_dReviewPanelPosX4 = 0; |
| | | m_dReviewPanelPosY4 = 0; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | m_nFlatnessSkipMode = 0; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | } |
| | | |
| | |
| | | void SetPanelPosY_Wsi(double dData) { m_dPanelPosY = dData; } |
| | | void SetPanelPosX2_Wsi(double dData) { m_dPanelPosX2 = dData; } |
| | | void SetPanelPosY2_Wsi(double dData) { m_dPanelPosY2 = dData; } |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | void SetFlastnessSkipMode(double dData) { m_nFlatnessSkipMode = dData; } |
| | | void SetSquarenessStandard(double dData) { m_dSquarenessStandard = dData; } |
| | | void SetSquarenessStandard2(double dData) { m_dSquarenessStandard2 = dData; } |
| | | void SetWSIStandard(double dData) { m_dWSIStandard = dData; } |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | |
| | | // getter |
| | |
| | | double GetPanelPosY_Wsi() const { return m_dPanelPosY; } |
| | | double GetPanelPosX2_Wsi() const { return m_dPanelPosX2; } |
| | | double GetPanelPosY2_Wsi() const { return m_dPanelPosY2; } |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | int GetFlastnessSkipMode() const { return m_nFlatnessSkipMode; } |
| | | double GetSquarenessStandard() const { return m_dSquarenessStandard; } |
| | | double GetSquarenessStandard2() const { return m_dSquarenessStandard2; } |
| | | double GetWSIStandard() const { return m_dWSIStandard; } |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | //Review |
| | | public: |
| | | double GetReviewPanelPosX() const { return m_dReviewPanelPosX; } |
| | |
| | | int m_nCameraFrameHeight; |
| | | double m_dCameraResolution; |
| | | double m_dJudgeData_Degree; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | double m_dSquarenessStandard; |
| | | double m_dSquarenessStandard2; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | // Flatness |
| | | CDiagnosisResult m_dataSettingResult_Flatness; // single data |
| | |
| | | int m_nRangeCount_Flatness; |
| | | int m_nGlassSizeX; |
| | | int m_nGlassSizeY; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | int m_nFlatnessSkipMode; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | // wsi |
| | | VectorDiagnosisResult m_vecSettingResult_Wsi; // add module count |
| | | int m_nPanelCount_Wsi; |
| | | double m_dJudgeData_3Sigma; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_START |
| | | /*< LYW 20210719 : #3517 ADD Start >*/ |
| | | double m_dWSIStandard; |
| | | //#3514_LYW_CF AOI Review �ڰ����� ��� ����_END |
| | | /*< LYW 20210719 : #3517 ADD End >*/ |
| | | |
| | | double m_dPanelPosX; |
| | | double m_dPanelPosY; |