CViewMotion.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. long ToSafePosition();
  27. //获取所有轴信息
  28. vector<CAxis*> GetAxisList();
  29. //获取所有IO信息
  30. vector<CIO*> GetIoList();
  31. //设置IO状态
  32. LONG SetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL nOutput);
  33. LONG SetIoStatus(string strIoName, short nOutput);
  34. //获取IO状态
  35. LONG GetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL& nOutput);
  36. LONG GetIoStatus(string strIoName, short& nOutput);
  37. //移动轴
  38. long ModuleMove(string ModuleType, string AxisType, double pos);
  39. long ModuleMoveTo(string ModuleType, string AxisType, double pos);
  40. long ModuleMove(string ModuleType, std::vector<MODULE_COORD_MOVE> vecPos);
  41. long ModuleMoveTo(string ModuleType, std::vector<MODULE_COORD_MOVE> vecPos);
  42. //获取轴实时位置
  43. long GetAxisPosition(string ModuleType, string AxisType, double& pos);
  44. };
  45. }