You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

641 lines
27 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include "StdAfx.h"
#include "WorkCmdExcuteAction.h"
#include "GlobalFunction.h"
#include "ProgramLaserTuiHuo.h"
#include "CommonFlowMgr.h"
#include "MotionCtrl.h"
#include "LaserDevice.h"
#include "TransferArmMgr.h"
#include "WarningMgr.h"
#include "ModuleDeviceMgr.h"
#include "PlcCommunicationMgr.h"
#include "DistanceMeterMgr.h"
#include "LaserBeamMeterMgr.h"
#include "AnnealMonitoringMgr.h"
#include "AlignerDyhMgr.h"
#include "ThorlabsRotatoMotorCtrlMgr.h"
#include "RecipeMgr.h"
#include "MotionCtrl.h"
#include "IO_CtrlMgr.h"
#include "LaserDevice.h"
#include "FoupLoadPortMgr.h"
#include "MachineGateMgr.h"
#include "DeviceStateMgr.h"
#include "ExceptionMsg.h"
#include "DistanceMeterMgr.h"
#include "EncryptionMgr.h"
#include "Laser.h"
#include "CommonFlowMgr.h"
#include "WorkCmdInvoker.h"
#include "TekOscilloscopeMgr.h"
#include "SemiSecsCommMgr.h"
#include "LaserBeamMeterMgr.h"
#include "CStringFuc.h"
#include "ThorlabsKCubeMotorCtrlMgr.h"
#include "WaferRecipeDataMgr.h"
CWorkCmdExcuteAction::CWorkCmdExcuteAction()
{
m_ExcuteActionPar.m_pBindingPar = NULL;
}
CWorkCmdExcuteAction::~CWorkCmdExcuteAction(void)
{
}
void CWorkCmdExcuteAction::WirteLog()
{
}
void CWorkCmdExcuteAction::BindingPar(void *p)
{
m_ExcuteActionPar.m_pBindingPar = p;
};
void CWorkCmdExcuteAction::SetExcuteActionPar(CExcuteActionPar ActionPar)
{
m_ExcuteActionPar = ActionPar;
SetAfterDelay(ActionPar.m_AfterActionDelay);
UseSleepDelay();//ʹÓÃsleep ÑÓʱ
}
CString CWorkCmdExcuteAction::GetWorkCmdInfoStr()
{
CWafer *pWafer = (CWafer *)m_ExcuteActionPar.m_pBindingPar;
CString InfoStr;
switch (m_ExcuteActionPar.m_ExcuteAction)
{
case _ExcuteAction_WaferTransfer_ResetWaferPosState:
InfoStr = "Reset Wafer Pos State";
break;
case _ExcuteAction_RotatoDimmer_Home:
InfoStr = "RotatoDimmer_Home";
break;
case _ExcuteAction_RotatoDimmer_ToAngle:
InfoStr = "RotatoDimmer_ToAngle";
break;
case _ExcuteAction_TekOscilloscopeInit:
InfoStr = "TekOscilloscopeInit";
break;
default:
break;
}
if(!pWafer)
return InfoStr;
switch(m_ExcuteActionPar.m_ExcuteAction)
{
case _ExcuteAction_WaferTransfer_CassetteToArm1Pos://´«ËÍwafer ÁϺÐ--->Arm
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_CassetteToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm1PosToAligner://Arm--->×¼Ö±Æ÷
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_Arm1PosToAligner,*pWafer);
break;
case _ExcuteAction_WaferTransfer_AlignerToArm1Pos:
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_AlignerToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_AlignerToArm2Pos://´«ËÍwafer ×¼Ö±Æ÷--->arm LoadλÖÃ
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_AlignerToArm2Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm2PosToAligner:
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_Arm2PosToAligner,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm2PosToPlatPChuck://arm LoadλÖÃ--->ÔØÅÌ
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_Arm2PosToPlatPChuck,*pWafer);
break;
case _ExcuteAction_WaferTransfer_TriggerAnnealProccess://´¥·¢ÍË»ðÁ÷³Ì
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_TriggerAnnealProccess,*pWafer);
break;
case _ExcuteAction_WaferTransfer_PlatToArm1Pos://ÔØÅÌ--->arm UnloadλÖÃ
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_PlatPChuckToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_PlatToArm2Pos:
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_PlatPChuckToArm2Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm1PosToCassette://arm1--->ÁϺÐ
InfoStr = gTransferArmMgr->GetTransferExcuteTypeStr(_TransferExcute_Arm1PosToCassette,*pWafer);
break;
default:
break;
}
return InfoStr;
}
//ÔËÐÐʱ°ó¶¨ÏÂÒ»¸öpjobµÄµÚһƬwafer
void CWorkCmdExcuteAction::BindingNextPjobFirstWafer(void *pWafer)
{
if(m_bTransNextJobWaferCmd)//ÐèÒªÊDZêʶµÄcmd
{
BindingPar(pWafer);
}
}
//»ñÈ¡Òƶ¯Wafer µÄÖ¸Áî
ExcuteAction CWorkCmdExcuteAction::GetExcuteActionByMoveWaferPos(EWaferPosType MoveFromPos,EWaferPosType MoveToPos)
{
bool bMoveFromPort = (MoveFromPos == _WaferPos_Port1)||(MoveFromPos == _WaferPos_Port2);
bool bMoveToPort = (MoveToPos == _WaferPos_Port1)||(MoveToPos == _WaferPos_Port2);
ExcuteAction Action = _ExcuteAction_Null;
if(bMoveFromPort && MoveToPos == _WaferPos_Arm1)
Action = _ExcuteAction_WaferTransfer_CassetteToArm1Pos;
if(MoveFromPos == _WaferPos_Arm1 && MoveToPos == _WaferPos_Aligner)
Action = _ExcuteAction_WaferTransfer_Arm1PosToAligner;
if(MoveFromPos == _WaferPos_Aligner && MoveToPos == _WaferPos_Arm1)
Action = _ExcuteAction_WaferTransfer_AlignerToArm1Pos;
if(MoveFromPos == _WaferPos_Aligner && MoveToPos == _WaferPos_Arm2)
Action = _ExcuteAction_WaferTransfer_AlignerToArm2Pos;
if(MoveFromPos == _WaferPos_Arm2 && MoveToPos == _WaferPos_Aligner)
Action = _ExcuteAction_WaferTransfer_Arm2PosToAligner;
if(MoveFromPos == _WaferPos_Arm2 && MoveToPos == _WaferPos_PlatePChuck)
Action = _ExcuteAction_WaferTransfer_Arm2PosToPlatPChuck;
if(MoveFromPos == _WaferPos_PlatePChuck && MoveToPos == _WaferPos_Arm1)
Action = _ExcuteAction_WaferTransfer_PlatToArm1Pos;
if(MoveFromPos == _WaferPos_PlatePChuck && MoveToPos == _WaferPos_Arm2)
Action = _ExcuteAction_WaferTransfer_PlatToArm2Pos;
if(MoveFromPos == _WaferPos_Arm1 && bMoveToPort)
Action = _ExcuteAction_WaferTransfer_Arm1PosToCassette;
return Action;
}
//Ö¸ÁîÖ´Ðйý³ÌµÄ¼ì²âÏîÄ¿
void CWorkCmdExcuteAction::ExcuteFlowCheck(vector<eFlowCheckType> FlowCheckVec)
{
if(gEncryptionMgr->IsbRunAtNoteBook())
return;
int size = FlowCheckVec.size();
for(int k=0;k<size;k++)
{
ExcuteFlowCheckExt(FlowCheckVec[k]);
}
}
void CWorkCmdExcuteAction::ExcuteFlowCheckExt(eFlowCheckType FlowCheckType)
{
CString Msg;
switch(FlowCheckType)
{
case _FlowCheck_XYZ_Init:
if(!gDeviceStateMgr->IsDeviceInitialize())
Msg = "Device Is Not Initialize";
break;
case _FlowCheck_Laser1LDD:
if(!gLaserDevice->CheckMainLaserLDD(_LaserDeviceType_MainLaser1))
Msg = "Laser LDD1 Not Open";
break;
case _FlowCheck_Laser2LDD:
if(!gLaserDevice->CheckMainLaserLDD(_LaserDeviceType_MainLaser2))
Msg = "Laser LDD2 Not Open";
break;
case _FlowCheck_LaserMasterMode:
if(!gLaserDevice->CheckLaserMasterMode())
Msg = "Laser Master Mode Not Open";
break;
case _FlowCheck_PlatWaferOn:
if(!gTransferArmMgr->CheckPlatWaferVC())
Msg = "Stage Wafer Vacuum Check Failed";
break;
case _FlowCheck_PlatThimbleOff:
if(!gTransferArmMgr->CheckPlatThimbleState(false))
Msg = "Stage Thimble Signal Off Check Failed";
break;
case _FlowCheck_LoadPosSignal:
gIO_CtrlMgr->CheckIOItemState(_IO_R_Plat_LoadPosSignal,true);
break;
case _FlowCheck_Plat_N2_Alarm:
//gIO_CtrlMgr->CheckIOItemState(_IO_R_Plat_CDA_Signal,true);
break;
case _FlowCheck_XY_LoadPos:
{
Dbxy PlatformCoord = gMotionCtrl->GetCurCmdCoordXY();
ECurPlatXyPos CurPlatXyPos = gPlatSpecialPosMgr->GetCurPlatXyPos(PlatformCoord);
if((CurPlatXyPos!=_PlatXyPos_ProductUnload))
Msg = "Stage not at product unload position";
}
break;
case _FlowCheck_RobotAlarm:
{
if(gDeviceStateMgr->QueryUsedFunc(_EUsedFunc_WaferTransferArm))
{
gTransferArmMgr->CheckRobotState();
}
}
break;
case _FlowCheck_MotorZ_Coord:
{
gMotionCtrl->CheckMotorZCoord();
}
break;
default:
break;
}
if(Msg!="")
{
CExceptionMsg ExceptionMsg;
ExceptionMsg.SetMsg(Msg);
throw ExceptionMsg;
}
}
bool CWorkCmdExcuteAction::Excute()
{
CWafer *pWafer = (CWafer *)m_ExcuteActionPar.m_pBindingPar;//wafer ÊÇ´æÔÚport ÖеÄûÎÊÌâ
if(m_bTransNextJobWaferCmd && pWafer == NULL)
return true;
CPowCheckPt *pCheckPt = NULL;
bool Ret = true;
switch(m_ExcuteActionPar.m_ExcuteAction)
{
case _ExcuteAction_XyMoveTestSavePt:
gCommonFlowMgr->XYMoveSaveCoord();
break;
case _ExcuteAction_LaserPowSavePt:
{
pCheckPt = (CPowCheckPt *)m_ExcuteActionPar.m_pBindingPar;
gLaserPowCheckMgr->LaserPowSavePt(pCheckPt,m_ExcuteActionPar.m_BoolParVal);
}
break;
case _ExcuteAction_UpdatePowCheckDataList:
gLaserPowCheckMgr->UpdatePowCheckDataList();
break;
case _ExcuteAction_StopMachineGateCtrl:
gMotionCtrl->StopMachineGateCtrlBuf();
break;
case _ExcuteAction_AsixXYMultiPointMove:
{
//µ±Ç°µÄwafer sub histroyĿ¼
CString CurSubRcpDataPath = gAnnealMonitoringMgr->GetCurSubRcpDataPath(*pWafer);
bool LaserBufCtrl = m_ExcuteActionPar.m_BoolParVal;//ÊÇ·ñ¿ØÖƼ¤¹â
gAnnealMonitoringMgr->SetbNeedGateCheck(LaserBufCtrl);//¿ØÖƼ¤¹âʱÐèÒª¼ì²é¹âÕ¢
//ÍË»ðÆô¶¯µÄʱºòÔÙÉèÖõ±Ç°µÄɨÃè¼ä¸ô
gWaferRecipeDataMgr->SetCurUseScanLineGap(pWafer->m_ScanLineGapY);//ÉèÖÃÓÃÓÚÏÔʾµÄ¼ä¸ô
int LastScanLineIdx = gMotionCtrl->AsixXYMultiPointMove(LaserBufCtrl,CurSubRcpDataPath);
if(LastScanLineIdx>0)
{
gAnnealMonitoringMgr->CreatPartialJobRecipe(*pWafer,LastScanLineIdx);
}
}
break;
case _ExcuteAction_ClearWarning://Çå³ý±¨¾¯
gWarningMgr->ClearAllWarningState();
break;
case _ExcuteAction_CheckWarningMsg://¼ì²é±¨¾¯ÐÅÏ¢
{
//±¨¾¯µÄʱºòÍ£Ö¹×Ô¶¯×´Ì¬
if(gWarningMgr->HasWarningMsg(_WarningType_StopJobFlow))
{
gCommonFlowMgr->PauseAutomationWorkFlow();
CString s("±¨¾¯×´Ì¬Î´Çå³ý!");
CExceptionMsg Msg;
Msg.SetMsg(s);
throw Msg;
}
}
break;
case _ExcuteAction_ModuleInit://һЩģ¿é³õʼ»¯
gModuleDeviceMgr.OnDeviceInit();
break;
case _ExcuteAction_CheckOxygen://¼ì²âÑõÆøŨ¶È
break;
case _ExcuteAction_SaveDismeterVal://¼Ç¼²â¾àÒǵĶÁÊý
gDistanceMeterMgr->SaveCurPlanenessPar(m_ParPt1);
break;
case _ExcuteAction_CheckRecipeEdiOnAnnealStart://¼ì²é¼¤¹â¹¦ÂÊÃܶÈÊÇ·ñÂú×ãrecipe µÄÌõ¼þ(ÍË»ð¿ªÊ¼Ç°)
gAnnealMonitoringMgr->CheckRecipeEdiOnAnnealStart(*pWafer);
break;
case _ExcuteAction_StartMonitoringOnAnnealProcess:
gAnnealMonitoringMgr->StartMonitoringOnAnnealProcess(*pWafer);
break;
case _ExcuteAction_StopMonitoringOnAnnealProcess:
gAnnealMonitoringMgr->StopMonitoringOnAnnealProcess(*pWafer);
break;
case _ExcuteAction_WaferTransfer_CassetteToArm1Pos://´«ËÍwafer ÁϺÐ--->Arm
gTransferArmMgr->TransferExcute(_TransferExcute_CassetteToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm1PosToAligner://Arm--->×¼Ö±Æ÷
gTransferArmMgr->SetbLoadOrUnload(m_ExcuteActionPar.m_BoolParVal);//µ±Ç°ÊÇload »¹ÊÇunload
gTransferArmMgr->TransferExcute(_TransferExcute_Arm1PosToAligner,*pWafer);
break;
case _ExcuteAction_WaferTransfer_AlignerToArm1Pos:
gTransferArmMgr->TransferExcute(_TransferExcute_AlignerToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_AlignerToArm2Pos://´«ËÍwafer ×¼Ö±Æ÷--->arm LoadλÖÃ
gTransferArmMgr->TransferExcute(_TransferExcute_AlignerToArm2Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm2PosToAligner:
gTransferArmMgr->TransferExcute(_TransferExcute_Arm2PosToAligner,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm2PosToPlatPChuck://arm LoadλÖÃ--->ÔØÅÌ
gTransferArmMgr->TransferExcute(_TransferExcute_Arm2PosToPlatPChuck,*pWafer);
break;
case _ExcuteAction_WaferTransfer_TriggerAnnealProccess://´¥·¢ÍË»ðÁ÷³Ì
pWafer->m_pTriggerAnnealCmd = this;//´¥·¢wafer annealµÄÖ¸Õë(ÓÃÓÚPAUSEºóSTART)
gTransferArmMgr->TransferExcute(_TransferExcute_TriggerAnnealProccess,*pWafer);
break;
case _ExcuteAction_WaferTransfer_WaitAnnealProccess://µÈ´ýÍË»ðÁ÷³Ì½áÊø
gTransferArmMgr->TransferExcute(_TransferExcute_WaitAnnealProccess,*pWafer);
break;
case _ExcuteAction_WaferTransfer_PlatToArm1Pos://ÔØÅÌ--->arm UnloadλÖÃ
gTransferArmMgr->TransferExcute(_TransferExcute_PlatPChuckToArm1Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_PlatToArm2Pos:
gTransferArmMgr->TransferExcute(_TransferExcute_PlatPChuckToArm2Pos,*pWafer);
break;
case _ExcuteAction_WaferTransfer_Arm1PosToCassette://arm1--->ÁϺÐ
gTransferArmMgr->TransferExcute(_TransferExcute_Arm1PosToCassette,*pWafer);
break;
case _ExcuteAction_WaferTransfer_ResetWaferPosState:
gTransferArmMgr->ResetAllWaferPosState();
break;
case _ExcuteAction_WaferTransfer_Robot_ORG:
gTransferArmMgr->RobotOrg();
break;
case _ExcuteAction_WaferTransfer_Robot_SEVON:
gTransferArmMgr->RobotSevon();
break;
case _ExcuteAction_WaferTransfer_Robot_Reset:
gTransferArmMgr->RobotReset();
break;
//×¼Ö±Æ÷Ïà¹ØÖ¸Áî(µ¥²½Ö¸Áî)
case _ExcuteAction_Aligner_SetPar:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_SetPar);
break;
case _ExcuteAction_Aligner_ClearAlarm:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_ClearAlarm);
break;
case _ExcuteAction_Aligner_Org:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_Org);
break;
case _ExcuteAction_Aligner_TakeStation:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_TakeStation);
break;
case _ExcuteAction_Aligner_VCOn:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_VCOn);
break;
case _ExcuteAction_Aligner_VCOff:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_VCOff);
break;
case _ExcuteAction_Aligner_StartAligner:
gAlignerDyhMgr->SendAlignerCmd(_AlignerDyhCmd_StartAligner);
break;
//Ðýת˥¼õÆ÷Ïà¹Ø
case _ExcuteAction_RotatoDimmer_Home:
gThorlabsRotatoMotorCtrlMgr->ExcuteRotatoDimmerCmd((eLaserDeviceType)m_ExcuteActionPar.m_IntParVal,_RotatoDimmerCmd_Home);
break;
case _ExcuteAction_RotatoDimmer_ToAngle:
{
double Ang = m_ExcuteActionPar.m_DoubleParVal;
eLaserDeviceType LaserType = (eLaserDeviceType)m_ExcuteActionPar.m_IntParVal;
gThorlabsRotatoMotorCtrlMgr->SetToAngVal(LaserType,Ang);
gThorlabsRotatoMotorCtrlMgr->ExcuteRotatoDimmerCmd(LaserType,_RotatoDimmerCmd_ToAng);
}
break;
case _ExcuteAction_WritePlcRegisterTest://IO ²âÊÔдÈë¼Ä´æÆ÷
//Ö»ÔÚIO ²âÊÔ½çÃæÖ´ÐÐûÓÐÎÊÌâ
gPlcCommunicationMgr->IOTestWriteRwRegister((CRwRegisterPar*)m_ExcuteActionPar.m_pBindingPar);
break;
case _ExcuteAction_SetAnneaSubRcprMultiMoveData:
gTransferArmMgr->SetCurAnneaSubRcprMultiMoveData(pWafer,m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_IO_Write:
gIO_CtrlMgr->WriteIOItemState((eIO_RW_Type)m_ExcuteActionPar.m_IntParVal,m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_IO_Read:
gIO_CtrlMgr->CheckIOItemState((eIO_RW_Type)m_ExcuteActionPar.m_IntParVal,m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_SetMainLaserPar:
{
if (!gLaserDevice->SetParToLaser(&(m_ExcuteActionPar.m_SetMainLaserPar)))
{
CString s("SetParToLaser failed");
CExceptionMsg Msg;
Msg.SetMsg(s);
throw Msg;
}
}
break;
case _ExcuteAction_OpMainLaserLDD:
gLaserDevice->OprateLaserLdd((eLaserDeviceType)m_ExcuteActionPar.m_IntParVal,m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_FoupLoadPort_CheckFoupOn:
if(!gEncryptionMgr->IsbRunAtNoteBook())
{
if(!gFoupLoadPortMgr->CheckFoupOn((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal))
{
CString s("No Foup On Loadport");
CExceptionMsg Msg;
Msg.SetMsg(s);
throw Msg;
}
}
break;
case _ExcuteAction_FoupLoadPort_CheckDoorOpen://¼ì²éÃÅÊÇ·ñΪ´ò¿ª×´Ì¬
if(!gEncryptionMgr->IsbRunAtNoteBook())
{
set<eLoadportCheckType> CheckTypeSet;
CheckTypeSet.insert(_LoadportCheck_DoorOpen);
COperateLoadPortInfo OpInfo;
OpInfo.m_LoadPortType = (eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal;
OpInfo.m_ReadLoadPortType = _ReadLoadPortType_CheckState;
OpInfo.m_CheckTypeSet = CheckTypeSet;
OpInfo.m_bAlarm = false;
bool Ret = gFoupLoadPortMgr->OperateLoadPortState(OpInfo);
}
break;
case _ExcuteAction_FoupLoadPort_ReadFoupId:
if(!gFoupLoadPortMgr->ReadFoupId((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal))
{
CString s("FoupID ¶ÁÈ¡´íÎó");
CExceptionMsg Msg;
Msg.SetMsg(s);
throw Msg;
}
break;
case _ExcuteAction_FoupLoadPort_LoadMap:
#if 1
gFoupLoadPortMgr->FoupLoadAndMap((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal);
#else
gTransferArmMgr->RobotJel_CassetteMapping((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal);
#endif
break;
case _ExcuteAction_FoupLoadPort_Unload:
gFoupLoadPortMgr->FoupUnload((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_FoupLoadPort_WriteE84IO:
gFoupLoadPortMgr->WriteE84IO((eWaferLoadPortType)m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_MachineGateOrg:
gMachineGateMgr->FindOrg();
break;
case _ExcuteAction_MachineGateCheck:
break;
case _ExcuteAction_FlowCheck:
ExcuteFlowCheck(m_ExcuteActionPar.m_FlowCheckVec);
break;
case _ExcuteAction_DisMeterFindFocus:
gDistanceMeterMgr->AutoFindFocus();
break;
case _ExcuteAction_WaitPlatThimbleState:
gTransferArmMgr->WaitPlatThimbleState(m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_UpdateWaferAnnealState:
gTransferArmMgr->UpdateWaferAnnealState(*pWafer);
break;
case _ExcuteAction_CheckManualOnPlatWafer:
gTransferArmMgr->CheckManualOnPlatWafer();
break;
case _ExcuteAction_WaferMonitoringStart:
gAnnealMonitoringMgr->WaferMonitoringStart(*pWafer);
break;
case _ExcuteAction_WaferMonitoringEnd:
gAnnealMonitoringMgr->WaferMonitoringEnd(*pWafer);
break;
case _ExcuteAction_SetAnnealPercent:
gProgramLaserTuiHuo->SetCurAnnealPercent(m_ExcuteActionPar.m_DoubleParVal);
break;
case _ExcuteAction_TekOscilloscopeInit:
gTekOscilloscopeMgr->InitDeviceComm(true);
break;
case _ExcuteAction_IO_AirDimmerCtrl:
gIO_CtrlMgr->AirDimmerCtrl(m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_SendSecsEvent:
{
gSemiSecsCommMgr->SendEventToEap(m_EventInfo);
//ÉèÖÃPJobÖжÔÓ¦µÄwafer ״̬
CWafer &Wafer = *(m_EventInfo.m_Wafer);
COperateJobPar OperateJobPar;
OperateJobPar.m_PWafer.m_LoadPortType = Wafer.m_LoadPortType;
OperateJobPar.m_PWafer.m_SlotId = Wafer.m_PortSlotId;
OperateJobPar.m_PWaferID = Wafer.m_WaferID;
OperateJobPar.m_OpJobType = _OpJobType_SetPWaferState;//ÐÞ¸ÄWaferµÄ״̬
if(m_EventInfo.m_EventType==_SecsEvent_Wafer_Anneal_Start)
{
OperateJobPar.m_PWafer.m_PWaferState = _PWaferState_IN_PROCESS;//FDC Êý¾Ý¿ªÊ¼
gJobQueueMgr->OperateJob(OperateJobPar);
}
if(m_EventInfo.m_EventType==_SecsEvent_Wafer_Anneal_End)
{
OperateJobPar.m_PWafer.m_PWaferState = _PWaferState_PROCESSED;//FDC Êý¾Ý½áÊø
gJobQueueMgr->OperateJob(OperateJobPar);
}
}
break;
case _ExcuteAction_BeamGageOpen:
gLaserBeamMeterMgr->BeamGageOpen();
break;
case _ExcuteAction_BeamGageClose:
gLaserBeamMeterMgr->BeamGageClose();
break;
case _ExcuteAction_CollectBeamData:
{
CString BeamDataName;
gLaserBeamMeterMgr->BeamGageCollectData(pWafer);
}
break;
case _ExcuteAction_CollectOscillData:
gTekOscilloscopeMgr->ChangeCurOperateType(_TekOscillOperateType_HardCopyBmp);
break;
case _ExcuteAction_ThorlabsKCubeIMotorJog:
gThorlabsKCubeIMotorCtrlMgr->JogMove();
break;
case _ExcuteAction_ConfirmBeforeProcess:
gAnnealMonitoringMgr->ConfirmBeforeProcess(*pWafer);
break;
case _ExcuteAction_EdiCheckStart://edi ¸´¼ì¿ªÊ¼
gAnnealMonitoringMgr->EdiCheckStartAction(m_ExcuteActionPar.m_BoolParVal,m_ExcuteActionPar.m_BoolParVal2);
break;
case _ExcuteAction_EdiCheckEnd://edi ¸´¼ì½áÊø
gAnnealMonitoringMgr->EdiCheckEndAction();
break;
case _ExcuteAction_CheckNextPjobFirstWafer:
gJobQueueMgr->CheckNextPjobFirstWafer();
break;
case _ExcuteAction_SetPjobCompleteState:
gJobQueueMgr->SetPjobCompleteState(m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_AdjustOsiiMaxAmplitude:
gTekOscilloscopeMgr->ChangeCurOperateType(_TekOscillOperateType_AdjustMaxAmplitude);
break;
case _ExcuteAction_AdjustOsiiMaxAmplitudeCheckExcEnd:
{
bool bWait = m_ExcuteActionPar.m_BoolParVal;
if (bWait)
{
gAnnealMonitoringMgr->WaitTekOscExecEnd(_TekOscillOperateType_AdjustMaxAmplitude
, m_ExcuteActionPar.m_BoolParVal, m_ExcuteActionPar.m_IntParVal);
}
}
break;
case _ExcuteAction_AdjustOsiiMaxAmplitudeBeforeProcess:
gTekOscilloscopeMgr->ChangeCurOperateType(_TekOscillOperateType_AdjustMaxAmplitudeBeforeProcess);
break;
#if 0
case _ExcuteAction_AdjustOsiiMaxAmplitudeBeforeProcessCheckExecEnd://ƬÓëƬ֮¼ä×ÔÊÊÓ¦±ØÐëµÈ´ý½áÊø
gAnnealMonitoringMgr->WaitTekOscExecEnd(_TekOscillOperateType_AdjustMaxAmplitudeBeforeProcess
, m_ExcuteActionPar.m_BoolParVal, m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_OsiiRawDataCollect:
{
CString DataPath;
if (nullptr == pWafer)
{
DataPath = gProgramLaserTuiHuo->GetLaipuLaserDataDir() + gTekOscilloscopeMgr->GetTestRawDataPath();
}
else
{
DataPath = gAnnealMonitoringMgr->GetCurSubRcpDataPath(*pWafer);
}
gTekOscilloscopeMgr->SetRawDataPath(DataPath);
gTekOscilloscopeMgr->ChangeCurOperateType(_TekOscillOperateType_OscRawDataCollect
, m_ExcuteActionPar.m_DoubleParVal);
}
break;
case _ExcuteAction_OsiiRawDataCollectCheckExcEnd:
gAnnealMonitoringMgr->WaitTekOscExecEnd(_TekOscillOperateType_OscRawDataCollect
, m_ExcuteActionPar.m_BoolParVal, m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_AdjustOsiiMaxAmplitudeSyncSave2Csv:
{
CString DataPath;
if (nullptr == pWafer)
{
DataPath = gProgramLaserTuiHuo->GetLaipuLaserDataDir() + gTekOscilloscopeMgr->GetTestRawDataPath();
}
else
{
DataPath = gAnnealMonitoringMgr->GetCurSubRcpDataPath(*pWafer);
}
gTekOscilloscopeMgr->SetRawDataPath(DataPath);
gTekOscilloscopeMgr->ChangeCurOperateTypeSyncSave2Csv(
_TekOscillOperateType_AdjustMaxAmplitudeSyncSave2Csv
, m_ExcuteActionPar.m_StringParVal, m_ExcuteActionPar.m_IntParVal);
}
break;
case _ExcuteAction_AdjustOsiiMaxAmplitudeSyncSave2CsvCheckExcEnd:
gAnnealMonitoringMgr->WaitTekOscExecEnd(_TekOscillOperateType_AdjustMaxAmplitudeSyncSave2Csv
, m_ExcuteActionPar.m_BoolParVal);
break;
#endif
case _ExcuteAction_IncCycRunTime:
gTransferArmMgr->SetCyclicRunTime(m_ExcuteActionPar.m_IntParVal);
break;
case _ExcuteAction_MotionParameterCompare:
gMotionCtrl->MotionParameterCompare();
break;
case _ExcuteAction_SetN2Val:
gAnnealMonitoringMgr->SetN2Val(m_ExcuteActionPar.m_DoubleParVal);
break;
case _ExcuteAction_MFCUseSignal:
gAnnealMonitoringMgr->SetUseMFCWork(m_ExcuteActionPar.m_BoolParVal);
break;
case _ExcuteAction_CheckLaserPathPow:
{
gAnnealMonitoringMgr->AnalyseProcessPathPowState(true);
}
break;
case _ExcuteAction_FoupUnLoadCheckArm1Pos:
gTransferArmMgr->UnLoadCheckArm1Pos();
break;
default:
break;
}
return Ret;
}