新增IO口状态的读取和速度参数保存为EF8000 DAT文件格式。
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
#include "StdAfx.h"
|
||||
#include <WinDef.h>
|
||||
#include <WinBase.h>
|
||||
#include <math.h>
|
||||
#include "EF8000_Interface.h "
|
||||
|
||||
|
||||
CEF8000_Interface::CEF8000_Interface()
|
||||
{
|
||||
for (int j=0;j<15;j++)
|
||||
{
|
||||
for (int i=0;i<4;i++)
|
||||
{
|
||||
Set_Speed[j][i]=0;
|
||||
}
|
||||
}
|
||||
for (int i=0;i<15;i++)
|
||||
{
|
||||
slow_dis[i]=0.0;
|
||||
}
|
||||
for (int i=0;i<3;i++)
|
||||
{
|
||||
g_precision[i]=0.0;
|
||||
}
|
||||
}
|
||||
|
||||
CEF8000_Interface::~CEF8000_Interface()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOL CEF8000_Interface::SaveSpeedParameter(CString _FileName)
|
||||
{
|
||||
FILE* iFileHandle=NULL;
|
||||
iFileHandle=FileOpen(_FileName,fmOpenWrite);
|
||||
if (iFileHandle)
|
||||
{
|
||||
FileSeek(iFileHandle,0,0);
|
||||
FileWrite(iFileHandle,&Set_Speed,sizeof(Set_Speed));
|
||||
FileWrite(iFileHandle,&slow_dis,sizeof(slow_dis));
|
||||
FileWrite(iFileHandle,&g_precision,sizeof(g_precision));
|
||||
FileWrite(iFileHandle,&Image_Info.m_Motor_Dx,sizeof(Image_Info.m_Motor_Dx));
|
||||
FileWrite(iFileHandle,&Image_Info.m_Motor_Dy,sizeof(Image_Info.m_Motor_Dy));
|
||||
FileWrite(iFileHandle,&Image_Info.m_Motor_Dz,sizeof(Image_Info.m_Motor_Dz));
|
||||
FileWrite(iFileHandle,&Image_Info.m_Motor_Plus_Num,sizeof(Image_Info.m_Motor_Plus_Num));
|
||||
FileClose(iFileHandle);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
BOOL CEF8000_Interface::OpenSpeedParameter(CString _FileName)
|
||||
{
|
||||
FILE* iFileHandle=NULL;
|
||||
iFileHandle=FileOpen(_FileName,fmOpenRead);
|
||||
if (iFileHandle)
|
||||
{
|
||||
FileSeek(iFileHandle,0,0);
|
||||
FileRead(iFileHandle,&Set_Speed,sizeof(Set_Speed));
|
||||
FileRead(iFileHandle,&slow_dis,sizeof(slow_dis));
|
||||
FileRead(iFileHandle,&g_precision,sizeof(g_precision));
|
||||
FileRead(iFileHandle,&Image_Info.m_Motor_Dx,sizeof(Image_Info.m_Motor_Dx));
|
||||
FileRead(iFileHandle,&Image_Info.m_Motor_Dy,sizeof(Image_Info.m_Motor_Dy));
|
||||
FileRead(iFileHandle,&Image_Info.m_Motor_Dz,sizeof(Image_Info.m_Motor_Dz));
|
||||
FileRead(iFileHandle,&Image_Info.m_Motor_Plus_Num,sizeof(Image_Info.m_Motor_Plus_Num));
|
||||
FileClose(iFileHandle);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================
|
||||
FILE* CEF8000_Interface::FileOpen(const CString filename,const int Mode)
|
||||
{
|
||||
CString fileMode(_T("rb"));
|
||||
switch (Mode)
|
||||
{
|
||||
case fmOpenRead: fileMode =_T("rb"); break;
|
||||
case fmOpenWrite: fileMode =_T("wb"); break;
|
||||
case fmOpenReadWrite:fileMode =_T("wb+"); break;
|
||||
}
|
||||
FILE *FileStream = _tfopen(filename, fileMode);
|
||||
return FileStream;
|
||||
|
||||
};
|
||||
//===========================================================
|
||||
int CEF8000_Interface::FileSeek(FILE * _Handle, long _Offset, int _Origin)
|
||||
{
|
||||
return fseek(_Handle,_Offset,_Origin);
|
||||
};
|
||||
|
||||
//===========================================================
|
||||
int CEF8000_Interface::FileRead(FILE * _Handle, void *_Buffer, int _Count)
|
||||
{
|
||||
size_t t(0);
|
||||
t= fread(_Buffer,_Count,1,_Handle);
|
||||
return _Count;
|
||||
};
|
||||
|
||||
//===========================================================
|
||||
int CEF8000_Interface::FileWrite(FILE * _Handle, const void *_Buffer, int _Count)
|
||||
{
|
||||
fwrite(_Buffer,_Count,1,_Handle);
|
||||
return _Count;
|
||||
};
|
||||
//===========================================================
|
||||
int CEF8000_Interface::FileClose(FILE * _Handle)
|
||||
{
|
||||
return fclose(_Handle);
|
||||
};
|
||||
@@ -0,0 +1,602 @@
|
||||
// protocol for control SevenOcean's Machine
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#ifndef EF8000_INTERFACE_H_INCLUDED_
|
||||
#define EF8000_INTERFACE_H_INCLUDED_
|
||||
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "DLL.h"
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(16)
|
||||
/*
|
||||
struct PointDB
|
||||
{
|
||||
double _x;
|
||||
double _y;
|
||||
PointDB()
|
||||
{
|
||||
_x=0.0;
|
||||
_y=0.0;
|
||||
}
|
||||
|
||||
PointDB(double x,double y)
|
||||
{
|
||||
_x=x;
|
||||
_y=y;
|
||||
}
|
||||
|
||||
PointDB operator-(PointDB& pot)
|
||||
{
|
||||
PointDB temp;
|
||||
temp._x=_x-pot._x;
|
||||
temp._y=_y-pot._y;
|
||||
return temp;
|
||||
}
|
||||
|
||||
PointDB operator+(PointDB& pot)
|
||||
{
|
||||
PointDB temp;
|
||||
temp._x=_x+pot._x;
|
||||
temp._y=_y+pot._y;
|
||||
return temp;
|
||||
}
|
||||
|
||||
PointDB operator/(double div)
|
||||
{
|
||||
PointDB temp;
|
||||
temp._x=_x/div;
|
||||
temp._y=_y/div;
|
||||
return temp;
|
||||
}
|
||||
|
||||
PointDB operator*(double mul)
|
||||
{
|
||||
PointDB temp;
|
||||
temp._x=_x*mul;
|
||||
temp._y=_y*mul;
|
||||
return temp;
|
||||
}
|
||||
bool operator==(PointDB& pot) { return _x==pot._x&&_y==pot._y; }
|
||||
PointDB operator=(PointDB pot) { _x=pot._x; _y=pot._y; return (*this); }
|
||||
double length()
|
||||
{
|
||||
return sqrt(_x*_x+_y*_y);
|
||||
}
|
||||
};
|
||||
|
||||
typedef struct light_value
|
||||
{
|
||||
char top_value;
|
||||
char bom_value;
|
||||
char fan_value;
|
||||
char bom1_value;
|
||||
char bom2_value;
|
||||
char fan1_switch;
|
||||
char fan2_switch;
|
||||
}g_light2;
|
||||
|
||||
typedef struct Dev_Info
|
||||
{
|
||||
//CWnd * m_cWnd;
|
||||
HWND g_USB_hWnd;
|
||||
HWND g_hWnd_Display;//显示主窗口
|
||||
HWND g_hWnd_Msg;//消息主窗口
|
||||
int g_Card_Num;
|
||||
int g_Card_No;
|
||||
int g_Switch_No;//显示通道
|
||||
int g_Width;
|
||||
int g_Height;
|
||||
// BYTE pBuf[640*480*2];
|
||||
int g_Sharpness; //锐度
|
||||
int g_Saturation;//饱和度
|
||||
int g_Hue;//色度
|
||||
int g_Contrast;//对比度
|
||||
int g_Brightness;//亮度
|
||||
char g_Picture_Type;//0-bmp,1-jpg
|
||||
char StrFileName[50];
|
||||
int cap_xa;
|
||||
int cap_ya;
|
||||
int cap_xb;
|
||||
int cap_yb;
|
||||
int disp_xa;
|
||||
int disp_ya;
|
||||
int disp_xb;
|
||||
int disp_yb;
|
||||
char IOin;
|
||||
char IOout;
|
||||
|
||||
BYTE RD_Usb_Dat[64];
|
||||
BYTE WR_Usb_Dat[64];
|
||||
BYTE User_Dat[250];
|
||||
unsigned long RD_Usb_Dat_Length;
|
||||
unsigned long WR_Usb_Dat_Length;
|
||||
char MoveX_Value;
|
||||
char MoveY_Value;
|
||||
char MoveZ_Value;
|
||||
char MoveV_Value;
|
||||
double MoveToX_Value;
|
||||
double MoveToY_Value;
|
||||
double MoveToZ_Value;
|
||||
char MoveToV_Value;
|
||||
double MaxisX;
|
||||
double MaxisY;
|
||||
double MaxisZ;
|
||||
int Fan_Light_Size;
|
||||
int Top_Light_Size;
|
||||
int Bottom_Light_Size;
|
||||
char Light_Value[14];
|
||||
char Light_Switch;
|
||||
int light_size_value;
|
||||
|
||||
BYTE *pBit;
|
||||
int startX;
|
||||
int startY;
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
double coorX;
|
||||
double coorY;
|
||||
int coorX_Off;
|
||||
int coorY_Off;
|
||||
double ValueZ;
|
||||
char rect_flag;
|
||||
int bar_type;
|
||||
int bar_num;
|
||||
|
||||
char g_type;
|
||||
char g_mode;
|
||||
char g_base;
|
||||
char g_fresh;
|
||||
char g_start;
|
||||
char g_hold;
|
||||
float g_slow;
|
||||
float g_precision;
|
||||
char get_xy_flag_num;
|
||||
char draw_num;
|
||||
int bar_dir;
|
||||
int Dog_Cmd;
|
||||
int User_Dat_Len;
|
||||
int MaxisX_Dir;
|
||||
int MaxisY_Dir;
|
||||
int MaxisZ_Dir;
|
||||
char Face_Flag;
|
||||
//double Get_Axis_Z[SET_FACE_NUM];
|
||||
//double Get_Image_Value[SET_FACE_NUM];
|
||||
int g_Face_Index;
|
||||
double Org_AbsX;
|
||||
double Org_AbsY;
|
||||
double Org_AbsZ;
|
||||
|
||||
|
||||
|
||||
double g_Bar_Scalex;
|
||||
double g_Bar_Scaley;
|
||||
|
||||
double g_Bar_Orgx;
|
||||
double g_Bar_Orgy;
|
||||
|
||||
double g_Bar_curx;
|
||||
double g_Bar_cury;
|
||||
|
||||
double MaxisX1;
|
||||
double MaxisY1;
|
||||
double MaxisZ1;
|
||||
double MaxisX_Scale;
|
||||
double MaxisY_Scale;
|
||||
double MaxisZ_Scale;
|
||||
|
||||
double g_Bar_dirx;
|
||||
double g_Bar_diry;
|
||||
|
||||
int Bar_fresh_flag;
|
||||
|
||||
char Usb_Cmd;
|
||||
char m_Usb_Cmd;
|
||||
char m_Usb_type;
|
||||
double m_Usb_dat;
|
||||
|
||||
double g_Bar_LineScaleX;
|
||||
double g_Bar_LineScaleY;
|
||||
double ResultVZ;
|
||||
|
||||
char Diy_Face_Flag;
|
||||
double Diy_x;
|
||||
double Diy_y;
|
||||
|
||||
double Face_Long_Dis;
|
||||
double Face_Short_Dis;
|
||||
double Face_Long_Step;
|
||||
double Face_Short_Step;
|
||||
|
||||
int Mdat1;
|
||||
int Mdat2;
|
||||
int Mdat3;
|
||||
int Mdat4;
|
||||
int Mdat5;
|
||||
int Mdat6;
|
||||
|
||||
int Mdat;
|
||||
char value;
|
||||
|
||||
long Max_ToV;
|
||||
int Min_ToV;
|
||||
int g_Rule_Type;//1,旧板,2-新板
|
||||
unsigned long g_Axis_V;
|
||||
long Org_AbsV;
|
||||
int BarCode_Width;
|
||||
int BarCode_Height;
|
||||
|
||||
double XT_scale;
|
||||
double XM_scale;
|
||||
double XB_scale;
|
||||
|
||||
double YL_scale;
|
||||
double YM_scale;
|
||||
double YR_scale;
|
||||
|
||||
char Enable_Face_flag;
|
||||
char g_Check_BarCode_Flag ;
|
||||
//FP g_BarCode_List[BAR_CODE_WIDTH*BAR_CODE_HEIGHT];
|
||||
// vector <FP> g_BarCode_List;
|
||||
|
||||
g_light2 g_light1;
|
||||
char g_sys_reset_flag;
|
||||
char Adc_Num;
|
||||
int Adc_Value[10];
|
||||
char Adc_No;
|
||||
int g_Adc_Value;
|
||||
|
||||
int motor_type;
|
||||
|
||||
double motor_ScaleX;
|
||||
double motor_ScaleY;
|
||||
double motor_ScaleZ;
|
||||
|
||||
char motor_check_flag;
|
||||
char g_video_type;
|
||||
|
||||
char bar_XY_type;//barcode XY 读数坐标对换
|
||||
|
||||
char Set_Current_Flag;
|
||||
//video_80M g_video_80M;
|
||||
|
||||
|
||||
char m_Aeen;
|
||||
BYTE m_AeTarget;
|
||||
int m_BGain;
|
||||
char m_bColorCorrect;
|
||||
BYTE m_Contrast;
|
||||
int m_ExpTime;
|
||||
int m_AnalogGain;
|
||||
BYTE m_Gamma;
|
||||
int m_GGain;
|
||||
int m_RGain;
|
||||
BYTE m_Saturation;
|
||||
BYTE m_FrameSpeed;
|
||||
UINT m_StrobleDelay;
|
||||
UINT m_StrobleDuration;
|
||||
UINT m_TriggerDelay;
|
||||
char m_Mode;
|
||||
char m_Save_Mode;
|
||||
UINT m_RawTime;
|
||||
|
||||
double m_Motor_Dx;
|
||||
double m_Motor_Dy;
|
||||
double m_Motor_Dz;
|
||||
int m_Motor_Plus_Num;
|
||||
char m_face_mode;
|
||||
char g_M_Count_Flag;
|
||||
char Get_Plc_Dat;
|
||||
char Set_Plc_Dat;
|
||||
|
||||
double g_ProbeX;
|
||||
double g_ProbeY;
|
||||
double g_ProbeZ;
|
||||
char g_video_type1;
|
||||
int g_Cap_Image;
|
||||
double g_Angle;
|
||||
char g_Debug_Video;
|
||||
int bar_Len_Type;
|
||||
int g_BarY_dir;
|
||||
float g_Lase1;
|
||||
float g_Lase2;
|
||||
char g_BarCode_Dir_Flag;
|
||||
|
||||
int g_HOff1;// = 1192;
|
||||
int g_VOff1;
|
||||
int g_HOff2;// = 1192;
|
||||
int g_VOff2;
|
||||
int g_Add_Pic_Flag;
|
||||
int Lase_USB_Type;
|
||||
int g_OScreen_Flag;
|
||||
|
||||
bool g_Mon;
|
||||
bool g_MirrorV;
|
||||
bool g_MirrorH;
|
||||
char g_M1k_Mode;
|
||||
int BarCodeX;
|
||||
int BarCodeY;
|
||||
int RunBar_Mode;
|
||||
|
||||
float Axis_X;
|
||||
float Axis_Y;
|
||||
|
||||
float Bar_Ofx;
|
||||
float Bar_Ofy;
|
||||
float Bar_X;
|
||||
float Bar_Y;
|
||||
|
||||
int Bar_Filter_Mode;
|
||||
int g_Set_Area_Flag;
|
||||
PointDB g_Set_Areas[5];
|
||||
int gFrameKey;
|
||||
|
||||
float Bar_Scale_Unit;
|
||||
int g_ITO_Flag;
|
||||
int g_face_flag;
|
||||
|
||||
int g_Nav_Flag;
|
||||
int g_Video_Input_Mode;
|
||||
int gAutoZoomFlag;
|
||||
|
||||
Dev_Info()
|
||||
{
|
||||
g_hWnd_Display = NULL;
|
||||
g_hWnd_Msg = NULL;
|
||||
g_Card_Num = 0;
|
||||
g_Card_No = 0;
|
||||
g_Switch_No = 0;
|
||||
g_Width = 640;
|
||||
g_Height = 480;
|
||||
g_Sharpness = 0;
|
||||
g_Saturation = 0;
|
||||
g_Hue = 0;
|
||||
g_Contrast = 0;
|
||||
g_Picture_Type = 0;
|
||||
|
||||
cap_xa = 0;
|
||||
cap_ya = 0;
|
||||
cap_xb = 640;
|
||||
cap_yb = 480;
|
||||
|
||||
disp_xa = 0;
|
||||
disp_ya = 0;
|
||||
disp_xb = 640;
|
||||
disp_yb = 480;
|
||||
|
||||
IOin = 0;
|
||||
IOout = 0;
|
||||
RD_Usb_Dat_Length=0;
|
||||
WR_Usb_Dat_Length=0;
|
||||
MoveX_Value=0;
|
||||
MoveY_Value=0;
|
||||
MoveZ_Value=0;
|
||||
MoveV_Value=0;
|
||||
MoveToX_Value=0;
|
||||
MoveToY_Value=0;
|
||||
MoveToZ_Value=0;
|
||||
MoveToV_Value=0;
|
||||
MaxisX=0;
|
||||
MaxisY=0;
|
||||
MaxisZ=0;
|
||||
Fan_Light_Size=0;
|
||||
Top_Light_Size=0;
|
||||
Bottom_Light_Size=0;
|
||||
Light_Switch=0;
|
||||
light_size_value=0;
|
||||
|
||||
pBit=NULL;
|
||||
startX=0;
|
||||
startY=0;
|
||||
nWidth=0;
|
||||
nHeight=0;
|
||||
coorX=0;
|
||||
coorY=0;
|
||||
coorX_Off=0;
|
||||
coorY_Off=0;
|
||||
ValueZ=0;
|
||||
rect_flag=0;
|
||||
bar_type=2;
|
||||
bar_num=10;
|
||||
|
||||
g_mode=1;
|
||||
g_base=10;
|
||||
g_fresh=10;
|
||||
g_start=100;
|
||||
g_hold=10;
|
||||
g_slow=1;
|
||||
g_precision=(float)0.005;
|
||||
get_xy_flag_num=3;
|
||||
draw_num=0;
|
||||
bar_dir=0;
|
||||
Dog_Cmd=0;
|
||||
User_Dat_Len=0;
|
||||
MaxisX_Dir=1;
|
||||
MaxisY_Dir=1;
|
||||
MaxisZ_Dir=1;
|
||||
Face_Flag=0;
|
||||
g_Face_Index=150;
|
||||
Org_AbsX=0;
|
||||
Org_AbsY=0;
|
||||
Org_AbsZ=0;
|
||||
|
||||
g_Bar_Scalex=0.00242209;
|
||||
g_Bar_Scaley=0.00247525;
|
||||
g_Bar_Orgx=0;
|
||||
g_Bar_Orgy=0;
|
||||
g_Bar_curx=0;
|
||||
g_Bar_cury=0;
|
||||
|
||||
MaxisX1=0;
|
||||
MaxisY1=0;
|
||||
|
||||
g_Bar_dirx=1;
|
||||
g_Bar_diry=-1;
|
||||
Bar_fresh_flag=0;
|
||||
|
||||
Usb_Cmd=0;
|
||||
m_Usb_Cmd=0;
|
||||
m_Usb_type=0;
|
||||
m_Usb_dat=0;
|
||||
|
||||
MaxisX_Scale=0.5;
|
||||
MaxisY_Scale=0.5;
|
||||
MaxisZ_Scale=0.5;
|
||||
|
||||
g_Bar_LineScaleX=1;
|
||||
g_Bar_LineScaleY=1;
|
||||
ResultVZ=0;
|
||||
Diy_Face_Flag=0;
|
||||
Diy_x = 0;
|
||||
Diy_y = 0;
|
||||
|
||||
Face_Long_Dis = 0;
|
||||
Face_Short_Dis = 0;
|
||||
Face_Long_Step = 0;
|
||||
Face_Short_Step = 0;
|
||||
|
||||
Mdat1 = 0;
|
||||
Mdat2 = 0;
|
||||
Mdat3 = 0;
|
||||
Mdat4 = 0;
|
||||
Mdat5 = 0;
|
||||
Mdat6 = 0;
|
||||
|
||||
Mdat = 0;
|
||||
value = 0;
|
||||
|
||||
Max_ToV = 2800;
|
||||
Min_ToV = 10;
|
||||
g_Rule_Type = 2;
|
||||
g_Axis_V = 0;
|
||||
Org_AbsV = 0;
|
||||
BarCode_Width = 600;
|
||||
BarCode_Height = 500;
|
||||
|
||||
XT_scale = 1;
|
||||
XM_scale = 1;
|
||||
XB_scale = 1;
|
||||
|
||||
YL_scale = 1;
|
||||
YM_scale = 1;
|
||||
YR_scale = 1;
|
||||
Enable_Face_flag = 0;
|
||||
g_Check_BarCode_Flag = 0;
|
||||
g_sys_reset_flag = 0;
|
||||
Adc_Num = 0;
|
||||
Adc_No = 0;
|
||||
g_Adc_Value = 0;
|
||||
motor_type = 0;
|
||||
|
||||
motor_ScaleX = 0.001;
|
||||
motor_ScaleY = 0.001;
|
||||
motor_ScaleZ = 0.001;
|
||||
|
||||
motor_check_flag = 0;
|
||||
g_video_type = 0;
|
||||
|
||||
bar_XY_type = 1;
|
||||
Set_Current_Flag = 0;
|
||||
|
||||
m_Aeen=0;
|
||||
m_AeTarget=1;
|
||||
m_BGain=1;
|
||||
m_bColorCorrect=0;
|
||||
m_Contrast=1;
|
||||
m_ExpTime=1;
|
||||
m_AnalogGain=5;
|
||||
m_Gamma=5;
|
||||
m_GGain=10;
|
||||
m_RGain=10;
|
||||
m_Saturation=1;
|
||||
m_FrameSpeed=5;
|
||||
m_StrobleDelay=5;
|
||||
m_StrobleDuration=5;
|
||||
m_TriggerDelay=5;
|
||||
m_Mode=3;
|
||||
m_Save_Mode=0;
|
||||
m_RawTime=1;
|
||||
|
||||
m_Motor_Dx=1.5;
|
||||
m_Motor_Dy=1.5;
|
||||
m_Motor_Dz=1.5;
|
||||
m_Motor_Plus_Num=10000;
|
||||
m_face_mode = 1;
|
||||
g_M_Count_Flag=0;
|
||||
g_video_type1=1;
|
||||
g_Cap_Image=0;
|
||||
g_Angle=0;
|
||||
g_Debug_Video=0;
|
||||
bar_Len_Type=0;
|
||||
g_BarY_dir=1;
|
||||
g_Lase1=0;
|
||||
g_Lase2=0;
|
||||
g_BarCode_Dir_Flag=0;
|
||||
|
||||
g_HOff1 = 1192;
|
||||
g_VOff1 = 1134;
|
||||
|
||||
g_HOff2 = 1192;
|
||||
g_VOff2 = 1134;
|
||||
g_Add_Pic_Flag=0;
|
||||
Lase_USB_Type=0;
|
||||
g_OScreen_Flag=0;
|
||||
g_MirrorV=0;
|
||||
g_MirrorH=0;
|
||||
g_M1k_Mode=0;
|
||||
g_Mon=0;
|
||||
|
||||
BarCodeX=0;
|
||||
BarCodeY=0;
|
||||
RunBar_Mode=0;
|
||||
Bar_Filter_Mode=0;
|
||||
g_Set_Area_Flag=0;
|
||||
gFrameKey=10;
|
||||
Bar_Scale_Unit=0.5;
|
||||
g_ITO_Flag=0;
|
||||
g_face_flag=0;
|
||||
g_Nav_Flag=0;
|
||||
g_Video_Input_Mode=0;
|
||||
gAutoZoomFlag=0;
|
||||
|
||||
};
|
||||
}g_Dev_Info;
|
||||
*/
|
||||
enum FileHandleMode
|
||||
{
|
||||
fmOpenRead=0,
|
||||
fmOpenWrite,
|
||||
fmOpenReadWrite
|
||||
};
|
||||
|
||||
//======================================================================================
|
||||
class CEF8000_Interface
|
||||
{
|
||||
public:
|
||||
BYTE Set_Speed[15][4];
|
||||
double slow_dis[15];
|
||||
double g_precision[3];
|
||||
Dev_Info Image_Info;
|
||||
|
||||
public:
|
||||
CEF8000_Interface();
|
||||
~CEF8000_Interface();
|
||||
BOOL SaveSpeedParameter(CString _FileName);
|
||||
BOOL OpenSpeedParameter(CString _FileName);
|
||||
|
||||
protected:
|
||||
FILE* FileOpen(const CString filename,const int Mode);
|
||||
int FileSeek(FILE * _Handle, long _Offset, int _Origin);
|
||||
int FileRead(FILE * _Handle, void *_Buffer, int _Count);
|
||||
int FileWrite(FILE * _Handle, const void *_Buffer, int _Count);
|
||||
int FileClose(FILE * _Handle);
|
||||
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
@@ -218,7 +218,11 @@ void CSO7_Proto::_process_rcv_transfer_data(int iEP)
|
||||
break;
|
||||
case CT_READ_AXISV:
|
||||
_process_SO7_CMD_READ_V_DATA();
|
||||
break;
|
||||
case CT_READ_IO_DAT:
|
||||
_process_SO7_CMD_READ_INPUT_PORT_STATUS();
|
||||
break;
|
||||
|
||||
default:
|
||||
TRACE1("_process_rcv_transfer_data() : Unknown ep_buff[EP_02_CMD_IDX]._save_send_cmd : %X \r\n", ep_buff[EP_02_CMD_IDX]._save_send_cmd);
|
||||
TRACE1("_process_rcv_transfer_data() : Unknown ep_buff[EP_81_DATA_IDX]._buffer[0] : %X \r\n", ep_buff[EP_81_DATA_IDX]._buffer[0]);
|
||||
@@ -506,6 +510,7 @@ CSO7_Proto::CSO7_Proto()
|
||||
g_machine.s_machine_config._dXYZSpeed=50;
|
||||
g_machine.InterruptFlag[0]=0;
|
||||
g_machine.InterruptFlag[1]=0;
|
||||
g_machine.InPortStatus=0;
|
||||
so7_motion_reset_controller_parameter();
|
||||
m_bHomingActive = false;
|
||||
g_pLogger = new CLogger(_T("\\UtilityDebug.Log"));
|
||||
@@ -3956,6 +3961,25 @@ SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_OPEN_KEYENCE_LASER()
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_READ_INPUT_PORT_STATUS(char AddrType)
|
||||
{
|
||||
WaitForSingleObject(g_hEP02_Serial_Mutex, INFINITE);
|
||||
memset(ep_buff[EP_02_CMD_IDX]._buffer, 0x00, MAX_BUFF_SIZE);
|
||||
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer) = CT_DATA;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+1) = CT_READ_IO_DAT;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+2)=AddrType;
|
||||
|
||||
ep_buff[EP_02_CMD_IDX]._size = 0x03;
|
||||
ep_buff[EP_82_DATA_IDX]._size = 0x01;
|
||||
|
||||
g_hEP02_Thread_State=THREAD_RUNNING_STATE1;
|
||||
g_hEP8x_Thread_State=THREAD_RUNNING_STATE2;
|
||||
_do_single_threaded_usb_comm(EP_02_CMD_IDX);
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_MOVE_X()
|
||||
@@ -4210,3 +4234,10 @@ SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_INTERRUPT_MESSAGE()
|
||||
g_machine.InterruptFlag[1]=*(ep_buff[EP_81_DATA_IDX]._buffer+1);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_INPUT_PORT_STATUS()
|
||||
{
|
||||
g_machine.InPortStatus=0;
|
||||
g_machine.InPortStatus=*(ep_buff[EP_82_DATA_IDX]._buffer);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
@@ -59,7 +59,6 @@
|
||||
const long MAX_INTENSITY = 0x3FF;
|
||||
#define MAXLIGHTVALUE 256
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
//****************************************************************************************************
|
||||
@@ -197,6 +196,7 @@ struct struct_so7_machine
|
||||
char Sys_Reset_Flag;
|
||||
char cVerNumber;
|
||||
char InterruptFlag[2];
|
||||
char InPortStatus;
|
||||
int _motor_pulse_num;
|
||||
|
||||
struct s_so7_axis x;
|
||||
@@ -398,6 +398,7 @@ public:
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_INTERRUPT_MESSAGE();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_ZOOM_MOTION_STATUS();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_OPEN_KEYENCE_LASER();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_INPUT_PORT_STATUS(char AddrType);
|
||||
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_MOVE_X();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_MOVE_Y();
|
||||
@@ -427,6 +428,7 @@ public:
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_SPEED_PRECISIONZ();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_INTERRUPT_MESSAGE();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_ZOOM_MOTION_STATUS();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_INPUT_PORT_STATUS();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1289,3 +1289,149 @@ Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
@@ -3,13 +3,13 @@ SPEED_BASE_X1=5
|
||||
SPEED_MAX_X1=168
|
||||
SPEED_START_X1=28
|
||||
SPEED_FRESH_X1=10
|
||||
SPEED_SLOW_X1=0.509
|
||||
SPEED_SLOW_X1=0.510
|
||||
;
|
||||
SPEED_BASE_X2=3
|
||||
SPEED_MAX_X2=50
|
||||
SPEED_START_X2=10
|
||||
SPEED_FRESH_X2=10
|
||||
SPEED_SLOW_X2=0.109
|
||||
SPEED_SLOW_X2=0.110
|
||||
;
|
||||
SPEED_BASE_X3=2
|
||||
SPEED_MAX_X3=5
|
||||
@@ -63,13 +63,13 @@ SPEED_BASE_Z1=5
|
||||
SPEED_MAX_Z1=130
|
||||
SPEED_START_Z1=28
|
||||
SPEED_FRESH_Z1=10
|
||||
SPEED_SLOW_Z1=0.509
|
||||
SPEED_SLOW_Z1=0.510
|
||||
;
|
||||
SPEED_BASE_Z2=3
|
||||
SPEED_MAX_Z2=60
|
||||
SPEED_START_Z2=10
|
||||
SPEED_FRESH_Z2=10
|
||||
SPEED_SLOW_Z2=0.109
|
||||
SPEED_SLOW_Z2=0.110
|
||||
;
|
||||
SPEED_BASE_Z3=2
|
||||
SPEED_MAX_Z3=5
|
||||
@@ -89,13 +89,13 @@ SPEED_START_Z5=80
|
||||
SPEED_FRESH_Z5=10
|
||||
SPEED_SLOW_Z5=0.001
|
||||
;
|
||||
X_MOTOR_PRECISION=0.001
|
||||
Y_MOTOR_PRECISION=0.001
|
||||
Z_MOTOR_PRECISION=0.001
|
||||
X_MOTOR_PRECISION=0.010
|
||||
Y_MOTOR_PRECISION=0.010
|
||||
Z_MOTOR_PRECISION=0.100
|
||||
;
|
||||
X_MOTOR_WHEELBASE=25.000
|
||||
X_MOTOR_WHEELBASE=19.990
|
||||
Y_MOTOR_WHEELBASE=20.000
|
||||
Z_MOTOR_WHEELBASE=2.999
|
||||
Z_MOTOR_WHEELBASE=3.000
|
||||
;
|
||||
MOTOR_PULSE_NUM=10000
|
||||
;
|
||||
@@ -104,11 +104,11 @@ X_SCALE_RESOLUTION=0.400
|
||||
Y_SCALE_RESOLUTION=0.400
|
||||
Z_SCALE_RESOLUTION=0.400
|
||||
;
|
||||
X_NEG_WORKING_LIMIT=0.000
|
||||
X_NEG_WORKING_LIMIT=-0.000
|
||||
Y_NEG_WORKING_LIMIT=0.000
|
||||
Z_NEG_WORKING_LIMIT=0.000
|
||||
;
|
||||
X_POS_WORKING_LIMIT=400.000
|
||||
X_POS_WORKING_LIMIT=-0.000
|
||||
Y_POS_WORKING_LIMIT=300.000
|
||||
Z_POS_WORKING_LIMIT=200.000
|
||||
;
|
||||
|
||||
@@ -44,3 +44,53 @@ Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
@@ -32,6 +32,12 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
|
||||
CAPTION "SevenOcean Utility"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "First",IDC_RADIO_SPEED_GEAR1,"Button",BS_AUTORADIOBUTTON | WS_GROUP,216,144,30,10
|
||||
CONTROL "Second",IDC_RADIO_SPEED_GEAR2,"Button",BS_AUTORADIOBUTTON,216,158,39,10
|
||||
CONTROL "Third",IDC_RADIO_SPEED_GEAR3,"Button",BS_AUTORADIOBUTTON,216,172,32,10
|
||||
CONTROL "Fourth",IDC_RADIO_SPEED_GEAR4,"Button",BS_AUTORADIOBUTTON,216,186,37,10
|
||||
CONTROL "Fifth",IDC_RADIO_SPEED_GEAR5,"Button",BS_AUTORADIOBUTTON,216,200,31,10
|
||||
GROUPBOX "Cmd",IDC_STATIC,17,216,379,46
|
||||
PUSHBUTTON "Start_Machine",IDC_BUTTON_START_SO7MACHINE,23,40,63,18
|
||||
PUSHBUTTON "Stop_Machine",IDC_BUTTON_STOP_SO7MACHINE,23,75,63,18
|
||||
PUSHBUTTON "Read XYZ Axis",IDC_BUTTON_SO7_READ_AXIS_XYZ,132,28,62,13
|
||||
@@ -55,21 +61,15 @@ BEGIN
|
||||
PUSHBUTTON "Y+",IDC_BUTTON_SO7_MOVE_Y_FRONT,154,159,25,12
|
||||
PUSHBUTTON "Y-",IDC_BUTTON_SO7_MOVE_Y_BACK,154,180,25,12
|
||||
PUSHBUTTON "X+",IDC_BUTTON_SO7_MOVE_X_RIGHT,180,169,25,12
|
||||
CONTROL "Fourth",IDC_RADIO_SPEED_GEAR4,"Button",BS_AUTORADIOBUTTON | WS_GROUP,216,190,37,10
|
||||
CONTROL "Third",IDC_RADIO_SPEED_GEAR3,"Button",BS_AUTORADIOBUTTON,216,175,32,10
|
||||
CONTROL "Second",IDC_RADIO_SPEED_GEAR2,"Button",BS_AUTORADIOBUTTON,216,160,39,10
|
||||
CONTROL "First",IDC_RADIO_SPEED_GEAR1,"Button",BS_AUTORADIOBUTTON,216,145,30,10
|
||||
PUSHBUTTON "Home XYZ",IDC_BUTTON_SO7_RESET_XYZ,274,140,76,14,BS_MULTILINE
|
||||
PUSHBUTTON "Hoom Manual",IDC_BUTTON_MANUAL_HOME,274,157,76,14
|
||||
PUSHBUTTON "Home Worktable Left",IDC_BUTTON_RESET_WORKTABLE,274,174,76,14
|
||||
PUSHBUTTON "Home Worktable Right",IDC_BUTTON_RESET_WORKTABLE_RIGHT,274,191,76,14
|
||||
PUSHBUTTON "Move\n To",IDC_BUTTON_MOVE_TO,359,142,32,27,BS_MULTILINE
|
||||
PUSHBUTTON "Auto Zoom",IDC_BUTTON_AUTO_ZOOM,359,177,32,27,BS_MULTILINE
|
||||
PUSHBUTTON "Set Reset Flag",IDC_BUTTON_SET_RESET_FLAG,27,234,61,14
|
||||
PUSHBUTTON "To Get Laser",IDC_BUTTON_GET_LASER,93,234,61,14
|
||||
PUSHBUTTON "Home V",IDC_BUTTON_RESET_V,159,234,61,14
|
||||
EDITTEXT IDC_EDIT_LIGHT_SIZE_VALUE,349,92,41,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_LIGHT_SWITCH,349,108,41,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Set Reset Flag",IDC_BUTTON_SET_RESET_FLAG,27,235,61,14
|
||||
PUSHBUTTON "To Get Laser",IDC_BUTTON_GET_LASER,95,235,61,14
|
||||
PUSHBUTTON "Home V",IDC_BUTTON_RESET_V,163,235,61,14
|
||||
EDITTEXT IDC_EDIT_X_SCALE_COEFFICIENT,46,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_Y_SCALE_COEFFICIENT,109,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_Z_SCALE_COEFFICIENT,172,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
@@ -77,10 +77,9 @@ BEGIN
|
||||
GROUPBOX "USB Control",IDC_STATIC,15,12,89,115
|
||||
GROUPBOX "Config",IDC_STATIC,13,129,55,83
|
||||
GROUPBOX "Get_Data",IDC_STATIC,114,13,98,115
|
||||
GROUPBOX "Cmd",IDC_STATIC,17,216,378,46
|
||||
PUSHBUTTON "当前探头:激光",IDC_BUTTON_PROBE_ONOFF,231,231,48,20,BS_MULTILINE
|
||||
PUSHBUTTON "当前状态:夹具开",IDC_BUTTON_FIXTURE_ONOFF,285,231,48,20,BS_MULTILINE
|
||||
PUSHBUTTON "当前状态:夹具上",IDC_BUTTON_FIXTURE_UPDOWN,339,231,48,20,BS_MULTILINE
|
||||
PUSHBUTTON "当前探头:激光",IDC_BUTTON_PROBE_ONOFF,273,369,48,20,BS_MULTILINE | NOT WS_VISIBLE
|
||||
PUSHBUTTON "当前状态:夹具开",IDC_BUTTON_FIXTURE_ONOFF,273,369,48,20,BS_MULTILINE | NOT WS_VISIBLE
|
||||
PUSHBUTTON "当前状态:夹具上",IDC_BUTTON_FIXTURE_UPDOWN,273,369,48,20,BS_MULTILINE | NOT WS_VISIBLE
|
||||
GROUPBOX "Ver NO.",IDC_STATIC,252,265,145,37
|
||||
LTEXT "Set Ver NO.",IDC_STATIC,273,282,39,8
|
||||
GROUPBOX "Common Cmd",IDC_STATIC,253,307,144,54
|
||||
@@ -96,11 +95,7 @@ BEGIN
|
||||
LTEXT "Coaxial",IDC_STATIC,231,99,24,8
|
||||
LTEXT "SegI",IDC_STATIC,236,72,16,8
|
||||
LTEXT "SegII",IDC_STATIC,236,86,18,8
|
||||
GROUPBOX "Light Size",IDC_STATIC,324,14,72,112
|
||||
CONTROL "Light1",IDC_RADIO_LIGHT1_SIZE,"Button",BS_AUTORADIOBUTTON,348,28,35,10
|
||||
CONTROL "Light2",IDC_RADIO_LIGHT2_SIZE,"Button",BS_AUTORADIOBUTTON,348,44,35,10
|
||||
CONTROL "Light3",IDC_RADIO_LIGHT3_SIZE,"Button",BS_AUTORADIOBUTTON,348,60,35,10
|
||||
CONTROL "Light4",IDC_RADIO_LIGHT4_SIZE,"Button",BS_AUTORADIOBUTTON,348,76,35,10
|
||||
GROUPBOX "Input Port Status",IDC_STATIC,321,14,72,111
|
||||
PUSHBUTTON "Exit",IDCANCEL,366,465,39,14
|
||||
LTEXT "x",IDC_STATIC,23,324,8,11
|
||||
LTEXT "y",IDC_STATIC,23,338,8,11
|
||||
@@ -128,14 +123,28 @@ BEGIN
|
||||
LTEXT "Probe",IDC_STATIC,189,310,20,8
|
||||
LTEXT "Pos Update Frequency",IDC_STATIC,104,384,74,8
|
||||
LTEXT "Spare1",IDC_STATIC,232,112,24,8
|
||||
LTEXT "Size",IDC_STATIC,328,94,15,8
|
||||
LTEXT "Switch",IDC_STATIC,326,110,20,8
|
||||
CTEXT "X",IDC_STATIC,70,273,8,8
|
||||
CTEXT "Y",IDC_STATIC,133,273,8,8
|
||||
CTEXT "Z",IDC_STATIC,195,273,8,8
|
||||
LTEXT "±ÈÀý ϵÊý",IDC_STATIC,23,281,18,18
|
||||
GROUPBOX "Set Gear",IDC_STATIC,208,132,56,81
|
||||
PUSHBUTTON "so7_config",IDC_BUTTON_SETUP_SO7CONFIG,20,184,44,23
|
||||
LTEXT "1",IDC_STATIC,337,27,8,8
|
||||
LTEXT "2",IDC_STATIC,337,43,8,8
|
||||
LTEXT "3",IDC_STATIC,337,59,8,8
|
||||
LTEXT "4",IDC_STATIC,337,75,8,8
|
||||
LTEXT "5",IDC_STATIC,337,91,8,8
|
||||
LTEXT "6",IDC_STATIC,337,107,8,8
|
||||
PUSHBUTTON "Read IO Status",IDC_BUTTON_SO7_READ_IN_PORT_STATUS,314,235,61,14
|
||||
CONTROL "Continuous",IDC_CHECK_CONTINUOUS_READ_IO_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,319,223,47,10
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT1,"MfcButton",WS_TABSTOP,353,24,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT2,"MfcButton",WS_TABSTOP,353,40,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT3,"MfcButton",WS_TABSTOP,353,56,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT4,"MfcButton",WS_TABSTOP,353,72,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT5,"MfcButton",WS_TABSTOP,353,88,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT6,"MfcButton",WS_TABSTOP,353,104,21,14
|
||||
EDITTEXT IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS,259,235,40,14,ES_AUTOHSCROLL
|
||||
LTEXT "Addr",IDC_STATIC,239,236,16,8
|
||||
END
|
||||
|
||||
IDD_S07_UTIL_SEND_PARAMETER DIALOGEX 0, 0, 753, 481
|
||||
@@ -833,6 +842,149 @@ IDI_ICON_GRAY ICON "res\\Gray.ico"
|
||||
IDI_ICON_WHITE ICON "res\\White.ico"
|
||||
IDI_ICON_RED ICON "res\\red.ico"
|
||||
IDI_ICON_BLACK ICON "res\\Black.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_SO7_UTIL_DIALOG DLGINIT
|
||||
BEGIN
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT1, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT2, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT3, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT4, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT5, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
IDC_MFCBUTTON_STATUS_IN_PORT6, 0x37c, 369, 0
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65,
|
||||
0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69,
|
||||
0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f,
|
||||
0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f,
|
||||
0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f,
|
||||
0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542,
|
||||
0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131,
|
||||
0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f,
|
||||
0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474,
|
||||
0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243,
|
||||
0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e,
|
||||
0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49,
|
||||
0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74,
|
||||
0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41,
|
||||
0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761,
|
||||
0x4f65, 0x526e, 0x6769, 0x7468, "\076"
|
||||
0
|
||||
END
|
||||
|
||||
#endif // Chinese (Simplified, PRC) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#include <math.h>
|
||||
#include "afxdialogex.h"
|
||||
#include "resource.h"
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "DrawGraph.h"
|
||||
#include "ProcessButton.h"
|
||||
#include "SO7_UtilDlg.h"
|
||||
#include "SO7_Send_Parameter.h"
|
||||
extern CSO7_Proto* m_pSO7_Proto;
|
||||
|
||||
extern CEF8000_Interface* m_pEF8000_Interface;
|
||||
#define PAUSE_TIME_CHANGE_PARAMETER 20
|
||||
#define MAX_SAMPLE_DIFF_VALUE 100
|
||||
//#include "INIFile.h"
|
||||
@@ -253,14 +254,30 @@ void CSO7_Send_Parameter::OnBnClickedOk()
|
||||
void CSO7_Send_Parameter::OnBnClickedButtonBrowse()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
m_csIniFile = "Utility_Config.ini";
|
||||
CFileDialog fileDialog(TRUE, _T("*.ini"),(LPCTSTR) m_csIniFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("INI files (*.ini)|*.ini||"), this);
|
||||
m_csIniFile = "motor";
|
||||
CString szFilter=_T("EF8000 DAT Files(*.dat)|*.dat|INI Files(*.ini)|*.ini|ALL Files(*.*)|*.*||");
|
||||
|
||||
CFileDialog fileDialog(TRUE, _T("*.dat"),(LPCTSTR) m_csIniFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, this);
|
||||
|
||||
if ( fileDialog.DoModal ()==IDOK )
|
||||
{
|
||||
m_csIniFile = fileDialog.GetPathName();
|
||||
GetDlgItem(IDC_EDIT_INPUT_FILE)->SetWindowText(m_csIniFile);
|
||||
m_pSO7_Proto->Load_SevenOcean_Inifile(m_csIniFile);
|
||||
|
||||
switch(fileDialog.m_ofn.nFilterIndex)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_pEF8000_Interface->OpenSpeedParameter(m_csIniFile);
|
||||
ParameterFormatEF8000ToSo7();
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_pSO7_Proto->Load_SevenOcean_Inifile(m_csIniFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ShowParameterOnEdit();
|
||||
m_StatusBar.SetText(_T("正在显示当前INI文档参数。"), 0, 0);
|
||||
}
|
||||
@@ -322,15 +339,28 @@ void CSO7_Send_Parameter::OnBnClickedButtonSave()
|
||||
CString PathName;
|
||||
CString path_and_fileName;
|
||||
|
||||
PathName=_T("Utility_Config.ini");
|
||||
CString szFilter=_T("INI Files(*.ini)|*.ini|ALL Files(*.*)|*.*||");
|
||||
CFileDialog fdlg(FALSE,_T("INI"),PathName,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,szFilter);
|
||||
PathName=_T("motor");
|
||||
CString szFilter=_T("EF8000 DAT Files(*.dat)|*.dat|INI Files(*.ini)|*.ini|ALL Files(*.*)|*.*||");
|
||||
CFileDialog fdlg(FALSE,_T("DAT"),PathName,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,szFilter);
|
||||
|
||||
if( fdlg.DoModal()==IDOK)
|
||||
{
|
||||
path_and_fileName=fdlg.GetPathName();
|
||||
ChangeParameterOnEdit();
|
||||
m_pSO7_Proto->Save_SevenOcean_Inifile(path_and_fileName);
|
||||
switch(fdlg.m_ofn.nFilterIndex)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
ParameterFormatSo7ToEF8000();
|
||||
m_pEF8000_Interface->SaveSpeedParameter(path_and_fileName);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_pSO7_Proto->Save_SevenOcean_Inifile(path_and_fileName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
CTmpString=_T("参数已保存至[")+path_and_fileName+_T("].");
|
||||
m_StatusBar.SetText(CTmpString, 0, 0);
|
||||
}
|
||||
@@ -369,6 +399,85 @@ void CSO7_Send_Parameter::OnBnClickedButtonReadParameterFromController()
|
||||
ShowParameterOnEdit();
|
||||
m_StatusBar.SetText(_T("运动参数已从控制器中读出。"), 0, 0);
|
||||
}
|
||||
//================================================================
|
||||
void CSO7_Send_Parameter::ParameterFormatSo7ToEF8000()
|
||||
{
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pEF8000_Interface->Set_Speed[j][0]=m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_base[j];
|
||||
m_pEF8000_Interface->Set_Speed[j][1]= m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_max[j];
|
||||
m_pEF8000_Interface->Set_Speed[j][2]=m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_start[j];
|
||||
m_pEF8000_Interface->Set_Speed[j][3]=m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_fresh[j];
|
||||
|
||||
m_pEF8000_Interface->slow_dis[j]=m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_slow_dis[j];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pEF8000_Interface->Set_Speed[j+5][0]=m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_base[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+5][1]= m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_max[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+5][2]=m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_start[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+5][3]=m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_fresh[j];
|
||||
|
||||
m_pEF8000_Interface->slow_dis[j+5]=m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_slow_dis[j];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pEF8000_Interface->Set_Speed[j+10][0]=m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_base[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+10][1]= m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_max[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+10][2]=m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_start[j];
|
||||
m_pEF8000_Interface->Set_Speed[j+10][3]=m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_fresh[j];
|
||||
|
||||
m_pEF8000_Interface->slow_dis[j+10]=m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_slow_dis[j];
|
||||
}
|
||||
|
||||
m_pEF8000_Interface->g_precision[0]=m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_precision;
|
||||
m_pEF8000_Interface->g_precision[1]=m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_precision;
|
||||
m_pEF8000_Interface->g_precision[2]=m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_precision;
|
||||
|
||||
m_pEF8000_Interface->Image_Info.m_Motor_Dx=m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_wheelbase;
|
||||
m_pEF8000_Interface->Image_Info.m_Motor_Dy=m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_wheelbase;
|
||||
m_pEF8000_Interface->Image_Info.m_Motor_Dz=m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_wheelbase;
|
||||
m_pEF8000_Interface->Image_Info.m_Motor_Plus_Num= m_pSO7_Proto->g_machine._motor_pulse_num;
|
||||
};
|
||||
//================================================================
|
||||
void CSO7_Send_Parameter::ParameterFormatEF8000ToSo7()
|
||||
{
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j+5][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j+5][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j+5][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j+5][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j+5];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j+10][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j+10][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j+10][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j+10][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j+10];
|
||||
}
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_precision=m_pEF8000_Interface->g_precision[0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_precision=m_pEF8000_Interface->g_precision[1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_precision= m_pEF8000_Interface->g_precision[2];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dx;
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dy;
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dz;
|
||||
m_pSO7_Proto->g_machine._motor_pulse_num= m_pEF8000_Interface->Image_Info.m_Motor_Plus_Num;
|
||||
};
|
||||
|
||||
//================================================================
|
||||
void CSO7_Send_Parameter::ChangeParameterOnEdit()
|
||||
|
||||
@@ -100,6 +100,10 @@ public:
|
||||
void Sample_Speed_Time_Curve();
|
||||
void Sample_Speed_Position_Curve();
|
||||
void Sample_Position_Time_Curve();
|
||||
//=============================================
|
||||
void ParameterFormatSo7ToEF8000();
|
||||
void ParameterFormatEF8000ToSo7();
|
||||
|
||||
//=============================================
|
||||
void OutputWithScroll(const CString &strNewText,CEdit &edtOutput);
|
||||
};
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
#include "SO7_UtilDlg.h"
|
||||
// CSO7_UtilDlg ¶Ô»°¿ò
|
||||
|
||||
#define HBIT0 0X01
|
||||
#define HBIT1 0X02
|
||||
#define HBIT2 0X04
|
||||
#define HBIT3 0X08
|
||||
#define HBIT4 0X10
|
||||
#define HBIT5 0X20
|
||||
#define HBIT6 0X40
|
||||
#define HBIT7 0X80
|
||||
|
||||
extern CPSerial* m_pSO7_PCDSerial;
|
||||
extern CSO7_Proto* m_pSO7_Proto;
|
||||
CLogger* g_pLoggerDebug=NULL;
|
||||
@@ -47,8 +56,6 @@ void CSO7_UtilDlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Text(pDX, IDC_EDIT_COAXIAL_LIGHT3, m_csFan1_Light_Switch);
|
||||
DDX_Text(pDX, IDC_EDIT_COAXIAL_LIGHT4, m_csFan2_Light_Switch);
|
||||
|
||||
DDX_Text(pDX, IDC_EDIT_LIGHT_SIZE_VALUE,m_cs_Light_Size_Value);
|
||||
DDX_Text(pDX, IDC_EDIT_LIGHT_SWITCH, m_cs_Light_Switch);
|
||||
DDX_Text(pDX, IDC_EDIT_SET_VER_NO, m_cs_Version_Number);
|
||||
|
||||
DDX_Text(pDX, IDC_EDIT_X_SCALE_COEFFICIENT, m_cs_XScaleCoeff);
|
||||
@@ -86,8 +93,6 @@ BEGIN_MESSAGE_MAP(CSO7_UtilDlg, CDialog)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_BOTTOM_LIGHT, &CSO7_UtilDlg::OnEnKillfocusEditBottomLight)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_RING_LIGHT, &CSO7_UtilDlg::OnEnKillfocusEditRingLight)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_COAXIAL_LIGHT, &CSO7_UtilDlg::OnEnKillfocusEditCoaxialLight)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_LIGHT_SIZE_VALUE, &CSO7_UtilDlg::OnEnKillfocusEditLightSizeValue)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_LIGHT_SWITCH, &CSO7_UtilDlg::OnEnKillfocusEditLightSwitch)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_COAXIAL_LIGHT2, &CSO7_UtilDlg::OnEnKillfocusEditCoaxialLight2)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_COAXIAL_LIGHT3, &CSO7_UtilDlg::OnEnKillfocusEditCoaxialLight3)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_COAXIAL_LIGHT4, &CSO7_UtilDlg::OnEnKillfocusEditCoaxialLight4)
|
||||
@@ -110,6 +115,9 @@ BEGIN_MESSAGE_MAP(CSO7_UtilDlg, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON_AUTO_ZOOM, &CSO7_UtilDlg::OnBnClickedButtonAutoZoom)
|
||||
ON_BN_CLICKED(IDC_BUTTON_MANUAL_HOME, &CSO7_UtilDlg::OnBnClickedButtonManualHome)
|
||||
ON_BN_CLICKED(IDC_BUTTON_SETUP_SO7CONFIG, &CSO7_UtilDlg::OnBnClickedButtonSetupSo7config)
|
||||
ON_BN_CLICKED(IDC_BUTTON_SO7_READ_IN_PORT_STATUS, &CSO7_UtilDlg::OnBnClickedButtonSo7ReadInPortStatus)
|
||||
ON_BN_CLICKED(IDC_RADIO_SPEED_GEAR5, &CSO7_UtilDlg::OnBnClickedRadioSpeedGear5)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS, &CSO7_UtilDlg::OnEnKillfocusEditSo7ReadIoStatusAddress)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
@@ -158,8 +166,6 @@ BOOL CSO7_UtilDlg::OnInitDialog()
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT2)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT3)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT4)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SIZE_VALUE)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SWITCH)->EnableWindow(false);
|
||||
|
||||
GetDlgItem(IDC_BUTTON_SETUP_SO7CONFIG)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_LOAD_SO7CONFIG)->EnableWindow(false);
|
||||
@@ -185,6 +191,8 @@ BOOL CSO7_UtilDlg::OnInitDialog()
|
||||
GetDlgItem(IDC_BUTTON_PROBE_ONOFF)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_ONOFF)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_UPDOWN)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS)->EnableWindow(false);
|
||||
GetDlgItem(IDC_CHECK_CONTINUOUS_READ_IO_STATUS)->EnableWindow(false);
|
||||
|
||||
GetDlgItem(IDC_EDIT_SET_VER_NO)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(false);
|
||||
@@ -221,7 +229,14 @@ BOOL CSO7_UtilDlg::OnInitDialog()
|
||||
|
||||
m_cs_Version_Number=_T("3");
|
||||
if (!g_pLoggerDebug)
|
||||
{
|
||||
g_pLoggerDebug = new CLogger(_T("\\UtilityDebug.Log"));
|
||||
}
|
||||
|
||||
m_BeginReadIO=FALSE;
|
||||
m_ReadIOStatusAddr=4;
|
||||
GetDlgItem(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS)->SetWindowTextW(_T("4"));
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
@@ -309,8 +324,6 @@ void CSO7_UtilDlg::OnBnClickedButtonStartSo7machine()
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT2)->EnableWindow(true);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT3)->EnableWindow(true);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT4)->EnableWindow(true);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SIZE_VALUE)->EnableWindow(true);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SWITCH)->EnableWindow(true);
|
||||
|
||||
GetDlgItem(IDC_BUTTON_SETUP_SO7CONFIG)->EnableWindow(true);
|
||||
GetDlgItem(IDC_BUTTON_LOAD_SO7CONFIG)->EnableWindow(true);
|
||||
@@ -336,6 +349,9 @@ void CSO7_UtilDlg::OnBnClickedButtonStartSo7machine()
|
||||
GetDlgItem(IDC_BUTTON_PROBE_ONOFF)->EnableWindow(true);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_ONOFF)->EnableWindow(true);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_UPDOWN)->EnableWindow(true);
|
||||
GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS)->EnableWindow(true);
|
||||
GetDlgItem(IDC_CHECK_CONTINUOUS_READ_IO_STATUS)->EnableWindow(true);
|
||||
|
||||
|
||||
GetDlgItem(IDC_EDIT_SET_VER_NO)->EnableWindow(true);
|
||||
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(true);
|
||||
@@ -374,10 +390,8 @@ void CSO7_UtilDlg::OnBnClickedButtonStopSo7machine()
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT2)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT3)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_COAXIAL_LIGHT4)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SIZE_VALUE)->EnableWindow(false);
|
||||
GetDlgItem(IDC_EDIT_LIGHT_SWITCH)->EnableWindow(false);
|
||||
|
||||
GetDlgItem(IDC_BUTTON_SETUP_SO7CONFIG)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SETUP_SO7CONFIG)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_LOAD_SO7CONFIG)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SO7_MOVE_ZOOM_IN)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SO7_MOVE_ZOOM_OUT)->EnableWindow(false);
|
||||
@@ -401,6 +415,8 @@ void CSO7_UtilDlg::OnBnClickedButtonStopSo7machine()
|
||||
GetDlgItem(IDC_BUTTON_PROBE_ONOFF)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_ONOFF)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_FIXTURE_UPDOWN)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS)->EnableWindow(false);
|
||||
GetDlgItem(IDC_CHECK_CONTINUOUS_READ_IO_STATUS)->EnableWindow(false);
|
||||
|
||||
GetDlgItem(IDC_EDIT_SET_VER_NO)->EnableWindow(false);
|
||||
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(false);
|
||||
@@ -475,11 +491,11 @@ void CSO7_UtilDlg::OnBnClickedButtonAutoZoom()
|
||||
return;
|
||||
}
|
||||
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear1()
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear1()//faster
|
||||
{
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.zm._Move_Speed_Gear=5;//m_motor.c ==> movev
|
||||
|
||||
|
||||
@@ -488,18 +504,18 @@ void CSO7_UtilDlg::OnBnClickedRadioSpeedGear1()
|
||||
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear2()
|
||||
{
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.zm._Move_Speed_Gear=5;//m_motor.c ==> movev
|
||||
}
|
||||
|
||||
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear3()
|
||||
{
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=3;
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=2;
|
||||
m_pSO7_Proto->g_machine.zm._Move_Speed_Gear=1;//m_motor.c ==> movev
|
||||
|
||||
}
|
||||
@@ -507,15 +523,23 @@ void CSO7_UtilDlg::OnBnClickedRadioSpeedGear3()
|
||||
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear4()
|
||||
{
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=4;
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=1;
|
||||
m_pSO7_Proto->g_machine.zm._Move_Speed_Gear=2;//m_motor.c ==> movev
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CSO7_UtilDlg::OnBnClickedRadioSpeedGear5()
|
||||
{
|
||||
m_pSO7_Proto->g_machine.x._Move_Speed_Gear=5;
|
||||
m_pSO7_Proto->g_machine.y._Move_Speed_Gear=5;
|
||||
m_pSO7_Proto->g_machine.z._Move_Speed_Gear=5;
|
||||
m_pSO7_Proto->g_machine.zm._Move_Speed_Gear=2;//m_motor.c ==> movev
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=====================================================================
|
||||
@@ -962,7 +986,114 @@ void CSO7_UtilDlg::OnBnClickedButtonSetupSo7config()
|
||||
}
|
||||
SetTimer(1,150,NULL);
|
||||
}
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::OnEnKillfocusEditSo7ReadIoStatusAddress()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
USES_CONVERSION;
|
||||
CString str;
|
||||
GetDlgItem(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS)->GetWindowText(str);
|
||||
const char* cTempValue=T2A(str);
|
||||
|
||||
m_ReadIOStatusAddr= static_cast<char>(atoi(cTempValue));
|
||||
}
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::OnBnClickedButtonSo7ReadInPortStatus()
|
||||
{
|
||||
if (((CButton *)GetDlgItem(IDC_CHECK_CONTINUOUS_READ_IO_STATUS))->GetCheck())
|
||||
{
|
||||
if (m_BeginReadIO)
|
||||
{
|
||||
m_BeginReadIO=FALSE;
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS))->SetWindowTextW(_T("Read IO Status"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_BeginReadIO=TRUE;
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS))->SetWindowTextW(_T("STOP"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_BeginReadIO=FALSE;
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS))->SetWindowTextW(_T("Read IO Status"));
|
||||
UpdateIOStatus();
|
||||
m_OutMessage.Format(_T("[Addr %d]:Data=%d"),m_ReadIOStatusAddr,m_pSO7_Proto->g_machine.InPortStatus);
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
}
|
||||
|
||||
}
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::UpdateIOStatus()
|
||||
{
|
||||
CString StrON(_T("ON"));
|
||||
CString StrOFF(_T("OFF"));
|
||||
COLORREF ColorON=RGB(0,255,0);
|
||||
COLORREF ColorOFF=RGB(240,240,240);
|
||||
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_INPUT_PORT_STATUS(m_ReadIOStatusAddr);
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT0)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT1))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT1))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT1))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT1))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT1)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT2))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT2))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT2))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT2))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT2)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT3))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT3))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT3))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT3))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT3)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT4))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT4))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT4))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT4))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT4)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT5))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT5))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT5))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT5))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
if (m_pSO7_Proto->g_machine.InPortStatus&HBIT5)
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT6))->SetWindowTextW(StrON);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT6))->SetFaceColor(ColorON);
|
||||
}
|
||||
else
|
||||
{
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT6))->SetWindowTextW(StrOFF);
|
||||
((CMFCButton*)GetDlgItem(IDC_MFCBUTTON_STATUS_IN_PORT6))->SetFaceColor(ColorOFF);
|
||||
}
|
||||
}
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::OnTimer(UINT_PTR nIDEvent)
|
||||
{
|
||||
@@ -975,6 +1106,10 @@ void CSO7_UtilDlg::OnTimer(UINT_PTR nIDEvent)
|
||||
{
|
||||
if (m_pSO7_Proto->g_machine.s_status._machine_running)
|
||||
{
|
||||
if (m_BeginReadIO)
|
||||
{
|
||||
UpdateIOStatus();
|
||||
}
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_AXIS_XYZ();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_V_DATA();
|
||||
|
||||
@@ -1043,3 +1178,7 @@ BOOL CSO7_UtilDlg::PreTranslateMessage(MSG* pMsg)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,8 +52,9 @@ public:
|
||||
CProcessButton m_Button_MoveZ_Down;
|
||||
CProcessButton m_Button_MoveV_Zoom_In;
|
||||
CProcessButton m_Button_MoveV_Zoom_Out;
|
||||
|
||||
|
||||
char m_ReadIOStatusAddr;
|
||||
BOOL m_BeginReadIO;
|
||||
void UpdateIOStatus();
|
||||
afx_msg void OnBnClickedButtonInitSo7usb();
|
||||
afx_msg void OnBnClickedButtonTermSo7usb();
|
||||
afx_msg void OnBnClickedButtonStartSo7machine();
|
||||
@@ -101,4 +102,7 @@ public:
|
||||
afx_msg void OnBnClickedButtonAutoZoom();
|
||||
afx_msg void OnBnClickedButtonManualHome();
|
||||
afx_msg void OnBnClickedButtonSetupSo7config();
|
||||
afx_msg void OnBnClickedButtonSo7ReadInPortStatus();
|
||||
afx_msg void OnBnClickedRadioSpeedGear5();
|
||||
afx_msg void OnEnKillfocusEditSo7ReadIoStatusAddress();
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "resource.h"
|
||||
|
||||
#include "..\..\..\SevenOcean\CMMIO_SERIAL.H"
|
||||
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "ProcessButton.h"
|
||||
|
||||
@@ -47,6 +47,7 @@ CKeyence_Laser_LK_H* m_pKeyence_Laser_LK_H=NULL;
|
||||
CKeyence_Proto* m_pKeyence_Proto=NULL;
|
||||
|
||||
CSo7_Interface* m_pSo7_Interface=NULL;
|
||||
CEF8000_Interface* m_pEF8000_Interface=NULL;
|
||||
// CSo7_Option dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CSo7_Option, CDialog)
|
||||
@@ -121,13 +122,27 @@ void CSo7_Option::OnBnClickedOk()
|
||||
{
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_CONTROLLER))->GetCheck())
|
||||
{
|
||||
if (!m_pEF8000_Interface)
|
||||
{
|
||||
m_pEF8000_Interface=new CEF8000_Interface();
|
||||
}
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto = new CSO7_Proto();
|
||||
}
|
||||
CSO7_UtilDlg* pSO7_UtilDlg=new CSO7_UtilDlg();
|
||||
pSO7_UtilDlg->DoModal();
|
||||
pSO7_UtilDlg->DoModal();
|
||||
delete pSO7_UtilDlg;
|
||||
delete m_pSO7_Proto;
|
||||
m_pSO7_Proto=NULL;
|
||||
if (m_pSO7_Proto)
|
||||
{
|
||||
delete m_pSO7_Proto;
|
||||
m_pSO7_Proto=NULL;
|
||||
}
|
||||
if (m_pEF8000_Interface)
|
||||
{
|
||||
delete m_pEF8000_Interface;
|
||||
m_pEF8000_Interface=NULL;
|
||||
}
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_KEYENCE_LASER))->GetCheck())
|
||||
{
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\SevenOcean\CMMIO_BASE.CPP" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\CMMIO_SERIAL.CPP" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\EF8000_Interface.cpp" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\Serial.cpp" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\So7_Interface.cpp" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\SO7_Proto.cpp" />
|
||||
@@ -267,6 +268,7 @@
|
||||
<ClInclude Include="..\..\..\SevenOcean\CMMIO_BASE.H" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\CMMIO_SERIAL.H" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\DLL.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\EF8000_Interface.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\NewDataStruct.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\Serial.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\So7_Interface.h" />
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<ClCompile Include="..\..\..\SevenOcean\Serial.cpp">
|
||||
<Filter>Sources Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\SevenOcean\EF8000_Interface.cpp">
|
||||
<Filter>Sources Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CaptureDataDlg.h">
|
||||
@@ -285,6 +288,9 @@
|
||||
<ClInclude Include="..\..\..\SevenOcean\Serial.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\SevenOcean\EF8000_Interface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
#define IDC_CHECK_SV2000E_MIRROR_VERTICALLY 1204
|
||||
#define IDC_CHECK_CONTINUE_READ_LASER_VALUE 1204
|
||||
#define IDC_CHECK_SO7_MANUAL_MACHINE_READ_POS_CONTINUE 1204
|
||||
#define IDC_CHECK_CONTINUOUS_READ_IO_STATUS 1204
|
||||
#define IDC_RADIO_MACHINE_SevenOcean 1205
|
||||
#define IDC_CHECK_CONTINUE_READ_LASER_LK_H_VALUE 1205
|
||||
#define IDC_BUTTON_INIT_SO7USB 1206
|
||||
@@ -347,6 +348,7 @@
|
||||
#define IDC_EDIT_FRESHSPEED_X2 1275
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_TOPZ2 1275
|
||||
#define IDC_EDIT_MANUAL_MACHINE_MSG 1275
|
||||
#define IDC_BUTTON_SO7_READ_IN_PORT_STATUS 1275
|
||||
#define IDC_EDIT_FRESHSPEED_X3 1276
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_TOPZ3 1276
|
||||
#define IDC_BUTTON_ZERO_SET 1277
|
||||
@@ -745,16 +747,23 @@
|
||||
#define IDC_RADIO_SO7_VERIFICATION_ALGORITHM 1651
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINEREAD_POS 1652
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD4 1653
|
||||
#define IDC_RADIO1 1654
|
||||
#define IDC_RADIO_CANVAS_SPEED_POSTION 1654
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT1 1661
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT2 1662
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT3 1663
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT4 1664
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT5 1665
|
||||
#define IDC_RADIO_SPEED_GEAR5 1666
|
||||
#define IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS 1667
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT6 1670
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 168
|
||||
#define _APS_NEXT_RESOURCE_VALUE 169
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1655
|
||||
#define _APS_NEXT_CONTROL_VALUE 1668
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user