#pragma once #define C_MACHINE_EXPORTS #include "Machine.h" #include "CDieBondFsm.h" #include "CMessageBox.h" #include "dt.h" namespace ns_module { struct MODULE_COORD_MOVE { string AxisType; double pos; }; class __declspec(dllexport) CViewMotion { private: static CViewMotion* m_instance; Machine* m_pMachine = nullptr; public: static CViewMotion* GetInstance(); CViewMotion(); //显示运控轴调试界面,strAxisName为空时,显示所有轴界面 void ShowMotionAdjustPage(std::string strAxisName = ""); void ShowMotionAdjustPage(string ModuleType, string AxisType); long ToHome(); //获取所有轴信息 vector GetAxisList(); //获取所有IO信息 vector GetIoList(); //设置IO状态 LONG SetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL nOutput); LONG SetIoStatus(string strIoName, short nOutput); //获取IO状态 LONG GetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL& nOutput); LONG GetIoStatus(string strIoName, short& nOutput); //移动轴 long ModuleMove(string ModuleType, string AxisType, double pos); long ModuleMoveTo(string ModuleType, string AxisType, double pos); long ModuleMove(string ModuleType, std::vector vecPos); long ModuleMoveTo(string ModuleType, std::vector vecPos); //获取轴实时位置 long GetAxisPosition(string ModuleType, string AxisType, double& pos); }; }