Compare commits

...

3 Commits

@ -156,7 +156,7 @@ CMFCPropertyGridProperty *COtherMonitorDevMgr::CreatGridProperty()
//添加属性显示
PropertyName = _T("大理石机台烟雾报警阀值");
Description = _T("大理石机台烟雾报警:最小浓度值1000");
Description = _T("大理石机台烟雾报警:范围[1000,20000]");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
@ -179,7 +179,7 @@ CMFCPropertyGridProperty *COtherMonitorDevMgr::CreatGridProperty()
//添加属性显示
PropertyName = _T("B01箱子烟雾报警阀值");
Description = _T("B01箱子烟雾报警最小浓度值1000");
Description = _T("B01箱子烟雾报警范围[1000,20000]");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
@ -202,7 +202,7 @@ CMFCPropertyGridProperty *COtherMonitorDevMgr::CreatGridProperty()
//添加属性显示
PropertyName = _T("B03箱子烟雾报警阀值");
Description = _T("B03箱子烟雾报警最小浓度值1000");
Description = _T("B03箱子烟雾报警范围[1000,20000]");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
@ -1175,34 +1175,59 @@ void COtherMonitorDevMgr::WriteModValToPLC()
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(PLATSUCKER2_VACPRESSURE_INDEX, m_ValScal_Sucker2_VacPressure);
}
iDevVal = GetMonitorDevVal(_MonitorValType_Marble_Smoke_Threshold);
if (iDevVal != m_SmokeAlarmThreshold)
{
if (m_SmokeAlarmThreshold < 1000) {
m_SmokeAlarmThreshold = 1000;
int NeedVal = m_SmokeAlarmThreshold;
if (m_SmokeAlarmThreshold < 1000)
{
NeedVal = 1000;
}
else if (m_SmokeAlarmThreshold>20000)
{
NeedVal = 20000;
}
iDevVal = GetMonitorDevVal(_MonitorValType_Marble_Smoke_Threshold);
if (iDevVal != NeedVal)
{
LogInfo.m_LogMsg.Format("Set m_SmokeAlarmThreshold = %d", NeedVal);
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(MARBLE_SMOKE_THRESHOLD_INDEX, NeedVal);
}
LogInfo.m_LogMsg.Format("Set m_SmokeAlarmThreshold = %d", m_SmokeAlarmThreshold);
gLogMgr->WriteLogInfo(LogInfo); gPlcCommunicationMgr->WriteRwRegisterWORDValue(MARBLE_SMOKE_THRESHOLD_INDEX, m_SmokeAlarmThreshold);
}
iDevVal = GetMonitorDevVal(_MonitorValType_B01_Smoke_Threshold);
if (iDevVal != m_B01SmokeAlarmThreshold)
{
if (m_B01SmokeAlarmThreshold < 1000) {
m_B01SmokeAlarmThreshold = 1000;
int NeedVal = m_B01SmokeAlarmThreshold;
if (m_B01SmokeAlarmThreshold < 1000)
{
NeedVal = 1000;
}
else if (m_B01SmokeAlarmThreshold > 20000)
{
NeedVal = 20000;
}
iDevVal = GetMonitorDevVal(_MonitorValType_B01_Smoke_Threshold);
if (iDevVal != NeedVal)
{
LogInfo.m_LogMsg.Format("Set m_B01SmokeAlarmThreshold = %d", NeedVal);
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(B01_SMOKE_THRESHOLD_INDEX, NeedVal);
}
LogInfo.m_LogMsg.Format("Set m_B01SmokeAlarmThreshold = %d", m_B01SmokeAlarmThreshold);
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(B01_SMOKE_THRESHOLD_INDEX, m_B01SmokeAlarmThreshold);
}
iDevVal = GetMonitorDevVal(_MonitorValType_B03_Smoke_Threshold);
if (iDevVal != m_B03SmokeAlarmThreshold)
{
if (m_B03SmokeAlarmThreshold < 1000) {
m_B03SmokeAlarmThreshold = 1000;
int NeedVal = m_B03SmokeAlarmThreshold;
if (m_B03SmokeAlarmThreshold < 1000)
{
NeedVal = 1000;
}
else if (m_B03SmokeAlarmThreshold > 20000)
{
NeedVal = 20000;
}
iDevVal = GetMonitorDevVal(_MonitorValType_B03_Smoke_Threshold);
if (iDevVal != NeedVal)
{
LogInfo.m_LogMsg.Format("Set m_B03SmokeAlarmThreshold = %d", NeedVal);
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(B03_SMOKE_THRESHOLD_INDEX, NeedVal);
}
LogInfo.m_LogMsg.Format("Set m_B03SmokeAlarmThreshold = %d", m_B03SmokeAlarmThreshold);
gLogMgr->WriteLogInfo(LogInfo);
gPlcCommunicationMgr->WriteRwRegisterWORDValue(B03_SMOKE_THRESHOLD_INDEX, m_B03SmokeAlarmThreshold);
}
}

@ -41,7 +41,8 @@
#include <Windows.h>
#include <TlHelp32.h>
#include "ThorlabsKCubeMotorCtrlMgr.h"
#include "FoupLoadPortMgr.h"
#include <thread>
@ -56,7 +57,7 @@
#define Recipe_Name_PPCode 1000001//Recipe 名称的code
#define Sub_Recipe_Name_PPCode 1000002//Sub_Recipe 名称的code
#define First_Recipe_Par_PPCode 1000003//第一个recipe参数的code
#define Last_Recipe_Par_PPCode 1000022//最后一个recipe参数的code (增加了recipe 参数这里要修改)
#define Last_Recipe_Par_PPCode 1000027//最后一个recipe参数的code (增加了recipe 参数这里要修改)
#define EAP_JOB_RECIPE_DIR _T("99_Eap_Job_Rcp")//保存补打recipe 的目录
@ -1723,6 +1724,17 @@ const char* CSemiSecsCommMgr::OnSecsGetVidVarValue(int varID)
case 50006: {if (m_ReportWafer) { result = m_ReportWafer->m_FoupID; }}break;
case 50007: {if (m_ReportWafer) { result = m_ReportWafer->m_ProcessJobID; }}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
default:result.Format("error variable %d, please contact the engineer", varID);//未定义的id
}
@ -3515,6 +3527,9 @@ void CSemiSecsCommMgr::UpdateEventReportVar(CSecsEventInfo &EventInfo)
CString ReportInfo;
switch(EventInfo.m_EventType)
{
case _SecsEvent_Port1_CarrierLayer_Change:
case _SecsEvent_Port2_CarrierLayer_Change:
break;
case _SecsEvent_FoupLoadMap_Start:
case _SecsEvent_FoupLoadMap_End:
case _SecsEvent_FoupUnload_Start:
@ -3553,7 +3568,7 @@ void CSemiSecsCommMgr::UpdateEventReportVar(CSecsEventInfo &EventInfo)
case _SecsEvent_Wafer_Anneal_Start:
case _SecsEvent_Wafer_Anneal_End:
case _SecsEvent_Beam_Check_Start:
case _SecsEvent_Beam_Check_End:
case _SecsEvent_Beam_Check_End:
{
if(EventInfo.m_Wafer)
{
@ -3613,7 +3628,8 @@ void CSemiSecsCommMgr::GetEventInfo(eSecsEquipEvent SecsEvent,int &EventId,CStri
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_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:
break;
}
@ -3720,12 +3736,18 @@ REMOTE_REPLY CSemiSecsCommMgr::OnRemoteCmd(REMOTE_DATA RemoteData)
set<string> CmdSet;
CmdSet.insert("CANCEL");
CmdSet.insert("STOP");
CmdSet.insert("CARRIERLAYERCHANGE");
if(CmdSet.count(RemoteData.pRCMD)==false)
return eCOMMAND_NOT_EXIST;//命令不存在
if(RemoteData.pRCMD=="CANCEL"||RemoteData.pRCMD=="STOP")
return OnRemoteCmd_Cancel(RemoteData);
if (RemoteData.pRCMD == "CANCEL" || RemoteData.pRCMD == "STOP")
{
return OnRemoteCmd_Cancel(RemoteData);
}
else if("CARRIERLAYERCHANGE"==RemoteData.pRCMD)
{
return OnRemoteCmd_CarrierLayerChange(RemoteData);
}
return eCOMMAND_NOT_EXIST;//命令不存在
}
@ -3763,6 +3785,104 @@ REMOTE_REPLY CSemiSecsCommMgr::OnRemoteCmd_Start(REMOTE_DATA RemoteData)
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
#if 1

@ -53,6 +53,9 @@ enum eSecsEquipEvent
_SecsEvent_Wafer_Anneal_End,
_SecsEvent_Beam_Check_Start,
_SecsEvent_Beam_Check_End,
//1200001
_SecsEvent_Port1_CarrierLayer_Change,
_SecsEvent_Port2_CarrierLayer_Change,
_SecsEvent_Max,
@ -381,6 +384,7 @@ private:
REMOTE_REPLY OnRemoteCmd_Cancel(REMOTE_DATA RemoteData);
REMOTE_REPLY OnRemoteCmd_CassetteClose(REMOTE_DATA RemoteData);
REMOTE_REPLY OnRemoteCmd_Start(REMOTE_DATA RemoteData);
REMOTE_REPLY OnRemoteCmd_CarrierLayerChange(REMOTE_DATA RemoteData);
void UpdateEventReportVar(CSecsEventInfo &EventInfo);
bool EnableGem300();
void InitCMS();

@ -37,6 +37,7 @@
#include "JobQueueMgr.h"
#include "OtherMonitorDevMgr.h"
#include "ThimbleMgr.h"
#include <thread>
#define ArmInSmifMaxDis 44
@ -3786,6 +3787,19 @@ void CTransferArmMgr::SwitchCassetteLayer(eWaferLoadPortType LoadPortType)
int PortSlotCnt = bChange ? (int)13 : (int)25;
m_Port2SlotCnt = PortSlotCnt;
}
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, LoadPortType);
tSend.detach();
}
bool CTransferArmMgr::CheckCassetteLayerChange(eWaferLoadPortType LoadPortType)

Loading…
Cancel
Save