增加激光开关。

This commit is contained in:
TAO Cheng
2013-07-22 11:54:45 +08:00
parent 94f85752ce
commit 9b5c637ad4
6 changed files with 52 additions and 0 deletions
@@ -1995,3 +1995,35 @@ 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.
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.
@@ -148,6 +148,7 @@ BEGIN
PUSHBUTTON "Test Z Signal",IDC_BUTTON_SO7_TEST_Z_SIGNAL,169,235,61,14
PUSHBUTTON "CNC Program",IDC_BUTTON_SO7_CNC_PROGRAM,281,274,52,19
GROUPBOX "CNC",IDC_STATIC,252,265,143,34
CONTROL "Laser ON",IDC_CHECK_SO7_TURN_ON_FFF_LASER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,223,47,10
END
IDD_S07_UTIL_SEND_PARAMETER DIALOGEX 0, 0, 753, 481
@@ -133,6 +133,7 @@ BEGIN_MESSAGE_MAP(CSO7_UtilDlg, CDialog)
ON_EN_KILLFOCUS(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS, &CSO7_UtilDlg::OnEnKillfocusEditSo7ReadIoStatusAddress)
ON_BN_CLICKED(IDC_BUTTON_SO7_TEST_Z_SIGNAL, &CSO7_UtilDlg::OnBnClickedButtonSo7TestZSignal)
ON_BN_CLICKED(IDC_BUTTON_SO7_CNC_PROGRAM, &CSO7_UtilDlg::OnBnClickedButtonSo7CncProgram)
ON_BN_CLICKED(IDC_CHECK_SO7_TURN_ON_FFF_LASER, &CSO7_UtilDlg::OnBnClickedCheckSo7TurnOnFffLaser)
END_MESSAGE_MAP()
@@ -214,6 +215,7 @@ BOOL CSO7_UtilDlg::OnInitDialog()
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(false);
GetDlgItem(IDC_BUTTON_CORRECTION_SCALE)->EnableWindow(false);
GetDlgItem(IDC_BUTTON_SO7_CNC_PROGRAM)->EnableWindow(false);
GetDlgItem(IDC_CHECK_SO7_TURN_ON_FFF_LASER)->EnableWindow(false);
((CButton *)GetDlgItem(IDC_RADIO_SPEED_GEAR1))->SetCheck(false);
@@ -373,6 +375,7 @@ void CSO7_UtilDlg::OnBnClickedButtonStartSo7machine()
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(true);
GetDlgItem(IDC_BUTTON_CORRECTION_SCALE)->EnableWindow(true);
GetDlgItem(IDC_BUTTON_SO7_CNC_PROGRAM)->EnableWindow(true);
GetDlgItem(IDC_CHECK_SO7_TURN_ON_FFF_LASER)->EnableWindow(true);
SetTimer(1, 150, 0);
GetDlgItem(IDC_EDIT_UPDATE_FREQ)->SetWindowText(_T("150"));
@@ -441,6 +444,7 @@ void CSO7_UtilDlg::OnBnClickedButtonStopSo7machine()
GetDlgItem(IDC_BUTTON_SET_SECTION)->EnableWindow(false);
GetDlgItem(IDC_BUTTON_CORRECTION_SCALE)->EnableWindow(false);
GetDlgItem(IDC_BUTTON_SO7_CNC_PROGRAM)->EnableWindow(false);
GetDlgItem(IDC_CHECK_SO7_TURN_ON_FFF_LASER)->EnableWindow(false);
KillTimer(1);
m_pSO7_Proto->_shutdown_machine();
@@ -1295,3 +1299,16 @@ void CSO7_UtilDlg::OnBnClickedButtonSo7CncProgram()
pSo7_Util_Program=NULL;
SetTimer(1,150,NULL);
}
void CSO7_UtilDlg::OnBnClickedCheckSo7TurnOnFffLaser()
{
if (((CButton *)GetDlgItem(IDC_CHECK_SO7_TURN_ON_FFF_LASER))->GetCheck())
{
m_pSO7_Proto->_send_cmd_SO7_CMD_COMMON_COMMAND(CT_MOTOR,CT_M_LASE_ON,0);
}
else
{
m_pSO7_Proto->_send_cmd_SO7_CMD_COMMON_COMMAND(CT_MOTOR,CT_M_LASE_OFF,0);
}
}
@@ -113,4 +113,5 @@ public:
afx_msg void OnEnKillfocusEditSo7ReadIoStatusAddress();
afx_msg void OnBnClickedButtonSo7TestZSignal();
afx_msg void OnBnClickedButtonSo7CncProgram();
afx_msg void OnBnClickedCheckSo7TurnOnFffLaser();
};
@@ -500,6 +500,7 @@
#define IDC_CHECK_REVERSE 1394
#define IDC_CHECK_AUTOZOOM_CONTINUE_READ 1394
#define IDC_CHECK_TEST_KEYENCE_LK_G_PROGRAM1 1394
#define IDC_CHECK_SO7_TURN_ON_FFF_LASER 1394
#define IDC_BUTTON_MANUAL_HOME 1395
#define IDC_CHECK_TEST_KEYENCE_LK_G_PROGRAM2 1395
#define IDC_CHECK_ 1396