正点原子开发板 alientek_develop_board cancmder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
4.0 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #pragma once
  2. #include "sdk/os/zos.hpp"
  3. #include "sdk\components\zprotocols\zcancmder_v2\api\api.hpp"
  4. #include "sdk\components\zprotocols\zcancmder_v2\zmodule_device_manager.hpp"
  5. namespace iflytop {
  6. using namespace std;
  7. class IntelligentWindingRobotCtrl {
  8. public:
  9. typedef struct {
  10. /**
  11. * @brief ŷ϶
  12. */
  13. int32_t paifei_duoji_reset_pos;
  14. int32_t paifei_duoji_press_pos;
  15. int32_t paifei_duoji_press_torque;
  16. /**
  17. * @brief ̽
  18. */
  19. int32_t raoxiantance_duoji_reset_pos;
  20. int32_t raoxiantance_duoji_tance_zero_pos;
  21. /**
  22. * @brief ѹ߶
  23. */
  24. int32_t yaxian_duoji_reset_pos;
  25. int32_t yaxian_duoji_press_pos;
  26. int32_t yaxian_duoji_press_torque;
  27. int32_t yaxian_duoji_wait_for_press_pos;
  28. /**
  29. * @brief
  30. */
  31. int32_t xianlajin_duoji_reset_pos;
  32. int32_t xianlajin_duoji_line_entry_pos;
  33. int32_t xianlajin_duoji_tight_line_pos;
  34. int32_t xianlajin_duoji_loose_line_pos;
  35. /**
  36. * @brief ߼н
  37. */
  38. int32_t jiaxian_duoji_reset_pos;
  39. int32_t jiaxian_duoji_clamp_pos;
  40. int32_t jiaxian_duoji_clamp_torque;
  41. /**
  42. * @brief еۼ߶
  43. */
  44. int32_t arm_jiaxian_duoji_reset_pos;
  45. int32_t arm_jiaxian_duoji_clamp_pos;
  46. int32_t arm_jiaxian_duoji_clamp_torque;
  47. /**
  48. * @brief
  49. */
  50. int32_t scissors_reset_pos;
  51. int32_t scissors_cut_pos;
  52. /**
  53. * @brief צ
  54. */
  55. int32_t arm_hook_claws_half_pos;
  56. int32_t arm_hook_claws_full_pos;
  57. /**
  58. * @brief Zλ
  59. */
  60. int32_t z_axis_take_line_pos;
  61. int32_t z_axis_take_clip_pos;
  62. int32_t z_axis_winding_hight;
  63. /**
  64. * @brief XYƽ̨
  65. */
  66. int32_t xy_platform_winding_pos_x;
  67. int32_t xy_platform_winding_pos_y;
  68. int32_t xy_platform_takeline_pos_x;
  69. int32_t xy_platform_takeline_pos_y;
  70. } config_t;
  71. ZModuleDeviceManager* m_dm;
  72. ICmdParser* m_cmdparse;
  73. config_t cfg;
  74. public:
  75. int32_t initialize(ZModuleDeviceManager* dm, ICmdParser* cmdparse);
  76. int32_t initialize_device();
  77. // �ŷ϶���
  78. int32_t paifei_duoji_moveto_reset();
  79. int32_t paifei_duoji_moveto_press();
  80. /**
  81. * @brief ̽
  82. */
  83. int32_t raoxiantance_duoji_move_to_reset();
  84. int32_t raoxiantance_duoji_move_to_get_thickness(int32_t *thickness);
  85. /**
  86. * @brief ѹ߶
  87. */
  88. int32_t yaxian_duoji_move_to_reset();
  89. int32_t yaxian_duoji_move_to_press_pos();
  90. int32_t yaxian_duoji_move_to_wait_for_press_pos();
  91. /**
  92. * @brief
  93. */
  94. int32_t xianlajin_duoji_move_to_reset(); // ��λ
  95. int32_t xianlajin_duoji_move_to_line_entry_pos(); // ����λ
  96. int32_t xianlajin_duoji_move_to_tight_line_pos(); // �����
  97. int32_t xianlajin_duoji_move_to_loose_line_pos(); // �����
  98. /**
  99. * @brief ߶
  100. */
  101. int32_t jiaxian_duoji_move_to_reset_pos();
  102. int32_t jiaxian_duoji_move_to_clamp_pos();
  103. /**
  104. * @brief
  105. */
  106. int32_t scissors_move_reset_pos(); // block
  107. int32_t scissors_cut(); // block
  108. /**
  109. * @brief еۼ߶
  110. */
  111. int32_t arm_jiaxian_duoji_move_to_reset_pos();
  112. int32_t arm_jiaxian_duoji_move_to_clamp_pos();
  113. /**
  114. * @brief е۹צ
  115. */
  116. int32_t arm_hook_claws_reset();
  117. int32_t arm_hook_claws_move_to_half_pos();
  118. int32_t arm_hook_claws_move_to_full_pos();
  119. /**
  120. * @brief XYƽ̨
  121. */
  122. int32_t xy_platform_reset();
  123. /**
  124. * @brief Z
  125. */
  126. int32_t z_axis_reset();
  127. int32_t z_axis_move_to(int32_t pos);
  128. int32_t xy_reset(); // ��λ
  129. int32_t xy_move_to_zero(); // �ƶ�����λ
  130. int32_t xy_take_clip(int32_t index); // ȡ����
  131. int32_t xy_take_line(); // ȡ��
  132. int32_t xy_take_back_clip(); // �ŵ���
  133. int32_t xy_remove_line(); // �Ƴ���
  134. /**
  135. * @brief
  136. */
  137. int32_t start_winding();
  138. int32_t stop_winding();
  139. int32_t reset_and_check_device();
  140. int32_t setcfg(const char* cfgname, int32_t cfgvalue);
  141. int32_t dumpcfg();
  142. void processError(int32_t err);
  143. void wait_module_idle(int32_t moduleid);
  144. };
  145. } // namespace iflytop