| | |
| | | #define AOIRAWBIN_NETWORK_DRIVE_PATH "Y:\\RawBin" |
| | | |
| | | enum CPJT_MeasureMode { CPJT_ModeAuto = 0, CPJT_ModeManual }; |
| | | // [2017:4:18]-[WEZASW] : WSI Module 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占?PlanType 占쏙옙호 占쏙옙占쏙옙. |
| | | // [2017:4:18]-[WEZASW] : WSI Module |
| | | enum CPJT_PlanType { CPJT_PlanReview = 0, CPJT_PlanUser, CPJT_PlanWSI, CPJT_PlanMeasure, CPJT_PlanReflow, CPJT_PlanWsiReflow, CPJT_PlanWsiUser,CPJT_PlanWsiMultiShot |
| | | }; |
| | | enum CPJT_InsepectionType{REVIEW_REFLOW = 0, WSI_REFLOW, REV_WSI,WSIUSER, USER,WSIMULTISHOT}; |
| | |
| | | CDitGlassRawClient* pDitGlassRaw = CDitGlassRawClient::GetInstance(); |
| | | if(pDitGlassRaw->ConnectServer() == FALSE) |
| | | { |
| | | g_pLog->DisplayMessage(_T("������ ���� ����!(Shared memory Access Fail)")); |
| | | g_pLog->DisplayMessage(_T("(Shared memory Access Fail)")); |
| | | } |
| | | } |
| | | |
| | |
| | | EnterCriticalSection(&m_csProcessStatus); |
| | | |
| | | BOOL bReturn = FALSE; |
| | | |
| | | // ���� ���°� ���� ���¿� �ٸ���? |
| | | |
| | | //if (nProcessStatus!=m_nProcessStatus || nProcessStatus==0) |
| | | if (1)//nProcessStatus!=m_nProcessStatus || nProcessStatus==0) |
| | | { |
| | | //if (nProcessStatus==0) // �ʱ�(0) �����̸�.. |
| | | //if (nProcessStatus==0) |
| | | //{ |
| | | // bReturn = TRUE; |
| | | //} |
| | | // else if (nProcessStatus==(m_nProcessStatus+1)) // ���� ���� ����(+1)�̸�.. |
| | | // else if (nProcessStatus==(m_nProcessStatus+1)) |
| | | // { |
| | | // bReturn = TRUE; |
| | | // } |
| | |
| | | // bReturn = FALSE; |
| | | //} |
| | | |
| | | if (bReturn) // �����̸�... |
| | | if (bReturn) |
| | | { |
| | | // Thread ���� �� Thread ���� |
| | | CSequenceProcessData* pThreadData = new CSequenceProcessData(this); |
| | | if (pThreadData) |
| | | { |
| | |
| | | } |
| | | } |
| | | else if(nProcessStatus==2){ |
| | | // Thread ���� �� Thread ���� |
| | | CSequenceProcessData* pThreadData = new CSequenceProcessData(this); |
| | | if (pThreadData) |
| | | { |
| | |
| | | CReviewResult* pWsiResult = pGlassResult->GetWsiResult(nModuleIndex); |
| | | if (pWsiResult==NULL) goto RESULT_FAIL; |
| | | |
| | | // ������ �ε����� �����´�. |
| | | int nCurResultIdx = pWsiResult->GetLastSReviewResultIndex() + 1; // last index + 1 |
| | | int nStartResultIdx = pWsiResult->GetStartSReviewResultIndex(); |
| | | int nEndResultIdx = pWsiResult->GetEndSReviewResultIndex(); |
| | |
| | | int nMPosY = int(pPosition->dMotorPosY * 1000.0); |
| | | double dTime = (double) m_ProcessTimer.GetDurationMilliSecond(); |
| | | |
| | | // �ε����� �ٸ��� ��������. |
| | | if (measureResut.nResultIndex != nCurResultIdx) |
| | | { |
| | | goto RESULT_FAIL; |
| | | } |
| | | |
| | | // ���� ������ ����. |
| | | // measureResut |
| | | |
| | | if(pWsiResult->GetSReviewResultCount() == 0) return ; |
| | |
| | | // set last result idx |
| | | pWsiResult->SetLastSReviewResultIndex(nCurResultIdx); |
| | | |
| | | // 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙트占쏙옙占쏙옙 占쌉곤옙, WSI 占쏙옙占쏙옙占?占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙... |
| | | if(nCurResultIdx==nEndResultIdx && nCurResultIdx<=pWsiResult->GetSReviewResultCount()) |
| | | { |
| | | nStartResultIdx = nCurResultIdx + 1; |
| | |
| | | pWsiResult->SetStartSReviewResultIndex(nStartResultIdx); |
| | | pWsiResult->SetEndSReviewResultIndex(nEndResultIdx); |
| | | |
| | | // ������ ����Ʈ ���� ��������. |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | // Process_RemainWsiPoint(nModuleIndex); |
| | | } |
| | | |
| | |
| | | CReviewResult* pWsiResult = pGlassResult->GetWsiUserResult(nModuleIndex); |
| | | if (pWsiResult==NULL) goto RESULT_FAIL; |
| | | |
| | | // ������ �ε����� �����´�. |
| | | int nCurResultIdx = pWsiResult->GetLastSReviewResultIndex() + 1; // last index + 1 |
| | | int nStartResultIdx = pWsiResult->GetStartSReviewResultIndex(); |
| | | int nEndResultIdx = pWsiResult->GetEndSReviewResultIndex(); |
| | |
| | | int nMPosY = int(pPosition->dMotorPosY * 1000.0); |
| | | double dTime = (double) m_ProcessTimer.GetDurationMilliSecond(); |
| | | |
| | | // �ε����� �ٸ��� ��������. |
| | | if (measureResut.nResultIndex != nCurResultIdx) |
| | | { |
| | | goto RESULT_FAIL; |
| | | } |
| | | |
| | | // ���� ������ ����. |
| | | // measureResut |
| | | |
| | | if(pWsiResult->GetSReviewResultCount() == 0) return ; |
| | |
| | | // set last result idx |
| | | pWsiResult->SetLastSReviewResultIndex(nCurResultIdx); |
| | | |
| | | // 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙트占쏙옙占쏙옙 占쌉곤옙, WSI 占쏙옙占쏙옙占?占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙... |
| | | if(nCurResultIdx==nEndResultIdx && nCurResultIdx<=pWsiResult->GetSReviewResultCount()) |
| | | { |
| | | nStartResultIdx = nCurResultIdx + 1; |
| | |
| | | pWsiResult->SetStartSReviewResultIndex(nStartResultIdx); |
| | | pWsiResult->SetEndSReviewResultIndex(nEndResultIdx); |
| | | |
| | | // ������ ����Ʈ ���� ��������. |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | // Process_RemainWsiPoint(nModuleIndex); |
| | | } |
| | | |
| | |
| | | CAlignResult *pAlignResult = &pGlassResult->m_AlignResult; |
| | | CAlignRecipe *pAlignRecipe = &pGlassResult->m_AlignRecipe; |
| | | |
| | | // 占쏙옙占쏙옙占?占쌘듸옙占쏙옙占쏙옙 占쏙옙占?占쏙옙占쏙옙占실울옙 占쏙옙占쏙옙占쏙옙占쏙옙. |
| | | CRsRcpAlignInfo *pRsRcpAlignInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpAlignInfo(); |
| | | if (pRsRcpAlignInfo!=NULL && pRsRcpAlignInfo->m_bAutoProcess) |
| | | { |
| | |
| | | pRsRcpAlignInfo->m_dSecondCamExposure = pCurAlignResult->dExposureTime[1]; |
| | | } |
| | | |
| | | // ������ ����Ÿ ���� |
| | | //m_pDoc->Recipe_WriteRecipeFile(); |
| | | } |
| | | |
| | | |
| | | BOOL bLastAlignResult = FALSE; |
| | | CCoordCalibrator *pCoordCalibrator = m_pSP2P->ISP2P_GetCoordCalibrator(); |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙占?占쏙옙占?. |
| | | if (pCoordCalibrator && pCurAlignResult->nResultCode==Align_Success) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[AlignResult] Align Find Success!")); |
| | | |
| | | // 占쏙옙占쏙옙占?占쏙옙占?占쌜띰옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 |
| | | *pAlignResult = *pCurAlignResult; |
| | | |
| | | pCoordCalibrator->SetFirstMarkPos(pAlignResult->dFindPositionX[0], pAlignResult->dFindPositionY[0], pAlignRecipe->dGlassPositionX[0], pAlignRecipe->dGlassPositionY[0]); |
| | | pCoordCalibrator->SetSecondMarkPos(pAlignResult->dFindPositionX[1], pAlignResult->dFindPositionY[1], pAlignRecipe->dGlassPositionX[1], pAlignRecipe->dGlassPositionY[1]); |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占? |
| | | if(pCoordCalibrator->CalculateAlignResult() == TRUE) |
| | | { |
| | | sAlignResult = pCoordCalibrator->GetAlignResult(); |
| | |
| | | bLastAlignResult = !pAlignRecipe->bRotateProcess; |
| | | } |
| | | |
| | | // �۶� ���� ���� ���� |
| | | CCameraControlAlign *pAlignCameraControl = m_pSP2P->ISP2P_GetAlignCameraControl(); |
| | | SThetaMotorInfo* pThetaMotorInfo = m_pSP2P->ISP2P_GetThetaMotorInfo(); |
| | | CMotorControl* pMotorControl = m_pSP2P->ISP2P_GetMotorControl(); |
| | | |
| | | if (pAlignRecipe->bRotateProcess && pAlignCameraControl && pMotorControl && pThetaMotorInfo) |
| | | { |
| | | if (fabs(sAlignResult.dDegree) <= pAlignRecipe->dGlassAngleMin) // ���� �۶� ������ �ּҰ����� ������ ���� |
| | | if (fabs(sAlignResult.dDegree) <= pAlignRecipe->dGlassAngleMin) |
| | | { |
| | | bLastAlignResult = TRUE; |
| | | g_pLog->DisplayMessage(_T("[AlignResult] Success! Last Glass Angle : %.8lf degree, Retry Count : %d ea"), |
| | | sAlignResult.dDegree, pCurAlignResult->nFindCount); |
| | | } |
| | | else if (fabs(sAlignResult.dDegree) > pAlignRecipe->dGlassAngleMax) // ���� �۶� ������ �ִ밢���� ũ�� ���� |
| | | else if (fabs(sAlignResult.dDegree) > pAlignRecipe->dGlassAngleMax) |
| | | { |
| | | bLastAlignResult = FALSE; |
| | | g_pLog->DisplayMessage(_T("[AlignResult] FAIL! Last Glass Angle : %.8lf degree, Retry Count : %d ea"), |
| | | sAlignResult.dDegree, pCurAlignResult->nFindCount); |
| | | } |
| | | else if (pCurAlignResult->nFindCount < pAlignRecipe->nRetryCount) // �纸�� Ƚ���� ������ Ƚ�� �����̸� �纸�� ���� |
| | | else if (pCurAlignResult->nFindCount < pAlignRecipe->nRetryCount) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[AlignResult] Current Glass Angle : %.8lf degree, Retry Count : %d ea"), |
| | | sAlignResult.dDegree, pCurAlignResult->nFindCount); |
| | | |
| | | // ���ͷ� ���� ����.. |
| | | double dCalAngle = sAlignResult.dDegree; |
| | | dCalAngle = pThetaMotorInfo->dPosition - dCalAngle ; |
| | | g_pLog->DisplayMessage(_T("[AlignResult] Move Rotate Glass Angle : %.8lf degree"), dCalAngle); |
| | | pMotorControl->AxisThetaManualGoEnd(dCalAngle); |
| | | ::Sleep(100); |
| | | |
| | | // 占쏙옙占쏙옙占?ReProcess |
| | | if (pAlignCameraControl->AlignProcess()) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[AlignResult] Align Find Process ReStarted!")); |
| | |
| | | //m_pView->SetAlignResult(pAlignResult->nResultCode, sAlignResult.dOriginX, sAlignResult.dOriginY, sAlignResult.dDegree); |
| | | } |
| | | |
| | | // PCControl 占쏙옙占쏙옙占?占쏙옙호 占쏙옙占쏙옙. |
| | | if (bLastAlignResult) // ���� �����... |
| | | if (bLastAlignResult) |
| | | { |
| | | SendResultToSignalControl(PCControlSendData_AlignResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Success Data!")); |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewStart] Send Review Success Signal!")); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_None, nPlanIndex); |
| | | |
| | | |
| | | //占쏙옙占쏙옙占? |
| | | AFM_SetAFMTracking(FALSE); |
| | | return; |
| | | } |
| | | |
| | | //190727 chm WSI 占쏙옙占쏙옙占?End 체크 占쏙옙 占쏙옙占쏙옙 |
| | | if(nBeforePlanIndex== CPJT_PlanWSI||nBeforePlanIndex== CPJT_PlanWsiReflow||nBeforePlanIndex== CPJT_PlanWsiUser) |
| | | { |
| | | if(pPlanInfo->m_nReviewType == CPJT_PlanWSI ||pPlanInfo->m_nReviewType == CPJT_PlanWsiReflow||pPlanInfo->m_nReviewType== CPJT_PlanWsiUser || pPlanInfo->m_nReviewType == CPJT_PlanWsiMultiShot) |
| | |
| | | } |
| | | } |
| | | |
| | | //190727 chm WSI type 占쏙옙占쏙옙占쏙옙 Review 占시뤄옙占쏙옙 占쏙옙占쏙옙占?카占쌨띰옙 占쌜띰옙 占쌜울옙 占쏙옙占쏙옙占쏙옙痢?占쏙옙占쏙옙... |
| | | if(nBeforePlanIndex== CPJT_PlanWSI ||nBeforePlanIndex== CPJT_PlanWsiReflow||nBeforePlanIndex== CPJT_PlanWsiUser) |
| | | { |
| | | if( pPlanInfo->m_nReviewType == CPJT_PlanReview|| pPlanInfo->m_nReviewType == CPJT_PlanUser|| pPlanInfo->m_nReviewType == CPJT_PlanMeasure|| pPlanInfo->m_nReviewType == CPJT_PlanReflow) |
| | | { |
| | | |
| | | CTotalPitchMeasure* pTotapPithMeasure = m_pSP2P->ISP2P_GetTotalPitchMeasure(); // 占쏙옙占쏙옙占쏙옙占? 20190730 chm 占쏙옙占쌩울옙 占쌉쇽옙占쏙옙 占쏙옙占쏙옙.... |
| | | CTotalPitchMeasure* pTotapPithMeasure = m_pSP2P->ISP2P_GetTotalPitchMeasure(); |
| | | |
| | | const CMotorControlInfo* pSystemMotorInfo = m_pSP2P->ISP2P_System_GetMotorInfo(); |
| | | if(pSystemMotorInfo !=NULL) |
| | |
| | | if(pPlanInfo == NULL) continue; |
| | | |
| | | //210325 |
| | | //END 占쏙옙 占쏙옙琯占쏙옙占?占실억옙占쏙옙占쏙옙占쏙옙占?占쌔댐옙 占쌉쇽옙占쏙옙 占쏙옙占쏙옙占쏙옙占?占쏙옙占싣곤옙占쏙옙 占쌍억옙 start 占쌉쇽옙占쏙옙 타占쏙옙占쏙옙 |
| | | //�װͿ� ���� ����ó�� |
| | | if (GetProcessStatus() == ProcessReviewEnd_CPJT || GetProcessStatus() == ProcessReviewUnloding_CPJT) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ProcessStop] StartProcessing Sequence Stop Status : %d"), GetProcessStatus()); |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[Sequence Processor] WSI Plan End!")); |
| | | } |
| | | break; |
| | | //占싱삼옙占? |
| | | |
| | | case CPJT_PlanMeasure: |
| | | if (( nTotalCount += pGlassResult->GetTotalSMeasureResultCount()) > 0) |
| | | { |
| | |
| | | |
| | | AllAckSignalOff(); |
| | | m_pSP2P->ISP2P_GetReviewProcessor()->ResetGantryDone(); |
| | | SetCheckWSIEnd(-1); //190726 wsiendüũ �ʱ�ȭ |
| | | SetWsiType(-1); //wsi reflow Ÿ�� ���� �ʱ�ȭ |
| | | SetCheckWSIEnd(-1); //190726 |
| | | SetWsiType(-1); //wsi reflow |
| | | SetLastPointCheck(FALSE); |
| | | |
| | | bFileFind = FALSE; |
| | |
| | | } |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Glass Result Count : %d ea"), nGlassResultCount); |
| | | |
| | | pGlassResult->ResetDefocusCount();//�ε� �κп��� defocus count �ʱ�ȭ 190821 chm |
| | | pGlassResult->ResetDefocusCount(); |
| | | |
| | | |
| | | CTime time = CTime::GetCurrentTime(); |
| | | pGlassResult->m_strResultDate.Format(_T("%04d.%02d.%02d"), time.GetYear(), time.GetMonth(), time.GetDay()); |
| | | |
| | | //if(Revolver_SetGoHome(0)) // ������ HOME ������ |
| | | //if(Revolver_SetGoHome(0)) |
| | | //{ |
| | | // m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Revolver Set GoHome Success!")); |
| | | //} |
| | | |
| | | //#3357 KYH Align Image �ʱ�ȭ ADD START |
| | | //#3357 KYH Align Image ADD START |
| | | CCameraControlAlign* pAlignCameraControl = m_pSP2P->ISP2P_GetAlignCameraControl(); |
| | | if (pAlignCameraControl != NULL) |
| | | { |
| | |
| | | |
| | | g_pLog->DisplayMessage(_T("[Align] Align Image Clear")); |
| | | } |
| | | //#3357 KYH Align Image �ʱ�ȭ ADD END |
| | | //#3357 KYH Align Image ADD END |
| | | |
| | | // get transfer data |
| | | int nResultCode = 0; |
| | |
| | | |
| | | if (pDitRawClient->isConnect()==FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]������ ���� ���� �翬�� �õ� ")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading] DitRawClient Connect Fail ")); |
| | | int nReconnect=0; |
| | | while (1) |
| | | { |
| | |
| | | Sleep(1000); |
| | | if (pDitRawClient->isConnect() == FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]������ ���� ���� Count[%d]"), nReconnect); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]DitRawClient Connect Fail Count[%d]"), nReconnect); |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]������ ���� ����")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]DitRawClient Connect Success")); |
| | | break; |
| | | } |
| | | nReconnect += 1; |
| | |
| | | |
| | | } |
| | | |
| | | // #3381 LYW CF AOI Review ������ FDC TackTime ������ ���� ���� ADD START |
| | | // #3381 LYW CF AOI Review FDC TackTime ADD START |
| | | pDitRawClient->GetGlassData()->m_tmReviewLoading = CTime::GetCurrentTime(); |
| | | // #3381 LYW CF AOI Review ������ FDC TackTime ������ ���� ���� ADD END |
| | | // #3381 LYW CF AOI Review FDC TackTime ADD END |
| | | |
| | | |
| | | CString strGlassIDTemp = NULL; |
| | |
| | | } |
| | | } |
| | | |
| | | //// 190725 占쏙옙占쏙옙占?占쏙옙청占쏙옙占쏙옙 chm ASCEND 占쏙옙 alarm |
| | | //// 190725 chm ASCEND alarm |
| | | const CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | |
| | | const CRcpSortingInfo *pSortingInfo = pRsRcpReviewInfo->GetRcpReviewSortInfo(); |
| | |
| | | |
| | | |
| | | |
| | | ////������ �������� �ȱ� 190618 |
| | | ////190618 |
| | | if(GetUseAfmHomePosition()) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[AFM] AFM Home Position Start!!!")); |
| | |
| | | |
| | | } |
| | | |
| | | //占쏙옙占쏙옙占쌨몌옙 커占쏙옙占?占쏙옙占쏙옙 占쏙옙타트(占쌜띰옙 占싸듸옙) |
| | | CDitGlassRawClient* pDitSharedGlassRaw = CDitGlassRawClient::GetInstance(); |
| | | if (pDitSharedGlassRaw->isConnect() == FALSE) { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[DitGlassRawClient] Shared Memory Connect Fail")); |
| | |
| | | CReviewProcessor* pReviewProcessor = m_pSP2P->ISP2P_GetReviewProcessor(); |
| | | if(pReviewProcessor == NULL) return ; |
| | | pReviewProcessor->SetCellData(pGlassResult); |
| | | pReviewProcessor->SetReviewCount(0); // ���� Sequence No �ʱ�ȭ. |
| | | pReviewProcessor->SetReviewCount(0); |
| | | pReviewProcessor->SetPlanReviewCount(0); |
| | | pReviewProcessor->SetPlanWSICount(0); |
| | | // Process Status Update |
| | |
| | | |
| | | if (SendSignalToSignalControl(PCControlSendSignalIndex_Ack, PCControlSend_AlignStartAck_CPJT)) |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Start Ack!")); |
| | | //Sleep(400);//占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占?占쌍깍옙 chm190602 |
| | | |
| | | // 1. get current glass result |
| | | CGlassResult* pGlassResult = m_pSP2P->ISP2P_GetCurrentGlassResult(); |
| | |
| | | } |
| | | else |
| | | { |
| | | // 190710 SJB Align Camera Disconnect Check, Align Step ���� ���� Ȯ���Ѵ�. |
| | | // 190710 SJB Align Camera Disconnect Check, Align Step |
| | | if(pAlignCameraControl) |
| | | { |
| | | if(pAlignCameraControl->AlignCameraDisconnectCheck() == FALSE) |
| | |
| | | } |
| | | else |
| | | { |
| | | //�����ߵ� |
| | | Sleep(1000); |
| | | //TEST 占쏙옙占? |
| | | { |
| | | SendResultToSignalControl(PCControlSendData_AlignResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align SUCCESS Data!")); |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Complete Signal!")); |
| | | } |
| | | |
| | | |
| | | //�ּ� Ǯ�� |
| | | // 4. send align fail signal to plc |
| | | //SendResultToSignalControl(PCControlSendData_AlignResult_CPJT, SIGNAL_SEND_RESULT_FAIL); |
| | | //m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::AlignStart] Send Align Fail Data!")); |
| | |
| | | if (bFileFind == FALSE) |
| | | { |
| | | SendResultToSignalControl(PCControlSendData_ReviewResult_CPJT, SIGNAL_SEND_RESULT_FAIL); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReadRawFile] 占쏙옙占쏙옙占쏙옙占?찾占쏙옙 占쏙옙占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReadRawFile] Find Raw File Fail")); |
| | | return; |
| | | } |
| | | |
| | | // get current glass result |
| | | CGlassResult* pGlassResult = m_pSP2P->ISP2P_GetCurrentGlassResult(); |
| | | if (pGlassResult==NULL) return; |
| | | |
| | | //占쏙옙占쏙옙占쌨몌옙 커占쏙옙占?占쏙옙占쏙옙 占쏙옙타트(占쌜띰옙 占싸듸옙) |
| | | |
| | | CDitGlassRawClient* pDitSharedGlassRaw = CDitGlassRawClient::GetInstance(); |
| | | if(pDitSharedGlassRaw->isConnect() == FALSE) m_pSP2P->ISP2P_DisplayMessage(_T("[DitGlassRawClient] Shared Memory Connect Fail")); |
| | | |
| | |
| | | int nTotalPlanCount = CalculatePlanData(pGlassResult); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[Read Raw File] Review All Plan Total Count : %d"), nTotalPlanCount); |
| | | |
| | | //�����ߵ� |
| | | Sleep(1000); |
| | | // send review ready |
| | | SendResultToSignalControl(PCControlSendData_ReviewResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS); |
| | |
| | | processTimer.End(); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[ReadRawFile] AOI Result File Read Fail![%.3f ms]"), processTimer.GetDurationMilliSecond()); |
| | | |
| | | |
| | | //占쌓쏙옙트 占쏙옙占? |
| | | //{ |
| | | // // send review ready |
| | | // SendResultToSignalControl(PCControlSendData_ReviewResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS); |
| | |
| | | // m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReadRawFile] Send Review Ready Signal!")); |
| | | //} |
| | | |
| | | //�ּ� ���� |
| | | int nCurPlanIndex = 0; |
| | | CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if(pRsRcpReviewInfo) |
| | |
| | | } |
| | | } |
| | | |
| | | //// [2017:5:24]-[WEZASW] : Review Image Upload Dir 占쏙옙占쏙옙.(FTPUploader占쏙옙占쏙옙 占쌘듸옙 占쏙옙占쏙옙 占실댐옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占?占쏙옙占쏙옙) |
| | | //// '占쌥븝옙占싯삼옙'占쏙옙 FTPUploader占쏙옙占쏙옙 占쏙옙占싸듸옙 占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 PCControl Glass Unloading 占쏙옙 占쏙옙占?Loading占쏙옙 Review占쏙옙占쏙옙占쏙옙 占쏙옙占싸듸옙 占쏙옙占?GlassID) 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙 |
| | | const CNetworkInfo *pNetworkInfo = m_pSP2P->ISP2P_System_GetNetworkInfo(); |
| | | CString strPath = _T(""); |
| | | //if(pNetworkInfo && pNetworkInfo->m_strUploadImagePath.IsEmpty() == FALSE) |
| | |
| | | CFileFind Uploadfile, RTMSUploadPath; |
| | | if (CDitGlassRawClient::GetInstance()->GetGlassData() == NULL) return; |
| | | |
| | | |
| | | //占쏙옙占싸듸옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쌕쏙옙 占쏙옙占싸듸옙 占쏙옙占?Set 20190917chm |
| | | if(Uploadfile.FindFile(strPath)==FALSE) |
| | | { |
| | | CTime tmServerLoadingTime = CDitGlassRawClient::GetInstance()->GetGlassData()->m_tmGlassLoading; |
| | |
| | | CreateDirectory(strPath, NULL); |
| | | pReviewProcessor->SetUploadImagePath(strPath); |
| | | |
| | | |
| | | |
| | | |
| | | //taek 210126 rtms 占쏙옙占쏙옙占?占싱뱄옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙 |
| | | CreateDirectory(pReviewProcessor->GetRTMSUploadImagePath(),NULL); |
| | | } |
| | | |
| | |
| | | // _grmCellData* pCellData = pDitRawClient->GetCellData(0); |
| | | // if(pCellData) |
| | | // { |
| | | // // pCellData->m_nTotalPitchData[0] = int(pTotapPithMeasure->GetTotalPitchBD() * 1000); // ����, �۾��� ���� ���� |
| | | // // pCellData->m_nTotalPitchData[1] = int(pTotapPithMeasure->GetTotalPitchAC() * 1000); // ����, �۾��� ���� �Ʒ��� |
| | | // // pCellData->m_nTotalPitchData[2] = int(pTotapPithMeasure->GetTotalPitchAB() * 1000); // ����, �۾��� ���� ���� |
| | | // // pCellData->m_nTotalPitchData[3] = int(pTotapPithMeasure->GetTotalPitchCD() * 1000); // ����, �۾��� ���� ������ |
| | | // // pCellData->m_nTotalPitchData[0] = int(pTotapPithMeasure->GetTotalPitchBD() * 1000); |
| | | // // pCellData->m_nTotalPitchData[1] = int(pTotapPithMeasure->GetTotalPitchAC() * 1000); |
| | | // // pCellData->m_nTotalPitchData[2] = int(pTotapPithMeasure->GetTotalPitchAB() * 1000); |
| | | // // pCellData->m_nTotalPitchData[3] = int(pTotapPithMeasure->GetTotalPitchCD() * 1000); |
| | | // } |
| | | // } |
| | | // } |
| | |
| | | // { |
| | | // m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor] TotalPitchMeasure Result Fail!")); |
| | | |
| | | // // 190711 SJB, TotalPitchMeasure Fail占시울옙 占쌕뤄옙 Motor占쏙옙 占쏙옙占쏙옙占?占쏙옙占쏙옙占쏙옙 占쏙옙占쌕댐옙 Motion Enable 占쏙옙호占쏙옙 확占쏙옙占쏙옙占쏙옙 |
| | | // |
| | | // if(!pTotapPithMeasure->GetMotorEnable()) |
| | | // { |
| | |
| | | } |
| | | else |
| | | { |
| | | //�����ߵ� |
| | | |
| | | //Sleep(1000); |
| | | //Test占쏙옙占? |
| | | //SendResultToSignalControl(PCControlSendData_ReviewComplete_CPJT, SIGNAL_SEND_RESULT_SUCCESS); |
| | | //SendSignalToSignalControl(PCControlSendSignalIndex_Seq, PCControlSend_ReviewComplete_CPJT); |
| | | //m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewStart] Send Review Success Signal!")); |
| | |
| | | } |
| | | |
| | | m_pDitGlassRaw->GetGlassData()->m_nReviewNum = m_pSP2P->ISP2P_GetReviewProcessor()->GetPlanReviewCount(); |
| | | //SendDVDataToSignalControl();// �Ⱦ��� |
| | | |
| | | //OverTime 占쌩삼옙占쏙옙 占쏙옙占쏘에占쏙옙 END ACK占쏙옙 占쏙옙摸占쏙옙째占?占싣니띰옙 占쏙옙 Conplete占쏙옙 占쏙옙摸占쏙옙占? |
| | | //�� ... ���� �����ε��ϴ� �߰� |
| | | //SendDVDataToSignalControl(); |
| | | |
| | | if (GetLastPointCheck() == FALSE) |
| | | { |
| | |
| | | m_pSP2P->ISP2P_GetWSIControl(0)->SendWsiAfmSafePosMove(); |
| | | m_pSP2P->ISP2P_GetWSIControl(1)->SendWsiAfmSafePosMove(); |
| | | } |
| | | // 占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙占쏙옙 Review占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙 |
| | | if(m_pDitGlassRaw->isConnect()==FALSE) WriteRawData(pGlassResult); |
| | | |
| | | //����Ŀ�� �˶� send 20190819chm |
| | | if(pGlassResult->m_nDeFocusCount >0) |
| | | { |
| | | SendSignalToSignalControl(PCControlSendSignalIndex_State,PCControlSend_Defoucs,1000); |
| | |
| | | CString strTime = _T(""); |
| | | strTime.Format(_T("%04d-%02d-%02d %02d:%02d:%02d"), time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); |
| | | |
| | | CDlgDefocusList::GetInstance()->SetDefocusTotalCount(pGlassResult->m_nDeFocusCount);//��Ż ī��Ʈ Add |
| | | CDlgDefocusList::GetInstance()->SetDefocusData(strTime,pGlassResult->m_strGlassID,pGlassResult->m_nDeFocusCount);//ui �߰��� ���� |
| | | CDlgDefocusList::GetInstance()->SetDefocusTotalCount(pGlassResult->m_nDeFocusCount); |
| | | CDlgDefocusList::GetInstance()->SetDefocusData(strTime,pGlassResult->m_strGlassID,pGlassResult->m_nDeFocusCount); |
| | | |
| | | } |
| | | |
| | |
| | | g_pLog->DisplayMessage(_T("History Button Enable")); |
| | | m_pSP2P->ISP2P_GetDiagnosisHistory2(); |
| | | |
| | | /*int nModuleCount = m_pSP2P->ISP2P_GetModuleStatusCount(); //0503 占쏙옙占쏙옙 End占쏙옙 占쏙옙占쏙옙占?0占쏙옙占쏙옙 占십깍옙화 |
| | | /*int nModuleCount = m_pSP2P->ISP2P_GetModuleStatusCount(); |
| | | for (int nModuleIdx = 0; nModuleIdx < nModuleCount; nModuleIdx++) |
| | | { |
| | | { |
| | | ReviewLight_SetLightLevel(nModuleIdx, 0); |
| | | g_pLog->DisplayMessage(_T("Module[%d] LightLevel �ʱ�ȭ"), nModuleIdx); |
| | | g_pLog->DisplayMessage(_T("Module[%d] LightLevel"), nModuleIdx); |
| | | } |
| | | |
| | | }*/ |
| | | |
| | | //5. PCControl ��ȣ ������Ʈ |
| | | //5. PCControl |
| | | if (pGlassResult) |
| | | { |
| | | m_pSP2P->ISP2P_UpdateProcessStatus(GetProcessStatus(), pGlassResult); |
| | |
| | | |
| | | CString strCode = _T(""); |
| | | |
| | | int nDefectCount = pRawData->GetGlassData()->m_nDefectNum; // ���尹�� |
| | | int nJudgeCount = pRcpReviewInfo->GetRcpZoneFilterInfoCount();// ���� ���� |
| | | int nDefectCount = pRawData->GetGlassData()->m_nDefectNum; |
| | | int nJudgeCount = pRcpReviewInfo->GetRcpZoneFilterInfoCount(); |
| | | int nFilterType = 0; |
| | | int nJudgeType = 0; |
| | | int nZoneNumber = 0; |
| | |
| | | int nJudgeCellOKCount = 0; |
| | | int nPixelSize = 0; |
| | | int nPixelFilterSize = 0; |
| | | //���� ������ |
| | | |
| | | //1 wsi, 3 CS, 4 R, 5 G, 6 B |
| | | //pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_fWsi_ResultData[1];//Defect |
| | | //pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_fWsi_ResultData[3];//cs |
| | |
| | | { |
| | | |
| | | |
| | | #pragma region 占쏙옙占쏙옙占?fail |
| | | #pragma region Align fail |
| | | if (m_pSP2P->ISP2P_GetCurrentGlassResult()->GetAlignResult()->nResultCode != Align_Success) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[TEST Process::ReviewEnd] 占쏙옙占쏙옙占?占쏙옙占쏙옙 WSI 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[TEST Process::ReviewEnd] Align Fail WSI Rejudge Cancel")); |
| | | break; |
| | | } |
| | | #pragma endregion |
| | |
| | | |
| | | if (nPixelFilterSize <= nPixelSize && nPixelFilterSize != 0) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[ReviewEnd] ������ ���� Pixel Size[%d] nPixelFilterSize [%d]"), nPixelSize,nPixelFilterSize); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[ReviewEnd] Size filtering Pixel Size[%d] nPixelFilterSize [%d]"), nPixelSize,nPixelFilterSize); |
| | | continue; |
| | | } |
| | | #pragma endregion |
| | |
| | | for (int nJudgeindex = 0; nJudgeindex < nJudgeCount; nJudgeindex++) |
| | | { |
| | | //nZoneType = GetZoneType(); |
| | | dJudgeHight = pRcpReviewInfo->GetRcpZoneFilteringInfo(nJudgeindex)->GetJudgeHeight(); //���� |
| | | dJudgeHight = pRcpReviewInfo->GetRcpZoneFilteringInfo(nJudgeindex)->GetJudgeHeight(); |
| | | nFilterType = pRcpReviewInfo->GetRcpZoneFilteringInfo(nJudgeindex)->m_nFilterType; //ZONE |
| | | nJudge = pRcpReviewInfo->GetRcpZoneFilteringInfo(nJudgeindex)->m_nFilterJudge; //OK TR |
| | | |
| | | //nZoneNumber = pRcpReviewInfo->GetRcpZoneInfo(nFilterType)->m_vecZoneNumber[0]; |
| | | |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 kyh���� |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 kyh |
| | | { |
| | | |
| | | BOOL isZoneValue = FALSE; |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] Zone[%d], DefectIndex[%d]"), nZoneNumber, pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh �α� �߰� |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] Zone[%d], DefectIndex[%d]"), nZoneNumber, pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh |
| | | isZoneValue = TRUE; |
| | | //break; |
| | | |
| | |
| | | |
| | | if (isZoneValue == FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] NoFail DefectIndex[%d]"), pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh �α� �߰� |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] NoFail DefectIndex[%d]"), pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh |
| | | continue; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | else if (fWsiData<=0) // 0���� ���� ������ ������ ���Ѵ�. |
| | | else if (fWsiData<=0) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[TEST Process::ReviewEnd] WSI TYPE[%d] WSI ����[%0.3lf] <= 0 ���� ���� ����"), nJudgeType, fWsiData); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[TEST Process::ReviewEnd] WSI TYPE[%d] WSI Height[%0.3lf] <= 0 Cancel Rejudge"), nJudgeType, fWsiData); |
| | | } |
| | | else |
| | | { |
| | | //20210419 TR 占쏙옙占쏙옙占쏙옙占쏙옙 Judge 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占?OK 占쏙옙占쏙옙 |
| | | //20210419 TR |
| | | //if (nJudge == 1)//TR -> OK |
| | | //{ |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_DefectJudgement == DEFECT_JUDGE_CPJT_OK || pRawData->GetDefectData(nDefectIdx)->m_DefectJudgement == DEFECT_JUDGE_CPJT_Unknown) |
| | |
| | | |
| | | |
| | | } |
| | | else //WSI TYPE �� �ƴϸ� |
| | | else //WSI TYPE |
| | | { |
| | | continue; |
| | | } |
| | |
| | | for (int nJudgeindex = 0; nJudgeindex < nJudgeCount; nJudgeindex++) |
| | | { |
| | | //nZoneType = GetZoneType(); |
| | | dJudgeHight = pRcpReviewInfo->GetRcpZoneFilteringInfo_PR(nJudgeindex)->GetJudgeHeight(); //���� |
| | | dJudgeHight = pRcpReviewInfo->GetRcpZoneFilteringInfo_PR(nJudgeindex)->GetJudgeHeight(); |
| | | nFilterType = pRcpReviewInfo->GetRcpZoneFilteringInfo_PR(nJudgeindex)->m_nFilterType; //ZONE |
| | | nJudge = pRcpReviewInfo->GetRcpZoneFilteringInfo_PR(nJudgeindex)->m_nFilterJudge; //OK TR |
| | | |
| | | //nZoneNumber = pRcpReviewInfo->GetRcpZoneInfo(nFilterType)->m_vecZoneNumber[0]; |
| | | |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 kyh���� |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 |
| | | { |
| | | |
| | | BOOL isZoneValue = FALSE; |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] Zone[%d], DefectIndex[%d]"), nZoneNumber, pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh �α� �߰� |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] Zone[%d], DefectIndex[%d]"), nZoneNumber, pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh |
| | | isZoneValue = TRUE; |
| | | //break; |
| | | |
| | |
| | | |
| | | if (isZoneValue == FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] NoFail DefectIndex[%d]"), pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh �α� �߰� |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[WSIZoneCheck] NoFail DefectIndex[%d]"), pRawData->GetDefectData(nDefectIdx)->m_nDefectIdx); //210330 kyh |
| | | continue; |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | //20210419 TR 占쏙옙占쏙옙占쏙옙占쏙옙 Judge 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占?OK 占쏙옙占쏙옙 |
| | | //if (nJudge == 1)//TR -> OK |
| | | //{ |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_DefectJudgement == DEFECT_JUDGE_CPJT_OK || pRawData->GetDefectData(nDefectIdx)->m_DefectJudgement == DEFECT_JUDGE_CPJT_Unknown) |
| | |
| | | |
| | | |
| | | } |
| | | else //WSI TYPE �� �ƴϸ� |
| | | else //WSI TYPE |
| | | { |
| | | continue; |
| | | } |
| | |
| | | |
| | | strCode =pRcpReviewInfo->GetRcpZoneFilteringInfo_CODE(nJudgeindex)->m_FilterCode; |
| | | |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 kyh���� |
| | | if (pRawData->GetDefectData(nDefectIdx)->m_ReviewDefect.m_nWsi_Type == 2) // 210330 |
| | | { |
| | | |
| | | nJudgeType = ReJugdeWSIType(nFilterType); |
| | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[TEST Process::ReviewEnd] CODE JUDGE WSI TYPE[%d] Defect CODE [%s] != [%s]"), nJudgeType, strCode, pRawData->GetDefectData(nDefectIdx)->m_strDefectCode); |
| | | } |
| | | } |
| | | else //WSI TYPE �� �ƴϸ� |
| | | else //WSI TYPE |
| | | { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | |
| | | #pragma region CELLJUDGE |
| | | //CELL ������//////////////////////////////////////////////////////////////// |
| | | |
| | | int nCellCount = pRawData->GetGlassData()->m_nCellNum; |
| | | |
| | |
| | | else if (pRawData->GetCellData(nCellIndex)->m_nJudgement == Judge_OK_CPJT) |
| | | { |
| | | nCelllOKJuge = nCelllOKJuge + 1; |
| | | } //taek 21.01.25 Juge ���ϴ� ���� ���Ӱ� �ٲ���... |
| | | } //taek 21.01.25 |
| | | else if (pRawData->GetCellData(nCellIndex)->m_nJudgement == Judge_PR_CPJT) |
| | | { |
| | | nCelllPRJuge = nCelllPRJuge + 1; |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] ī��Ʈ ������ ������ [%02d]Cell DefectTRCount[%d] >= [%d]"), nCellIndex, pRawData->GetCellData(nCellIndex)->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetJudgeCount()); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] Count Number is minus! [%02d]Cell DefectTRCount[%d] >= [%d]"), nCellIndex, pRawData->GetCellData(nCellIndex)->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetJudgeCount()); |
| | | } |
| | | break; |
| | | case JudgeType_T8_PR: |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] ī��Ʈ ������ ������ [%02d]Cell DefectTRCount[%d] <= [%d]"), nCellIndex, pRawData->GetCellData(nCellIndex)->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetSubJudgeCount()); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] Count Number is minus! [%02d]Cell DefectTRCount[%d] <= [%d]"), nCellIndex, pRawData->GetCellData(nCellIndex)->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetSubJudgeCount()); |
| | | } |
| | | break; |
| | | case JudgeType_T8_PR: |
| | |
| | | } |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] CELL COUNT OK:[%d] TR[%d] PR[%d]"), nCelllOKJuge, nCellTRJudge, nCelllPRJuge); |
| | | #pragma endregion |
| | | //GLASS ������//////////////////////////////////////////////////////////////// |
| | | |
| | | #pragma region GLASSJUDGE |
| | | CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if (pRsRcpReviewInfo == NULL) return FALSE; |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] TR ī��Ʈ�� ������ [%02d]GLASS Defect TR Count[%d] >= [%d]"), nIdx, pRawData->GetGlassData()->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetJudgeCount()); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] TR Count is minus [%02d]GLASS Defect TR Count[%d] >= [%d]"), nIdx, pRawData->GetGlassData()->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetJudgeCount()); |
| | | } |
| | | break; |
| | | case JudgeType_T8_PR: |
| | |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd]TRī��Ʈ�� ������ [%02d]GLASS Defect TR Count[%d] <= [%d]"), nIdx, pRawData->GetGlassData()->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetSubJudgeCount()); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd]TR Count is minus [%02d]GLASS Defect TR Count[%d] <= [%d]"), nIdx, pRawData->GetGlassData()->m_nDefectNumJudgeTR, pRcpJudgeInfo->GetSubJudgeCount()); |
| | | } |
| | | break; |
| | | case JudgeType_T8_PR: |
| | |
| | | CakFileUtil akFileFinder; |
| | | while (nReTryTime--) |
| | | { |
| | | //#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER �˶� �� ���� �м� START |
| | | //#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER START |
| | | if (nReTryTime%2 == 0) |
| | | { |
| | | strFilePath = AOIRAWBIN_PATH; |
| | |
| | | |
| | | strWild.Format("%s\\%s_*.bin", strFilePath, strFileName); |
| | | akFileFinder.FindFile(strWild.GetBuffer(0), FALSE); |
| | | //LYW LOG�߰� |
| | | //LYW LOG |
| | | g_pLog->DisplayMessage(_T("[GlassLoading][FindRawBinFile] Find Path = %s, RetryCount = %d, ResultCode = [%d]"), strFilePath, 30-nReTryTime, GetLastError()); |
| | | //#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER �˶� �� ���� �м� END |
| | | //#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER END |
| | | VECFINDDATA* pFindData = akFileFinder.getFindData(); |
| | | int nFileNamePos = strlen(akFileFinder.getProcessPath()); |
| | | std::map<LONGLONG, CString> mapSpanFileName; |
| | |
| | | parser.process(pFileName, "_."); |
| | | if (parser.getTokNum() < 4) continue; |
| | | |
| | | if (parser.getTokNum() >= 6) continue; // 0401 �߰� |
| | | if (parser.getTokNum() >= 6) continue; // 0401 |
| | | |
| | | int nDataTime[8] = {}; |
| | | { |
| | |
| | | { |
| | | if (mapSpanFileName.begin()->first < nCloseTime) |
| | | { |
| | | //占쏙옙占쏙옙 占쌍깍옙 占쏙옙占쏙옙占쏙옙占?찾占쏙옙 占쏙옙占쏙옙 [占쏙옙占쏙옙占쏙옙 2019/7/17] |
| | | strFindFile = mapSpanFileName.begin()->second; |
| | | break; |
| | | } |
| | |
| | | |
| | | int nPCControlReadDataCount = pSignalInfo->GetReadDataAddressCount(); |
| | | |
| | | // [2017:1:9]-[WEZASW] : PCControl GlassData �� ������. |
| | | // [2017:1:9]-[WEZASW] : PCControl GlassData |
| | | if(pSignalInfo->GetUseContinuousReadAddress()) |
| | | { |
| | | CString strReadAddress = _T(""); |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::UpdateGlassResultFromTransferData(CGlassResult *pGlassResult, STransferData* pTransferData) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Transfer Data �б�!")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Transfer Data Read!")); |
| | | |
| | | if (pGlassResult==NULL || pTransferData==NULL) return; |
| | | |
| | | // [2017:1:9]-[WEZASW] : PCControl GlassData �� ������ |
| | | // [2017:1:9]-[WEZASW] : PCControl GlassData |
| | | // transfer data is not exist |
| | | if (pTransferData->strLotID.GetLength()<1) |
| | | { |
| | |
| | | pGlassResult->m_strPairFlag = pTransferData->strPairFlag; |
| | | pGlassResult->m_strOptionValue = pTransferData->strOptionValue; |
| | | pGlassResult->m_strReserved = pTransferData->strReserved; |
| | | pGlassResult->strGlassScanSchedule = pTransferData->strGlassScanSchedule;//���� ���� cmark |
| | | pGlassResult->strGlassScanSchedule = pTransferData->strGlassScanSchedule;//cmark |
| | | pGlassResult->m_strRTMSStepID = pTransferData->strStepID; //taek 210126 |
| | | |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Transfer Data ��!")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Transfer Data END!")); |
| | | } |
| | | |
| | | void CSequenceProcessor_CPJT::UpdateHistoryResultFromTransferData(CGlassResult *pHistoryResult, CGlassResult* pGlassResult) |
| | |
| | | pHistoryResult->m_strPairFlag = pGlassResult->m_strPairFlag; |
| | | pHistoryResult->m_strOptionValue = pGlassResult->m_strOptionValue; |
| | | pHistoryResult->m_strReserved = pGlassResult->m_strReserved; |
| | | pHistoryResult->strGlassScanSchedule = pGlassResult->strGlassScanSchedule;//���� ���� cmark |
| | | 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; |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::CreateResultDirectory(const CString& strGlassID, const CString& strDate) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占쏙옙占썰리 占쏙옙占쏙옙占?占쏙옙占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make Directory Start")); |
| | | if (m_pSP2P==NULL) return; |
| | | |
| | | const CNetworkInfo *pNetworkInfo = m_pSP2P->ISP2P_System_GetNetworkInfo(); |
| | |
| | | strPath.Format(_T("%s\\%s"),pNetworkInfo->m_strAlignImagePath, strGlassID); |
| | | CreateDirectory(strPath, NULL); |
| | | } |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占쏙옙占썰리 占쏙옙占쏙옙占?占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make directory End")); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::SetSaveImageBasePathToReviewProcessor(const CString& strGlassID, const CString& strResultDate) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占싱뱄옙占쏙옙 占싻쏙옙 占쏙옙占쏙옙占?占쏙옙占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make image path start")); |
| | | const CNetworkInfo *pNetworkInfo = m_pSP2P->ISP2P_System_GetNetworkInfo(); |
| | | if(pNetworkInfo == NULL) return; |
| | | |
| | |
| | | Sleep(1000); |
| | | if (CDitGlassRawClient::GetInstance()->isConnect() == FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]������ ���� ���� Count[%d]"), nReconnect); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]access Shared Memory Fail!! Count[%d]"), nReconnect); |
| | | } |
| | | else |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]������ ���� ����")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading]access Shared Memory Success")); |
| | | break; |
| | | } |
| | | nReconnect += 1; |
| | |
| | | else |
| | | { |
| | | tmServerLoadingTime = CTime::GetCurrentTime(); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading] ������ �����̻�")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::GlassLoading] access Shared Memory Fail")); |
| | | strPath.Format(_T("%s\\%s_%04d%02d%02d%02d%02d%02d"), pNetworkInfo->m_strUploadImagePath, strGlassID, tmServerLoadingTime.GetYear(), tmServerLoadingTime.GetMonth(), tmServerLoadingTime.GetDay(), tmServerLoadingTime.GetHour(), tmServerLoadingTime.GetMinute(), tmServerLoadingTime.GetSecond()); |
| | | strImagePath.Format(_T("%s\\%s_%04d%02d%02d%02d%02d%02d"), strGlassID, tmServerLoadingTime.GetYear(), tmServerLoadingTime.GetMonth(), tmServerLoadingTime.GetDay(), tmServerLoadingTime.GetHour(), tmServerLoadingTime.GetMinute(), tmServerLoadingTime.GetSecond()); |
| | | CreateDirectory(strPath, NULL); |
| | |
| | | } |
| | | |
| | | } |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占싱뱄옙占쏙옙 占싻쏙옙 占쏙옙占쏙옙占?占쏙옙")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make image path End")); |
| | | } |
| | | |
| | | void CSequenceProcessor_CPJT::SetSaveImageBasePathToAlignCameraControl(const CString& strGlassID) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占쏙옙占쏙옙占?占싱뱄옙占쏙옙 占싻쏙옙 占쏙옙占쏙옙 ")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make Align image path Start")); |
| | | const CNetworkInfo *pNetworkInfo = m_pSP2P->ISP2P_System_GetNetworkInfo(); |
| | | if(pNetworkInfo == NULL) return; |
| | | |
| | |
| | | strPath.Format(_T("%s\\%s"), pNetworkInfo->m_strAlignImagePath, strGlassID); |
| | | pAlignCameraControl->SetSaveImageBasePath(strPath); |
| | | } |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] 占쏙옙占쏙옙占?占싱뱄옙占쏙옙 占싻쏙옙 占쏙옙 ")); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Make Align image path End ")); |
| | | } |
| | | |
| | | BOOL CSequenceProcessor_CPJT::ReadRecipeDataFromRecipeFile(const CString& strPPID_RC, CString& strRecipeName)// const CString& strPPID, CString& strRecipeName |
| | |
| | | { |
| | | if(pGlassResult == NULL) return FALSE; |
| | | |
| | | // ������ ���� |
| | | const CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if (pRsRcpReviewInfo==NULL) return FALSE; |
| | | |
| | | // system info |
| | | const CSystemInfo* pSystemInfo = m_pSP2P->ISP2P_System_GetSystemInfo(); |
| | | |
| | | // �۶� ���� |
| | | STransferData* pTransferData = m_pSP2P->ISP2P_GetCurrentTransferData(); |
| | | if (pTransferData==NULL) return FALSE; |
| | | int nGlassTypeInfoIndex = 0; |
| | |
| | | if (pGlassTypeInfo == NULL) return FALSE; |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("GlassTypeName : %s,GlassTypeIdx : %s"),pGlassTypeInfo->m_strGlassTypeName,pTransferData->strGlassScanSchedule); |
| | | |
| | | // ���� ���� |
| | | const CMotorControlInfo *pMotorInfo = m_pSP2P->ISP2P_System_GetMotorInfo(); |
| | | |
| | | // ��ǥ ��ȯ�� |
| | | CCoordCalibrator* pCoordCalibrator = m_pSP2P->ISP2P_GetCoordCalibrator(); |
| | | |
| | | // ��ǥ�� ���� |
| | | if (pSystemInfo && pGlassTypeInfo && pMotorInfo && pCoordCalibrator) |
| | | { |
| | | // Get Direction |
| | | int nDirectionX = GetDirectionX(pGlassTypeInfo->m_nOriginDirection, pMotorInfo->GetOriginDirection()); |
| | | int nDirectionY = GetDirectionY(pGlassTypeInfo->m_nOriginDirection, pMotorInfo->GetOriginDirection()); |
| | | |
| | | // ��ǥ�� ���� |
| | | pCoordCalibrator->SetTransDirection(nDirectionX, nDirectionY); |
| | | pCoordCalibrator->SetOriginMotorPosition(pGlassTypeInfo->m_dOriginMotorX, pGlassTypeInfo->m_dOriginMotorY); |
| | | if (fabs(pGlassTypeInfo->m_dAlignAngle) > 0.0000001) |
| | |
| | | pGlassTypeInfo->m_dFirstAlignGlassX, pGlassTypeInfo->m_dFirstAlignGlassY, pGlassTypeInfo->m_dAlignAngle); |
| | | } |
| | | |
| | | // �۶� ���� ���� |
| | | pGlassResult->SetGlassSize(pGlassTypeInfo->m_nGlassSizeX * 1000, pGlassTypeInfo->m_nGlassSizeY * 1000); |
| | | pGlassResult->SetGlassOriginDirection(pGlassTypeInfo->m_nOriginDirection); |
| | | pGlassResult->SetCornerCutDirection(pGlassTypeInfo->m_nCornerCutDirection); |
| | |
| | | pGlassResult->SetCollisionDistanceX(int(pSystemInfo->m_dCollisionDistance*1000.)); |
| | | } |
| | | |
| | | // Align ���� |
| | | const CRsRcpAlignInfo* pRsRcpAlignInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpAlignInfo(); |
| | | |
| | | // Align ���� ���� |
| | | if (pGlassTypeInfo && pRsRcpAlignInfo) |
| | | { |
| | | // Align ��ũ ���� ���� (�ȼ�, ����, �۶� ��ġ) |
| | | pGlassResult->m_AlignRecipe.m_nUseAlignPosMove = pGlassTypeInfo->m_nUseAlignPosMove; |
| | | |
| | | // �ȼ� ��ġ |
| | | pGlassResult->m_AlignRecipe.dOriginPixelX[0] = pGlassTypeInfo->m_nFirstAlignFindPixelX; |
| | | pGlassResult->m_AlignRecipe.dOriginPixelY[0] = pGlassTypeInfo->m_nFirstAlignFindPixelY; |
| | | pGlassResult->m_AlignRecipe.dOriginPixelX[1] = pGlassTypeInfo->m_nSecondAlignFindPixelX; |
| | | pGlassResult->m_AlignRecipe.dOriginPixelY[1] = pGlassTypeInfo->m_nSecondAlignFindPixelY; |
| | | |
| | | // ���� ��ġ |
| | | pGlassResult->m_AlignRecipe.dOriginPositionX[0] = pGlassTypeInfo->m_dFirstAlignMotorX; |
| | | pGlassResult->m_AlignRecipe.dOriginPositionY[0] = pGlassTypeInfo->m_dFirstAlignMotorY; |
| | | pGlassResult->m_AlignRecipe.dOriginPositionX[1] = pGlassTypeInfo->m_dSecondAlignMotorX; |
| | | pGlassResult->m_AlignRecipe.dOriginPositionY[1] = pGlassTypeInfo->m_dSecondAlignMotorY; |
| | | |
| | | // �۶� ��ġ |
| | | pGlassResult->m_AlignRecipe.dGlassPositionX[0] = pGlassTypeInfo->m_dFirstAlignGlassX; |
| | | pGlassResult->m_AlignRecipe.dGlassPositionY[0] = pGlassTypeInfo->m_dFirstAlignGlassY; |
| | | pGlassResult->m_AlignRecipe.dGlassPositionX[1] = pGlassTypeInfo->m_dSecondAlignGlassX; |
| | | pGlassResult->m_AlignRecipe.dGlassPositionY[1] = pGlassTypeInfo->m_dSecondAlignGlassY; |
| | | |
| | | // Align Recipe 占쏙옙占쏙옙 占쏙옙占쏙옙 占쌘듸옙占쏙옙占쏙옙 찾占쏙옙 占식띰옙占쏙옙占? |
| | | // Align Recipe |
| | | // Align Skip Mode |
| | | pGlassResult->m_AlignRecipe.bAlignSkipMode = pRsRcpAlignInfo->m_bAlignSkipMode; |
| | | pGlassResult->m_AlignRecipe.bUseTotalPitchMeasure = pRsRcpAlignInfo->m_bTotalPitchMeasure; |
| | |
| | | pGlassResult->m_AlignRecipe.nMergeRange = pRsRcpAlignInfo->m_nMergeRange; |
| | | pGlassResult->m_AlignRecipe.dEdgeRate = pRsRcpAlignInfo->m_dEdgeRate; |
| | | |
| | | // 占쏙옙占쏙옙챨占? |
| | | pGlassResult->m_AlignRecipe.bManualProcess = pRsRcpAlignInfo->m_bManualProcess; |
| | | pGlassResult->m_AlignRecipe.dFirstCamExposure = pRsRcpAlignInfo->m_dFirstCamExposure; |
| | | pGlassResult->m_AlignRecipe.dSecondCamExposure = pRsRcpAlignInfo->m_dSecondCamExposure; |
| | | |
| | | // �ڵ����� ���� |
| | | pGlassResult->m_AlignRecipe.bAutoProcess = pRsRcpAlignInfo->m_bAutoProcess; |
| | | pGlassResult->m_AlignRecipe.dTargetMin = pRsRcpAlignInfo->m_dTargetMin; |
| | | pGlassResult->m_AlignRecipe.dTargetMax = pRsRcpAlignInfo->m_dTargetMax; |
| | | pGlassResult->m_AlignRecipe.dExposureMin = pRsRcpAlignInfo->m_dExposureMin; |
| | | pGlassResult->m_AlignRecipe.dExposureMax = pRsRcpAlignInfo->m_dExposureMax; |
| | | |
| | | // Align Recipe ���� ���� rotate info |
| | | pGlassResult->m_AlignRecipe.bRotateProcess = pRsRcpAlignInfo->m_bRotateProcess; |
| | | pGlassResult->m_AlignRecipe.nRetryCount = pRsRcpAlignInfo->m_nRetryCount; |
| | | pGlassResult->m_AlignRecipe.dGlassAngleMin = pRsRcpAlignInfo->m_dGlassAngleMin; |
| | | pGlassResult->m_AlignRecipe.dGlassAngleMax = pRsRcpAlignInfo->m_dGlassAngleMax; |
| | | |
| | | // Align ī�� ���� �� �ػ� ���� |
| | | |
| | | int nAlignCameraInfoCount = 2; |
| | | for(int nAlignCameraIdx = 0; nAlignCameraIdx < nAlignCameraInfoCount; nAlignCameraIdx++) |
| | | { |
| | | // Align ���� �� ��������. |
| | | int nLightValue = 0; |
| | | |
| | | |
| | |
| | | { |
| | | nLightValue = (nAlignCameraIdx==0) ? (int)pRsRcpAlignInfo->m_dFirstCamExposure: (int)pRsRcpAlignInfo->m_dSecondCamExposure; |
| | | |
| | | // 占쏙옙占쏙옙占?카占쌨띰옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙 |
| | | const CAlignCameraInfo *pCameraInfo = m_pSP2P->ISP2P_System_GetAlignCameraInfo(nAlignCameraIdx); |
| | | |
| | | //占쏙옙占쏙옙占?占쏙옙占쏙옙. |
| | | CLightControl *pLightControl = NULL; |
| | | |
| | | const CLightControlInfo *AlignLightinfo = pCameraInfo->GetLightContorlInfo(); |
| | |
| | | { |
| | | if (AlignLightinfo->GetMaster()==1&& nAlignCameraIdx==1) |
| | | { |
| | | //占쏙옙占쏙옙占?占쏙옙틀占싼뤄옙占쏙옙 占싹놂옙占쏙옙 占쏙옙占쏙옙퓸占?占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占싸뤄옙 확占쏙옙 |
| | | //������ �̰� �´��� �ٴ� �ƹ��� �Ⱦ˷��� |
| | | pLightControl = m_pSP2P->ISP2P_GetAlignLightControl(0); |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 占쏙옙占쏙옙占?카占쌨띰옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙 |
| | | const CAlignCameraInfo *pCameraInfo = m_pSP2P->ISP2P_System_GetAlignCameraInfo(nAlignCameraIdx); |
| | | if (pCameraInfo) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙占?占쏙옙占시몌옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙 |
| | | if((int)pGlassTypeInfo->m_vecTemplateImagePath.size() == nAlignCameraInfoCount) |
| | | { |
| | | pGlassResult->m_AlignRecipe.strTemplateName[nAlignCameraIdx] = pGlassTypeInfo->m_vecTemplateImagePath[nAlignCameraIdx]; |
| | |
| | | if (pRcpReviewAFMInfo) |
| | | { |
| | | int nRealAFMIndex = pRcpReviewAFMInfo->m_nRecipeIndex; |
| | | if(nRealAFMIndex == -1)// �����ǿ� ���õ� ������ ���� MagnificInfo Index�� �˾ƿ� |
| | | if(nRealAFMIndex == -1) |
| | | { |
| | | //-1占쏙옙 占쏙옙占?占쏙옙占쏙옙 占싸듸옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙. |
| | | nRealAFMIndex = GetRealMagnification(nModuleIdx, pRcpReviewAFMInfo->m_nZoomIndex); |
| | | } |
| | | AFM_SetAFMRecipeName(nModuleIdx, strRecipeName, nRealAFMIndex); |
| | | |
| | | if(pRcpReviewAFMInfo->m_bAFMHomeOffMode==TRUE) //190618AFMȨ ������ ���� X |
| | | if(pRcpReviewAFMInfo->m_bAFMHomeOffMode==TRUE) //190618AFM |
| | | { |
| | | SetUseAfmHomePosition(FALSE); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // ���� � ������ ���� |
| | | CReviewProcessor* pReviewProcessor = m_pSP2P->ISP2P_GetReviewProcessor(); |
| | | const CRsRcpDefectFindInfo* pRsRcpDefectFindInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpDefectFindInfo(); |
| | | if(pReviewProcessor && pRsRcpDefectFindInfo) |
| | |
| | | |
| | | CString strRawTDPath=_T(""), strRawCDPath=_T(""), strRawSDPath=_T(""); |
| | | |
| | | // 占쏙옙占쏙옙占쏙옙占?占싱몌옙 찾占쏙옙 |
| | | FindAOIRawFilePath(pGlassResult, &strRawTDPath, &strRawCDPath, &strRawSDPath); |
| | | |
| | | bRet = m_pSP2P->ISP2P_ReadAOIRawFileToGlassResult(strRawTDPath); |
| | |
| | | if(finder.IsDots()) continue; |
| | | if(finder.IsDirectory()) continue; |
| | | |
| | | // [2017:5:16]-[WEZASW] : AOI Server占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙치占쏙옙 占쏙옙占쌉몌옙 占싱뱄옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占?占쏙옙占쏙옙 占쏙옙占싹몌옙 占쏙옙占쏙옙 |
| | | // [2017:5:16]-[WEZASW] : AOI Server |
| | | sRawFile.strFileName = finder.GetFileName(); |
| | | strExtTemp = sRawFile.strFileName; |
| | | int nIdx = strExtTemp.Remove('.'); |
| | |
| | | CModuleStatus* pModuleStatus = Module_GetModuleStatus(nModuleIdx); |
| | | if (pModuleStatus == NULL) continue; |
| | | |
| | | //�浹�Ÿ� �ֱ� |
| | | { |
| | | |
| | | double dCollisionPosX = pReviewResult->GetCollisionPositionX() / 1000.0; |
| | |
| | | |
| | | } |
| | | |
| | | //�¿� ��Ʈ�� �����̵� |
| | | pMotorControl->GantrySetTwoGantrySyncModeSend(0); |
| | | |
| | | // set result index |
| | | int nStartIdx = pReviewResult->GetStartSReviewResultIndex(); |
| | | int nEndIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount()-1)) + 1; // End Index �ٽü��� |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount()-1)) + 1; // End Index |
| | | |
| | | double xpostemp, ypostemp; |
| | | // get review pos |
| | |
| | | SReviewResult* pReview = pReviewResult->GetSReviewResult(nResultIdx); |
| | | if (pReview==NULL) continue; |
| | | |
| | | //200占쏙옙 占쏙옙藥뱄옙占쏙옙占?占쏙옙占쏙옙占쏙옙 占싹뤄옙占쏙옙占쏙옙占쏙옙占?占쌩븝옙체크 |
| | | //200 |
| | | if (pReview->bCheckSendToMotor == FALSE) |
| | | { |
| | | pReview->bCheckSendToMotor = TRUE; |
| | |
| | | } |
| | | } |
| | | |
| | | //���� ����Ʈ�� �ִ��� ������ üũ |
| | | if (vectorPosX.empty() ==TRUE) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point "), vectorPosX.size()); |
| | |
| | | int nTickCount = GetTickCount(); |
| | | while (1) |
| | | { |
| | | //5�� ����Ÿ�� |
| | | if ((GetTickCount() - nTickCount) > 5000) |
| | | { |
| | | bOverTime = TRUE; |
| | | break; |
| | | } |
| | | //占쏙옙占쏙옙 占쏙옙占?End 체크 |
| | | if (pMotorControl->IsGantryMotionEnd(pModuleStatus->GetGantryIndex()) == TRUE) |
| | | { |
| | | if (pMotorControl->GantryAutoGo(pModuleStatus->GetGantryIndex(), vectorPosX, vectorPosY, TRUE)) |
| | |
| | | |
| | | } |
| | | |
| | | //5占쏙옙占식울옙占쏙옙 占싫울옙占쏙옙占싸댐옙? 占쌓뤄옙 3占쏙옙 占쏙옙천占?占쏙옙占쏙옙 |
| | | //���End �� �߸� ���ü��� ������ |
| | | if (bOverTime == TRUE) |
| | | { |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | Sleep(1000); |
| | | |
| | | //���Ͱ� �����ϼ� ���»����϶� Send ��ȣ�� Fail �� ���� Retry 3�� ���� |
| | | if (pMotorControl->GantryAutoGo(pModuleStatus->GetGantryIndex(), vectorPosX, vectorPosY, TRUE)) |
| | | { |
| | | nTotalCount += (int)vectorPosX.size(); |
| | |
| | | if(pGlassResult && pReviewProcessor) |
| | | { |
| | | // UserStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); //pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); //pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_UserStart, nPlanIndex); |
| | | |
| | |
| | | CModuleStatus* pModuleStatus = Module_GetModuleStatus(nModuleIdx); |
| | | if (pModuleStatus == NULL) continue; |
| | | |
| | | //�浹�Ÿ� �ֱ� |
| | | { |
| | | |
| | | double dCollisionPosX = pReviewResult->GetCollisionPositionX() / 1000.0; |
| | |
| | | // set result index |
| | | int nStartIdx = pReviewResult->GetStartSReviewResultIndex(); |
| | | int nEndIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount() - 1)) + 1; // End Index �ٽü��� |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount() - 1)) + 1; // End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | double xpostemp, ypostemp; |
| | |
| | | SReviewResult* pReview = pReviewResult->GetSReviewResult(nResultIdx); |
| | | if (pReview == NULL) continue; |
| | | |
| | | //200占쏙옙 占쏙옙藥뱄옙占쏙옙占?占쏙옙占쏙옙占쏙옙 占싹뤄옙占쏙옙占쏙옙占쏙옙占?占쌩븝옙체크 |
| | | //200 |
| | | if (pReview->bCheckSendToMotor == FALSE) |
| | | { |
| | | pReview->bCheckSendToMotor = TRUE; |
| | |
| | | } |
| | | } |
| | | |
| | | //���� ����Ʈ�� �ִ��� ������ üũ |
| | | if (vectorPosX.empty() == TRUE) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point "), vectorPosX.size()); |
| | |
| | | if(pGlassResult && pReviewProcessor) |
| | | { |
| | | // WsiStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_WSIStart, nPlanIndex); |
| | | |
| | |
| | | MakeWSIUpLoadDirectory(pReviewProcessor->GetUploadImagePath()); |
| | | |
| | | //20190219 chm |
| | | pReviewProcessor->SetReviewCount(0); // ���� Sequence No �ʱ�ȭ. |
| | | pReviewProcessor->SetReviewCount(0); |
| | | |
| | | return TRUE; |
| | | } |
| | |
| | | strPath = strPath + _T("\\WSI"); |
| | | if(CreateDirectory(strPath,NULL)==FALSE) |
| | | { |
| | | //LYW LOG�߰� |
| | | //LYW LOG |
| | | g_pLog->DisplayMessage(_T("[MakeWSIUpLoadDirectory]Directory Create Fail %s, ERROR CODE = %d "),strPath, GetLastError()); |
| | | } |
| | | |
| | |
| | | VectorDouble vectorCollisionPosX; |
| | | vectorCollisionPosX.clear(); |
| | | |
| | | //WSI �¿� ��Ʈ�� �����̵� |
| | | //WSI |
| | | pMotorControl->GantrySetTwoGantrySyncModeSend(1); |
| | | |
| | | // WSI result count |
| | |
| | | CModuleStatus* pModuleStatus = Module_GetModuleStatus(nModuleIdx); |
| | | if (pModuleStatus == NULL) continue; |
| | | |
| | | //�浹�Ÿ� �ֱ� |
| | | { |
| | | double dCollisionPosX = pWsiResult->GetCollisionPositionX() / 1000.0; |
| | | double dCollisionPosY = 0.0; |
| | |
| | | int nEndIdx = pWsiResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pWsiResult->GetSReviewResultCount() - 1)) + 1; // set End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | SReviewResult* pWsi = pWsiResult->GetSReviewResult(nResultIdx); |
| | | if (pWsi == NULL) continue; |
| | | |
| | | //200占쏙옙 占쏙옙藥뱄옙占쏙옙占?占쏙옙占쏙옙占쏙옙 占싹뤄옙占쏙옙占쏙옙占쏙옙占?占쌩븝옙체크 |
| | | //200 |
| | | if (pWsi->bCheckWSISendToMotor == FALSE) |
| | | { |
| | | pWsi->bCheckWSISendToMotor = TRUE; |
| | |
| | | } |
| | | } |
| | | |
| | | //���� ����Ʈ�� �ִ��� ������ üũ |
| | | if (vectorPosX.empty() == TRUE) |
| | | { |
| | | //3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error �˶� �� ���� �м� �� ��ġ START |
| | | //3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error START |
| | | g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point,TwoGantrySyncMode OFF!"), vectorPosX.size()); |
| | | g_pLog->DisplayMessage(_T("[GantryAutoGo] (%d)Gantry Path Send Fail"), pModuleStatus->GetGantryIndex()); //taek 210128 |
| | | pMotorControl->GantrySetTwoGantrySyncModeSend(0); |
| | | //3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error �˶� �� ���� �м� �� ��ġ END |
| | | //3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error END |
| | | } |
| | | else |
| | | { |
| | |
| | | int nTickCount = GetTickCount(); |
| | | while (1) |
| | | { |
| | | //5�� ����Ÿ�� |
| | | if ((GetTickCount() - nTickCount) > 5000) |
| | | { |
| | | bOverTime = TRUE; |
| | | break; |
| | | } |
| | | //占쏙옙占쏙옙 占쏙옙占?End 체크 |
| | | //End üũ |
| | | if (pMotorControl->IsGantryMotionEnd(pModuleStatus->GetGantryIndex()) == TRUE) |
| | | { |
| | | if (pMotorControl->GantryAutoGo(pModuleStatus->GetGantryIndex(), vectorPosX, vectorPosY, TRUE)) |
| | |
| | | |
| | | } |
| | | |
| | | //5占쏙옙占식울옙占쏙옙 占싫울옙占쏙옙占싸댐옙? 占쌓뤄옙 3占쏙옙 占쏙옙천占?占쏙옙占쏙옙 |
| | | //���End �� �߸� ���ü��� ������ |
| | | if (bOverTime == TRUE) |
| | | { |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | Sleep(1000); |
| | | |
| | | //���Ͱ� �����ϼ� ���»����϶� Send ��ȣ�� Fail �� ���� Retry 3�� ���� |
| | | if (pMotorControl->GantryAutoGo(pModuleStatus->GetGantryIndex(), vectorPosX, vectorPosY, TRUE)) |
| | | { |
| | | nTotalCount += (int)vectorPosX.size(); |
| | |
| | | // get result index |
| | | int nStartIdx = pReviewResult->GetStartSReviewResultIndex(); |
| | | int nEndIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount()-1)) + 1; // End Index �ٽü��� |
| | | nEndIdx = min(nEndIdx, (pReviewResult->GetSReviewResultCount()-1)) + 1; // End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | if(pGlassResult && pReviewProcessor) |
| | | { |
| | | // MeasureStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_MeasureStart, nPlanIndex); |
| | | |
| | |
| | | const SCoordInfo* pCoordInfo = Module_GetCoordInfo(nModuleIdx); |
| | | if(pCoordInfo == NULL) continue; |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | int nTotalCount = 0; |
| | | double dDefectPosX, dDefectPosY; |
| | | |
| | | // Module�� ��ġ�� ���� ModuleStatus sorting |
| | | std::vector<CModuleStatus*> SortedModuleStatus; |
| | | for(int nModuleIdx = 0; nModuleIdx < m_pSP2P->ISP2P_GetModuleStatusCount(); nModuleIdx++) |
| | | { |
| | |
| | | const SCoordInfo* pCoordInfo = Module_GetCoordInfo(pReviewResult->GetModuleIndex()); |
| | | if(pCoordInfo == NULL) continue; |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | |
| | | if(nHeaderIdx == 0) |
| | | { |
| | | // �̵��� ������ǥ �߰� |
| | | if((int)vectorPos.size() < MAX_MOTOR_ADDRESS_SIZE) |
| | | { |
| | | pSReviewResult->dTargetMotorX = dDefectPosX; |
| | |
| | | |
| | | // add user schedule result |
| | | |
| | | |
| | | //占쏙옙占쏙옙占쌨모리울옙 채占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙표占쏙옙 占쏙옙占쏙옙체占쏙옙 채占쏙옙占쌍댐옙 占쏙옙占? |
| | | { |
| | | |
| | | |
| | |
| | | break; |
| | | } |
| | | break; |
| | | // 占싱삼옙占? |
| | | case CPJT_PlanMeasure: |
| | | { |
| | | const CRcpMeasureInfo *pRcpMeasureInfo = pRsRcpMeasureInfo->GetRcpMeasureInfo(0); |
| | |
| | | } |
| | | |
| | | //CIM DV Data |
| | | BOOL CSequenceProcessor_CPJT::SendDVDataToSignalControl() // ���� |
| | | BOOL CSequenceProcessor_CPJT::SendDVDataToSignalControl() |
| | | { |
| | | CGlassResult *pGlassResult = m_pSP2P->ISP2P_GetCurrentGlassResult(); |
| | | if (pGlassResult==NULL) return FALSE; |
| | |
| | | } |
| | | |
| | | |
| | | int CSequenceProcessor_CPJT::MakeDVData(CGlassResult *pGlassResult, char* pDVData, int nIndex) // ���� |
| | | int CSequenceProcessor_CPJT::MakeDVData(CGlassResult *pGlassResult, char* pDVData, int nIndex) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[SequenceProcessor] SendDVDataToSignalControl->MakeDVData IN.")); |
| | | |
| | |
| | | const CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if (pRsRcpReviewInfo == NULL) return FALSE; |
| | | |
| | | // Review ���� ���� |
| | | // Review |
| | | const CRcpLightInfo *pReviewLightInfo = pRsRcpReviewInfo->GetRcpLightInfo(nIndex); |
| | | // Review AFM ���� |
| | | // Review AFM |
| | | const CRcpAFMRecipeInfo *pReviewAFMInfo = pRsRcpReviewInfo->GetRcpAFMRecipeInfo(nIndex); |
| | | // Review Align Info |
| | | const CAlignResult* pAlignResult = pGlassResult->GetAlignResult(); |
| | | // Review Defect Info |
| | | const CReviewResult* pReviewResult = pGlassResult->GetReviewResult(nIndex); |
| | | |
| | | // Review ���� ���� |
| | | // Review |
| | | const CModuleStatus* pModuleStatus = Module_GetModuleStatus(nIndex); |
| | | const SMagnificInfo* pSMagnificInfo = pModuleStatus->GetMagnificInfo(pReviewAFMInfo->GetZoomIndex()); |
| | | CSignalControl* pSignalControl = m_pSP2P->ISP2P_GetSignalControl(); |
| | |
| | | // Write DVData Packet |
| | | //_DVDataPack_B7_8ver DVDataPack; |
| | | //**Review |
| | | //INLINE : 10�� |
| | | //TFE-OFF : 20�� |
| | | //Hcut : 50�� |
| | | //LAMI : 5�� |
| | | //INLINE : 10 |
| | | //TFE-OFF : 20 |
| | | //Hcut : 50 |
| | | //LAMI : 5 |
| | | //**WSI |
| | | //10�� ���� |
| | | //10 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | |
| | | |
| | |
| | | //nAlignResult = 1; |
| | | |
| | | |
| | | //nAlignResult00 = pAlignResult->nFindAlign[0] * 1000;//���� |
| | | //nAlignResult01 = pAlignResult->nFindAlign[1] * 1000;//���� |
| | | //nAlignResult00 = pAlignResult->nFindAlign[0] * 1000; |
| | | //nAlignResult01 = pAlignResult->nFindAlign[1] * 1000; |
| | | |
| | | //nAlignResult00 = pAlignResult->dFindScore[0]; |
| | | //nAlignResult01 = pAlignResult->dFindScore[1]; |
| | |
| | | nAlignResult01 = 0; |
| | | } |
| | | |
| | | //�Ŀ�? |
| | | nReviewAliveCamera00 = ReviewCamera_GetReviewCameraControl(0)->GetConnected() * 1000; |
| | | nReviewAliveCamera01 = ReviewCamera_GetReviewCameraControl(1)->GetConnected() * 1000; |
| | | |
| | |
| | | { |
| | | wsprintf(DriveText, TEXT("%C:"), Drive); |
| | | UINT type = GetDriveType(DriveText); |
| | | if ((dwDrive & dwDriveCh) && (type == DRIVE_REMOVABLE || type == DRIVE_FIXED || type == DRIVE_RAMDISK)) { |
| | | // 占싹듸옙酉? |
| | | if ((dwDrive & dwDriveCh) && (type == DRIVE_REMOVABLE || type == DRIVE_FIXED || type == DRIVE_RAMDISK)) { |
| | | ULARGE_INTEGER i64FreeBytesToCaller = { 0 }, i64TotalBytes = { 0 }, i64FreeBytes = { 0 }; |
| | | BOOL bRsult = GetDiskFreeSpaceEx(DriveText, (PULARGE_INTEGER)&i64FreeBytesToCaller, (PULARGE_INTEGER)&i64TotalBytes, (PULARGE_INTEGER)&i64FreeBytes); |
| | | if (bRsult) { |
| | |
| | | pSignalControl->WritePacketData(_T("15100"), sizeof(DVDataPack_CPJT), (short*)&DVData);*/ |
| | | } |
| | | |
| | | //#3358 KYH FDC ������ ���� ���� ���� ADD START |
| | | //#3358 KYH FDC ADD START |
| | | void CSequenceProcessor_CPJT::MakeDVData2() |
| | | { |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | // Review ���� ���� |
| | | // Review |
| | | pReviewLightInfo = pRsRcpReviewInfo->GetRcpLightInfo(0); |
| | | // Review AFM ���� |
| | | // Review AFM |
| | | pReviewAFMInfo = pRsRcpReviewInfo->GetRcpAFMRecipeInfo(0); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Review ���� ���� |
| | | // Review |
| | | const CModuleStatus* pModuleStatus = Module_GetModuleStatus(0); |
| | | const SMagnificInfo* pSMagnificInfo = NULL; |
| | | if (pModuleStatus == NULL) |
| | |
| | | //nAlignResult = 1; |
| | | |
| | | |
| | | //nAlignResult00 = pAlignResult->nFindAlign[0] * 1000;//���� |
| | | //nAlignResult01 = pAlignResult->nFindAlign[1] * 1000;//���� |
| | | //nAlignResult00 = pAlignResult->nFindAlign[0] * 1000; |
| | | //nAlignResult01 = pAlignResult->nFindAlign[1] * 1000; |
| | | |
| | | //nAlignResult00 = pAlignResult->dFindScore[0]; |
| | | //nAlignResult01 = pAlignResult->dFindScore[1]; |
| | |
| | | nAlignResult01 = 1000; |
| | | } |
| | | |
| | | //�Ŀ�? |
| | | if (ReviewCamera_GetReviewCameraControl(0) != NULL) |
| | | { |
| | | nReviewAliveCamera00 = ReviewCamera_GetReviewCameraControl(0)->GetConnected() * 1000; |
| | |
| | | { |
| | | wsprintf(DriveText, TEXT("%C:"), Drive); |
| | | UINT type = GetDriveType(DriveText); |
| | | if ((dwDrive & dwDriveCh) && (type == DRIVE_REMOVABLE || type == DRIVE_FIXED || type == DRIVE_RAMDISK)) { |
| | | // 占싹듸옙酉? |
| | | if ((dwDrive & dwDriveCh) && (type == DRIVE_REMOVABLE || type == DRIVE_FIXED || type == DRIVE_RAMDISK)) { |
| | | ULARGE_INTEGER i64FreeBytesToCaller = { 0 }, i64TotalBytes = { 0 }, i64FreeBytes = { 0 }; |
| | | BOOL bRsult = GetDiskFreeSpaceEx(DriveText, (PULARGE_INTEGER)&i64FreeBytesToCaller, (PULARGE_INTEGER)&i64TotalBytes, (PULARGE_INTEGER)&i64FreeBytes); |
| | | if (bRsult) { |
| | |
| | | |
| | | return; |
| | | } |
| | | //#3358 KYH FDC ������ ���� ���� ���� ADD END |
| | | //#3358 KYH FDC ADD END |
| | | |
| | | DWORD CSequenceProcessor_CPJT::GetDiskUsage() |
| | | { |
| | |
| | | |
| | | BOOL bResult = FALSE; |
| | | |
| | | // PCControl D2300 (�˻� ����) |
| | | // PCControl D2300 |
| | | switch(nSignalIndex) |
| | | { |
| | | case PCControlRecv_TimeChange: |
| | |
| | | g_pLog->DisplayMessage(_T("[SequenceProcessor] Success! SetLocalTime(), Current: %04d-%02d-%02d %02d-%02d-%02d, Changed: %04d-%02d-%02d %02d-%02d-%02d"), |
| | | CurrentTime.wYear, CurrentTime.wMonth, CurrentTime.wDay, CurrentTime.wHour, CurrentTime.wMinute, CurrentTime.wSecond, |
| | | ChangedTime.wYear, ChangedTime.wMonth, ChangedTime.wDay, ChangedTime.wHour, ChangedTime.wMinute, ChangedTime.wSecond); |
| | | // AFM & WSI TIME ����ȭ |
| | | // AFM & WSI TIME |
| | | SendSystemTime(ChangedTime); |
| | | } else { |
| | | g_pLog->DisplayMessage(_T("[SequenceProcessor] Fail! SetLocalTime()")); |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | // Local System ���� �ð��� ���� ��û ��Ʈ�ѷ��� �ð��� ó�� ���� |
| | | // Local System |
| | | BOOL CSequenceProcessor_CPJT::SendSystemTime(SYSTEMTIME sysTime) |
| | | { |
| | | SYSTEMTIME CurrentTime; |
| | |
| | | case PCControlSend_Defoucs: |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Defoucs! => %d"),0); |
| | | break; |
| | | case PCControlSend_Diagnosis: // 0412 �ڰ����� ��ȣ �߰� |
| | | case PCControlSend_Diagnosis: // 0412 |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Diagnosis! => %d"), 0); |
| | | break; |
| | | } |
| | |
| | | case PCControlSend_Defoucs: |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Defoucs! => %d"),0); |
| | | break; |
| | | case PCControlSend_Diagnosis: // 0412 �ڰ����� ��ȣ �߰� |
| | | case PCControlSend_Diagnosis: // 0412 |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Send] Diagnosis! => %d"), 0); |
| | | break; |
| | | } |
| | |
| | | if (bResult==FALSE) m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Mode] Manual Mode Error!")); |
| | | |
| | | // lmk simul manual camera,motor stop |
| | | //ReviewCamera_CameraControl(CameraControlStop); // ���� ���߸� ī�� �ڵ� ��ž |
| | | //ReviewCamera_CameraControl(CameraControlStop); |
| | | CMotorControl* pMotorControl = m_pSP2P->ISP2P_GetMotorControl(); |
| | | if(pMotorControl) |
| | | pMotorControl->CommonSetAutoStop(); |
| | |
| | | |
| | | if (SetLocalTime(&sTime)) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Signal] �ð�����ȭ���� %s"), strtime); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Signal] TymeSync Success %s"), strtime); |
| | | } |
| | | else |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Signal] �ð�����ȭ���� %s"), strtime); |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[PCControl_Signal] TymeSync Fail %s"), strtime); |
| | | |
| | | |
| | | //memcpy(&time, strTime, 2); |
| | |
| | | CReviewResult* pWsiMultiShotResult = pGlassResult->GetWsiMultiShotResult(nModuleIndex); |
| | | if (pWsiMultiShotResult == NULL) goto RESULT_FAIL; |
| | | |
| | | // ������ �ε����� �����´�. |
| | | int nCurResultIdx = pWsiMultiShotResult->GetLastSReviewResultIndex() + 1; // last index + 1 |
| | | int nStartResultIdx = pWsiMultiShotResult->GetStartSReviewResultIndex(); |
| | | int nEndResultIdx = pWsiMultiShotResult->GetEndSReviewResultIndex(); |
| | |
| | | int nMPosY = int(pPosition->dMotorPosY * 1000.0); |
| | | double dTime = (double)m_ProcessTimer.GetDurationMilliSecond(); |
| | | |
| | | // �ε����� �ٸ��� ��������. |
| | | if (measureResut.nResultIndex != nCurResultIdx) |
| | | { |
| | | goto RESULT_FAIL; |
| | | } |
| | | |
| | | // ���� ������ ����. |
| | | // measureResut |
| | | |
| | | if (pWsiMultiShotResult->GetSReviewResultCount() == 0) return; |
| | |
| | | // set last result idx |
| | | pWsiMultiShotResult->SetLastSReviewResultIndex(nCurResultIdx); |
| | | |
| | | // 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙트占쏙옙占쏙옙 占쌉곤옙, WSI 占쏙옙占쏙옙占?占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙... |
| | | if (nCurResultIdx == nEndResultIdx && nCurResultIdx <= pWsiMultiShotResult->GetSReviewResultCount()) |
| | | { |
| | | nStartResultIdx = nCurResultIdx + 1; |
| | |
| | | pWsiMultiShotResult->SetStartSReviewResultIndex(nStartResultIdx); |
| | | pWsiMultiShotResult->SetEndSReviewResultIndex(nEndResultIdx); |
| | | |
| | | // ������ ����Ʈ ���� ��������. |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | // Process_RemainWsiPoint(nModuleIndex); |
| | | } |
| | | |
| | |
| | | if(pGlassResult && pReviewProcessor) |
| | | { |
| | | // WsiStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_WSIReflowStart, nPlanIndex); |
| | | |
| | |
| | | if(pGlassResult && pReviewProcessor) |
| | | { |
| | | // WsiStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_WSIStart, nPlanIndex); |
| | | |
| | |
| | | WSIAllReadySignal(1); |
| | | |
| | | // send wsi start |
| | | // ���� ���� |
| | | if (!WSIMultiShotAllStartSignal()) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[WSI] WSI MultiShot Start Fail!!")); |
| | |
| | | if (pGlassResult && pReviewProcessor) |
| | | { |
| | | // WsiStart |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID ���� |
| | | pReviewProcessor->SetJobID(pGlassResult->m_strJobID); // pGlassResult->m_strGlassID -> pGlassResult->m_strJobID |
| | | pReviewProcessor->SetOperID(pGlassResult->m_strOperID); |
| | | m_pSP2P->ISP2P_UpdateReviewProcessStatus(ReviewProcessStatus_WSIMultiShotStart, nPlanIndex); |
| | | |
| | |
| | | int nEndIdx = pWsiResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pWsiResult->GetSReviewResultCount()-1)) + 1; // set End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | CModuleStatus* pModuleStatus = Module_GetModuleStatus(nModuleIdx); |
| | | if (pModuleStatus == NULL) continue; |
| | | |
| | | //�浹�Ÿ� �ֱ� |
| | | { |
| | | double dCollisionPosX = pWsiUserResult->GetCollisionPositionX() / 1000.0; |
| | | double dCollisionPosY = 0.0; |
| | |
| | | int nEndIdx = pWsiUserResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pWsiUserResult->GetSReviewResultCount()-1)) + 1; // set End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //������ ���� |
| | | |
| | | pWsiMultiShotResult->GetVectorSReviewResult()->clear(); |
| | | int nResultCount = 0; |
| | | if (m_vecSReviewResult.size()>0) |
| | | { |
| | | //占쏙옙占쏙옙占쌕몌옙 占쏙옙占쏙옙 占쏙옙占?占쏙옙占쏙옙占쏙옙占쏙옙킷占?占쏙옙 占쏙옙占쏙옙殮占?占쏙옙占쏙옙 |
| | | for(int i=0; i< m_vecSReviewResult.size(); i++) |
| | | { |
| | | //������ ���ÿ� ���� ���� �Է��ؾߵ� �װ�ŭ ������! |
| | | //������ WSI FOV 4���� ���ؿ��� ���� |
| | | { |
| | | double dOringinX = m_vecSReviewResult[i].nUMOriginX; |
| | | double dOringinY = m_vecSReviewResult[i].nUMOriginY; |
| | | |
| | |
| | | CModuleStatus* pModuleStatus = Module_GetModuleStatus(nModuleIdx); |
| | | if (pModuleStatus == NULL) continue; |
| | | |
| | | |
| | | //�浹�Ÿ� �ֱ� |
| | | { |
| | | |
| | | double dCollisionPosX = pWsiMultiShotResult->GetCollisionPositionX() / 1000.0; |
| | |
| | | int nEndIdx = pWsiMultiShotResult->GetEndSReviewResultIndex(); |
| | | nEndIdx = min(nEndIdx, (pWsiMultiShotResult->GetSReviewResultCount() - 1)) + 1; // set End Index |
| | | |
| | | // [2017:3:8]-[WEZASW] : CameraOffset ���� ���� (-1~1 => -5~5) |
| | | // [2017:3:8]-[WEZASW] : CameraOffset (-1~1 => -5~5) |
| | | double m_dMinOffset = -5.0; |
| | | double m_dMaxOffset = 5.0; |
| | | |
| | |
| | | CRsRcpReviewInfo* pRsRcpReviewInfo = m_pSP2P->ISP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if(pRsRcpReviewInfo == NULL) return FALSE; |
| | | |
| | | if(pRsRcpReviewInfo->GetRcpUserDefectInfoCount() < 1) return TRUE; // �������� ī��Ʈ�� ���ٸ� �Ѿ�� |
| | | if(pRsRcpReviewInfo->GetRcpUserDefectInfoCount() < 1) return TRUE; |
| | | |
| | | double dCenterPosX, dCenterPosY; |
| | | |
| | |
| | | _grmGlassData* pSharedGlassData = pDitSharedGlassRaw->GetGlassData(); |
| | | if(pSharedGlassData == NULL) return FALSE; |
| | | |
| | | //pSharedGlassData->m_nUserReviewNum = 0; //���� �� User plan |
| | | //pSharedGlassData->m_nUserReviewNum = 0; // User plan |
| | | |
| | | _grmDefectData* pSharedDefect; |
| | | int nPointCount = pRecipeinfo->GetRcpUserDefectInfoCount(); // User ��ǥ �� ī��Ʈ |
| | | int nPointCount = pRecipeinfo->GetRcpUserDefectInfoCount(); |
| | | |
| | | int nSharedDefectNum = pSharedGlassData->m_nDefectNum; // ���� �Ѱ��� User Idx �� ù��° Index �� �ȴ� |
| | | int nStartIdx=nSharedDefectNum;// USER ���� ���� IDX �ο��ϱ� ���� ������ |
| | | int nSharedDefectNum = pSharedGlassData->m_nDefectNum; |
| | | int nStartIdx=nSharedDefectNum; |
| | | |
| | | CRcpPlanInfo* pRcpPlanInfo; // ������ ���� |
| | | CRcpUserDefectInfo *pDefectInfo;// ������ defect ���� |
| | | CRcpPlanInfo* pRcpPlanInfo; |
| | | CRcpUserDefectInfo *pDefectInfo; |
| | | |
| | | int nInsepectionType;// User Ÿ�� Reviewreflow = 0 wsiReflow =1; REV&WSI =2; WSIUSEr =3; USER =4; |
| | | int nInsepectionType;// User Reviewreflow = 0 wsiReflow =1; REV&WSI =2; WSIUSEr =3; USER =4; |
| | | |
| | | int nCount = 0; |
| | | |
| | |
| | | |
| | | BOOL CSequenceProcessor_CPJT::CompareRevType(int nInsType,int nRevType) |
| | | { |
| | | //Plan Ÿ�� InspectionMode �� |
| | | //Plan InspectionMode |
| | | if(nRevType == CPJT_PlanUser) |
| | | { |
| | | if(nInsType == USER) return TRUE; |
| | |
| | | CString strMessage, strResultFilePath, strUploadResultFilePath, strLocalRawPath; |
| | | CString strUploadRawPath, strUploadImagePath, strAOIRawFileName, strAOIRawFilePath; |
| | | |
| | | //3-1. 占쏙옙占쏙옙 占쏙옙占?占쏙옙占쏙옙 占쏙옙占쏙옙 |
| | | //3-1. |
| | | m_pSP2P->ISP2P_SetReviewResultData(pGlassResult); |
| | | |
| | | strLocalRawPath = pNetworkInfo->m_strLocalRawPath; |
| | |
| | | |
| | | if(strUploadRawPath.IsEmpty() == FALSE && strAOIRawFilePath.IsEmpty() == FALSE) |
| | | { |
| | | // [2017:5:16]-[WEZASW] : ���� PASS���� ���� ��� ��Ȳ�� ���� AOI Server�� RAW ���� ���� ���ε� ����. |
| | | // [2017:5:16]-[WEZASW] : |
| | | strUploadResultFilePath.Format(_T("%s\\%s"), strUploadRawPath, strAOIRawFileName); |
| | | |
| | | if(CopyFile(strResultFilePath, strUploadResultFilePath, FALSE)) |
| | |
| | | } |
| | | |
| | | // delete file of Glass direction |
| | | DeleteFile(pNetworkInfo->m_strAOIRawPath + _T("\\") + pGlassResult->m_strJobID + _T("TD"));//pGlassResult->m_strGlassID -> m_StrJobID ���� |
| | | DeleteFile(pNetworkInfo->m_strAOIRawPath + _T("\\") + pGlassResult->m_strJobID + _T("TD"));//pGlassResult->m_strGlassID -> m_StrJobID |
| | | |
| | | // [2017:4:11]-[WEZASW] :CIM(DV Data) ���� �� �߰�. |
| | | // [2017:4:11]-[WEZASW] :CIM(DV Data) |
| | | if (SendDVDataToSignalControl()==FALSE) |
| | | { |
| | | m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewEnd] DV Data Send FAIL!")); |
| | |
| | | |
| | | BOOL CSequenceProcessor_CPJT::MoveReviewStartMotorPosition(CGlassResult* pGlassResult,int nReviewType) |
| | | { |
| | | //혹占시놂옙 占쏙옙占싹깍옙占?占쏙옙占쌤듸옙 |
| | | //���� �÷��� ù��° ��ġ�� �̵� |
| | | |
| | | double dDefectPosX,dDefectPosY = 0; |
| | | |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::SendWsiErrorAlarm_CPJT(int Index) //190801 chm |
| | | { |
| | | //wsi ���� �˶� |
| | | //wsi |
| | | if(Index==1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[SequenceProcessor_CPJT] WSI Alive Error!!!")); |
| | |
| | | |
| | | void CSequenceProcessor_CPJT::SendWsiAlive_CPJT()//190801 chm |
| | | { |
| | | //WSI Alive ��ȣ ���� |
| | | //WSI Alive |
| | | SetWSIAliveCheck(TRUE); |
| | | } |
| | | |
| | |
| | | if(bWsiAliveCheck ==FALSE){ |
| | | m_pCSPC->SendWsiErrorAlarm_CPJT(1); |
| | | } |
| | | bWsiAliveCheck=FALSE; //30�ʿ� �ѹ��� 0���� �ʱ�ȭ |
| | | bWsiAliveCheck=FALSE; |
| | | |
| | | } |
| | | } |