新增IO口状态的读取和速度参数保存为EF8000 DAT文件格式。
This commit is contained in:
@@ -1289,3 +1289,149 @@ Init:Open device succeed .
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -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 .
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
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
|
||||
|
||||
@@ -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