|
|
|
|
#pragma once
|
|
|
|
|
#include "PenPar.h"
|
|
|
|
|
#include "GlobalDefine.h"
|
|
|
|
|
#include "module.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define PEN_CNT 100 //<2F>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
#define SPECIAL_PEN_START 80 //<2F><><EFBFBD><EFBFBD><EFBFBD>ʺſ<CABA>ʼ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
|
|
|
|
|
#define PEN_COLOR_0 RGB(10,10,10)
|
|
|
|
|
#define PEN_COLOR_1 RGB(0,0,255)
|
|
|
|
|
#define PEN_COLOR_2 RGB(255,0,0)
|
|
|
|
|
#define PEN_COLOR_3 RGB(0,255,0)
|
|
|
|
|
#define PEN_COLOR_4 RGB(255,0,255)
|
|
|
|
|
#define PEN_COLOR_5 RGB(255,255,0)
|
|
|
|
|
#define PEN_COLOR_6 RGB(255,125,125)
|
|
|
|
|
#define PEN_COLOR_7 RGB(125,0,0)
|
|
|
|
|
#define PEN_COLOR_8 RGB(125,0,125)
|
|
|
|
|
#define PEN_COLOR_9 RGB(0,125,125)
|
|
|
|
|
#define PEN_COLOR_10 RGB(255,255,255)
|
|
|
|
|
#define PEN_COLOR_11 RGB(185,122,87)
|
|
|
|
|
#define PEN_COLOR_12 RGB(255,201,14)
|
|
|
|
|
#define PEN_COLOR_13 RGB(181,230,29)
|
|
|
|
|
#define PEN_COLOR_14 RGB(153,217,234)
|
|
|
|
|
#define PEN_COLOR_15 RGB(112,146,190)
|
|
|
|
|
#define PEN_COLOR_16 RGB(200,191,231)
|
|
|
|
|
#define PEN_COLOR_17 RGB(63,72,204)
|
|
|
|
|
#define PEN_COLOR_18 RGB(163,73,164)
|
|
|
|
|
#define PEN_COLOR_19 RGB(34,177,76)
|
|
|
|
|
#define PEN_COLOR_20 RGB(127,127,127)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define MAX_RECIPE_PAR_CNT 12//<2F><><EFBFBD><EFBFBD>recipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƵIJ<C6B5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪС<D2AA><D0A1>VAR_PAR_CNT 20)
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
|
|
|
|
enum PEN_CTRL_PAR
|
|
|
|
|
{
|
|
|
|
|
_PAR_NULL = 0,//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κβ<CEBA><CEB2><EFBFBD>
|
|
|
|
|
_PAR_SCAN_TRACK_TYPE,//ɨ<>跽ʽ
|
|
|
|
|
_PAR_LASER_SET_POWER,//<2F><><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>W
|
|
|
|
|
_PAR_PLAT_SCAN_SPEED,//ɨ<><C9A8><EFBFBD>ٶ<EFBFBD>
|
|
|
|
|
_PAR_SCAN_OVERLAP_RATIO_X,//Xɨ<58><C9A8><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>%
|
|
|
|
|
_PAR_SCAN_OVERLAP_RATIO_Y,//Yɨ<59><C9A8><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>%
|
|
|
|
|
_PAR_FOCUS_ADJUST_VAL,//<2F><><EFBFBD><EFBFBD><EFBFBD><CEA2><EFBFBD><EFBFBD>mm
|
|
|
|
|
|
|
|
|
|
_PAR_LASER_CURR_1,//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LDD1 <20><><EFBFBD><EFBFBD>A
|
|
|
|
|
_PAR_LASER_CURR_2,//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LDD2 <20><><EFBFBD><EFBFBD>A
|
|
|
|
|
_PAR_LASER_PRF,//<2F><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>(Hz)
|
|
|
|
|
_PAR_LASER_PRF2_DELAY,//˫<><CBAB><EFBFBD>弤<EFBFBD><E5BCA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱms
|
|
|
|
|
_PAR_RED_LASER_CURR,//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A
|
|
|
|
|
_PAR_RED_LASER_PULSE_W,//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>us
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
enum SPECIAL_PEN
|
|
|
|
|
{
|
|
|
|
|
_SPECIAL_PEN_NULL = 0,
|
|
|
|
|
_SPECIAL_PEN_PLAT_MOVE_SPEED,//ƽ̨<C6BD><CCA8><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>
|
|
|
|
|
_SPECIAL_PEN_S_MOVE_OFFSET_OBJ,//<2F><><EFBFBD><EFBFBD>S <20><><EFBFBD>ƶ<EFBFBD>ʱƽ<CAB1><C6BD>obj <20><><EFBFBD><EFBFBD><EFBFBD>ıʺ<C4B1>
|
|
|
|
|
_SPECIAL_PEN_FIND_ORIGIN_XY,//XY ƽ̨<C6BD><CCA8>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>
|
|
|
|
|
_SPECIAL_PEN_MANUAL_MOVE_X,//<2F>ֶ<EFBFBD><D6B6>ƶ<EFBFBD>ƽ̨X <20>ٶ<EFBFBD>
|
|
|
|
|
_SPECIAL_PEN_MANUAL_MOVE_Y,//<2F>ֶ<EFBFBD><D6B6>ƶ<EFBFBD>ƽ̨X <20>ٶ<EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
//recipe <20>ӹ<EFBFBD><D3B9><EFBFBD>ʹ<EFBFBD>õIJ<C3B5><C4B2><EFBFBD>
|
|
|
|
|
class CRecipePar
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CRecipePar()
|
|
|
|
|
{
|
|
|
|
|
m_MinVal = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Сֵ
|
|
|
|
|
m_MaxVal = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
};
|
|
|
|
|
public:
|
|
|
|
|
CString m_RecipeParName;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PEN_CTRL_PAR m_PenCtrlType;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>ıʲ<C4B1><CAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
double m_MinVal;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Сֵ
|
|
|
|
|
double m_MaxVal;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>̲<EFBFBD><CCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CPenParMgr:public CModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CPenParMgr(void);
|
|
|
|
|
~CPenParMgr(void);
|
|
|
|
|
virtual void WriteWorkFileExt(vector<CLab> &LabVec);
|
|
|
|
|
virtual void ReadWorkFile(CLabVecRang &LabVecRang);
|
|
|
|
|
virtual CString GetParDirName(){return "CPenParMgr";};
|
|
|
|
|
virtual void OnAppInitialize();
|
|
|
|
|
void Copy(CPenParMgr &rls);
|
|
|
|
|
void InsertToList(CListCtrl &List);
|
|
|
|
|
COLORREF GetPenColor(int pen);
|
|
|
|
|
void SaveCurPen(int Pen,CPenPar CurPar);
|
|
|
|
|
CPenPar GetPen(int pen);
|
|
|
|
|
CPenPar& GetCurPen(){return m_ParVec[m_CurPen];};//<2F><><EFBFBD>õ<EFBFBD>ǰѡ<C7B0><D1A1><EFBFBD>ı<EFBFBD>
|
|
|
|
|
void SetCurPenNum(int num);
|
|
|
|
|
int GetCurPenNum(){return m_CurPen;};
|
|
|
|
|
int GetCurWorkPenNum(){return m_CurWorkPen;};
|
|
|
|
|
void SetCurWorkPen(int n){m_CurWorkPen = n;};
|
|
|
|
|
void SaveOrLoad(bool bSave);
|
|
|
|
|
void SaveCurPen(CPenPar CurPar);
|
|
|
|
|
double GetPar(int PenNum,PEN_CTRL_PAR PenCtrlPar);
|
|
|
|
|
double GetPar(CPenPar &PenPar,PEN_CTRL_PAR PenCtrlPar);
|
|
|
|
|
bool IsSpecialPen(int n);
|
|
|
|
|
void SetPar(int PenNum,PEN_CTRL_PAR PenCtrlPar,double val);
|
|
|
|
|
vector<CPenPar> &GetParVec(){return m_ParVec;};
|
|
|
|
|
void SetParVec(vector<CPenPar> &vec){m_ParVec = vec;};
|
|
|
|
|
void SetParSelectState(vector<bool> &vec);
|
|
|
|
|
void SetFirstSelPenAsWorkPen();
|
|
|
|
|
void ResetAllSelState();
|
|
|
|
|
vector<CRecipePar> &GetRecipeParVec(){return m_PenParVec;};
|
|
|
|
|
private:
|
|
|
|
|
void IniParVec();
|
|
|
|
|
void InitRecipeParVec();
|
|
|
|
|
void SaveOrLoadExt(CArchive &ar);
|
|
|
|
|
void InsertPenParName(CMFCPropertyGridProperty* p);
|
|
|
|
|
void AdjustPenParOrder();
|
|
|
|
|
private:
|
|
|
|
|
vector<CPenPar> m_ParVec;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
vector<CRecipePar> m_PenParVec;//recipe <20>ӹ<EFBFBD><D3B9><EFBFBD>ʹ<EFBFBD>õIJ<C3B5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int m_CurPen;//<2F><>ǰ<EFBFBD>ıʺ<C4B1>
|
|
|
|
|
int m_CurWorkPen;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>ıʺ<C4B1>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<EFBFBD>ʺ<EFBFBD> ---------------------------------------
|
|
|
|
|
int m_PenPlatMoveSpeed;//ƽ̨<C6BD><CCA8><EFBFBD><EFBFBD><EFBFBD>ٶȵıʺ<C4B1>(<28>˶<EFBFBD><CBB6><EFBFBD><EFBFBD>ƿ<EFBFBD>)
|
|
|
|
|
int m_PenOffsetObj;//<2F><><EFBFBD><EFBFBD>S <20><><EFBFBD>ƶ<EFBFBD>ʱƽ<CAB1><C6BD>obj <20><><EFBFBD><EFBFBD><EFBFBD>ıʺ<C4B1>
|
|
|
|
|
int m_PenFindOrignXY;//XY ƽ̨<C6BD><CCA8>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>
|
|
|
|
|
int m_PenManualMoveX;//<2F>ֶ<EFBFBD><D6B6>ƶ<EFBFBD>ƽ̨X <20>ٶ<EFBFBD>
|
|
|
|
|
int m_PenManualMoveY;//<2F>ֶ<EFBFBD><D6B6>ƶ<EFBFBD>ƽ̨Y <20>ٶ<EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern CPenParMgr *gPenParMgr;
|