CViewMotion.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #define C_MACHINE_EXPORTS
  3. #include "Machine.h"
  4. #include "CDieBondFsm.h"
  5. #include "CMessageBox.h"
  6. #include "dt.h"
  7. namespace ns_module
  8. {
  9. struct MODULE_COORD_MOVE
  10. {
  11. string AxisType;
  12. double pos;
  13. };
  14. class __declspec(dllexport) CViewMotion
  15. {
  16. private:
  17. static CViewMotion* m_instance;
  18. Machine* m_pMachine = nullptr;
  19. public:
  20. static CViewMotion* GetInstance();
  21. CViewMotion();
  22. //显示运控轴调试界面,strAxisName为空时,显示所有轴界面
  23. void ShowMotionAdjustPage(std::string strAxisName = "");
  24. void ShowMotionAdjustPage(string ModuleType, string AxisType);
  25. long ToHome();
  26. //获取所有轴信息
  27. vector<CAxis*> GetAxisList();
  28. //获取所有IO信息
  29. vector<CIO*> GetIoList();
  30. //设置IO状态
  31. LONG SetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL nOutput);
  32. LONG SetIoStatus(string strIoName, short nOutput);
  33. //获取IO状态
  34. LONG GetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL& nOutput);
  35. LONG GetIoStatus(string strIoName, short& nOutput);
  36. //移动轴
  37. long ModuleMove(string ModuleType, string AxisType, double pos);
  38. long ModuleMoveTo(string ModuleType, string AxisType, double pos);
  39. long ModuleMove(string ModuleType, std::vector<MODULE_COORD_MOVE> vecPos);
  40. long ModuleMoveTo(string ModuleType, std::vector<MODULE_COORD_MOVE> vecPos);
  41. //获取轴实时位置
  42. long GetAxisPosition(string ModuleType, string AxisType, double& pos);
  43. };
  44. }