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.

158 lines
7.9 KiB
C++

#pragma once
#include "module.h"
#include "GlobalDefine.h"
#include "RecipeMgr.h"
enum EAutoWorkStep
{
_AutoWork_Step_NULL = 0,
_AutoWork_Step_Stop,//停止状态
_AutoWork_Step_Transfer_Load,//Load 晶圆
_AutoWork_Step_Tuihuo_Progress,//加工
_AutoWork_Step_Transfer_UnLoad,//UnLoad 晶圆
};
//激光退火设备
class CProgramLaserTuiHuo :public CModule
{
public:
CProgramLaserTuiHuo(void);
~CProgramLaserTuiHuo(void);
virtual CMFCPropertyGridProperty *CreatGridProperty();
virtual void OnPropertyChanged();
virtual MODULE GetModuleType(){return _PROGRAM_LASER_ANEAL_PROP;};
virtual CString GetParDirName(){return "CProgramLaserTuiHuo";};
virtual void OnAppInitialize();
virtual void OnExitApp();
void ReadMachiningModeFile(int Idx);
void FastReadInfo();
void SlowReadInfo();
void SetListCheckVec(vector<bool> vec){m_ListCheckVec = vec;};
vector<bool> GetListCheckVec(){return m_ListCheckVec;};
bool StartWork(bool bAutoMode);
CString GetAppOpenTime(){return m_AppOpenTime;};
void AutoWorkFlowCtrl();
void ExecuteCurStep();
void SetCurAutoWorkStep(EAutoWorkStep Step);
EAutoWorkStep GetCurAutoWorkStep(){return m_CurAutoWorkStep;};
bool StartWorkPrepare();
bool IsbAutoWorking(){return m_bAutoWorking;};
bool IsbStopAfterThisCycle(){return m_bStopAfterThisCycle;};
void StopAftrThisCycle();
bool IsbAutoPowerMode(){return m_bAutoPowerMode;};
void SetbAutoPowerMode(bool b){m_bAutoPowerMode = b;};
bool IsbStopWork(){return m_bStopWork;};
bool CloseAppCheck();
bool ReadDlgItemSizeFile(CString FilePath);
void AdjustItemSize(CWnd *pWnd,int Idx);
bool IsbArmAutoMode(){return m_bAutoTransferMode;};
CString GetScanAreaFilePath();
CString GetObjTxtFilePath(){return m_ObjTxtFilePath;};
void ManualTransferLoad();
void ManualTransferUnLoad();
bool IsbLockAllDlgPane(){return m_bLockAllDlgPane;};
int GetBackTime2Mins(){return m_BackTime2Mins;};
bool OnLoadWaferToPlat();
bool OnUnLoadPlatWaferToPod();
void ManualArmAlignerUnLoad();
bool IsbFirstWafer(){return m_bFirstWafer;};
void SetbFirstWafer(bool b){m_bFirstWafer = b;};
bool IsbLockCurRecipe(){return m_bLockCurRecipe;};
void OnClickeCyclicRun();
void SetbCyclicRunMode(bool b){m_bCyclicRunMode = b;};
bool IsbCyclicRunMode(){return m_bCyclicRunMode;};
bool IsbCyclicRunExcuting(){return m_bCyclicRunExcuting;};
void CyclicRun();
void StopCyclicRunThread();
void SetCyclicRunRecipe(CRecipe Recipe){m_CyclicRecipe = Recipe;};
CString GetCyclicWaferCnt();
CString GetCurCyclicWaferCnt();
void CyclicWaferInc();
void ClearCyclicWaferCnt();
int GetWaferScanType(){return m_WaferScanType;};
bool IsOneDirScanType();
int GetRecoverScanIdxAdjust(){return m_RecoverScanIdxAdjust;};
CString GetWorkRecordFilePath(){return m_WorkRecordFilePath;};
void ManualRecoverAllWafer();
int GetLaserPathBmpId(){return m_CurLaserPathBmpId;};
void SetbSoftInitComplete(bool b){m_bSoftInitComplete = b;};
bool IsbSoftInitComplete(){return m_bSoftInitComplete;};
double GetCurAnnealPercent(){return m_CurAnnealPercent;};
void SetCurAnnealPercent(double val){m_CurAnnealPercent = val;};
CString GetDeviceID(){return m_DeviceID;};
CString GetCurSoftVision(){return m_CurSoftVision;};
void CloseAppBySysMsg();
CString GetLaipuLaserDataDir(CString Path);
void ReStartApp();
private:
void OnTuiHuoProgress();
void OnWorkStop();
bool IsReadyToLoad();
bool IsLoadEnd();
bool IsReadyToUnload();
bool IsUnloadEnd();
bool HasUntreatedWafer();
void StartCyclicRunThread();
bool CheckCyclicRunCondition();
void CyclicRunExt();
void WriteCyclicWaferCntToFile(int CyclicWaferCnt);
void ReadCyclicWaferCntFromFile();
void OnTuiHuoProgressExt();
private:
CWinThread* m_pMeasureThread;//测量线程
bool m_bCheckLaserPar;//加工前检测实际激光参数是否匹配
bool m_bExitApp;//是否退出程序
bool m_bFirstWafer;//是否为第一片wafer 点开始之后的第一片
int m_BackTime2Mins;//激光器休眠计时(关闭电源)(分钟)(保存值)
vector<bool> m_ListCheckVec;//保存区域的选择状态
CString m_AppOpenTime;//软件打开的时间
EAutoWorkStep m_CurAutoWorkStep;//当前的工作步骤
EAutoWorkStep m_OldAutoWorkStep;//之前的工作步骤(用来判断是否发生变化)
bool m_bAutoWorking;//是否正在自动工作
bool m_bStopAfterThisCycle;//本次循环后停止
EAutoWorkStep m_ExcuteStartWorkStep;//点开始加工的时候执行的步骤
bool m_bAutoPowerMode;//功率自动匹配模式
bool m_bAutoTransferMode;//自动传片模式
bool m_bStopWork;//是否停止工作
COffsetRotatoPar m_WaferOffsetRotatoPar;//当前正在加工的晶元位置参数
CString m_ObjTxtFilePath;//obj Txt路径(保存值)
CString m_WorkRecordFilePath;//加工记录 文件路径(保存值)
bool m_bLockAllDlgPane;//锁定活动界面面板(保存值)
bool m_bLockCurRecipe;//锁定当前recipe 显示(保存值)
bool m_bLastWaferEnd;//是否为最后一片正常结束
bool m_bCyclicRunMode;//是否正在CyclicRun 模式
bool m_bCyclicRunExcuting;//CyclicRun 是否正在执行
CRecipe m_CyclicRecipe;//CyclicRun 使用的Recipe
int m_AllCyclicWaferCnt;//CyclicRun Wafer 的数量(全部)
int m_CurCyclicWaferCnt;//CyclicRun Wafer 的数量(当前打开软件后)
int m_WaferScanType;//wafer 扫描方式
int m_RecoverScanIdxAdjust;//恢复扫描路径从前面的第几条线开始(保存值)
int m_CurLaserPathBmpId;//当前光路背景图ID
bool m_bSoftInitComplete;//软件初始化是否完成
double m_CurAnnealPercent;//当前的退火完成度
CString m_DeviceID;//当前设备的编号(显示在主界面)
CString m_CurSoftVision;//当前的软件版本
CString m_LaipuLaserDataDir;//软件存储数据目录,比如E:\LaipuLaserData (保存值)
CString m_CurLaipuLaserDataDir;//当前软件存储数据目录
};
extern CProgramLaserTuiHuo *gProgramLaserTuiHuo;