#pragma once
|
|
#include "CHCommonClasses/ProcessTimer.h"
|
#include "CHThreadPools/WorkThreadPools.h"
|
#include "ModuleStatus.h"
|
#include "CHResultFileManager/StringRaw.h"
|
#include "M_AutoDiagnosisManager/DiagnosisManager.h"
|
#include "DlgSelfDiagnosis.h"
|
#include "DlgReviewHistoryTool.h"
|
|
// system info
|
class CSystemInfo;
|
class CGlassTypeInfo;
|
class CGlassTypeInfo;
|
class CAlignCameraInfo;
|
class CSignalControlInfo;
|
class CMotorControlInfo;
|
class CNetworkInfo;
|
|
// recipe info
|
class CRsRecipeManager;
|
class CRsRcpReviewInfo;
|
class CRsRcpMeasureInfo;
|
class CRsRcpAlignInfo;
|
class CRsRcpDefectFindInfo;
|
class CRcpSchedulingInfo;
|
|
// single control
|
class CSignalControl;
|
class CMotorControl;
|
class CAlignServerControl;
|
class CCameraControlAlign;
|
class CPrioritySorter;
|
class CPathScheduler;
|
//class CMeasureScheduler;
|
class CCoordCalibrator;
|
class CReviewProcessor;
|
class CPrioritySorter;
|
class CRecipeManager;
|
class CDefectPicker;
|
struct _ProtocolReview;
|
|
// multi control
|
class CLightControl;
|
class CLensChangeControl;
|
class CAfmControl;
|
class CWsiControl;
|
class CCameraControlReview;
|
class CMotorCalibrator;
|
class CVcrControl;
|
|
// single variable
|
class CGlassResult;
|
struct STransferData;
|
struct SDefectFilter;
|
struct SSignalIOStatus;
|
class CSharedImageData;
|
class CConnectionStatus;
|
struct SThetaMotorInfo;
|
struct SRangePoint;
|
struct SRecipeBodyPack_B7E_WSI;
|
|
// multi variable
|
class CModuleStatus;
|
struct SCameraControl;
|
struct SCameraInfo;
|
struct SMotorPosition;
|
struct SMotorStatus;
|
struct SSignalIOStatus;
|
struct SAxisIndex;
|
|
class CConnectionStatus;
|
struct SCoordInfo;
|
struct SCameraInfo;
|
struct SAlignResult;
|
struct SWsiResult;
|
|
class CTotalPitchMeasure;
|
|
enum ResultFileSortingType { RESULT_SORTING_ASCENDING = 0, RESULT_SORTING_DESCENDING };
|
enum ProcessMode { ProcessModeBypass=0, ProcessModeAuto, ProcessModeManual, ProcessModeReview };
|
enum ProcessStatus { ProcessNA=-1, ProcessLoading, ProcessAlignStart, ProcessReadRawFile, ProcessReviewStart, ProcessReviewEnd, ProcessUnloading, ProcessLightOn, ProcessLightOff };
|
enum COMMON_MAGNIFICATION { COMMON_MAGNIFICATION_X2=0, COMMON_MAGNIFICATION_X5, COMMON_MAGNIFICATION_X10, COMMON_MAGNIFICATION_X20, COMMON_MAGNIFICATION_X50, COMMON_MAGNIFICATION_COUNT };
|
enum COMMON_MAGNIFICATION_VALUE { COMMON_MAG_VALUE_X2=2, COMMON_MAG_VALUE_X5=5, COMMON_MAG_VALUE_X10=10, COMMON_MAG_VALUE_X20=20, COMMON_MAG_VALUE_X50=50 };
|
|
enum MotorOffsetType { MotorOffsetCamera=1, MotorOffsetMag=2, MotorOffsetWSI=4,MotorOffset_Glass=8};
|
|
|
// [2017:4:13]-[WEZASW] : CIM Data.
|
#define PCControl_ADDR_PPID_LIST _T("D2500")
|
#define PCControl_ADDR_DCOLL_BASE _T("D8000")
|
|
// 20171011 smok flexible address
|
#define PCControl_ADDR_DCOLL_DATA _T("D8300")
|
// 20170813 smok DCOLL DATA 8月 ver.
|
#define PCControl_ADDR_DCOLL_DATA_8VER _T("D8300")
|
#define PC_ADDR_DCOLL_DATA _T("18000")
|
|
#define PCControl_ADDR_CHANGE_PPID_DATA _T("D2310")
|
#define PCControl_ADDR_VCR_DATA _T("D2450")
|
#define PC_ADDR_VCR_DATA _T("19000")
|
|
#define PCControl_ADDR_REQUEST_RECIPE_BODY _T("D3000")
|
#define PCControl_ADDR_MODIFY_RECIPE_BODY _T("D4000")
|
|
// from PCControl
|
#define PCControl_ADDR_TIME_DATA _T("2380")
|
#define PCControl_ADDR_CURRENT_PPID_DATA _T("D2361")
|
|
// [2017:4:13]-[WEZASW] : PCControl(CIM) Signal
|
enum PCControlRecvCIMSignal1_B7 { PCControlRecv_RecipeBody=9, PCControlRecv_VCREnable=10, PCControlRecv_VCRDisable=11, PCControlRecv_KeyInMode=12, PCControlRecv_SkipMode=13, PCControlRecv_CIMMode=14, PCControlRecv_TimeChange=15 };
|
enum PCControlSend_CIMIndex_B7 { PCControlSend_D2420=0, PCControlSend_D2421=1, PCControlSend_D2320=2, PCControlSend_D2321=3, PCControlSend_D2322=4, PCControlSend_D2323=5, PCControlSend_D2313=6, PCControlSend_D2283=7};
|
|
enum PCControlSend_D2421_Signal_B7 { PCControlSend_ReviewAlive=0 };
|
// [2017:4:27]-[WEZASW] : Alarm 신호 추가 (측정기에 한함)
|
enum PCControlSend_D2320_Signal_B7 { PCControlSend_NoPPID=9, PCControlSend_AlignAlarm=14 };
|
enum PCControlSend_D2321_Signal_B7 { PCControlSend_OperationEnd=5, PCControlSend_ChangeTimeAck=15 };
|
enum PCControlSend_D2322_Signal_B7 { PCControlSend_CreatePPID=4, PCControlSend_DeletePPID=5, PCControlSend_ModifyPPID=6, PCControlSend_ChangePPID=8 };
|
enum PCControlSend_D2323_Signal_B7 { PCControlSend_RecipeBodyAck=11, PCControlSend_RecipeBodyNak=12 };
|
enum PCControlSend_D2313_Signal_B7 { PCControlSend_GlassJudgeNoJudge=0, PCControlSend_GlassJudgeGood=1, PCControlSend_GlassJudgeRepair=2, PCControlSend_GlassJudgeNG=3, PCControlSend_GlassJudgeNeedCVD=4, PCControlSend_GlassJudgeNeedCSI=5,
|
PCControlSend_GlassJudgeScrap=6, PCControlSend_GlassJudgeRW=7, PCControlSend_GlassJudgeProcessSkip=8, PCControlSend_GlassJudgeRetest=9, PCControlSend_GlassJudgeMacMic=10, PCControlSend_GlassJudgeReserved=11 };
|
enum PCControlSend_D2283_Signal_B7 { PCControlSend_WSIMeasureNG=0, PCControlSend_WSIMeasureOK=1};
|
|
struct __DVDataPack_C_PJT
|
{
|
char H_PanelID[12];
|
char E_PanelID[12];
|
char ProcessID[20];
|
char ProdcutID[20];
|
char StepID[12];
|
char BATCHID[12];
|
char PROD_TYPE[2];
|
char PROD_KIND[2];
|
char PPID[16];
|
char FLOWID[4];
|
char PANEL_SIZE[4];
|
char THICKNESS[2];
|
char COMP_COUNT[2];
|
char PANEL_STATE[2];
|
char READING_FLAG[2];
|
char INS_FLAG[2];
|
char PANEL_POSITION[2];
|
char JUDGEMENT[4];
|
char CODE[4];
|
char FLOW_HISTORY[28];
|
char UNIQUEID[4];
|
char COUNT1[2];
|
char COUNT2[2];
|
char GRADE[8];
|
char MULTI_USE[20];
|
char GlassDataBitSignal[4];
|
char PAIR_H_PANELID[12];
|
char PAIR_E_PANELID[12];
|
char PAIR_PRODUCTID[20];
|
char PAIR_GRADE[8];
|
char FLOW_GROUP[20];
|
char DBR_RECIPE[4];
|
char Reserved[12];
|
char RERFER_DATA[4];
|
};
|
|
struct _RecipeBodyPack_CSOT
|
{
|
//Review
|
//int ppid; // 1 Word : ASCII to INT (CIM ASCII 인식 이상으로 현장 추가)
|
//char recipeName[40]; // 10 Word :
|
int reviewPlan; // 2 Word : 1: REVIEW, 2: REVIEW+WSI
|
int reviewCount; // 2 Word : Review Total Count
|
int reviewLightLevel; // 2 Word :
|
int reviewLightMinLevel; // 2 Word :
|
int reviewLightMaxLevel; // 2 Word :
|
int reviewAfmMagnificIndex; // 2 Word :
|
int priorityOptic; // 2 Word : 1: ALL, 2: DARK, 3: BRIGHT
|
int priorityGray; // 2 Word : 1: ALL, 2: BLACK, 3: WHITE
|
int priorityStack; // 2 Word : 1: ALL, 2: CD, 3: TD, 4: SD
|
int sortingType; // 2 Word : 1: SIZE, 2: PEAK
|
int sortingOrder; // 2 Word : 1: DECEND, 2: ASCEND
|
|
//WSI
|
//int wsiCount; // 2 Word :
|
//int wsiLightLevel; // 2 Word :
|
//int wsiLightMinLevel; // 2 Word :
|
//int wsiLightMaxLevel; // 2 Word :
|
//int wsiAfmMagnificIndex; // 2 Word :
|
//int scanStartPos; // 2 Word : um (250)
|
//int scanEndPos; // 2 Word : um (250)
|
//int afSettingPos; // 2 Word : um (250)
|
//int scanStep; // 2 Word : um (250)
|
//int exposureTime; // 2 Word :
|
};
|
|
struct _RecipeBodyPack_CSOT_WSI
|
{
|
int wsiCount; // 2 Word :
|
};
|
|
|
// [2017:4:11]-[WEZASW] :CIM(DV Data) 보고 항목 추가.
|
struct _RecipeBodyPack_B7
|
{
|
//Review
|
int ppid; // 1 Word : ASCII to INT (CIM ASCII 인식 이상으로 현장 추가)
|
char recipeName[40]; // 10 Word :
|
int reviewPlan; // 2 Word : 1: REVIEW, 2: REVIEW+WSI
|
int reviewCount; // 2 Word : Review Total Count
|
int reviewLightLevel; // 2 Word :
|
int reviewLightMinLevel; // 2 Word :
|
int reviewLightMaxLevel; // 2 Word :
|
int reviewAfmMagnificIndex; // 2 Word :
|
int priorityOptic; // 2 Word : 1: ALL, 2: DARK, 3: BRIGHT
|
int priorityGray; // 2 Word : 1: ALL, 2: BLACK, 3: WHITE
|
int priorityStack; // 2 Word : 1: ALL, 2: CD, 3: TD, 4: SD
|
int sortingType; // 2 Word : 1: SIZE, 2: PEAK
|
int sortingOrder; // 2 Word : 1: DECEND, 2: ASCEND
|
|
//WSI
|
int wsiCount; // 2 Word :
|
int wsiLightLevel; // 2 Word :
|
int wsiLightMinLevel; // 2 Word :
|
int wsiLightMaxLevel; // 2 Word :
|
int wsiAfmMagnificIndex; // 2 Word :
|
int scanStartPos; // 2 Word : um (250)
|
int scanEndPos; // 2 Word : um (250)
|
int afSettingPos; // 2 Word : um (250)
|
int scanStep; // 2 Word : um (250)
|
int exposureTime; // 2 Word :
|
};
|
|
// [2017:4:11]-[WEZASW] :CIM(DV Data) 보고 항목 추가.
|
|
struct _RVDefectData_B7_8ver
|
{
|
// int count; // 2 Word : Index
|
|
// 20170814 smok DCOLL DATA 8月 ver.
|
int PositionX; // 2 Word : mm (9999.999)
|
int PositionY; // 2 Word : mm (9999.999)
|
char defectType[20]; // 10 Word :
|
int judgeCode; // 2 Word : Number
|
int sizeRScale; // 2 Word : um (9999.999)
|
};
|
|
// 20170813 smok DCOLL DATA 8月 ver.
|
struct _WSIDefectData_B7_8ver
|
{
|
// int count; // 2 Word : defect Index
|
|
// 20170813 smok DCOLL DATA 8月 ver.
|
int measureResult; // 1 Word : success / fail
|
int measureType; // 1 Word : 돌기 / 함몰
|
int measureHeight; // 2 Word : x height, um (9999.999)
|
int measureWidthX; // 2 Word : x width, um (9999.999)
|
int measureWidthY; // 2 Word : x area, um (9999.999)
|
//int measureRatio; // 2 Word : x a ratio, um (9999.999)
|
};
|
|
struct _DVDataPack_B7_8ver
|
{
|
// 20170813 smok DCOLL DATA 8月 ver.
|
/*
|
int alignCam1MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam2MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam1GrayValue; // 2 Word : 0 ~ 255
|
int alignCam2GrayValue; // 2 Word : 0 ~ 255
|
|
int reviewLightValue; // 2 Word : 0 ~ 255
|
int reviewLensMagnify; // 2 Word : 5, 10, 20
|
*/
|
_RVDefectData_B7_8ver reviewDefectData[10];
|
_WSIDefectData_B7_8ver wsiDefectData[10];
|
};
|
struct _DVDataPack_Hcut
|
{
|
|
_RVDefectData_B7_8ver reviewDefectData[50];
|
_WSIDefectData_B7_8ver wsiDefectData[10];
|
|
};
|
|
struct _DVDataPack_TFEOFF
|
{
|
|
_RVDefectData_B7_8ver reviewDefectData[20];
|
_WSIDefectData_B7_8ver wsiDefectData[10];
|
|
};
|
|
|
/////////////////////////////////////////////////////////////////
|
// 20170813 smok DCOLL DATA 8月 ver.
|
// Flexible 임시로 기존버전 유지
|
// [2017:4:11]-[WEZASW] :CIM(DV Data) 보고 항목 추가.
|
|
|
/////////////////////////////////////////////////////////////////
|
// 20170922 smok DV DATA 9月 ver.(Flexible)
|
struct _RVDefectData_B7_Flexible
|
{
|
unsigned short count; // 1 Word : Index
|
long PositionX; // 2 Word : mm (9999.999)
|
long PositionY; // 2 Word : mm (9999.999)
|
char defectType[20]; // 10 Word :
|
unsigned short judgeCode; // 1 Word : Number
|
long sizeRScale; // 2 Word : um (9999.999)
|
|
};
|
|
struct _DVDataPack_B7_Flexible
|
{
|
/* int alignCam1MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam2MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam1GrayValue; // 2 Word : 0 ~ 255
|
int alignCam2GrayValue; // 2 Word : 0 ~ 255
|
*/
|
char nGlassPPID[20]; // 10 Word
|
char nGlassID[20]; // 10 Word
|
|
unsigned short reviewLightValue; // 1 Word : 0 ~ 255
|
unsigned short reviewLensMagnify; // 1 Word : 5, 10, 20
|
|
_RVDefectData_B7_Flexible reviewDefectData[11];
|
};
|
|
struct _RVDefectData_B7
|
{
|
int count; // 2 Word : Index
|
float PositionX; // 2 Word : mm (9999.999)
|
float PositionY; // 2 Word : mm (9999.999)
|
char defectType[8]; // 4 Word :
|
int judgeCode; // 2 Word : Number
|
float sizeRScale; // 2 Word : um (9999.999)
|
};
|
|
struct _WSIDefectData_B7
|
{
|
int count; // 2 Word : defect Index
|
int measureResult; // 2 Word : success / fail
|
int measureType; // 2 Word : 돌기 / 함몰
|
float measureHeight; // 2 Word : x height, um (9999.999)
|
float measureWidthX; // 2 Word : x width, um (9999.999)
|
float measureWidthY; // 2 Word : x area, um (9999.999)
|
float measureRatio; // 2 Word : x a ratio, um (9999.999)
|
};
|
|
struct _DVDataPack_B7
|
{
|
int alignCam1MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam2MatchValue; // 2 Word : 0 ~ 100 %
|
int alignCam1GrayValue; // 2 Word : 0 ~ 255
|
int alignCam2GrayValue; // 2 Word : 0 ~ 255
|
|
int reviewLightValue; // 2 Word : 0 ~ 255
|
int reviewLensMagnify; // 2 Word : 5, 10, 20
|
|
_RVDefectData_B7 reviewDefectData[21];
|
_WSIDefectData_B7 wsiDefectData[21];
|
};
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
interface ISequenceProcessor2Parent
|
{
|
// Read ConfigFile
|
virtual const BOOL ISP2P_System_ReadConfigFile() = 0;
|
|
// common
|
virtual void ISP2P_DisplayMessage(const TCHAR* lpstrFormat, ...) = 0;
|
virtual void ISP2P_MeasureGraph(CGlassResult* pGlassResult) = 0;
|
|
virtual BOOL IRP2P_SaveDefectMap(const CString& strPath) = 0;
|
|
|
virtual void ISP2P_SetCurrentWsiMode(int nMode) = 0;
|
|
// system info
|
virtual const CSystemInfo* ISP2P_System_GetSystemInfo() = 0;
|
virtual const CGlassTypeInfo* ISP2P_System_GetGlassTypeInfo(int nIndex) = 0;
|
virtual const CGlassTypeInfo* ISP2P_System_GetStandardGlassTypeInfo() = 0;
|
virtual const CAlignCameraInfo* ISP2P_System_GetAlignCameraInfo(int nIndex) = 0;
|
virtual const CSignalControlInfo* ISP2P_System_GetPCControlInfo() = 0;
|
virtual const CMotorControlInfo* ISP2P_System_GetMotorInfo() = 0;
|
virtual const CNetworkInfo* ISP2P_System_GetNetworkInfo() = 0;
|
|
virtual CTotalPitchMeasure* ISP2P_GetTotalPitchMeasure() = 0;
|
|
// recipe info
|
virtual CRsRecipeManager* ISP2P_Recipe_GetRsRecipeManager() = 0;
|
virtual CRsRcpReviewInfo* ISP2P_Recipe_GetRsRcpReviewInfo() = 0;
|
virtual CRsRcpMeasureInfo* ISP2P_Recipe_GetRsRcpMeasureInfo() = 0;
|
virtual CRsRcpAlignInfo* ISP2P_Recipe_GetRsRcpAlignInfo() = 0;
|
virtual CRsRcpDefectFindInfo* ISP2P_Recipe_GetRsRcpDefectFindInfo() = 0;
|
|
// single control
|
virtual CSignalControl* ISP2P_GetSignalControl() = 0; // Signal Control
|
virtual CMotorControl* ISP2P_GetMotorControl() = 0; // Motor Control
|
virtual CAlignServerControl* ISP2P_GetAlignServerControl() = 0; // Align Server Control
|
virtual CCameraControlAlign* ISP2P_GetAlignCameraControl() = 0; // Align Camera Control
|
virtual CPrioritySorter* ISP2P_GetPrioritySorter() = 0; // new Priority Sorter
|
virtual CDefectPicker* ISP2P_GetDefectPicker(int nIdx=-1) = 0; // Review Defect Picker
|
virtual CPathScheduler* ISP2P_GetReviewScheduler(int nIdx=-1) = 0; // Review Scheduler
|
// virtual CMeasureScheduler* ISP2P_GetMeasureScheduler() = 0; // Measure Scheduler
|
virtual CCoordCalibrator* ISP2P_GetCoordCalibrator() = 0; // coordination calibrator
|
virtual CReviewProcessor* ISP2P_GetReviewProcessor() = 0; // Review Processor
|
|
virtual _ProtocolReview* ISP2P_GetAoiMemoryProtocol() = 0; // aoi shared memory control
|
|
// multi control
|
virtual int ISP2P_GetReviewLightControlCount() = 0; // Review Light Control vector
|
virtual int ISP2P_GetAlignLightControlCount() = 0; // Align Light Control vector
|
virtual int ISP2P_GetRevolverControlCount() = 0; // Revolver Control vector
|
virtual int ISP2P_GetAFMControlCount() = 0; // AFM Control vector
|
virtual int ISP2P_GetWSIControlCount() = 0; // WSI Control vector
|
virtual int ISP2P_GetReviewCameraControlCount() = 0; // Review Camera control vector
|
virtual int ISP2P_GetMotorCalibratorCount() = 0; // motor calibrator
|
virtual CLightControl* ISP2P_GetReviewLightControl(int nIndex) = 0; // Review Light Control vector
|
virtual CLightControl* ISP2P_GetAlignLightControl(int nIndex) = 0; // Align Light Control vector
|
virtual CLensChangeControl* ISP2P_GetRevolverControl(int nIndex) = 0; // Revolver Control vector
|
virtual CAfmControl* ISP2P_GetAFMControl(int nIndex) = 0; // AFM Control vector
|
virtual CWsiControl* ISP2P_GetWSIControl(int nIndex) = 0; // WSI Control vector
|
virtual CCameraControlReview* ISP2P_GetReviewCameraControl(int nIndex) = 0; // Review Camera control vector
|
virtual CMotorCalibrator* ISP2P_GetMotorCalibrator(int nIndex) = 0; // motor calibrator
|
virtual CVcrControl* ISP2P_GetVcrControl(int nIndex) = 0; // Vcr Control vector
|
virtual void ISP2P_GlassPositionUpdate() = 0; // Glass Position Update
|
|
// single variable
|
virtual CGlassResult* ISP2P_GetNewGlassResult(int& nGlassResultCount) = 0; // new glass result
|
virtual CGlassResult* ISP2P_GetGlassResult(int nIndex) = 0; // get glass result
|
virtual CGlassResult* ISP2P_GetCurrentGlassResult() = 0; // get current glass result
|
virtual STransferData* ISP2P_GetCurrentTransferData() = 0; // get current transfer data
|
|
virtual CGlassResult* ISP2P_GetNewHistoryResult(int& nHistoryResultCount) = 0; // new glass result
|
virtual CGlassResult* ISP2P_GetHistoryResult(int nIndex) = 0; // get glass result
|
|
virtual SDefectFilter* ISP2P_GetDefectFilter() = 0; // Defect Filter
|
virtual SSignalIOStatus* ISP2P_GetPCControlIOSignal() = 0; // PCControl IO Signal
|
virtual CSharedImageData* ISP2P_GetSharedImageData() = 0; // shared image data
|
virtual CConnectionStatus* ISP2P_GetConnectionStatus() = 0; // Connection Status
|
virtual SThetaMotorInfo* ISP2P_GetThetaMotorInfo() = 0; // Theta motor info
|
|
// multi variable
|
virtual int ISP2P_GetModuleStatusCount(int nModuleType=0) = 0; // Review Module Status Vector
|
virtual CModuleStatus* ISP2P_GetModuleStatus(int nIndex) = 0; // Review Module Status Vector
|
virtual CModuleStatus* ISP2P_GetSelectedModuleStatus() = 0; // Review Module Status Vector
|
virtual BOOL ISP2P_Motor_CameraGo(int nModuleIndex, double dPosX, double dPosY, int nMoveAxis, BOOL bAutoSelectCamera=FALSE, BOOL bGoEnd=FALSE)=0;
|
|
virtual CRecipeManager* ISP2P_GetEdgeRecipeManager() = 0;
|
|
// Read AOI Memory
|
virtual BOOL ISP2P_ReadAOIResultMemory() = 0;
|
virtual BOOL ISP2P_ReadAOIResultMemory2(CGlassResult* pGlassResult) = 0;
|
|
// AOI Raw file
|
virtual BOOL ISP2P_ReadAOIRawFileToGlassResult(const CString& strRawPath) = 0;
|
virtual BOOL ISP2P_WriteGlassResultToAOIRawFile(CGlassResult* pGlassResult, const CString& strResultFilePath, int nStackType) = 0;
|
virtual BOOL ISP2P_SetReviewResultData(CGlassResult *pGlassResult) = 0;
|
virtual BOOL ISP2P_SetUserResultData(CGlassResult *pGlassResult) = 0;
|
virtual BOOL ISP2P_SetMeasureResultData(CGlassResult *pGlassResult) = 0; //Add by Juneki 2016-03-01
|
virtual BOOL ISP2P_SetReflowResultData(CGlassResult *pGlassResult);
|
virtual BOOL ISP2P_SetWsiReflowResultData(CGlassResult *pGlassResult) = 0;
|
virtual BOOL ISP2P_CreateRawDataFormat(int* pnCnt) = 0; //Add by Juneki 2016-03-01
|
virtual BOOL ISP2P_WriteGlassResultToMeasureRawFile(const CString& strResultFilePath) = 0;//Add by Juneki 2016-03-01
|
|
// Review Defect Map
|
virtual BOOL ISP2P_SaveDefectMap(const CString strPath) = 0;
|
|
// recipe
|
virtual void ISP2P_UpdateAlignResult(int nResultCode, const SAlignResult* pAlignResult) = 0;
|
|
// Observer interface
|
virtual void ISP2P_UpdateReviewProcessStatus(int nReviewStatus, int nPlanIndex=0) = 0;
|
virtual void ISP2P_UpdateDefectFilter(const SDefectFilter* pDefectFilter) = 0; // Map Option
|
virtual void ISP2P_UpdateReviewResult(int nModuleIndex, const CGlassResult* pGlassResult) = 0; // Review Result
|
virtual void ISP2P_UpdateProcessStatus(int nProcessStatus, const CGlassResult* pGlassResult) = 0; // Process Status
|
virtual void ISP2P_UpdateCameraControl(int nModuleIndex, const SCameraControl *pCameraControl, const SCameraInfo* pCameraInfo) = 0; // camera status
|
virtual void ISP2P_UpdateMotorPosition(int nModuleIndex, BOOL bSelected, const SMotorPosition *pMotorPosition) = 0; // motor position
|
virtual void ISP2P_UpdateMotorStatus(int nModuleIndex, const SMotorStatus *pMotorStatus) = 0; // motor status
|
virtual void ISP2P_UpdatePCControlIOSignal(const SSignalIOStatus *pSignalIOStatus) = 0; // PCControl IO signal
|
virtual void ISP2P_UpdateConnectionStatus(const CConnectionStatus* pConnectionStatus) = 0; // connection status
|
virtual void ISP2P_UpdateAlignResultStatus(int nModuleIndex, const CGlassResult* pGlassResult) = 0;
|
virtual void ISP2P_GetDiagnosisHistory() = 0;
|
virtual void ISP2P_GetDiagnosisHistory2() = 0;
|
// Align Result
|
|
virtual CDiagnosisManager* ISP2P_GetDiagnosisManager() = 0;
|
virtual CDlgSelfDiagnosis* ISP2P_GetDlgDiagnosis() = 0;
|
virtual CDlgReviewHistoryTool* ISP2P_GetDlgHistory() = 0;
|
|
virtual BOOL ISP2P_GetFirstReviewLeft() = 0;
|
virtual BOOL ISP2P_GetFirstReviewRight() = 0;
|
virtual void ISP2P_SetFirstReviewLeft(BOOL b_Check) = 0;
|
virtual void ISP2P_SetFirstReviewRight(BOOL b_Check) = 0;
|
|
|
|
virtual BOOL GetOffSetValue(int nModule, int nCam, int nScan, double dGlassXPos, double &dXpos, double &dYpos) = 0;
|
|
public:
|
virtual BOOL ISP2P_MakeDirectory(CString strPath) {return TRUE;};
|
virtual int ISP2P_CopyFolder( TCHAR* strSrc, TCHAR* strDest, bool bSubDir ) {return TRUE;};
|
};
|
|
class CSequenceProcessData : public CWorkThreadData
|
{
|
public:
|
CSequenceProcessData(PVOID pPtr) : CWorkThreadData(pPtr)
|
{
|
nProcessStatus = -1;
|
}
|
|
virtual ~CSequenceProcessData()
|
{
|
nProcessStatus = -1;
|
}
|
int nProcessStatus;
|
};
|
|
class CSequenceProcessor : public CWorkThreadPools,
|
public IUpdateReviewProcessStatus
|
{
|
public:
|
CSequenceProcessor(void);
|
virtual ~CSequenceProcessor(void);
|
|
virtual void RecvWSIResult(int nModuleIndex, const SWsiResult& measureResut) = 0;
|
virtual void RecvWSIUserResult(int nModuleIndex, const SWsiResult& measureResut) = 0;
|
virtual void RecvWSIReflowResult(int nModuleIndex, const SWsiResult& measureResut) = 0;
|
virtual void RecvWSIMultiShotResult(int nModuleIndex, const SWsiResult& measureResut) = 0;
|
virtual void RecvAlignResult(const CAlignResult* pCurAlignResult) = 0;
|
|
virtual BOOL RecvSignalToSignalControl(int nSignalIndex, int nSignalValue, BOOL bSignalOn=TRUE) = 0;
|
virtual BOOL SendSignalToSignalControl(int nSignalIndex, int nSignalValue) = 0;
|
virtual BOOL SendSignalToSignalControl(int nSignalIndex, int nSignalValue,int nSignalOnTime)=0;
|
virtual BOOL SendSignalOffToSignalControl(int nSignalIndex, int nSignalValue) = 0;
|
|
virtual BOOL SendSignalReviewAlive(long alive);
|
|
//#3358 KYH FDC 데이터 전송 시점 개선 ADD START
|
virtual void MakeDVData2() = 0;
|
//#3358 KYH FDC 데이터 전송 시점 개선 ADD END
|
|
virtual BOOL CalculateReviewPathPlan(CDefectPicker* pDefectPicker, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateReviewPathPlan(CDefectPicker* pDefectPicker, CGlassResult *pGlassResult, int nPlanIdx) {return TRUE; }
|
virtual BOOL CalculateUserPathPlan(CPrioritySorter* pPrioritySorter, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateWsiPathPlan(CDefectPicker* pDefectPicker, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateReflowPathPlan(CPrioritySorter* pPrioritySorter, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateWsiReflowPathPlan(CPrioritySorter* pPrioritySorter, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateWsiUserPathPlan(CPrioritySorter* pPrioritySorter, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateWsiMultiShotPathPlan(CDefectPicker* pDefectPicker, CGlassResult *pGlassResult) {return TRUE;}
|
virtual BOOL CalculateMeasurePathPlan(CPrioritySorter* pPrioritySorter, CGlassResult *pGlassResult) {return TRUE;}
|
|
virtual BOOL ReviewStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL UserStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL MeasureStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL WsiStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL ReflowStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL WsiReflowStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL WsiUserStartProcessing(CGlassResult *pGlassResult, int nPlanIndex=0) {return TRUE;}
|
virtual BOOL WsiMultiShotStartProcessing(CGlassResult *pGlassResult, int nPlanIndex = 0) { return TRUE; }
|
|
// [2017:4:13]-[WEZASW] : CIM Signal.
|
virtual BOOL RecvCIMSignalToSignalControl(int nAddrIndex, int nSignalIndex) = 0;
|
virtual BOOL SendCIMSignalToSignalControl(int nAddrIndex, int nSignalIndex) = 0;
|
|
virtual BOOL CIM_SendRecipeCreate(int nPPID) = 0;
|
virtual BOOL CIM_SendRecipeDelete(int nPPID) = 0;
|
virtual BOOL CIM_SendRecipeChange(int nPPID) = 0;
|
virtual BOOL CIM_SendRecipeModify(int nPPID) = 0;
|
|
virtual int SendReviewPositionToMotorControl(CGlassResult *pGlassResult) = 0;
|
virtual int SendUserPositionToMotorControl(CGlassResult *pGlassResult) = 0;
|
virtual int SendReflowPositionToMotorControl(CGlassResult *pGlassResult) = 0;
|
virtual void CompletePlanIndex(int nReviewStatus, int nPlanIndex) = 0;
|
|
//[2017:5:2]-[WEZASW] : TFE Measurement 설비 UNIT Test(Signal 수동 발생)를 위한 추가 (TEST)
|
virtual BOOL CIM_SendAlignAlarmSignal(int nPPID) = 0;
|
virtual BOOL CIM_SendNoPPIDSignal(int nPPID) = 0;
|
|
BOOL PCControl_SendAFMAlarmSignal();
|
protected:
|
virtual void WorkThreadProcess(PVOID pParameter) = 0;
|
|
virtual BOOL SetProcessStatus(int nStatus);
|
virtual void UpdateReviewProcessStatus(int nReviewStatus, int nPlanIndex=0);
|
virtual void SortingFindAOIRawFile(VectorSRawFile& vectorSRowFile, int nSortingType);
|
|
public:
|
// setter
|
void SetSP2P(ISequenceProcessor2Parent* pSP2P);
|
void SetLineMachineType(int nLineType, int nMachineType, CString strEqpID);
|
void SetDefaultValue();
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD START
|
void SetSimulationMode(BOOL bCheck) { m_bSimulationMode = bCheck; };
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD END
|
|
// getter
|
int GetProcessMode() const;
|
int GetProcessStatus() const;
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD START
|
BOOL GetSimulationMode() { return m_bSimulationMode; };
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD END
|
|
static int GetDirectionX(int nGlassDirection, int nMotorDirection);
|
static int GetDirectionY(int nGlassDirection, int nMotorDirection);
|
static void DeleteDirectoryInsideFile(const CString& strPath);
|
|
// 190208 SJB, CalculatePlanData
|
int CalculatePlanData(CGlassResult* pGlassResult);
|
|
int GetRealMagnification(int nModuleIdx, int nRcpMagnification);
|
|
// WSI Signal
|
BOOL WSIAllReadySignal(int nAFMHome=1);
|
BOOL WSIAllStartSignal();
|
BOOL WSIUserAllStartSignal();
|
BOOL WSIReflowAllStartSignal();
|
BOOL WSIMultiShotAllStartSignal();
|
|
// AFM Signal
|
BOOL MoveAFMHomePosition();
|
BOOL MoveAFMReferencePosition();
|
|
// Review, WSI Stop Siganl
|
BOOL SetMotionStop();
|
// Align Camera Control command
|
BOOL AlignCamera_CameraControl(int nControlCmd);
|
|
protected:
|
// common
|
BOOL SetProcessMode(int nMode);
|
|
void CalibrateMotorPos(int nModuleIdx, double &dPosX, double &dPosY);
|
void ApplyMotorOffset(int nModuleIdx, int nMagIdx, int nOffsetType, double &dPosX, double &dPosY);
|
|
// PCControl Control command
|
BOOL Signal_SendSignal(int nSignalIndex);
|
BOOL PCControl_ReadTransferData(STransferData* pTransferData);
|
|
// Review Camera Control Command
|
void ReviewCamera_CameraControl(int nControlCmd);
|
BOOL ReviewCamera_CameraControl(int nModuleIndex, int nControlCmd);
|
int ReviewCamera_GetReviewCameraControlCount() const;
|
CCameraControlReview* ReviewCamera_GetReviewCameraControl(int nModuleIndex);
|
|
// Align Network Command
|
void AlignNetwork_SendAlignResult(const CGlassResult* pGlassResult);
|
|
// Review Light Control command
|
BOOL ReviewLight_SetLightStatus(int nModuleIndex, int nValue);
|
BOOL ReviewLight_SetLightLevel(int nModuleIndex, int nValue);
|
BOOL ReviewLight_GetLightStatus(int nModuleIndex, int& nValue);
|
BOOL ReviewLight_GetLightLevel(int nModuleIndex, int& nValue);
|
|
// Align Light Control command
|
BOOL AlignLight_SetLightStatus(int nCameraIndex, int nValue);
|
BOOL AlignLight_SetLightLevel(int nCameraIndex, int nValue);
|
BOOL AlignLight_GetLightStatus(int nCameraIndex, int& nValue);
|
BOOL AlignLight_GetLightLevel(int nCameraIndex, int& nValue);
|
|
// Revolver Control Command
|
BOOL Revolver_SetRevolverLevel(int nModuleIndex, int nValue);
|
BOOL Revolver_GetRevolverLevel(int nModuleIndex, int& nValue);
|
BOOL Revolver_SetGoHome(int nModuleIndex);
|
// AFM Control Command
|
BOOL AFM_SetAFMRecipeIndex(int nRecipeIndex, int nValue);
|
BOOL AFM_SetAFMRecipeName(const CString& strRecipeName, int nValue);
|
BOOL AFM_SetAFMZoomLevel(int nValue);
|
BOOL AFM_SetAFMTracking(BOOL bValue);
|
BOOL AFM_SetAFMJogCommand(int nCmd);
|
BOOL AFM_SetAFMJogSpeed(double dSpeed);
|
|
BOOL AFM_SetAFMRecipeIndex(int nModuleIndex, int nRecipeIndex, int nValue);
|
BOOL AFM_GetAFMRecipeIndex(int nModuleIndex, int& nRecipeIndex, int& nValue);
|
BOOL AFM_SetAFMRecipeName(int nModuleIndex, const CString& strRecipeName, int nValue);
|
BOOL AFM_GetAFMRecipeName(int nModuleIndex, CString& strRecipeName, int& nValue);
|
|
BOOL AFM_SetAFMZoomLevel(int nModuleIndex, int nValue);
|
BOOL AFM_GetAFMZoomLevel(int nModuleIndex, int& nValue);
|
BOOL AFM_SetAFMTracking(int nModuleIndex, BOOL bValue);
|
BOOL AFM_GetAFMTracking(int nModuleIndex, BOOL& bValue);
|
BOOL AFM_SetAFMJogCommand(int nModuleIndex,int nCmd);
|
BOOL AFM_SetAFMJogSpeed(int nModuleIndex,double dSpeed);
|
|
|
// WSI Control Command
|
BOOL WSI_SetWSIEnd();
|
BOOL WSI_SetWSITimeOver();
|
BOOL WSI_SetWSIEnd(int nModuleIndex);
|
BOOL WSI_SetWSITimeOver(int nModuleIndex);
|
|
|
public:
|
// [2016:11:20]-[WEZASW] : WSI Manual 기능
|
BOOL WSI_WSIManualReady();
|
BOOL WSI_WSIManualStart(int nDefectPosX, int nDefectPosY, int nDefectgPosX, int nDefectgPosY);
|
|
virtual void TestStartWsi(){return;};
|
|
virtual BOOL WSIReadyProcess(int nMessageResult) {return FALSE;};
|
virtual BOOL CheckWSIReady(){return FALSE;};
|
virtual BOOL WSIStartProcess(int nMessageResult) {return FALSE;};
|
virtual BOOL CheckWSIStart(){return FALSE;};
|
|
// 190201 SJB, 꼭 필요한 기능들만 SequenceProcessor 내부에 정리
|
public:
|
BOOL ReadAOIMemory(CGlassResult *pGlassResult);
|
BOOL ReadAOIMemory2(CGlassResult *pGlassResult);
|
int FirstReviewPlanStart();
|
|
int GetTotalWsiCount() { return m_nWsiTotalCount; }
|
protected:
|
// getter module status
|
int Module_GetModuleStatusCount(int nModuleType=0) const;
|
CModuleStatus* Module_GetModuleStatus(int nModuleIdx);
|
SCameraControl* Module_GetCameraControl(int nModuleIdx);
|
SMotorPosition* Module_GetMotorPosition(int nModuleIdx);
|
SMotorStatus* Module_GetMotorStatus(int nModuleIdx);
|
SAxisIndex* Module_GetAxisIndex(int nModuleIdx);
|
SCoordInfo* Module_GetCoordInfo(int nModuleIdx);
|
SCameraInfo* Module_GetCurrentCameraInfo(int nModuleIdx);
|
SCameraInfo* Module_GetCameraInfo(int nModuleIdx, int nZoomIdx);
|
|
// range schedule
|
void GetRangeName(int nRangeIdx, SRangePoint* pRange);
|
void GetRangeSize(int nRangeIdx, SRangePoint* pRange);
|
void GetRangeStartEnd(CRcpSchedulingInfo* pScheduleInfo);
|
|
|
|
public :
|
//WSI END 체크를 위한 함수 190725 chm
|
int GetCheckWSIEnd(){return m_nCheckWSIEnd;}; // wsi end 여부
|
void SetCheckWSIEnd(int nCheck){ m_nCheckWSIEnd=nCheck;}; //wsi end 여부
|
int GetWsiType(){return m_nWsiTyep;};
|
void SetWsiType(int i){ m_nWsiTyep=i;};
|
void SendWsiErrorAlarm();
|
void SendWsiAlive();
|
void WSIAliveCheckRunThread();
|
virtual void WSIAliveCheckRunThread_CPJT() =0;
|
virtual void SendWsiErrorAlarm_CPJT(int Index) = 0;
|
virtual void SendWsiAlive_CPJT() = 0;
|
int ChangeWsiReflowPointIndex_P( int nIdx );
|
|
virtual void SetStartTickCount(DWORD dwTick) = 0;
|
virtual void SetEndTickCount(DWORD dwTick) = 0;
|
virtual DWORD GetStartTickCount() = 0;
|
virtual DWORD GetEndTickCount() = 0;
|
|
protected:
|
int m_nCheckWSIEnd;
|
int m_nWsiTyep;
|
|
// thread
|
CRITICAL_SECTION m_csProcessStatus;
|
ISequenceProcessor2Parent* m_pSP2P;
|
|
// process info
|
int m_nProcessMode;
|
int m_nProcessStatus;
|
int m_nPreProcessStatus;
|
|
// review process status
|
int m_nReviewProcessStatus;
|
int m_nReviewPlanIndex;
|
CProcessTimer m_ProcessTimer;
|
|
// WSI process status
|
BOOL m_bWSI_ALIVE;
|
BOOL m_bWSI_AFM_SAFE_POS;
|
|
// add new
|
BOOL m_bChangeSysConfig;
|
int m_nLineType;
|
int m_nMachineType;
|
CString m_strEqpID;
|
|
long m_nAFMDelay;
|
long m_nSNAPDelay;
|
long m_nWSIDelay;
|
|
BOOL m_bLongRunMode;
|
BOOL m_bLongRunStop;
|
int m_nLongRunCount;
|
|
int m_nAlive;
|
CTime m_wsiReadyTime;
|
CTime m_wsiStartTime;
|
|
int m_nWsiTotalCount;
|
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD START
|
BOOL m_bSimulationMode;
|
//#3584 210817 LYW CF AOI Review 시뮬레이션 기능 정상화 ADD END
|
};
|