User`s manual

http://www.adtechcn.com 93
btn->EnableWindow(TRUE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_CMOVE);
btn->EnableWindow(TRUE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_INPMOVE);
btn->EnableWindow(TRUE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_CLEARPOS);
btn->EnableWindow(TRUE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_BASEPARA);
btn->EnableWindow(TRUE);
}
else
{
//********** drive under way**********
btn=(CButton*)GetDlgItem(IDC_BUTTON_PMOVE);
btn->EnableWindow(FALSE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_CMOVE);
btn->EnableWindow(FALSE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_INPMOVE);
btn->EnableWindow(FALSE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_CLEARPOS);
btn->EnableWindow(FALSE);
btn=(CButton*)GetDlgItem(IDC_BUTTON_BASEPARA);
btn->EnableWindow(FALSE);
}
CDialog::OnTimer(nIDEvent);
}
2.5 Stop module
The stop module is mainly used to control sudden events during the drive process that require
immediate stop of all axes’ motions. The codes of stop module are provided at the button
“CmdStop” where they can be accessed by clicking, and described as follows:
void CVCExampleDlg::OnButtonStop()
{
for (int i = 1; i<=MAXAXIS; i++)
{
g_CtrlCard.StopRun(i,1);
}
}