正点原子开发板
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.
|
|
#pragma once
#include "sdk/os/zos.hpp"
#include "sdk\components\zprotocols\zcancmder_v2\api\api.hpp"
#include "sdk\components\zprotocols\zcancmder_v2\zmodule_device_manager.hpp"
//
#include "app_zmodule_device_manager.hpp"
#define ZMOTOR_ID 4
#define XYRobot_ID 3
#define XYRobot_HOOK_ID 21
namespace iflytop { using namespace std;
class IntelligentWindingRobotCtrl { public: typedef struct { /**
* @brief ��е�ۼ��߶��� */ int32_t m11_arm_jiaxian_reset_pos; int32_t m11_arm_jiaxian_clamp_direction; int32_t m11_arm_jiaxian_clamp_torque;
/**
* @brief ����� */ int32_t m12_jiaxian_reset_pos; int32_t m12_jiaxian_clamp_direction; int32_t m12_jiaxian_clamp_torque;
/**
* @brief ѹ�߶��� */ /**
* �߶�: * 1. û�е��� 1015 * 2. �е��� 1055 * 3. �����п� 1110 * */ int32_t m13_yaxian_forward_reset_pos; // ѹ������λ
int32_t m13_yaxian_backward_reset_pos; // ��������λ
int32_t m13_jiaxian_clamp_direction; // ѹ�߷���
int32_t m13_jiaxian_clamp_torque; // ѹ��Ť��
/**
* @brief ����̽������ */ int32_t m14_raoxiantance_reset_pos; int32_t m14_raoxiantance_tance_zero_pos;
/**
* @brief �ŷ϶��� */ int32_t m15_paifei_reset_pos; int32_t m15_paifei_press_direction; int32_t m15_paifei_press_torque;
/**
* @brief ���������� */ int32_t m16_xianlajin_reset_pos; int32_t m16_xianlajin_tight_line_pos; int32_t m16_xianlajin_winding_low_pos; int32_t m16_xianlajin_winding_up_pos; int32_t m16_xianlajin_line_entry_pos;
/**
* @brief ��צ */ int32_t m21_arm_hook_claws_half_pos; int32_t m21_arm_hook_claws_full_pos; /**
* @brief ���� */ // int32_t m22_scissors_cut_pos;
/**
* @brief ���� */ // int32_t m23_laxian_move_to_tight_pos;
/**
* @brief Z�ᶨλ */ int32_t z_axis_take_line_pos; int32_t z_axis_take_clip_pos; int32_t z_axis_winding_hight;
/**
* @brief XYƽ̨ */
int32_t xy_platform_winding_pos_x; int32_t xy_platform_winding_pos_y;
int32_t xy_platform_takeline_pos_x; int32_t xy_platform_takeline_pos_y;
int32_t xy_platform_takeline_clip00_pos_x; //
int32_t xy_platform_takeline_clip00_pos_y;
int32_t xy_platform_takeline_clipXX_pos_x; int32_t xy_platform_takeline_clipXX_pos_y; int32_t clip_line; int32_t clip_each_line_num;
} config_t;
APPDM* m_dm; ICmdParser* m_cmdparse; config_t cfg;
public: int32_t initialize(APPDM* dm, ICmdParser* cmdparse);
public: void wait_module_idle(int32_t moduleid); void wait_modules_idle(void* mark, ...);
int32_t m11_arm_jiaxian_move_to_reset_pos(); int32_t m11_arm_jiaxian_move_to_clamp_pos(); int32_t m12_jiaxian_move_to_open_pos(); int32_t m12_jiaxian_move_to_clamp_pos(); int32_t m13_yaxian_move_to_reset_forward(); int32_t m13_yaxian_move_to_reset_backward(); int32_t m13_yaxian_press_clip(); int32_t m14_raoxiantance_move_to_reset(); int32_t m15_paifei_moveto_reset(); int32_t m15_paifei_moveto_press(); int32_t m16_xianlajin_move_to_reset(); int32_t m16_xianlajin_move_to_tight_line_pos(); int32_t m16_xianlajin_move_to_winding_low_pos(); int32_t m16_xianlajin_move_to_winding_up_pos(); int32_t m16_xianlajin_move_to_line_entry_pos(); int32_t m21_arm_hook_claws_reset(); int32_t m21_arm_hook_claws_move_to_half_pos(); int32_t m21_arm_hook_claws_move_to_full_pos(); int32_t m22_scissors_move_reset_pos(); // block
int32_t m22_scissors_cut(); // block
int32_t m23_laxian_motor_move_to_reset_pos(); // block
int32_t m23_laxian_motor_move_to_tight_line_pos(); // block
int32_t m4_zreset(); int32_t m4_zmove_to(int32_t pos);
int32_t device_reset(); int32_t disable_all_module(); int32_t enable_all_module();
int32_t step_take_bullet(int32_t bulletindex);
int32_t xy_get_point(int32_t clip_index, int32_t& x, int32_t& y); // ȡ����
int32_t xy_run_to(int32_t x, int32_t y, int32_t zpos = 0, bool jiaxian_reset = true); // ȡ����
int32_t xy_run_to_clip_pos_test(int32_t clip_index); int32_t xy_reset();
int32_t xymove_to(int32_t x, int32_t y);
void regcb(); int32_t initialize_device();
int32_t main_shaft_run(); int32_t main_shaft_stop();
/**
* @brief XYƽ̨ */ int32_t xy_platform_reset(); /**
* @brief Z�� */ int32_t z_axis_reset(); int32_t z_axis_move_to(int32_t pos);
int32_t xy_move_to_zero(); // �ƶ�����λ
int32_t xy_take_clip(int32_t index); // ȡ����
int32_t xy_take_line(); // ȡ��
int32_t xy_take_back_clip(); // �ŵ���
int32_t xy_remove_line(); // �Ƴ���
/**
* @brief */ int32_t start_winding(); int32_t stop_winding(); int32_t reset_and_check_device();
int32_t setcfg(const char* cfgname, int32_t cfgvalue); int32_t dumpcfg();
int32_t do_reset_device(); int32_t do_winding(int32_t index);
void processError(int32_t err); };
} // namespace iflytop
|