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 <20><>Բ
_AutoWork_Step_Tuihuo_Progress,//<2F>ӹ<EFBFBD>
_AutoWork_Step_Transfer_UnLoad,//UnLoad <20><>Բ
};
//<2F><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB>
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;//<2F><><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>
bool m_bCheckLaserPar;//<2F>ӹ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ʵ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ƥ<EFBFBD><C6A5>
bool m_bExitApp;//<2F>Ƿ<EFBFBD><C7B7>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
bool m_bFirstWafer;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>һƬwafer <20>ʼ֮<CABC><D6AE><EFBFBD>ĵ<EFBFBD>һƬ
int m_BackTime2Mins;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>ʱ(<28>رյ<D8B1>Դ)(<28><><EFBFBD><EFBFBD>)(<28><><EFBFBD><EFBFBD>ֵ)
vector<bool> m_ListCheckVec;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>״̬
CString m_AppOpenTime;//<2F><><EFBFBD><EFBFBD><EFBFBD>򿪵<EFBFBD>ʱ<EFBFBD><CAB1>
EAutoWorkStep m_CurAutoWorkStep;//<2F><>ǰ<EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
EAutoWorkStep m_OldAutoWorkStep;//֮ǰ<D6AE>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>仯)
bool m_bAutoWorking;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
bool m_bStopAfterThisCycle;//<2F><><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD>ֹͣ
EAutoWorkStep m_ExcuteStartWorkStep;//<2F>ʼ<E3BFAA>ӹ<EFBFBD><D3B9><EFBFBD>ʱ<EFBFBD><CAB1>ִ<EFBFBD>еIJ<D0B5><C4B2><EFBFBD>
bool m_bAutoPowerMode;//<2F><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>ƥ<EFBFBD><C6A5>ģʽ
bool m_bAutoTransferMode;//<2F>Զ<EFBFBD><D4B6><EFBFBD>Ƭģʽ
bool m_bStopWork;//<2F>Ƿ<EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD>
COffsetRotatoPar m_WaferOffsetRotatoPar;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD>ڼӹ<DABC><D3B9>ľ<EFBFBD>Ԫλ<D4AA>ò<EFBFBD><C3B2><EFBFBD>
CString m_ObjTxtFilePath;//obj Txt·<74><C2B7>(<28><><EFBFBD><EFBFBD>ֵ)
CString m_WorkRecordFilePath;//<2F>ӹ<EFBFBD><D3B9><EFBFBD>¼ <20>ļ<EFBFBD>·<EFBFBD><C2B7>(<28><><EFBFBD><EFBFBD>ֵ)
bool m_bLockAllDlgPane;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEB6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>ֵ)
bool m_bLockCurRecipe;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰrecipe <20><>ʾ(<28><><EFBFBD><EFBFBD>ֵ)
bool m_bLastWaferEnd;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>һƬ<D2BB><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool m_bCyclicRunMode;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>CyclicRun ģʽ
bool m_bCyclicRunExcuting;//CyclicRun <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
CRecipe m_CyclicRecipe;//CyclicRun ʹ<>õ<EFBFBD>Recipe
int m_AllCyclicWaferCnt;//CyclicRun Wafer <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C8AB>)
int m_CurCyclicWaferCnt;//CyclicRun Wafer <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
int m_WaferScanType;//wafer ɨ<>ʽ
int m_RecoverScanIdxAdjust;//<2F>ָ<EFBFBD>ɨ<EFBFBD><C9A8>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ĵڼ<C4B5><DABC><EFBFBD><EFBFBD>߿<EFBFBD>ʼ(<28><><EFBFBD><EFBFBD>ֵ)
int m_CurLaserPathBmpId;//<2F><>ǰ<EFBFBD><C7B0>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ͼID
bool m_bSoftInitComplete;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
double m_CurAnnealPercent;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ɶ<EFBFBD>
CString m_DeviceID;//<2F><>ǰ<EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>(<28><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
CString m_CurSoftVision;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CString m_LaipuLaserDataDir;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B4A2><EFBFBD><EFBFBD>Ŀ¼,<2C><><EFBFBD><EFBFBD>E:\LaipuLaserData (<28><><EFBFBD><EFBFBD>ֵ)
CString m_CurLaipuLaserDataDir;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B4A2><EFBFBD><EFBFBD>Ŀ¼
};
extern CProgramLaserTuiHuo *gProgramLaserTuiHuo;