AK80-64 AK Series Actuator Driver Manual V1.0.8

Table Of Contents
https://www.cubemars.com/
40 / 52
&motor_spd= (float)( spd_int * 10.0f);//motor speed
&motor_cur= (float) ( cur_int * 0.01f);//motor current
&motor_temp= (rx_message)->Data[6] ;//motor temperature
&motor_error= (rx_message)->Data[7] ;//motor error mode
}
5.2.2 Servo Mode Serial Message Protocol
Servo mode serial port sending and receiving message protocol is as follows:
Frame
header
0x02
Data
length
Data Frame
Data bit
Check the
high 8
bits
Check the
lower 8
bits
End of
frame
0x03
Check digit calculation code refer to page 32
data frame definition
typedef enum {
COMM_FW_VERSION = 0,
COMM_JUMP_TO_BOOTLOADER,
COMM_ERASE_NEW_APP,
COMM_WRITE_NEW_APP_DATA,
COMM_GET_VALUES, //Get motor running parameters
COMM_SET_DUTY, //Motor runs in duty cycle mode
COMM_SET_CURRENT, //Motor runs in current loop mode
COMM_SET_CURRENT_BRAKE, //Motor current brake mode operation
COMM_SET_RPM, //Motor runs in current loop mode
COMM_SET_POS, //Motor runs in position loop mode
COMM_SET_HANDBRAKE, //Motor runs in handbrake current loop mode
COMM_SET_DETECT, //Motor real-time feedback current position command
COMM_ROTOR_POSITION=22,//Motor feedback current position
COMM_GET_VALUES_SETUP=50,//Motor single or multiple parameter acquisition
instructions
COMM_SET_POS_SPD=91, // Motor runs in position velocity loop mode
COMM_SET_POS_MULTI=92, // Set the motor movement to single-turn mode
COMM_SET_POS_SINGLE=93, // Set the motor motion to multi-turn mode, the range is
±100 turns
COMM_SET_POS_UNLIMITED=94, //Save
COMM_SET_POS_ORIGIN=95, //Set the motor origin
} COMM_PACKET_ID;
1. Obtain an example of motor parameters
Serial port command: 02 01 04 40 84 03 // Get the motor parameter command After the motor