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.
96 lines
4.1 KiB
C++
96 lines
4.1 KiB
C++
#pragma once
|
|
#include "module.h"
|
|
|
|
//功率计类型
|
|
enum ePowerMeterDeviceType
|
|
{
|
|
_PowerMeterDevice_Source1,//光路功率计1
|
|
_PowerMeterDevice_Source2,//光路功率计2
|
|
_PowerMeterDevice_LightPath,//光路功率计3
|
|
_PowerMeterDevice_Stage,//平台功率计
|
|
|
|
_PowerMeterDevice_Max,
|
|
};
|
|
|
|
|
|
class CPowerMeterDevice
|
|
{
|
|
public:
|
|
CPowerMeterDevice(void)
|
|
{
|
|
m_PowerValScale = 1;//功率计的系数
|
|
m_bDeviceUsed = true;//设备是否使用
|
|
m_DeviceHand = 0;//设备句柄号
|
|
m_LastWaferPathPowerAvg = 0;//最近一次功率的平均值
|
|
m_LastWaferPathPowerAvgDiff = 0;//当前pow 和LastPowerAvg 的差值
|
|
m_CurDataErrTimes = 0;//当前错误数据次数
|
|
ResetCurPowerVal();//重置当前的pow值
|
|
};
|
|
void ResetCurPowerVal()//重置当前的pow值
|
|
{
|
|
m_CurPowerVal = 0;//当前的功率计读数
|
|
m_PowerBeamPar.ResetPowerBeamPar();//重置光斑参数
|
|
};
|
|
public:
|
|
ePowerMeterDeviceType m_PowerMeterDeviceType;//功率计类型
|
|
|
|
bool m_bDeviceUsed;//设备是否使用
|
|
CString m_SerialNumber;//功率计的序列号
|
|
long m_DeviceHand;//设备句柄号
|
|
double m_PowerValScale;//功率计的系数
|
|
CString m_PowerMeterShowName;//显示名称
|
|
|
|
double m_CurPowerVal;//当前的功率计读数
|
|
|
|
CPowerBeamPar m_PowerBeamPar;//功率计中beam 相关的参数
|
|
|
|
int m_CurDataErrTimes;//当前错误数据次数
|
|
//用于对比wafer 之间POW 平均值的参数
|
|
double m_LastWaferPathPowerAvg;//最近一次功率的平均值(第一片wafer process 后计算)
|
|
double m_LastWaferPathPowerAvgDiff;//当前pow 和LastPowerAvg 的差值(实时计算)
|
|
};
|
|
|
|
|
|
//激光功率计
|
|
class CLaserPowDeviceMgr :public CModule
|
|
{
|
|
friend class CSemiSecsCommMgr;
|
|
public:
|
|
CLaserPowDeviceMgr(void);
|
|
~CLaserPowDeviceMgr(void);
|
|
virtual CMFCPropertyGridProperty *CreatGridProperty();
|
|
virtual MODULE GetModuleType(){return _LASER_POW_DEVICE_PROP;};
|
|
virtual void OnAppInitialize();
|
|
double GetCurLaserPowerVal(ePowerMeterDeviceType DeviceType);
|
|
double GetLastPowerAvg(ePowerMeterDeviceType DeviceType);
|
|
void SetLastPowerAvg(ePowerMeterDeviceType DeviceType,double Val);
|
|
double GetLastWaferPowerAvgDiff_ByProcess(ePowerMeterDeviceType DeviceType);
|
|
CPowerBeamPar GetCurLaserPowerBeamPar(ePowerMeterDeviceType DeviceType);
|
|
void StartReadLaserPower();
|
|
void StopReadLaserPower();
|
|
void ReadLaserPowerExt();
|
|
double GetPowerDeviceScale(ePowerMeterDeviceType DeviceType);
|
|
CString GetPowerDeviceSerialNumber(ePowerMeterDeviceType DeviceType);
|
|
bool GetPowerDevicebDeviceUsed(ePowerMeterDeviceType DeviceType);
|
|
int GetDevCoolingDelay(){return m_DevCoolingDelay;};
|
|
double GetMinValidPow(){return m_MinValidPow;};
|
|
bool IsbNeedSavePowAvg(){return m_bNeedSavePowAvg;};
|
|
void SetbNeedSavePowAvg(bool b){m_bNeedSavePowAvg = b;};
|
|
void SetCycPowerState(bool b) { m_bCycPowerNull = b; };
|
|
private:
|
|
bool OphirDeviceGetData(long hDc,double &PowerVal,CPowerBeamPar &BeamPar);
|
|
void DataErrAlarmHandle(CPowerMeterDevice &PowerMeterDevice);
|
|
private:
|
|
int m_DevCoolingDelay;//功率计冷却时间(单位:s)(保存值)
|
|
double m_MinValidPow;//最小有效功率(W)
|
|
vector<CPowerMeterDevice> m_PowerMeterDeviceVec;//功率计管理容器
|
|
|
|
bool m_bNeedSavePowAvg;//当前是否需要设置功率的平均值
|
|
|
|
//数据异常判断
|
|
int m_MaxDataErrTimes;//最大错误数据次数(保存值)
|
|
bool m_bCycPowerNull;
|
|
};
|
|
|
|
extern CLaserPowDeviceMgr *gLaserPowDeviceMgr;
|