AK80-64 AK Series Actuator Driver Manual V1.0.8

Table Of Contents
https://www.cubemars.com/
38 / 52
means restoring the default zero point (automatic parameter saving);
Position loop sending routine
void comm_can_set_origin(uint8_t controller_id, uint8_t set_origin_mode) {
comm_can_transmit_eid(controller_id |
((uint32_t) CAN_PACKET_SET_ORIGIN_HERE << 8), buffer, send_index);
}
5.1.7Position and Velocity Loop Mode
Simplified block diagram of position velocity loop
Position velocity loop mode sends data definition
Data bits
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
Data[6]
Data[7]
Range
0~0xff
0~0xff
0~0xff
0~0xff
0~0xff
0~0xff
0~0xff
0~0xff
Corresponding
variables
Position
25-32
bit
Position
17-24
bit
Position
9-16 bit
Position
1-8 bit
Speed 8
bit high
Speed 8
bit low
Accelerated
speed 8 bit
high
Accelerated
speed 8 bit
low
Among them, the position is int32 type, and the range -360000000-360000000 represents the
position -36000°-36000°;
Among them, the speed is int16 type, and the range -100000-100000 represents -100000-100000
electrical speed;
Among them, the acceleration is int16 type, and the range -100000-100000 represents
-100000-100000 electrical speed/s².
void comm_can_set_pos_spd(uint8_t controller_id, float pos,int16_t spd, int16_t RPA ) {
int32_t send_index = 0;
Int16_t send_index1 = 0;
uint8_t buffer[4];
buffer_append_int32(buffer, (int32_t)(pos * 10000.0), &send_index);