Compare commits

...

23 Commits

Author SHA1 Message Date
admin 7554c180e2 自动生产任务结束后恢复JOB停止状态为NULL,JOB连续传片下一pjob传片前读取Recipe的准直角度 3 months ago
admin 32e96e62e8 停止计时时停止刷新工艺时间 3 months ago
wyj b155ef7c2f 蓝色软件卡控Recipe名称的特殊字符 3 months ago
wyj 78068989fb 红色软件卡控Recipe名称的特殊字符 3 months ago
wyj db37aeff08 等待功率计冷却时间单位为S 3 months ago
wyj 9eeda9c3e9 退火线程启动标志,等待退火结束条件增加 3 months ago
wyj a2ebce6a25 恢复运行(Eap 和E84)前强制E84 step进入stop状态,防止Alarm状态清除失败 3 months ago
wyj baec0a5dca 优化工艺中衰减器调整逻辑 3 months ago
wyj 3426eccdf3 焦距微调通过CommPara设置范围 3 months ago
wyj 89bf69557b 屏蔽绑定点检数据刷新的列表 3 months ago
wyj b6fd0a217e 光斑采样显示焦深与索引号 3 months ago
wyj 2af3123221 if判定中变量错误赋值修正 3 months ago
wyj ad9f919c33 EAP添加SV参数(SecsProcessState) 3 months ago
wyj 90ff11daea 初始化界面激光点检与光斑采集显示 3 months ago
wyj 875053711c 出光口功率计位置与衰减器位置修正 3 months ago
wyj 9bc3f3b7bf 点检记录应用区分手动模式 3 months ago
wyj 646e7d69bd 光斑打样查看预览图 3 months ago
wyj 595d07d8f5 手动点检自动打开LDD 3 months ago
wyj d968c5e7ac 操作LDD设置当前操作类型,防止LDD关闭等待电流为零检测失败 3 months ago
wyj 041c85d648 光斑检测固定电流与衰减角度检测 3 months ago
wyj 496f3bd643 工艺流程优化:光斑采集,功率复检,测距调焦,气帘氮气 3 months ago
wyj 5c5b332711 点检功能优化 3 months ago
wyj db61e8feaf 衰减器初始化加锁,移动到位判断两次 3 months ago

1
.gitignore vendored

@ -14,3 +14,4 @@
/LaiPuLaser/Debug
*.ipch
/LaiPuLaser/LaiPuLaser
/LaipuDrawing/LaiPuLaser.aps

@ -157,6 +157,11 @@ CAnnealMonitoringMgr::CAnnealMonitoringMgr(void)
m_bBeamCheckByYmtc = false;//是否将beam 数据发送给YMTC 检测
m_BeamCheckSetCur1 = 10;
m_BeamCheckSetCur2 = 10;
m_BeamSetDimmer1 = 38;
m_BeamSetDimmer2 = 38;
m_GateCheck_bUse = true;//是否监控光闸状态
m_GateCheck_MinDataCnt = 540;//最小判断Data数
m_GateCheck_MidDataCnt = 180;//中间判断Data数(需要小于最小点数)
@ -592,6 +597,95 @@ CMFCPropertyGridProperty *CAnnealMonitoringMgr::CreatGridProperty()
pGroup1->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
{
//添加属性变量映射
Name = _T("m_BeamCheckSetCur1");//变量名字
CPropertie *pPropertie = new CPropertie;
pPropertie->SetpVal((void*)&m_BeamCheckSetCur1);
pPropertie->SetType(_PROP_TYPE_DOUBLE);
pPropertie->SetpModule(this);
pPropertie->SetPath(Path);
pPropertie->SetName(Name);
pPropertie->WriteRead(true);//读取保存的属性
//添加属性显示
PropertyName = _T("Laser1设置电流");
Description = _T("光斑检测时Laser1设置电流");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
pPropertie->SetModuleName(ModuleName);
CMFCPropertyGridProperty* p = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_BeamCheckSetCur1, Description);
pGroup1->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
{
//添加属性变量映射
Name = _T("m_BeamCheckSetCur2");//变量名字
CPropertie *pPropertie = new CPropertie;
pPropertie->SetpVal((void*)&m_BeamCheckSetCur2);
pPropertie->SetType(_PROP_TYPE_DOUBLE);
pPropertie->SetpModule(this);
pPropertie->SetPath(Path);
pPropertie->SetName(Name);
pPropertie->WriteRead(true);//读取保存的属性
//添加属性显示
PropertyName = _T("Laser2设置电流");
Description = _T("光斑检测时Laser2设置电流");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
pPropertie->SetModuleName(ModuleName);
CMFCPropertyGridProperty* p = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_BeamCheckSetCur2, Description);
pGroup1->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
{
//添加属性变量映射
Name = _T("m_BeamSetDimmer1");//变量名字
CPropertie *pPropertie = new CPropertie;
pPropertie->SetpVal((void*)&m_BeamSetDimmer1);
pPropertie->SetType(_PROP_TYPE_DOUBLE);
pPropertie->SetpModule(this);
pPropertie->SetPath(Path);
pPropertie->SetName(Name);
pPropertie->WriteRead(true);//读取保存的属性
//添加属性显示
PropertyName = _T("Laser1设置衰减角度");
Description = _T("光斑检测时Laser1设置衰减角度(最小默认30)");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
pPropertie->SetModuleName(ModuleName);
CMFCPropertyGridProperty* p = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_BeamSetDimmer1, Description);
pGroup1->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
{
//添加属性变量映射
Name = _T("m_BeamSetDimmer2");//变量名字
CPropertie *pPropertie = new CPropertie;
pPropertie->SetpVal((void*)&m_BeamSetDimmer2);
pPropertie->SetType(_PROP_TYPE_DOUBLE);
pPropertie->SetpModule(this);
pPropertie->SetPath(Path);
pPropertie->SetName(Name);
pPropertie->WriteRead(true);//读取保存的属性
//添加属性显示
PropertyName = _T("Laser2设置衰减角度");
Description = _T("光斑检测时Laser2设置衰减角度(最小默认30)");
pPropertie->SetGroupName(GroupName);
pPropertie->SetShowName(PropertyName);
pPropertie->SetModuleName(ModuleName);
CMFCPropertyGridProperty* p = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_BeamSetDimmer2, Description);
pGroup1->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
pGroup->AddSubItem(pGroup1);
}
}
@ -1612,6 +1706,33 @@ void CAnnealMonitoringMgr::BindingCheckList(CListCtrl *Power1List,CListCtrl *Pow
m_pLaserBeamCheckList = BeamList;
}
double CAnnealMonitoringMgr::GetBeamCheckSetCur(eLaserDeviceType LaserDevice)
{
if (_LaserDeviceType_MainLaser1 == LaserDevice)
{
return m_BeamCheckSetCur1;
}
else
{
return m_BeamCheckSetCur2;
}
}
double CAnnealMonitoringMgr::GetBeamSetDimmer(eLaserDeviceType LaserDevice)
{
double Val;
if (_LaserDeviceType_MainLaser1 == LaserDevice)
{
Val = m_BeamSetDimmer1 > 30 ? m_BeamSetDimmer1 : 30;
return Val;
}
else
{
Val = m_BeamSetDimmer2 > 30 ? m_BeamSetDimmer2 : 30;
return Val;
}
}
void CAnnealMonitoringMgr::InitPrepareWorkVec()
{
int Cnt = (int)(_AnnealMonitoringType_Max);
@ -1946,25 +2067,25 @@ bool CAnnealMonitoringMgr::StartPrepareWork(ePrepareWorkType WorkType,bool bOneS
case _AnnealMonitoringType_Laser1PowCheck:
{
//绑定点检数据刷新的列表
gLaserPowCheckMgr->BindingParList(m_pLaser1PowerCheckList);
//gLaserPowCheckMgr->BindingParList(m_pLaser1PowerCheckList);
//设置当前点检的激光类型
gLaserPowCheckMgr->SetCurPowCheckType((int)_LaserDeviceType_MainLaser1);//绿光1
//创建当前的点检数据到m_CurPowCheckData
gLaserPowCheckMgr->SetCurPowCheckFre(GetPrepareWorkLaserFre());//使用指定的频率
gLaserPowCheckMgr->CreatCurPowCheckData();
bCompleted = gCommonFlowMgr->LaserPowCheckFlow(false);
bCompleted = gCommonFlowMgr->LaserPowCheckFlow(false,false);
}
break;
case _AnnealMonitoringType_Laser2PowCheck:
{
gLaserPowCheckMgr->BindingParList(m_pLaser2PowerCheckList);
//gLaserPowCheckMgr->BindingParList(m_pLaser2PowerCheckList);
//设置当前点检的激光类型
gLaserPowCheckMgr->SetCurPowCheckType((int)_LaserDeviceType_MainLaser2);//绿光2
//创建当前的点检数据
gLaserPowCheckMgr->SetCurPowCheckFre(GetPrepareWorkLaserFre());//使用指定的频率
gLaserPowCheckMgr->CreatCurPowCheckData();
//点检激光2 的时候先等待功率计冷却,避免温度过高测量值不准
bCompleted = gCommonFlowMgr->LaserPowCheckFlow(true);
bCompleted = gCommonFlowMgr->LaserPowCheckFlow(true,false);
}
break;
case _AnnealMonitoringType_LaserBeamCheck:
@ -2712,12 +2833,13 @@ bool CAnnealMonitoringMgr::CheckbExcuteStop()
LogInfo.m_FuncName = "CheckbExcuteStop";
//执行停止
if(gStopAllWrokCmd
||gJobQueueMgr->GetCurJobStopType()==_JobStopType_Pause
||gJobQueueMgr->GetCurJobStopType()==_JobStopType_Stop
||gJobQueueMgr->GetCurJobStopType()==_JobStopType_Abort
|| _JobStopType_Pause==gJobQueueMgr->GetCurJobStopType()
|| _JobStopType_Stop==gJobQueueMgr->GetCurJobStopType()
|| _JobStopType_Abort==gJobQueueMgr->GetCurJobStopType()
)
{
LogInfo.m_LogMsg = "Excute Stop";
CString str = Bool2CString(gStopAllWrokCmd) + ";" + Int2CString(gJobQueueMgr->GetCurJobStopType());
LogInfo.m_LogMsg = str+"Excute Stop";
gLogMgr->WriteLogInfo(LogInfo);
return true;
}

@ -627,8 +627,10 @@ public:
void SetUseMFCWork(bool b) { m_bUseMFCWork = b; };
bool IsUseMFCWork() { return m_bUseMFCWork; };
vector<vector<CString>> GetMFCScalStrVec() { return MFCScalStrVec; };
private:
void InitPrepareWorkVec();
double GetBeamCheckSetCur(eLaserDeviceType LaserDevice);
double GetBeamSetDimmer(eLaserDeviceType LaserDevice);
private:
void InitPrepareWorkVec();
void CreatMonitoringDir();
CPrepareWork *GetPrepareWork(ePrepareWorkType WorkType);
bool IsPreviousWorkCompleted(ePrepareWorkType WorkType);
@ -664,6 +666,10 @@ private:
bool m_bBeamCheckOnJobStart;//job 开始前检测激光光斑
bool m_bBeamCheckByYmtc;//是否将beam 数据发送给YMTC 检测
double m_BeamCheckSetCur1;//光斑检测时Laser1设置电流
double m_BeamCheckSetCur2;//光斑检测时Laser2设置电流
double m_BeamSetDimmer1;//光斑检测时Laser1设置衰减角度
double m_BeamSetDimmer2;//光斑检测时Laser2设置衰减角度
bool m_bRecipeEdiCheckOnJobStart;//Pjob 开始前检测recipe 的功率密度(保存值)

File diff suppressed because it is too large Load Diff

@ -165,7 +165,7 @@ public:
void InitMoveRetList(CListCtrl &List);
void InsertMoveRetList(CListCtrl &List);
bool LaserPowCheckFlow(bool bWaitcooling);
bool LaserPowCheckFlow(bool bWaitcooling, bool bManual=true);
CLaserSpotMarkPar GetLaserSpotMarkPar(){return m_LaserSpotMarkPar;};
void SetLaserSpotMarkPar(CLaserSpotMarkPar par){m_LaserSpotMarkPar = par;};
void CreatLaserSpotMarkPt();
@ -208,6 +208,9 @@ public:
bool IsCheckAutoDoorSign() { return m_bCheckAutoDoorSign; };
void SetJobStopType(eJobStopType StopType) { m_CurJobStopType = StopType; };
eJobStopType GetJobStopType() { return m_CurJobStopType; };
bool IsWaferAnnealCreateSign() { return m_WaferAnnealCreateSign; };
void SetWaferAnnealCreateSign(bool bState) { m_WaferAnnealCreateSign = bState; };
private:
void CreatSubRecipeAnnealPrepareCmd(CWorkCmdInvoker &CmdInvoker,CWafer *pWafer,int SubRecipeIdx);
void CreatAnnealPrepareCmd(CWorkCmdInvoker &CmdInvoker,CWafer *pWafer);
@ -221,7 +224,7 @@ private:
bool CheckLaserSpotData();
void DrawTestLineVec(CDC* pDC);
void CreatAutoFindFocusInvokerCmd(CWorkCmdInvoker &WorkCmdInvoker,bool bToLaserFocus);
void CreatPowCheckPrepareCmd(CWorkCmdInvoker &CmdInvoker);
void CreatPowCheckPrepareCmd(CWorkCmdInvoker &CmdInvoker, eLaserDeviceType PowCheckType);
void CreatLaserBeamFlowCmd(CWorkCmdInvoker &CmdInvoker,CWafer *pWafer,bool bEdiCheckCmd);
void AutomationWorkJobFlow();
void AutomationWorkJobFlow_CJob(CControlJob &ControlJob);
@ -288,6 +291,8 @@ private:
bool m_bIsManusal_Anneal_Test;//是否为手动退火测试
eJobStopType m_CurJobStopType;//当前Job停止类型
bool m_WaferAnnealCreateSign;//ľąÇ°ÍËťđąęÖž
};
extern CCommonFlowMgr *gCommonFlowMgr;

@ -124,6 +124,12 @@ UINT CtrlSoftWareRunHeartBeatThread(LPVOID pParam)
p->SoftWareRunHeartBeat();
return 0;
}
UINT UpDataSecsProcessStateThread(LPVOID pParam)
{
CDeviceStateMgr *p = (CDeviceStateMgr *)pParam;
p->UpDataSecsProcessState();
return 0;
}
CDeviceStateMgr *gDeviceStateMgr = new CDeviceStateMgr;
CDeviceStateMgr::CDeviceStateMgr(void)
{
@ -245,6 +251,8 @@ void CDeviceStateMgr::OnAppInitialize()
pThread = AfxBeginThread(ReadAptDeviceStateThread, this);
Sleep(100);
pThread = AfxBeginThread(CtrlSoftWareRunHeartBeatThread, this);
Sleep(100);
pThread = AfxBeginThread(UpDataSecsProcessStateThread, this);
}
void CDeviceStateMgr::OnDeviceInit()
{
@ -481,6 +489,58 @@ void CDeviceStateMgr::SoftWareRunHeartBeat()
}
}
void CDeviceStateMgr::UpDataSecsProcessState()
{
//第一次检查前的延时
Sleep(FIRST_OPEN_DELAY);
while (1)
{
if (gAllThreadMgr.IsbStopAllThread())
break;
set<ePJobState> StateSet1;
StateSet1.insert(_PJobState_QUEUED);
set<ePJobState> StateSet2;
StateSet2.insert(_PJobState_PROCESSING);
//刷新状态的顺序需要按照紧急级别排列
if (!IsDeviceInitialize())
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_INIT);
}
else if (gCommonFlowMgr->GetJobStopType()>_JobStopType_Null
&&gJobQueueMgr->HasJob())
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_PAUSED);
}
else if (gCmdInvoker_WaferAneal.IsbExcuting()&&gAnnealMonitoringMgr->IsAnnealProcessExt())
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_PROCESSING);
}
else if (gCommonFlowMgr->IsbAutoRunning()&&gJobQueueMgr->HasRunningPJob())
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_SETTING_UP);
}
else if ((gJobQueueMgr->CheckLoadPortJob_ByStateSet(_LoadPortType_Port1, StateSet1)
|| gJobQueueMgr->CheckLoadPortJob_ByStateSet(_LoadPortType_Port2, StateSet1))
&& !gJobQueueMgr->HasRunningPJob())
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_READY);
}
else if (_FoupState_OFF==gFoupLoadPortMgr->GetFoupState(_LoadPortType_Port1)
&& _FoupState_OFF == gFoupLoadPortMgr->GetFoupState(_LoadPortType_Port2)
&&gWarningMgr->HasWarningMsg(_WarningType_Warning))
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_IDLE_WITH_ALARMS);
}
else if (_FoupState_OFF == gFoupLoadPortMgr->GetFoupState(_LoadPortType_Port1)
&& _FoupState_OFF == gFoupLoadPortMgr->GetFoupState(_LoadPortType_Port2)
&& !gWarningMgr->HasWarningMsg(_WarningType_Warning))
{
gSemiSecsCommMgr->SetCurProcessState(_ProcessState_IDLE);
}
Sleep(1000);
}
}
#endif
#if 1
//更新常用IO 的状态(这个函数只是读取相应的值,不进行具体的通信操作)

@ -149,6 +149,7 @@ public:
void ReadLoadport2State();
void ReadAptDeviceState();
void SoftWareRunHeartBeat();
void UpDataSecsProcessState();
void BeamGageCtrl();
bool CheckStateDuringProcessing();
void SetIOState(CCommonIOState IOState){m_IOState = IOState;};

@ -272,6 +272,18 @@ void CDlgAddControlJob::OnBnClickedOk()
MsgBox.Show("FoupID 不能为空");
return;
}
CString LotCheck = gRecipeMgr->CheckInvalidChar(m_LotID);
if (!LotCheck.IsEmpty())
{
MsgBox.Show("LotID:"+LotCheck);
return;
}
CString FoupCheck = gRecipeMgr->CheckInvalidChar(m_FoupID);
if (!FoupCheck.IsEmpty())
{
MsgBox.Show("FoupID:" + FoupCheck);
return;
}
CString s("创建job ?");
s += "\nRecipe : "+m_CurSelRecipeName;
s += "\nLotID : "+m_LotID;

@ -36,6 +36,7 @@
#include "DlgTekOscilloscopeCtrl.h"
#include "ThorlabsKCubeMotorCtrlMgr.h"
#include "OtherMonitorDevMgr.h"
#include "DlgDeviceMain.h"
#define UPDATE_INFO_TIMER 1
@ -515,12 +516,22 @@ void CDlgChildLaserPathState::OnBnClickedTestFucBtn()
LogInfo.m_ClassName = "CDlgChildLaserPathState";
LogInfo.m_FuncName = "OnBnClickedTestFucBtn";
gLogMgr->WriteLogInfo(LogInfo);
shared_ptr<CDlgTestFunc> dlg(new CDlgTestFunc);
if (dlg.get())
{
dlg->DoModal();
GetFrame()->ShowWindowMax();
}
CDlgTestFunc dlg;
dlg.DoModal();
if(dlg.IsbShowDlgGraphEdit())
{
GetFrame()->m_DlgGraphEdit.ShowAllItem();
//隐藏主界面,编辑图形
gDlgDeviceMain->ShowWindow(SW_HIDE);
GetFrame()->ShowWindowMax();
//重新绘制
m_pView->RefreshView();
}
else
{
gDlgDeviceMain->ShowWindow(SW_SHOW);
GetFrame()->ShowWindowMax();
}
}
void CDlgChildLaserPathState::OnBnClickedMainLaserState()
{

@ -154,7 +154,7 @@ void CDlgChildPCSAnnealCh::UpdateAnnealTime()
{
CString WorkTime = gCmdInvoker_WaferAneal.GetInvokerWorkTime();
//CString WorkTime = gAnnealMonitoringMgr->GetCurWaferProcessingTime();
if(WorkTime != "")
if(WorkTime != ""&&gCmdInvoker_WaferAneal.IsInvokerWorkTimeRecord())
{
SetItemText(IDC_CUR_ANNEAL_TIME,WorkTime,false);
}

@ -304,7 +304,6 @@ void CDlgGraphEdit::OnBnClickedZoomOutBtn()
m_pView->OnZoomOut();
}
#endif
#define MAIN_DLG_SIZE_Y 1050
void CDlgGraphEdit::OnStnClickedOpenMainDlg()
{

@ -141,7 +141,7 @@ void CDlgLaserPowCheck::OnBnClickedUseParBtn()
if(!UpdateData(TRUE))
return;
//将当前的点检结果用作recipe 计算依据
gLaserPowCheckMgr->SaveCurPowCheckDataForRecipe();
gLaserPowCheckMgr->SaveCurPowCheckDataForRecipe(true);
}
void CDlgLaserPowCheck::StartPowCheck(double Fre)
{
@ -162,7 +162,7 @@ void CDlgLaserPowCheck::StartPowCheck(double Fre)
//更新结果列表
gLaserPowCheckMgr->UpdatePowCheckDataListExt(m_ParList,true);
//点检流程
gCommonFlowMgr->LaserPowCheckFlow(false);
gCommonFlowMgr->LaserPowCheckFlow(false,true);
//显示结果
gLaserPowCheckMgr->GetEnergyDensityPar(m_EnergyDensityK,m_EnergyDensityPo);
UpdateData(FALSE);

@ -107,6 +107,8 @@ CDlgTestFunc::CDlgTestFunc(CWnd* pParent /*=NULL*/)
m_DimmerAngVal1 = 0;//移动到角度值
m_DimmerAngVal2 = 0;//移动到角度值
m_bShowDlgGraphEdit = false;//显示绘制界面
}
CDlgTestFunc::~CDlgTestFunc()
{
@ -222,6 +224,8 @@ BEGIN_MESSAGE_MAP(CDlgTestFunc, CDialogEx)
ON_BN_CLICKED(IDD_ROTATO_DIMMER_TO_ANG_BTN2, &CDlgTestFunc::OnBnClickedRotatoDimmerToAngBtn2)
ON_BN_CLICKED(IDD_PATH_MOTOR_DLG_BTN, &CDlgTestFunc::OnBnClickedPathMotorDlgBtn)
ON_BN_CLICKED(IDC_ACS_PAR_COMPARE_BTN, &CDlgTestFunc::OnBnClickedAcsParCompareBtn)
ON_BN_CLICKED(NEW_WAFER_VIEW_BTN2, &CDlgTestFunc::OnBnClickedWaferViewBtn2)
ON_BN_CLICKED(NEW_CLOSE_WAFER_VIEW_BTN, &CDlgTestFunc::OnBnClickedCloseWaferViewBtn)
END_MESSAGE_MAP()
#if 1
BOOL CDlgTestFunc::OnInitDialog()
@ -475,6 +479,55 @@ void CDlgTestFunc::OnBnClickedHideMainFrameBtn()
Sleep(300);
this->ShowWindow(SW_SHOW);
}
void CDlgTestFunc::OnBnClickedWaferViewBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgTestFunc";
LogInfo.m_FuncName = "OnBnClickedWaferViewBtn";
gLogMgr->WriteLogInfo(LogInfo);
#if 0
if(gDraw->IsbDlgLayerViewShow())
{
LogInfo.m_LogMsg = "Cannot Re-Open";
gLogMgr->WriteLogInfo(LogInfo);
return;
}
CDlgLayerViewShow *dlg = new CDlgLayerViewShow;
dlg->Create(IDD_LAYER_VIEW_SHOW_DLG, this);
dlg->ShowWindow(SW_SHOW);
#else
GetFrame()->m_DlgGraphEdit.ShowAllItem();
//显示图形界面
gDlgDeviceMain->ShowWindow(SW_HIDE);
GetFrame()->ShowWindowMax();
//重新绘制
//m_pView->RefreshView();
m_pView->DoZoomFull();
#endif
}
void CDlgTestFunc::OnBnClickedWaferViewBtn2()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgTestFunc";
LogInfo.m_FuncName = "OnBnClickedWaferViewBtn2";
gLogMgr->WriteLogInfo(LogInfo);
m_bShowDlgGraphEdit = true;//显示绘制界面
OnOK();//关闭界面才能进行鼠标操作
}
void CDlgTestFunc::OnBnClickedCloseWaferViewBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgTestFunc";
LogInfo.m_FuncName = "OnBnClickedCloseWaferViewBtn";
gLogMgr->WriteLogInfo(LogInfo);
//显示图形界面
gDlgDeviceMain->ShowWindow(SW_SHOW);
GetFrame()->ShowWindowMax();
}
#endif
#if 1
void CDlgTestFunc::SetMoveDis(int idx)
@ -948,11 +1001,8 @@ void CDlgTestFunc::OnBnClickedIoTestBtn()
gLogMgr->WriteLogInfo(LogInfo);
if(gAuthorityMgr->CheckAuthority(_Authority_Factory,true)==false)
return;
shared_ptr<CDlgIOTest> dlg(new CDlgIOTest);
if (dlg.get())
{
dlg->DoModal();
}
CDlgIOTest dlg;
dlg.DoModal();
}
#endif
#if 1
@ -1192,22 +1242,6 @@ void CDlgTestFunc::OnBnClickedAirDimmerBtn()
#endif
#if 1
void CDlgTestFunc::OnBnClickedWaferViewBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgTestFunc";
LogInfo.m_FuncName = "OnBnClickedWaferViewBtn";
gLogMgr->WriteLogInfo(LogInfo);
if(gDraw->IsbDlgLayerViewShow())
{
LogInfo.m_LogMsg = "Cannot Re-Open";
gLogMgr->WriteLogInfo(LogInfo);
return;
}
CDlgLayerViewShow *dlg = new CDlgLayerViewShow;
dlg->Create(IDD_LAYER_VIEW_SHOW_DLG, this);
dlg->ShowWindow(SW_SHOW);
}
void CDlgTestFunc::OnBnClickedOpenObjBtn()
{
CLogInfo LogInfo;

@ -50,7 +50,8 @@ public:
virtual ~CDlgTestFunc();
virtual void OnCancel();
bool IsbNeedReOpenTestFuncDlg(){return m_bNeedReOpenTestFuncDlg;};
bool IsbHideMainFrame(){return m_bHideMainFrame;};
bool IsbHideMainFrame(){return m_bHideMainFrame;};
bool IsbShowDlgGraphEdit(){return m_bShowDlgGraphEdit;};
enum { IDD = IDD_TEST_FUNC_DLG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
@ -116,6 +117,8 @@ private:
bool m_bHideMainFrame;//是否隐藏主界面
ETestFuncType m_CurETestFuncType;//当前执行的类型
CValVectorMgr m_ValVectorMgr;
bool m_bShowDlgGraphEdit;//ÏÔʾ»æÖƽçÃæ
public:
afx_msg void OnBnClickedMoveUpBtn();
afx_msg void OnBnClickedMoveRightBtn();
@ -184,4 +187,6 @@ public:
afx_msg void OnBnClickedRotatoDimmerToAngBtn2();
afx_msg void OnBnClickedPathMotorDlgBtn();
afx_msg void OnBnClickedAcsParCompareBtn();
afx_msg void OnBnClickedWaferViewBtn2();
afx_msg void OnBnClickedCloseWaferViewBtn();
};

@ -1380,6 +1380,12 @@ void CTdkFoupLoadPortMgr::ClearComBuf()
gCriticalSection_LoadPort2.Unlock();
}
}
eFoupState CTdkFoupLoadPortMgr::GetFoupState(eWaferLoadPortType PortType)
{
if (_LoadPortType_Port1 == PortType)
return m_FoupLoadPort1.m_FoupState;
return m_FoupLoadPort2.m_FoupState;
}
bool CTdkFoupLoadPortMgr::ReadLoadPortStateExt(eWaferLoadPortType LoadPortType,eReadLoadPortType ReadLoadPortType)
{
//多次读取失败才算
@ -2098,7 +2104,7 @@ bool CTdkFoupLoadPortMgr::ReadFoupId(eWaferLoadPortType LoadPortType)
//设置报警信息
{
eAlarmType AlarmType = _AlarmType_RfidRead1_CommunicationErr;
if(LoadPortType = _LoadPortType_Port2)
if(_LoadPortType_Port2==LoadPortType)
AlarmType = _AlarmType_RfidRead2_CommunicationErr;
COperateAlarmPar OperateAlarmPar;
OperateAlarmPar.m_OperateAlarmType = _OperateAlarmType_SetAlarmOn;
@ -2172,7 +2178,7 @@ bool CTdkFoupLoadPortMgr::ReadFoupId(eWaferLoadPortType LoadPortType)
//设置报警信息
{
eAlarmType AlarmType = _AlarmType_RfidRead1_DataErr;
if(LoadPortType = _LoadPortType_Port2)
if(_LoadPortType_Port2==LoadPortType)
AlarmType = _AlarmType_RfidRead2_DataErr;
COperateAlarmPar OperateAlarmPar;
@ -2459,7 +2465,7 @@ void CTdkFoupLoadPortMgr::E84StepErrorHandle(eWaferLoadPortType PortType,eE84Err
if(E84ErrType==_eE84ErrType_VALID)
{
AlarmAddInfo = "VALID Break Off";
if(PortType = _LoadPortType_Port1)
if(_LoadPortType_Port1==PortType)
AlarmType = _AlarmType_Port1E84_VALID_BreakOff;
else
AlarmType = _AlarmType_Port2E84_VALID_BreakOff;
@ -2467,7 +2473,7 @@ void CTdkFoupLoadPortMgr::E84StepErrorHandle(eWaferLoadPortType PortType,eE84Err
if(E84ErrType==_eE84ErrType_TP3)
{
AlarmAddInfo = "TP3 OverTime";
if(PortType = _LoadPortType_Port1)
if(_LoadPortType_Port1==PortType)
AlarmType = _AlarmType_Port1E84_TP3_OverTime;
else
AlarmType = _AlarmType_Port2E84_TP3_OverTime;
@ -2475,7 +2481,7 @@ void CTdkFoupLoadPortMgr::E84StepErrorHandle(eWaferLoadPortType PortType,eE84Err
if(E84ErrType==_eE84ErrType_TP4)
{
AlarmAddInfo = "TP4 OverTime";
if(PortType = _LoadPortType_Port1)
if(_LoadPortType_Port1==PortType)
AlarmType = _AlarmType_Port1E84_TP4_OverTime;
else
AlarmType = _AlarmType_Port2E84_TP4_OverTime;
@ -2483,7 +2489,7 @@ void CTdkFoupLoadPortMgr::E84StepErrorHandle(eWaferLoadPortType PortType,eE84Err
if(E84ErrType==_eE84ErrType_Ext)
{
AlarmAddInfo = "E84 Execute Error";
if(PortType = _LoadPortType_Port1)
if(_LoadPortType_Port1==PortType)
AlarmType = _AlarmType_Port1E84_E84ExecuteError;
else
AlarmType = _AlarmType_Port2E84_E84ExecuteError;
@ -2590,9 +2596,11 @@ void CTdkFoupLoadPortMgr::E84Step_Alarm(eWaferLoadPortType PortType)
LogInfo.m_FuncName = "E84Step_Alarm";
LogInfo.m_LogMsg = gTransferArmMgr->GetLoadPortStr(PortType);
LogInfo.m_LogMsg += "RecoverE84Flow";
gLogMgr->WriteLogInfo(LogInfo);
gLogMgr->WriteLogInfo(LogInfo);
LoadPort.m_bE84AlarmClear = false;//重置报警清除状态
//½øÈëֹͣ״̬
LoadPort.ChangeE84CtrlFlowStep(_E84Step_Stop);
Sleep(1000);
//恢复运行(Eap 和E84) -->这里只能重新load
gSemiSecsCommMgr->ChangeEapFlowStepState(PortType);
}
@ -2801,7 +2809,7 @@ void CTdkFoupLoadPortMgr::E84Step_Wait_FoupSingal(eWaferLoadPortType PortType)
//设置报警信息
{
eAlarmType AlarmType = _AlarmType_Port1E84_TP3_OverTime;
if(PortType = _LoadPortType_Port2)
if(_LoadPortType_Port2==PortType)
AlarmType = _AlarmType_Port2E84_TP3_OverTime;
COperateAlarmPar OperateAlarmPar;
OperateAlarmPar.m_OperateAlarmType = _OperateAlarmType_SetAlarmOn;
@ -2862,7 +2870,7 @@ void CTdkFoupLoadPortMgr::E84Step_Wait_TransEnd(eWaferLoadPortType PortType)
//设置报警信息
{
eAlarmType AlarmType = _AlarmType_Port1E84_TP4_OverTime;
if(PortType = _LoadPortType_Port2)
if(_LoadPortType_Port2==PortType)
AlarmType = _AlarmType_Port2E84_TP4_OverTime;
COperateAlarmPar OperateAlarmPar;
OperateAlarmPar.m_OperateAlarmType = _OperateAlarmType_SetAlarmOn;

@ -312,6 +312,7 @@ public:
void UpdateFoupOnStateExt(eWaferLoadPortType LoadPortType);
void FoupStatuReadReaLTimeCtl(bool bStart);
void ClearComBuf();
eFoupState GetFoupState(eWaferLoadPortType PortType);
private:
CString GetCmdTypeStr(eTdkCmdType CmdType);
CString GetCmdStr(eTdkCmdType CmdType);

@ -33,6 +33,9 @@ using namespace std;/*ʹ
#define VAR_PAR_CNT 20//可变参数的数量
#define MAIN_DLG_SIZE_Y 1050
//软件中的延时时间
#define FIRST_OPEN_DELAY 5000 //打开软件后等待这个时间再开始检测状态
#define READ_INFO_FAST_DELAY 300 //读取信息延时ms (快速)

@ -2237,7 +2237,7 @@ void CJobQueueMgr::OnAutoRunStop()
break;
}
//恢复为无操作
//SetJobStopType(_JobStopType_Null);
SetJobStopType(_JobStopType_Null);
//改变EAP 流程状态(Statr 或者Stop)
gSemiSecsCommMgr->ChangeEapFlowStepState(_LoadPortType_Port1);
@ -2382,7 +2382,7 @@ bool CJobQueueMgr::IsLoadPortEapJobCreat(eWaferLoadPortType PortType)
{
CProcessJob &PJob = PJobVec[k];
//有一个PJob 处于PROCESSING 就算
if(PJob.m_bJobValid = true && PJob.m_LoadPortType == PortType && (PJob.m_bEapJob))
if(true==PJob.m_bJobValid && PJob.m_LoadPortType == PortType && (PJob.m_bEapJob))
return true;
}
return false;
@ -2591,11 +2591,46 @@ void CJobQueueMgr::CheckNextPjobFirstWafer()
if(pWafer && (pWafer->m_WaferState)<=_WaferState_CassetteWating)
{
gCmdInvoker_WaferTransfer.BindingNextPjobFirstWafer(pWafer);
double Val = -1.00;
Val = GetRecipeContTransAlignerAngle(NextQueuedPJob);
gTransferArmMgr->SetContTransAlignerAngle(Val);
}
}
}
}
double CJobQueueMgr::GetRecipeContTransAlignerAngle(CProcessJob pJob)
{
double Ret = -1.00;
CLogInfo LogInfo;
LogInfo.m_ClassName = "CJobQueueMgr";
LogInfo.m_FuncName = "GetRecipeContTransAlignerAngle";
CRecipe Recipe;
LogInfo.m_LogMsg = "ReadRecipeFromFile : " + pJob.m_RecipeName;
gLogMgr->WriteLogInfo(LogInfo);
//¸ù¾ÝPJob.m_RecipeName ¶ÁÈ¡xml Îļþµ½recipe
if (!gRecipeMgr->ReadRecipeFromFile(Recipe, pJob.m_RecipeName))
{
CString s("Recipe Open Failed:");
s += pJob.m_RecipeName;
gLogMgr->InsertPromptList(s);
//Alarm
{
COperateAlarmPar OperateAlarmPar;
OperateAlarmPar.m_OperateAlarmType = _OperateAlarmType_SetAlarmOn;
OperateAlarmPar.m_AlarmType = _AlarmType_Recipe_ReadXmlErr;
OperateAlarmPar.m_AlarmAddInfo = s;
OperateAlarmPar.m_bThowException = false;
gWarningMgr->OperateAlarmState(OperateAlarmPar);
}
return Ret;
}
CRecipeParameter RecipePar;
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_ALIGNER_ANG);
Ret = RecipePar.m_ParDoubleVal;
return Ret;
}
//设置Pjob 的完成状态
//NeedPJobState需要的job 状态
//_PJobState_PROCESSING或者_PJobState_PROCESSING_LAST_WAFER

@ -278,6 +278,7 @@ public:
bool HasNoCompletePJob();
void SetPjobCompleteState(int NeedPJobState);
void CheckNextPjobFirstWafer();
double GetRecipeContTransAlignerAngle(CProcessJob pJob);
CString AddPJobHistory(COperateJobPar &OperateJobPar);
void SetbCancelQueueJob(bool b){m_bCancelQueueJob = b;};
bool IsbCancelQueueJob(){return m_bCancelQueueJob;};

@ -31,6 +31,7 @@
#include "ObjFillMgr.h"
#include "CommonFlowMgr.h"
#include "CriticalSection.h"
#include "DlgDeviceMain.h"
@ -387,7 +388,7 @@ BOOL CLaiPuLaserView::PreTranslateMessage(MSG* pMsg)
OnSpace();
break;
case VK_ESCAPE://Esc 键
OnEscape();
OnEscape(true);
break;
case VK_DELETE://删除
OnDelSelObj();
@ -422,7 +423,7 @@ BOOL CLaiPuLaserView::PreTranslateMessage(MSG* pMsg)
return CScrollView::PreTranslateMessage(pMsg);
}
//ESC 键响应
void CLaiPuLaserView::OnEscape()
void CLaiPuLaserView::OnEscape(bool bDlgDeviceMain)
{
CClientDC dc(this);
OnPrepareDC(&dc);
@ -438,7 +439,16 @@ void CLaiPuLaserView::OnEscape()
LogInfo.m_FuncName = "OnEscape";
//LogInfo.m_LogMsg = Bool2Str(bLock);
gLogMgr->WriteLogInfo(LogInfo);
//回到主界面
if(bDlgDeviceMain && gDlgDeviceMain)
{
gDraw->SetbObjEditMode(false);//关闭编辑模式
gDlgDeviceMain->ShowWindow(SW_SHOW);
//全屏显示(会影响弹出对话框的位置)
gDlgDeviceMain->MoveWindow(CRect(0,0,1950,MAIN_DLG_SIZE_Y));
}
}
//方向键响应
void CLaiPuLaserView::MoveObjToPtByDir(DIRECTION dir,double Dis)
@ -1250,9 +1260,14 @@ void CLaiPuLaserView::RefreshView()
if(gDraw->IsbDlgLayerViewShow())
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CLaiPuLaserView";
LogInfo.m_FuncName = "RefreshView";
LogInfo.m_LogMsg = "SendMsgToWnd";
gLogMgr->WriteLogInfo(LogInfo);
CString WndName = "Wafer View";
CString WndMsg = "Invalidate";
SendMsgToWnd(WndName,WndMsg);
SendMsgToWnd(WndName,WndMsg);
}
else
{

@ -97,7 +97,7 @@ public:
int GetCurrScaleVal(int val);//데貫角獗羹
double GetCurrScaleVal(double val);//데貫:봐쵠
void RefreshView();
void OnEscape();
void OnEscape(bool bDlgDeviceMain);
void MoveObjToPtByDir(DIRECTION dir,double Dis);
afx_msg BOOL OnMouseWheel(UINT nFlags,short zDelta,CPoint pt);
double GetCurZoomScale(){return m_zoomScale;};

@ -1486,6 +1486,18 @@ void CLaserDevicePhotonics::OprateLaserLdd(eLaserDeviceType LaserDeviceType,bool
LogInfo.m_LogMsg = Bool2CStringOnOff(bOpen);
gLogMgr->WriteLogInfo(LogInfo);
CString LaserHead;
if (LaserDeviceType == _LaserDeviceType_MainLaser1)
{
LaserHead = Photonics_LaserHead_00;
m_CurOperateType = _ELaserDeviceOperateType_Ldd1;
}
if (LaserDeviceType == _LaserDeviceType_MainLaser2)
{
LaserHead = Photonics_LaserHead_01;
m_CurOperateType = _ELaserDeviceOperateType_Ldd2;
}
//检查Power 和Enable key
if(!GetBitState(Photonics_Power))
{
@ -1529,15 +1541,6 @@ void CLaserDevicePhotonics::OprateLaserLdd(eLaserDeviceType LaserDeviceType,bool
gWarningMgr->OperateAlarmState(OperateAlarmPar);
}
}
CString LaserHead;
if(LaserDeviceType==_LaserDeviceType_MainLaser1)
{
LaserHead = Photonics_LaserHead_00;
}
if(LaserDeviceType==_LaserDeviceType_MainLaser2)
{
LaserHead = Photonics_LaserHead_01;
}
if(bOpen)
{
//先打开shutter

@ -210,6 +210,9 @@ void CLaserPowCheckMgr::UpdatePowCheckDataList()
PowCheckValSum.m_LaserPathPow += PowCheckVal.m_LaserPathPow;
PowCheckValSum.m_SurfacePow += PowCheckVal.m_SurfacePow;
PowCheckValSum.m_PulseWidth += PowCheckVal.m_PulseWidth;
PowCheckValSum.m_Pk2pk += PowCheckVal.m_Pk2pk;
PowCheckValSum.m_Mean += PowCheckVal.m_Mean;
PowCheckValSum.m_Amplitude += PowCheckVal.m_Amplitude;
}
}
if(ValidValCnt>0)
@ -221,6 +224,9 @@ void CLaserPowCheckMgr::UpdatePowCheckDataList()
PowCheckValAvg.m_LaserPathPow = PowCheckValSum.m_LaserPathPow/ValidValCnt;
PowCheckValAvg.m_SurfacePow = PowCheckValSum.m_SurfacePow/ValidValCnt;
PowCheckValAvg.m_PulseWidth = PowCheckValSum.m_PulseWidth/ValidValCnt;
PowCheckValAvg.m_Pk2pk = PowCheckValSum.m_Pk2pk / ValidValCnt;
PowCheckValAvg.m_Mean = PowCheckValSum.m_Mean / ValidValCnt;
PowCheckValAvg.m_Amplitude = PowCheckValSum.m_Amplitude / ValidValCnt;
}
}
@ -264,8 +270,8 @@ void CLaserPowCheckMgr::UpdatePowCheckDataListExtExt(CListCtrl &List,bool bInser
//数据显示平均值
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_SurfacePow,2));
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_LaserPathPow,2));
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_LaserSourcePow2,2));
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_LaserSourcePow1,2));
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_LaserSourcePow2,2));
List.SetItemText(i,idx++,Db2CString(PowCheckValAvg.m_PulseWidth,2));
}
}
@ -494,7 +500,7 @@ void CLaserPowCheckMgr::ChangeCurrent(CSetMainLaserPar &LaserPar,double Curr)
#endif
#if 1
//保存当前功率点检的数据m_CurPowCheckData
bool CLaserPowCheckMgr::SaveCurPowCheckData(bool bRotatoDimmerMode)
bool CLaserPowCheckMgr::SaveCurPowCheckData(bool bRotatoDimmerMode, bool bManual)
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CLaserPowCheckMgr";
@ -512,6 +518,8 @@ bool CLaserPowCheckMgr::SaveCurPowCheckData(bool bRotatoDimmerMode)
FileMgr.CreatDir(FilePath);//创建年文件夹
CPowCheckData &CurPowCheckData = m_CurPowCheckData;
CurPowCheckData.m_bCheckDataValid = true;
CurPowCheckData.m_DateTime = WorkTime.GetCurMonth();//记录时间
CurPowCheckData.m_DateTime += "_";
CurPowCheckData.m_DateTime += WorkTime.GetCurDay();
@ -538,11 +546,11 @@ bool CLaserPowCheckMgr::SaveCurPowCheckData(bool bRotatoDimmerMode)
CheckPt.m_LaserFre = CurPowCheckData.m_LaserFre;
CheckPt.m_LaserType = CurPowCheckData.m_CheckType;
}
//保存到LaipuLaserData\\LaserPowerCheckData
SavePowCheckDataFlie(FilePath, CurPowCheckData, true);
//衰减器点检模式不要记录普通的点检数据
if(!bRotatoDimmerMode)
{
//保存到LaipuLaserData\\LaserPowerCheckData
SavePowCheckDataFlie(FilePath,CurPowCheckData,true);
{
//保存激光功率对应表(衰减器用)
SaveLaserFixedCurrentPowFile();
//记录最近一次的信息
@ -553,8 +561,8 @@ bool CLaserPowCheckMgr::SaveCurPowCheckData(bool bRotatoDimmerMode)
if(CurPowCheckData.m_CheckType == _LaserDeviceType_MainLaser2)
m_LastPow2CheckData = CurPowCheckData;
}
//记录Fre 对应的K和P0
gLaser->SetEnergyDensityPar(CurPowCheckData.m_CheckType,CurPowCheckData.m_LaserFre,CurPowCheckData.m_EnergyDensityK,CurPowCheckData.m_EnergyDensityPo);
//将当前的点检结果用作recipe 计算依据
gLaserPowCheckMgr->SaveCurPowCheckDataForRecipe(bManual);
}
//详细数据保存到LaipuLaserData\\MonitoringData\\CheckData
SaveMonitoringCheckData(CurPowCheckData,bRotatoDimmerMode);
@ -571,19 +579,55 @@ void CLaserPowCheckMgr::SaveMonitoringCheckData(CPowCheckData &PowCheckData,bool
CString DataPath = gAnnealMonitoringMgr->CreatCurCheckDataPath();
CFileMgr FileMgr;
//输出一个总的结果
if(!bRotatoDimmerMode)
{
CCsvData CsvData;
CsvData.AddData("点检类型",false);
CsvData.AddData(CheckType,true);
CsvData.AddData("时间",false);
CsvData.AddData(PowCheckData.m_DateTime,true);
CsvData.AddData("斜率K",false);
CsvData.AddData(Db2CString(PowCheckData.m_EnergyDensityK),true);
CsvData.AddData("截距Po",false);
CsvData.AddData(Db2CString(PowCheckData.m_EnergyDensityPo),true);
CsvData.AddData("脉冲频率Hz",false);
CsvData.AddData(Db2CString(PowCheckData.m_LaserFre),true);
if(!bRotatoDimmerMode)
{
CsvData.AddData("斜率K",false);
CsvData.AddData(Db2CString(PowCheckData.m_EnergyDensityK),true);
CsvData.AddData("截距Po",false);
CsvData.AddData(Db2CString(PowCheckData.m_EnergyDensityPo),true);
}
//输出所有平均数据
{
CsvData.AddData("电流A",false);
CsvData.AddData("衰减角度",false);
CsvData.AddData("出光口功率计1W",false);
CsvData.AddData("出光口功率计2W",false);
CsvData.AddData("光路功率计W",false);
CsvData.AddData("平台功率值W",false);
CsvData.AddData("脉冲宽度ns",false);
CsvData.AddData("脉冲峰峰值",false);
CsvData.AddData("脉冲平均值",false);
CsvData.AddData("脉冲幅度值",true);
vector<CPowCheckPt> &PowCheckPtVec = PowCheckData.m_PowCheckPtVec;
int PtCnt = PowCheckPtVec.size();
for(int k=0;k<PtCnt;k++)
{
CPowCheckPt &CheckPt = PowCheckPtVec[k];
CPowCheckVal &PowCheckValAvg = CheckPt.m_PowCheckValAvg;
CString SetCurrStr = Db2CString(CheckPt.m_SetCurr);
CString SetAngStr = Db2CString(CheckPt.m_RotatoDimmerAng);
CCsvData CsvData;
CsvData.AddData(SetCurrStr,false);
CsvData.AddData(SetAngStr,false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_LaserSourcePow1),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_LaserSourcePow2),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_LaserPathPow),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_SurfacePow),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_PulseWidth),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_Pk2pk),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_Mean),false);
CsvData.AddData(Db2CString(PowCheckValAvg.m_Amplitude),true);
}
}
CString s = FileName+"Result";
FileMgr.WriteDataToExcel(DataPath,s,CsvData);
}
@ -658,14 +702,18 @@ void CLaserPowCheckMgr::SaveMonitoringCheckData(CPowCheckData &PowCheckData,bool
}
}
//将当前的点检结果用作recipe 计算依据
void CLaserPowCheckMgr::SaveCurPowCheckDataForRecipe()
void CLaserPowCheckMgr::SaveCurPowCheckDataForRecipe(bool bManual)
{
CMsgBox MsgBox;
if(!m_CurPowCheckData.m_bCheckDataValid)
{
MsgBox.Show("需要先进行点检");
if (bManual)
{
MsgBox.Show("需要先进行点检");
}
return;
}
#if 0
//先读取原来的
vector<CPowCheckPt> PowCheckPtPowCheckPVec;
ReadLaserFixedCurrentPowFile(PowCheckPtPowCheckPVec);
@ -683,6 +731,20 @@ void CLaserPowCheckMgr::SaveCurPowCheckDataForRecipe()
}
}
#endif
if (bManual)
{
if (MsgBox.ConfirmOkCancel("是否应用当前的点检记录K和Po作为recipe计算依据?"))
{
//记录Fre 对应的K和P0 (Edi-->Current用)
gLaser->SetEnergyDensityPar(m_CurPowCheckData.m_CheckType, m_CurPowCheckData.m_LaserFre, m_CurPowCheckData.m_EnergyDensityK, m_CurPowCheckData.m_EnergyDensityPo);
}
}
else
{
//记录Fre 对应的K和P0 (Edi-->Current用)
gLaser->SetEnergyDensityPar(m_CurPowCheckData.m_CheckType, m_CurPowCheckData.m_LaserFre, m_CurPowCheckData.m_EnergyDensityK, m_CurPowCheckData.m_EnergyDensityPo);
}
}
//读取固定电流功率对应表
void CLaserPowCheckMgr::ReadLaserFixedCurrentPowFile(vector<CPowCheckPt> &PowCheckPtPowCheckPVec)
@ -867,16 +929,21 @@ void CLaserPowCheckMgr::ReadPowCheckDataFlie(CString Path,CPowCheckData &PowChec
for(int k=1;k<LineCnt;k++)
{
vector<CString> StrLine = StrVec[k];
if(StrLine.size()==6)
int Idx = 0;
if(StrLine.size()>=6)
{
CPowCheckPt CheckPt;
CPowCheckVal &PowCheckValAvg = CheckPt.m_PowCheckValAvg;
CheckPt.m_SetCurr = CStringToDouble(StrLine[0]);
PowCheckValAvg.m_LaserSourcePow1 = CStringToDouble(StrLine[1]);
PowCheckValAvg.m_LaserSourcePow2 = CStringToDouble(StrLine[2]);
PowCheckValAvg.m_LaserPathPow = CStringToDouble(StrLine[3]);
PowCheckValAvg.m_SurfacePow = CStringToDouble(StrLine[4]);
PowCheckValAvg.m_PulseWidth = CStringToDouble(StrLine[5]);
CheckPt.m_SetCurr = CStringToDouble(StrLine[Idx++]);
if(StrLine.size()>= 7)
CheckPt.m_RotatoDimmerAng = CStringToDouble(StrLine[Idx++]);
PowCheckValAvg.m_LaserSourcePow1 = CStringToDouble(StrLine[Idx++]);
PowCheckValAvg.m_LaserSourcePow2 = CStringToDouble(StrLine[Idx++]);
PowCheckValAvg.m_LaserPathPow = CStringToDouble(StrLine[Idx++]);
PowCheckValAvg.m_SurfacePow = CStringToDouble(StrLine[Idx++]);
PowCheckValAvg.m_PulseWidth = CStringToDouble(StrLine[Idx++]);
PowCheckData.m_PowCheckPtVec.push_back(CheckPt);
}
}
@ -898,6 +965,7 @@ void CLaserPowCheckMgr::SavePowCheckDataFlie(CString Path,CPowCheckData &PowChec
CPowCheckPt &CheckPt = PowCheckPtVec[k];
CPowCheckVal &PowCheckValAvg = CheckPt.m_PowCheckValAvg;
FileStream << CheckPt.m_SetCurr<<",";
FileStream << CheckPt.m_RotatoDimmerAng << ",";
FileStream<<PowCheckValAvg.m_LaserSourcePow1<<",";
FileStream<<PowCheckValAvg.m_LaserSourcePow2<<",";
FileStream<<PowCheckValAvg.m_LaserPathPow<<",";
@ -1012,6 +1080,8 @@ void CLaserPowCheckMgr::SaveSelCheckRecordToFile()
ar<<"斜率K : "<<K<<" 截距Po : "<<Po<<'\n'<<'\n';
ar<<"电流(A)";
ar<<TAB_STR;
ar << "衰减器角度";
ar << TAB_STR;
ar<<"出光口功率(W)";
ar<<TAB_STR;
ar<<"光路功率(W)";
@ -1032,6 +1102,8 @@ void CLaserPowCheckMgr::SaveSelCheckRecordToFile()
double CalPower = gLaser->CalPowerByDensityPar(Po,K,CheckPt.m_SetCurr);
ar<<Db2CString(CheckPt.m_SetCurr);
ar<<TAB_STR;
ar << Db2CString(CheckPt.m_RotatoDimmerAng);
ar << TAB_STR;
ar<<Db2CString(PowCheckValAvg.m_LaserSourcePow1,2);
ar<<TAB_STR;
ar<<Db2CString(PowCheckValAvg.m_LaserSourcePow2,2);

@ -159,7 +159,7 @@ public:
CPowCheckData &GetCurPowCheckData(){return m_CurPowCheckData;};
void LaserPowSavePt(CPowCheckPt *pCheckPt,bool bVaildData);
void BindingParList(CListCtrl *p){m_ParList = p;};
bool SaveCurPowCheckData(bool bRotatoDimmerMode);
bool SaveCurPowCheckData(bool bRotatoDimmerMode,bool bManual=true);
void ChangeCurrent(CSetMainLaserPar &LaserPar,double Curr);
void ReadPowCheckData(int LaserType,CString Year,CString Month);
void UpdatePowCheckRecordList(CListCtrl &List);
@ -167,7 +167,7 @@ public:
eLaserDeviceType GetCurPowCheckType(){return m_CurPowCheckType;};
void RecoverLastPowCheckData(eLaserDeviceType LaserDeviceType);
void GetLastPowCheckPar(eLaserDeviceType LaserDeviceType,double &K,double &Po);
void SaveCurPowCheckDataForRecipe();
void SaveCurPowCheckDataForRecipe(bool bManual=true);
void ReadLaserFixedCurrentPowFile(vector<CPowCheckPt> &PowCheckPtPowCheckPVec);
void SaveLaserFixedCurrentPowFile();

@ -1153,9 +1153,10 @@ int CMotionCtrl_Acs::AsixXYMultiPointMove(bool LaserBufCtrl,CString HistoryDataP
}
//结束点才能停止
//手动操作界面或者job 的停止状态为Abort
if(gCmdInvoker_WaferAneal.IsbExcutingStop()||(gJobQueueMgr->GetCurJobStopType()==_JobStopType_Abort))
if(gCmdInvoker_WaferAneal.IsbExcutingStop()||(_JobStopType_Abort==gJobQueueMgr->GetCurJobStopType()))
{
LogInfo.m_LogMsg = "Abort";
CString str = Bool2CString(gCmdInvoker_WaferAneal.IsbExcutingStop()) + ";" + Int2CString(gJobQueueMgr->GetCurJobStopType());
LogInfo.m_LogMsg = str+ "Abort";
gLogMgr->WriteLogInfo(LogInfo);
break;
}

@ -52,7 +52,7 @@ void CMouseTool::OnLButtonDown(UINT nFlags, CPoint point,CClientDC &dc)
}
void CMouseTool::OnRButtonDown(UINT nFlags, CPoint point,CClientDC &dc)
{
GetCurViewPtr()->OnEscape();
GetCurViewPtr()->OnEscape(false);
}
void CMouseTool::OperateOver()
{

@ -2138,6 +2138,40 @@ CString CRecipeMgr::GetRecipePathByName(CString RecipeName)
//没找到
return "";
}
CString CRecipeMgr::CheckInvalidChar(CString Str)
{
CString RetStr = "";
int Len = Str.GetLength();
const char* CheckCh = (LPCTSTR)Str;
char ch;
for (int i = 0; i < Len; i++)
{
ch = *(CheckCh + i);
if ((ch >= 'a' && ch <= 'z')
|| (ch >= 'A' && ch <= 'Z')
|| ('%' == ch)
|| (ch >= '0' && ch <= '9')
|| ('_' == ch)
|| ('.' == ch&&i != 0 && i != Len - 1))
{
continue;
}
else
{
if ('.' == ch)
{
RetStr = "'.'不能位于首尾!";
}
else
{
RetStr = "含无效字符!(有效字符含字母大小写、数字、小数点、下划线、百分号)";
}
break;
}
}
return RetStr;
}
//获取所有recipe 文件的名称("TEST-RCP-PATICO.rcp")
void CRecipeMgr::GetAllRecipeNameVec(vector<CString> &RcpNameVec)
{

@ -219,6 +219,7 @@ public:
CString GetRecipePath();
bool DeletRecipe(CString RecipeName);
CString GetRecipePathByName(CString RecipeName);
CString CheckInvalidChar(CString Str);
CString GetOffsetTablePath(CString TabName);
bool CheckRecipeLinkFileExsit(CRecipe &Recipe);
private:

@ -1005,6 +1005,8 @@ void CSemiSecsCommMgr::InitSecsVar()
m_pSecs->VariableSetMethod(k,OnVarValueProc);
for(int k=42101;k<=42119;k++)
m_pSecs->VariableSetMethod(k,OnVarValueProc);
for (int k = 42201; k <= 42210; k++)
m_pSecs->VariableSetMethod(k, OnVarValueProc);
for(int k=5000001;k<=5000286;k++)//Ec List
m_pSecs->VariableSetMethod(k,OnVarValueProc);
}
@ -1703,6 +1705,11 @@ const char* CSemiSecsCommMgr::OnSecsGetVidVarValue(int varID)
result = Db2CString(LaserDeviceState.m_Laser2DevicePower);
}
break;
case 42201://ESecsProcessState
{
result = Int2CString(m_CurProcessState);
}
break;
#if 1//¸øEvent Report ÓõÄÖµ------------START
case 50001://STP_PORT_NUMBER
{

@ -60,17 +60,14 @@ enum eSecsEquipEvent
//设备流程状态
enum ESecsProcessState
{
_ProcessState_INIT = 0,//初始化中
_ProcessState_IDLE,//待机状态
_ProcessState_IDLE_WITH_ALARMS,//待机(有报警)
//_ProcessState_READY,//准备完成(收到PP-SELECT 后,然后等待MAP-CASSETTE和START)
_ProcessState_SETTING_UP,//加工前准备(job start 之后load 之前的状态,设置激光参数...)
_ProcessState_LOAD,//上料
_ProcessState_PROCESSING,//加工中
_ProcessState_UNLOAD,//退料
_ProcessState_PAUSED,//已暂停
_ProcessState_ALARM_PAUSED,//已暂停,并且有报警
_ProcessState_Null,//未定义
_ProcessState_INIT = 0,//初始化中或未初始化
_ProcessState_Null,//未定义
_ProcessState_IDLE,//待机状态Loadport无料盒放置
_ProcessState_PAUSED,//已暂停有Job处于暂停暂停并不能继续终止状态
_ProcessState_SETTING_UP,//加工前准备(job start 之后工艺之前的状态,传片....)
_ProcessState_READY,//准备完成(当前机台有队列中的PJOB可以Start)
_ProcessState_PROCESSING,//加工中
_ProcessState_IDLE_WITH_ALARMS,//待机(有报警)
};
//port 的状态
enum ESecsPortState
@ -330,6 +327,7 @@ public:
const char* OnSecsGetECVidVarValue(int varID);
REMOTE_REPLY OnRemoteCmd(REMOTE_DATA rd);
ESecsProcessState GetCurProcessState(){return m_CurProcessState;};
void SetCurProcessState(ESecsProcessState State) { m_CurProcessState = State; };
void OnPPSelect(eWaferLoadPortType PortType);
void OnCancel(eWaferLoadPortType PortType);
void OnStart(eWaferLoadPortType PortType);

@ -40,55 +40,69 @@ void CRotatoDimmer::RotatoDimmerErrHandle(eAlarmType AlarmType,CString AddInfo,b
//初始化设备
bool CRotatoDimmer::InitK10CR1Dev()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CRotatoDimmer";
LogInfo.m_FuncName = "InitK10CR1Dev";
LogInfo.m_LogMsg = "Start";
gLogMgr->WriteLogInfo(LogInfo);
m_bOpenDev = false;
//int--->char[]
sprintf_s(m_DevSerialNo, "%d", m_SerialNoVal);
if (TLI_BuildDeviceList() == 0)
{
// get device list size
short n = TLI_GetDeviceListSize();
// get LTS serial numbers
char serialNos[100];
TLI_GetDeviceListByTypeExt(serialNos, 100, 55);
// output list of matching devices
{
char *searchContext = nullptr;
char *p = strtok_s(serialNos, ",", &searchContext);
while (p != nullptr)
{
TLI_DeviceInfo deviceInfo;
// get device info from device
TLI_GetDeviceInfo(p, &deviceInfo);
// get strings from device info structure
char desc[65];
strncpy_s(desc, deviceInfo.description, 64);
desc[64] = '\0';
char serialNo[9];
strncpy_s(serialNo, deviceInfo.serialNo, 8);
serialNo[8] = '\0';
// output
p = strtok_s(nullptr, ",", &searchContext);
}
}
if(ISC_Open(m_DevSerialNo) == 0)
{
LogInfo.m_LogMsg = "Succ";
gLogMgr->WriteLogInfo(LogInfo);
return true;
}
}
//Alarm
eAlarmType AlarmType = _AlarmType_RotatoDimmer1_InitDevErr;
if(m_LaserDeviceType == _LaserDeviceType_MainLaser2)
AlarmType = _AlarmType_RotatoDimmer2_InitDevErr;
RotatoDimmerErrHandle(AlarmType,"Device Initialize Failed");
return false;
try
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CRotatoDimmer";
LogInfo.m_FuncName = "InitK10CR1Dev";
LogInfo.m_LogMsg = "Start";
gLogMgr->WriteLogInfo(LogInfo);
m_bOpenDev = false;
//int--->char[]
sprintf_s(m_DevSerialNo, "%d", m_SerialNoVal);
if (TLI_BuildDeviceList() == 0)
{
// get device list size
short n = TLI_GetDeviceListSize();
// get LTS serial numbers
char serialNos[100];
TLI_GetDeviceListByTypeExt(serialNos, 100, 55);
// output list of matching devices
{
char *searchContext = nullptr;
char *p = strtok_s(serialNos, ",", &searchContext);
while (p != nullptr)
{
TLI_DeviceInfo deviceInfo;
// get device info from device
TLI_GetDeviceInfo(p, &deviceInfo);
// get strings from device info structure
char desc[65];
strncpy_s(desc, deviceInfo.description, 64);
desc[64] = '\0';
char serialNo[9];
strncpy_s(serialNo, deviceInfo.serialNo, 8);
serialNo[8] = '\0';
// output
p = strtok_s(nullptr, ",", &searchContext);
}
}
static CCriticalSection sec;
CSingleLock slck(&sec, true);
if (ISC_Open(m_DevSerialNo) == 0)
{
LogInfo.m_LogMsg = "Succ";
gLogMgr->WriteLogInfo(LogInfo);
return true;
}
}
}
catch (...)
{
//Alarm
eAlarmType AlarmType = _AlarmType_RotatoDimmer1_InitDevErr;
if (m_LaserDeviceType == _LaserDeviceType_MainLaser2)
AlarmType = _AlarmType_RotatoDimmer2_InitDevErr;
COperateAlarmPar OperateAlarmPar;
OperateAlarmPar.m_OperateAlarmType = _OperateAlarmType_SetAlarmOn;
OperateAlarmPar.m_AlarmType = AlarmType;
OperateAlarmPar.m_AlarmAddInfo = "打开衰减器异常.";
OperateAlarmPar.m_bThowException = false;
gWarningMgr->OperateAlarmState(OperateAlarmPar);
}
return false;
}
//移动到原点
void CRotatoDimmer::MoveHome()
@ -196,6 +210,7 @@ void CRotatoDimmer::WaitMoveToAngVal(double AngVal)
int CurDelay = 0;//当前的总延时
double PerPos = ISC_GetPosition(m_DevSerialNo);//上一个位置
int NoMoveTimes = 0;//没有移动的判断次数
int MoveEndTimes = 0;//移动到位的判断次数
bool bMoveErr = false;
while(1)
{
@ -218,8 +233,15 @@ void CRotatoDimmer::WaitMoveToAngVal(double AngVal)
m_CurAng = PosToAngVal(m_CurPos);
if(IsTwoDbEqual(AngVal,m_CurAng,0.01))//执行完成
{
break;
MoveEndTimes++;
if(MoveEndTimes>2)
break;
}
else
{
MoveEndTimes = 0;
}
CurDelay += CheckDelay;
if(CurDelay>WaitDelay)//检测超时
{
@ -569,7 +591,10 @@ void CThorlabsRotatoMotorCtrlMgr::SetLastRotatoDimmerAng(eLaserDeviceType LaserD
LogInfo.m_LogMsg.Format(" Ang=%lf",Ang);
LogInfo.m_LogMsg = gLaser->GetLaserDeviceName(LaserDeviceType) + LogInfo.m_LogMsg;
gLogMgr->WriteLogInfo(LogInfo);
if (Ang < 0.00001)
{
return;
}
if(LaserDeviceType==_LaserDeviceType_MainLaser1)
m_Laser1RotatoDimmerAng = Ang;
else

@ -1455,13 +1455,20 @@ void CTransferArmMgr::WaferTransfer_Arm1PosToAligner(CWafer &Wafer,bool bLoad)
if(bLoad)//上料的时候使用wafer recipe 第一个区域的准直角度
{
AlignerAngle = Wafer.GetAlignerAngle();
if (m_bTwoJobContinuousTrans&&m_ContTransAlignerAngle>=0)
{
AlignerAngle = m_ContTransAlignerAngle;
m_ContTransAlignerAngle = -1.00;//清除使用连续传片准直角度标志
}
//记录wafer 的准直角度(写入记录用)
Wafer.m_AlignerAngle = Db2CString(AlignerAngle);
gLogMgr->WriteDebugLog("WaferTransfer_Arm1PosToAligner:AlignerAngle:"+Wafer.m_AlignerAngle);
}
else//退料的时候使用指定的准直角度
{
AlignerAngle = gAlignerDyhMgr->GetBackAlignerAngle(Wafer.GetLoadPortType());
}
//设置当前的准直角度
gAlignerDyhMgr->SetCurAlignerAngle(AlignerAngle);
@ -1897,7 +1904,7 @@ void CTransferArmMgr::WaferTransfer_WaitAnnealProccess(CWafer &Wafer)
CWorkCmdInvoker &WorkCmdInvoker = gCmdInvoker_WaferAneal;
while(1)
{
if(!WorkCmdInvoker.IsbExcuting())
if(!WorkCmdInvoker.IsbExcuting() && !gCommonFlowMgr->IsWaferAnnealCreateSign())
{
break;
}

@ -526,6 +526,7 @@ public:
void SetCurMoveToWaferSlot(int Slot){m_CurMoveToWaferSlot = Slot;};
void GetPortWaferSlotVec(eWaferLoadPortType LoadPortType,bool bInvertSelection,ePortWaferState WaferStateStart,ePortWaferState WaferStateEnd,vector<int> &WaferSlotVec);
void SetbLoadOrUnload(bool b){m_bLoadOrUnload = b;};
void SetContTransAlignerAngle(double Val) { m_ContTransAlignerAngle = Val; };
CRobotCoord GetCurRobotCoord(){return m_CurRobotCoord;};
void ClearWaferTimes(eWaferTimesType TimesType);
void RobotSevon();
@ -673,6 +674,8 @@ private:
bool m_VacOnBeforeThimbleDown;//顶针下降前先开真空
CRobotCoord m_CurRobotCoord;//机械手的坐标
double m_ContTransAlignerAngle = -1.00;//Á¬ÐøPJOB´«Æ¬×¼Ö±½Ç¶ÈÉèÖÃ
eAlarmType m_CurRobotAlarmType;//当前的报警类型
eRobotCmdType m_CurRobotCmdType;//当前执行的cmd

@ -483,6 +483,11 @@ bool CWorkCmdExcuteAction::Excute()
case _ExcuteAction_WaferMonitoringEnd:
gAnnealMonitoringMgr->WaferMonitoringEnd(*pWafer);
break;
case _ExcuteAction_SetWaferAnnealCreateSign:
{
gCommonFlowMgr->SetWaferAnnealCreateSign(m_ExcuteActionPar.m_BoolParVal);
}
break;
case _ExcuteAction_SetAnnealPercent:
gProgramLaserTuiHuo->SetCurAnnealPercent(m_ExcuteActionPar.m_DoubleParVal);
break;

@ -90,6 +90,7 @@ enum ExcuteAction
//数据监控相关
_ExcuteAction_WaferMonitoringStart,//Wafer 退火记录开始
_ExcuteAction_WaferMonitoringEnd,//Wafer 退火记录结束
_ExcuteAction_SetWaferAnnealCreateSign,//WaferÍË»ð½áÊø±êÖ¾
_ExcuteAction_CheckRecipeEdiOnAnnealStart,//检查激光功率密度是否满足recipe 的条件(退火开始前)
_ExcuteAction_StartMonitoringOnAnnealProcess,//启动退火过程中监控

@ -33,6 +33,7 @@ public:
void SetbStopAutoState(bool b){m_bStopAutoState = b;};
void ResetCmdExcutedState(CWorkCmd *p);
void BindingNextPjobFirstWafer(void *p);
bool IsInvokerWorkTimeRecord() { return m_InvokerWorkTime.IsbRecordTime(); };
private:
private:

Binary file not shown.

@ -1226,12 +1226,14 @@ void CRecipeMgr::UpdateEditRecipeList(CListCtrl &RecipeList,CListCtrl &RecipeInf
{
int idx = 0;
CRecipeParameter &RecipePar = RecipeParVec[k];
#if 0
//改变焦距微调值的范围
if(RecipePar.m_ParName ==RECIPE_PAR_NAME_FOCUS_ADJUST_VAL)
{
RecipePar.m_DoubleMinVal = m_FocusAdjustMin;
RecipePar.m_DoubleMaxVal= m_FocusAdjustMax;
}
#endif
CString Min,Max;
RecipePar.GetRangeStr(Min,Max);
if(RecipePar.m_bRcpInfoPar)//计算参数
@ -1579,18 +1581,22 @@ CString CRecipeMgr::RecipeCtrlExcute(CRecipeCtrlItem &CtrlItem)
if(RecipeCtrlType==_RecipeCtrl_AddGroup
||RecipeCtrlType==_RecipeCtrl_GroupName
||RecipeCtrlType==_RecipeCtrl_RecipeName
||RecipeCtrlType==_RecipeCtrl_AddRecipe)
||RecipeCtrlType==_RecipeCtrl_AddRecipe
|| RecipeCtrlType == _RecipeCtrl_CopyRecipe)
{
if(EditName2.Find('.',0)!= -1)
{
ErrMsg = "不能有小数点!";
return ErrMsg;
}
if(EditName2=="")
if(EditName2=="")
{
ErrMsg = "输入不能为空!";
return ErrMsg;
}
else
{
ErrMsg = CheckInvalidChar(EditName2);
if (!ErrMsg.IsEmpty())
{
return ErrMsg;
}
}
}
switch(RecipeCtrlType)
@ -2524,4 +2530,39 @@ CString CRecipeMgr::GetShowParText(int Row)
return str;
}
CString CRecipeMgr::CheckInvalidChar(CString Str)
{
CString RetStr = "";
int Len = Str.GetLength();
const char* CheckCh = (LPCTSTR)Str;
char ch;
for (int i = 0; i<Len; i++)
{
ch = *(CheckCh + i);
if ((ch >= 'a' && ch <= 'z')
|| (ch >= 'A' && ch <= 'Z')
|| ('%'==ch )
|| (ch >= '0' && ch <= '9')
|| ('_' == ch)
|| ('.' == ch&&i!=0&&i!= Len-1))
{
continue;
}
else
{
if ('.' == ch)
{
RetStr = "'.'不能位于首尾!";
}
else
{
RetStr = "含无效字符!(有效字符含字母大小写、数字、小数点、下划线、百分号)";
}
break;
}
}
return RetStr;
}
#endif

@ -272,6 +272,8 @@ public:
void UpdateRecipeGroupInfo();
CString GetOffsetTablePath(CString TabName);
CString GetShowParText(int Row);
CString CheckInvalidChar(CString Str);
private:
CString GetGroupDirPath(int GroupIdx);
CString GetRecipeNameListPath();
@ -323,7 +325,6 @@ private:
double m_FocusAdjustMin;//焦距调整范围最小值
double m_FocusAdjustMax;//焦距调整范围最大值
};
extern CRecipeMgr *gRecipeMgr;
Loading…
Cancel
Save