|
|
@ -41,8 +41,7 @@
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <TlHelp32.h>
|
|
|
|
#include <TlHelp32.h>
|
|
|
|
#include "ThorlabsKCubeMotorCtrlMgr.h"
|
|
|
|
#include "ThorlabsKCubeMotorCtrlMgr.h"
|
|
|
|
#include "FoupLoadPortMgr.h"
|
|
|
|
|
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -57,7 +56,7 @@
|
|
|
|
#define Recipe_Name_PPCode 1000001//Recipe 名称的code
|
|
|
|
#define Recipe_Name_PPCode 1000001//Recipe 名称的code
|
|
|
|
#define Sub_Recipe_Name_PPCode 1000002//Sub_Recipe 名称的code
|
|
|
|
#define Sub_Recipe_Name_PPCode 1000002//Sub_Recipe 名称的code
|
|
|
|
#define First_Recipe_Par_PPCode 1000003//第一个recipe参数的code
|
|
|
|
#define First_Recipe_Par_PPCode 1000003//第一个recipe参数的code
|
|
|
|
#define Last_Recipe_Par_PPCode 1000027//最后一个recipe参数的code (增加了recipe 参数这里要修改)
|
|
|
|
#define Last_Recipe_Par_PPCode 1000022//最后一个recipe参数的code (增加了recipe 参数这里要修改)
|
|
|
|
|
|
|
|
|
|
|
|
#define EAP_JOB_RECIPE_DIR _T("99_Eap_Job_Rcp")//保存补打recipe 的目录
|
|
|
|
#define EAP_JOB_RECIPE_DIR _T("99_Eap_Job_Rcp")//保存补打recipe 的目录
|
|
|
|
|
|
|
|
|
|
|
@ -1724,17 +1723,6 @@ const char* CSemiSecsCommMgr::OnSecsGetVidVarValue(int varID)
|
|
|
|
case 50006: {if (m_ReportWafer) { result = m_ReportWafer->m_FoupID; }}break;
|
|
|
|
case 50006: {if (m_ReportWafer) { result = m_ReportWafer->m_FoupID; }}break;
|
|
|
|
case 50007: {if (m_ReportWafer) { result = m_ReportWafer->m_ProcessJobID; }}break;
|
|
|
|
case 50007: {if (m_ReportWafer) { result = m_ReportWafer->m_ProcessJobID; }}break;
|
|
|
|
case 50008: {if (m_ReportWafer) { result = m_ReportWafer->m_ControlJobID; }}break;
|
|
|
|
case 50008: {if (m_ReportWafer) { result = m_ReportWafer->m_ControlJobID; }}break;
|
|
|
|
|
|
|
|
|
|
|
|
case 50101:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result = gTransferArmMgr->IsCurCassetteLayer(_LoadPortType_Port1) ? ("13") : ("25");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 50102:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result = gTransferArmMgr->IsCurCassetteLayer(_LoadPortType_Port2) ? ("13") : ("25");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
#endif//给Event Report 用的值------------END
|
|
|
|
#endif//给Event Report 用的值------------END
|
|
|
|
default:result.Format("error variable %d, please contact the engineer", varID);//未定义的id
|
|
|
|
default:result.Format("error variable %d, please contact the engineer", varID);//未定义的id
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3527,9 +3515,6 @@ void CSemiSecsCommMgr::UpdateEventReportVar(CSecsEventInfo &EventInfo)
|
|
|
|
CString ReportInfo;
|
|
|
|
CString ReportInfo;
|
|
|
|
switch(EventInfo.m_EventType)
|
|
|
|
switch(EventInfo.m_EventType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case _SecsEvent_Port1_CarrierLayer_Change:
|
|
|
|
|
|
|
|
case _SecsEvent_Port2_CarrierLayer_Change:
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _SecsEvent_FoupLoadMap_Start:
|
|
|
|
case _SecsEvent_FoupLoadMap_Start:
|
|
|
|
case _SecsEvent_FoupLoadMap_End:
|
|
|
|
case _SecsEvent_FoupLoadMap_End:
|
|
|
|
case _SecsEvent_FoupUnload_Start:
|
|
|
|
case _SecsEvent_FoupUnload_Start:
|
|
|
@ -3568,7 +3553,7 @@ void CSemiSecsCommMgr::UpdateEventReportVar(CSecsEventInfo &EventInfo)
|
|
|
|
case _SecsEvent_Wafer_Anneal_Start:
|
|
|
|
case _SecsEvent_Wafer_Anneal_Start:
|
|
|
|
case _SecsEvent_Wafer_Anneal_End:
|
|
|
|
case _SecsEvent_Wafer_Anneal_End:
|
|
|
|
case _SecsEvent_Beam_Check_Start:
|
|
|
|
case _SecsEvent_Beam_Check_Start:
|
|
|
|
case _SecsEvent_Beam_Check_End:
|
|
|
|
case _SecsEvent_Beam_Check_End:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(EventInfo.m_Wafer)
|
|
|
|
if(EventInfo.m_Wafer)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3628,8 +3613,7 @@ void CSemiSecsCommMgr::GetEventInfo(eSecsEquipEvent SecsEvent,int &EventId,CStri
|
|
|
|
case _SecsEvent_Wafer_Anneal_End:{EventId=1100034;EventName="Wafer_Anneal_End";}break;
|
|
|
|
case _SecsEvent_Wafer_Anneal_End:{EventId=1100034;EventName="Wafer_Anneal_End";}break;
|
|
|
|
case _SecsEvent_Beam_Check_Start:{EventId=1100035;EventName="_SecsEvent_Beam_Check_Start";}break;
|
|
|
|
case _SecsEvent_Beam_Check_Start:{EventId=1100035;EventName="_SecsEvent_Beam_Check_Start";}break;
|
|
|
|
case _SecsEvent_Beam_Check_End:{EventId=1100036;EventName="_SecsEvent_Beam_Check_End";}break;
|
|
|
|
case _SecsEvent_Beam_Check_End:{EventId=1100036;EventName="_SecsEvent_Beam_Check_End";}break;
|
|
|
|
case _SecsEvent_Port1_CarrierLayer_Change: {EventId = 1200001; EventName = "_SecsEvent_Port1_CarrierLayer_Change"; }break;
|
|
|
|
|
|
|
|
case _SecsEvent_Port2_CarrierLayer_Change: {EventId = 1200002; EventName = "_SecsEvent_Port2_CarrierLayer_Change"; }break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3736,18 +3720,12 @@ REMOTE_REPLY CSemiSecsCommMgr::OnRemoteCmd(REMOTE_DATA RemoteData)
|
|
|
|
set<string> CmdSet;
|
|
|
|
set<string> CmdSet;
|
|
|
|
CmdSet.insert("CANCEL");
|
|
|
|
CmdSet.insert("CANCEL");
|
|
|
|
CmdSet.insert("STOP");
|
|
|
|
CmdSet.insert("STOP");
|
|
|
|
CmdSet.insert("CARRIERLAYERCHANGE");
|
|
|
|
|
|
|
|
if(CmdSet.count(RemoteData.pRCMD)==false)
|
|
|
|
if(CmdSet.count(RemoteData.pRCMD)==false)
|
|
|
|
return eCOMMAND_NOT_EXIST;//命令不存在
|
|
|
|
return eCOMMAND_NOT_EXIST;//命令不存在
|
|
|
|
|
|
|
|
|
|
|
|
if (RemoteData.pRCMD == "CANCEL" || RemoteData.pRCMD == "STOP")
|
|
|
|
if(RemoteData.pRCMD=="CANCEL"||RemoteData.pRCMD=="STOP")
|
|
|
|
{
|
|
|
|
return OnRemoteCmd_Cancel(RemoteData);
|
|
|
|
return OnRemoteCmd_Cancel(RemoteData);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if("CARRIERLAYERCHANGE"==RemoteData.pRCMD)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return OnRemoteCmd_CarrierLayerChange(RemoteData);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return eCOMMAND_NOT_EXIST;//命令不存在
|
|
|
|
return eCOMMAND_NOT_EXIST;//命令不存在
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3785,104 +3763,6 @@ REMOTE_REPLY CSemiSecsCommMgr::OnRemoteCmd_Start(REMOTE_DATA RemoteData)
|
|
|
|
return eCOMMAND_PERFORMED;//执行
|
|
|
|
return eCOMMAND_PERFORMED;//执行
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
REMOTE_REPLY CSemiSecsCommMgr::OnRemoteCmd_CarrierLayerChange(REMOTE_DATA RemoteData)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CLogInfo LogInfo;
|
|
|
|
|
|
|
|
LogInfo.m_ClassName = "CSemiSecsCommMgr";
|
|
|
|
|
|
|
|
LogInfo.m_FuncName = "OnRemoteCmd_CarrierLayerChange";
|
|
|
|
|
|
|
|
gLogMgr->WriteLogInfo(LogInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string sPar1 = RemoteData.mapParam["CP-PORT"];//"1 or 2"
|
|
|
|
|
|
|
|
std::string sPar2 = RemoteData.mapParam["CP-CARRIERLAYER"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//转换为CString
|
|
|
|
|
|
|
|
CString CMD = RemoteData.pRCMD.c_str();
|
|
|
|
|
|
|
|
CString PORT = sPar1.c_str();
|
|
|
|
|
|
|
|
CString CARRIERLAYER = sPar2.c_str();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CString log;
|
|
|
|
|
|
|
|
log = CMD;
|
|
|
|
|
|
|
|
log += " PORT:[";
|
|
|
|
|
|
|
|
log += PORT;
|
|
|
|
|
|
|
|
log += "]CARRIERLAYER:[";
|
|
|
|
|
|
|
|
log += CARRIERLAYER;
|
|
|
|
|
|
|
|
log += "]";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(log);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eWaferLoadPortType CurPort = "1" == PORT ? _LoadPortType_Port1 : _LoadPortType_Port2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Port 只能是1或者2
|
|
|
|
|
|
|
|
if (PORT != "1" && PORT != "2")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CString ErrInfo = "Secs--->eCOMMAND_PARAMETER_IS_INVALID:PORT";
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
return eCOMMAND_PARAMETER_IS_INVALID;//参数错误
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//CARRIERLAYER 只能是13或者25
|
|
|
|
|
|
|
|
if (CARRIERLAYER != "13" && CARRIERLAYER != "25")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CString ErrInfo = "Secs--->eCOMMAND_PARAMETER_IS_INVALID:CARRIERLAYER";
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
return eCOMMAND_PARAMETER_IS_INVALID;//参数错误
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gCommonFlowMgr->IsbAutoRunning())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CString ErrInfo = "Secs--->COMMAND_REFUSAL_EXECUTE:CURRENT_DEVICE_STATUS_IS_AUTO_RUN";
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
return eCOMMAND_CANNOT_PERFORM_NOW;//命令现在不能执行
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gJobQueueMgr->HasJob())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CString ErrInfo = "Secs--->COMMAND_REFUSAL_EXECUTE:DEVICE_HAS_JOB";
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
return eCOMMAND_CANNOT_PERFORM_NOW;//命令现在不能执行
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
CFoupLoadPort &CurFoupLoadPort = gFoupLoadPortMgr->GetFoupLoadPort(CurPort);
|
|
|
|
|
|
|
|
if (CurFoupLoadPort.m_bFoupInEquip)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CString ErrInfo = "Secs--->COMMAND_REFUSAL_EXECUTE:FOUP_IN_EQUIP";
|
|
|
|
|
|
|
|
gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
return eCOMMAND_CANNOT_PERFORM_NOW;//命令现在不能执行
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ("13" == CARRIERLAYER && !gTransferArmMgr->IsCurCassetteLayer(CurPort))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
gTransferArmMgr->SwitchCassetteLayer(CurPort);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ("25" == CARRIERLAYER && gTransferArmMgr->IsCurCassetteLayer(CurPort))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
gTransferArmMgr->SwitchCassetteLayer(CurPort);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//CString ErrInfo = "Secs--->INVALID OPERATION:PORT"+ PORT +"CARRIERLAYER IS ALREADY"+ CARRIERLAYER;
|
|
|
|
|
|
|
|
//gLogMgr->WriteDebugLog(ErrInfo);
|
|
|
|
|
|
|
|
//gLogMgr->InsertPromptList(ErrInfo);
|
|
|
|
|
|
|
|
//return eCOMMAND_REJECTED;//拒绝,虽然已经满足命令所需状态
|
|
|
|
|
|
|
|
auto EventFun = [&](eWaferLoadPortType PortType)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Sleep(500);
|
|
|
|
|
|
|
|
//Eap 事件
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CSecsEventInfo EventInfo;
|
|
|
|
|
|
|
|
EventInfo.m_EventType = _LoadPortType_Port1 == PortType ? _SecsEvent_Port1_CarrierLayer_Change : _SecsEvent_Port2_CarrierLayer_Change;
|
|
|
|
|
|
|
|
EventInfo.m_LoadPortType = PortType;
|
|
|
|
|
|
|
|
gSemiSecsCommMgr->SendEventToEap(EventInfo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
thread tSend(EventFun,CurPort);
|
|
|
|
|
|
|
|
tSend.detach();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return eCOMMAND_PERFORMED;//执行
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if 1
|
|
|
|
#if 1
|
|
|
|