|
|
|
|
#pragma once
|
|
|
|
|
#include "module.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CPowCheckPar
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CPowCheckPar(void)
|
|
|
|
|
{
|
|
|
|
|
m_PulseFre = 1000;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>Hz
|
|
|
|
|
m_StartCurr = 27;//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
m_EndCurr = 40;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
m_GapCurr = 1;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
m_FirstCheckDelay = 30;//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱms
|
|
|
|
|
m_CheckDelay = 15;//ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱms
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void Serialize( CArchive& ar);
|
|
|
|
|
public:
|
|
|
|
|
double m_PulseFre;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>Hz
|
|
|
|
|
double m_StartCurr;//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
double m_EndCurr;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
double m_GapCurr;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
int m_CheckDelay;//ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱms
|
|
|
|
|
int m_FirstCheckDelay;//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CPowCheckPt
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CPowCheckPt(void)
|
|
|
|
|
{
|
|
|
|
|
m_SetCurr = 0;//<2F>趨<EFBFBD><E8B6A8><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
m_LaserDevicePow = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD>ֵW
|
|
|
|
|
m_LaserPathPow = 0;//<2F><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ֵW
|
|
|
|
|
m_DOE_Pow = 0;//<2F>¹<EFBFBD>·DOE <20><><EFBFBD><EFBFBD>ֵW
|
|
|
|
|
m_SurfacePow = 0;//<2F><>Ʒ<EFBFBD>湦<EFBFBD><E6B9A6>ֵW
|
|
|
|
|
};
|
|
|
|
|
public:
|
|
|
|
|
double m_SetCurr;//<2F>趨<EFBFBD><E8B6A8><EFBFBD><EFBFBD>ֵA
|
|
|
|
|
double m_LaserDevicePow;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ֵW
|
|
|
|
|
double m_LaserPathPow;//<2F><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ֵW
|
|
|
|
|
double m_DOE_Pow;//<2F>¹<EFBFBD>·DOE <20><><EFBFBD><EFBFBD>ֵW
|
|
|
|
|
double m_SurfacePow;//<2F><>Ʒ<EFBFBD>湦<EFBFBD><E6B9A6>ֵW
|
|
|
|
|
|
|
|
|
|
eLaserDeviceType m_LaserType;
|
|
|
|
|
double m_LaserFre;//<2F><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>Hz
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CPowCheckData
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CPowCheckData(void)
|
|
|
|
|
{
|
|
|
|
|
m_CheckType = _LaserDeviceType_MainLaser1;
|
|
|
|
|
m_EnergyDensityK = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD>ܶȵ<DCB6>б<EFBFBD><D0B1>
|
|
|
|
|
m_EnergyDensityPo = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD>ܶȵĽؾ<C4BD>
|
|
|
|
|
m_LaserFre = 0;//<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD>õļ<C3B5><C4BC><EFBFBD>Ƶ<EFBFBD><C6B5>
|
|
|
|
|
};
|
|
|
|
|
void ResetCheckData(){m_bCheckDataValid = false;};
|
|
|
|
|
public:
|
|
|
|
|
bool m_bCheckDataValid;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ч
|
|
|
|
|
CString m_DateTime;//<2F><><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
double m_LaserFre;//<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD>õļ<C3B5><C4BC><EFBFBD>Ƶ<EFBFBD><C6B5>Hz
|
|
|
|
|
eLaserDeviceType m_CheckType;
|
|
|
|
|
double m_EnergyDensityK;//<2F><><EFBFBD><EFBFBD><EFBFBD>ܶȵ<DCB6>б<EFBFBD><D0B1>
|
|
|
|
|
double m_EnergyDensityPo;//<2F><><EFBFBD><EFBFBD><EFBFBD>ܶȵĽؾ<C4BD>
|
|
|
|
|
vector<CPowCheckPt> m_PowCheckPtVec;//<2F><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CLaserPowCheckMgr :public CModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CLaserPowCheckMgr(void);
|
|
|
|
|
~CLaserPowCheckMgr(void);
|
|
|
|
|
virtual void OnAppInitialize();
|
|
|
|
|
|
|
|
|
|
void InitSelYearComb(CComboBox &ComboBox);
|
|
|
|
|
void InitSelMonthComb(CComboBox &ComboBox);
|
|
|
|
|
void InitSelLaserComb(CComboBox &ComboBox);
|
|
|
|
|
void IniParList(CListCtrl &list,int AddW=0);
|
|
|
|
|
void UpdatePowCheckDataList(CListCtrl &List,bool bInsert,int SelIdx=-1);
|
|
|
|
|
void IniRecordList(CListCtrl &list);
|
|
|
|
|
void SetCurPowCheckType(int idx);
|
|
|
|
|
CPowCheckPar *GetCurPowCheckPar();
|
|
|
|
|
void SetCurPowCheckFre(double Fre);
|
|
|
|
|
void CreatCurPowCheckData();
|
|
|
|
|
void SetPowCheckPar(CPowCheckPar CheckPar);
|
|
|
|
|
void GetEnergyDensityPar(double &K,double &Po);
|
|
|
|
|
CPowCheckData &GetCurPowCheckData(){return m_CurPowCheckData;};
|
|
|
|
|
void LaserPowSavePt(CPowCheckPt *pCheckPt);
|
|
|
|
|
void BindingParList(CListCtrl *p){m_ParList = p;};
|
|
|
|
|
bool SaveCurPowCheckData();
|
|
|
|
|
void ReadPowCheckData(int LaserType,CString Year,CString Month);
|
|
|
|
|
void UpdatePowCheckRecordList(CListCtrl &List);
|
|
|
|
|
void SaveSelCheckRecordToFile();
|
|
|
|
|
eLaserDeviceType GetCurPowCheckType(){return m_CurPowCheckType;};
|
|
|
|
|
void RecoverLastPowCheckData(eLaserDeviceType LaserDeviceType);
|
|
|
|
|
void GetLastPowCheckPar(eLaserDeviceType LaserDeviceType,double &K,double &Po);
|
|
|
|
|
void SaveCurPowCheckDataForRecipe();
|
|
|
|
|
void ReadLaserFixedCurrentPowFile(vector<CPowCheckPt> &PowCheckPtPowCheckPVec);
|
|
|
|
|
private:
|
|
|
|
|
CString GetPowCheckFilePath();
|
|
|
|
|
void ReadPowCheckPar();
|
|
|
|
|
bool CalEnergyDensityPar();
|
|
|
|
|
double CalTwoPtK(CPowCheckPt CheckPt1,CPowCheckPt CheckPt2);
|
|
|
|
|
void UpdatePowCheckDataListExt(CListCtrl &List,bool bInsert,CPowCheckData &PowCheckData);
|
|
|
|
|
void SerializePowCheckData(CArchive& ar,CPowCheckData &PowCheckData);
|
|
|
|
|
private:
|
|
|
|
|
CPowCheckPar m_MainPowCheckPar;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPowCheckPar m_RedPowCheckPar;//<2F><><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPowCheckData m_CurPowCheckData;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
vector<CPowCheckData> m_CurPowCheckRecordVec;//<2F><>ǰ<EFBFBD>ļ<EFBFBD>¼<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int m_CurSelCheckRecordIdx;
|
|
|
|
|
eLaserDeviceType m_CurPowCheckType;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CListCtrl *m_ParList;
|
|
|
|
|
CString m_CurSelMonth;//<2F><>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int m_CurExtLaserType;
|
|
|
|
|
|
|
|
|
|
CPowCheckData m_LastPow1CheckData;//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>μ<EFBFBD><CEBC><EFBFBD>1 <20><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPowCheckData m_LastPow2CheckData;//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>μ<EFBFBD><CEBC><EFBFBD>2 <20><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPowCheckData m_LastRedPowCheckData;//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>κ<EFBFBD><CEBA><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern CLaserPowCheckMgr *gLaserPowCheckMgr;
|