| | |
| | | #include "PlcView.h" |
| | | #include "Log.h" |
| | | #include "InputDialog.h" |
| | | #include "AxisManager.h" |
| | | #include "IOManager.h" |
| | | |
| | | // 测试 |
| | | #include "AxisSettingsDlg.h" |
| | | #include "IOMonitoringDlg.h" |
| | | |
| | | |
| | |
| | | if (!strName.IsEmpty()) { |
| | | theApp.m_model.addPlc((LPTSTR)(LPCTSTR)strName, "192.168.1.188", 1001); |
| | | |
| | | // 新建轴文件 |
| | | AxisManager axisManager; |
| | | axisManager.SaveAxis((LPTSTR)(LPCTSTR)strName); |
| | | |
| | | // 新建IO文件 |
| | | IOManager io; |
| | | io.DefaultMachineData(); |
| | | io.SaveToFile((LPTSTR)(LPCTSTR)strName); |
| | | IOManager ioManager; |
| | | ioManager.SaveToFile((LPTSTR)(LPCTSTR)strName); |
| | | } |
| | | } |
| | | else if (id == IDC_BUTTON_DELETE) { |
| | |
| | | // 测试 IO模块 |
| | | CPLC* pPLC = theApp.m_model.getCurrentPlc(); |
| | | if (pPLC != nullptr) { |
| | | CIOMonitoringDlg dlg; |
| | | dlg.SetPLC(pPLC); |
| | | dlg.SetIOManager(pPLC->getName()); |
| | | //CIOMonitoringDlg dlg; |
| | | //dlg.DoModal(); |
| | | |
| | | CAxisSettingsDlg dlg; |
| | | dlg.DoModal(); |
| | | } |
| | | } |