Motor Protocol
Motor Protocol
26 38 int32_t
Set the maximum positive position
27 39 int32_t
Set the minimum negative position
7-byte instructions
int32_t+uint8_t
00
Force-position mixed mode (test) (Du
02 2
Yuqing PT mode)
10 16 Position Mode - Feed Forward Torque
11 17 Position Mode - Feedforward Speed
12 18 //Position mode - feedforward position
Return value description: The first byte is the received code, and the other bytes are the returned tar
high bit last. If the return value contains multiple groups of data, each group of data follows the low b
return value contains: code + speed (two bytes) + position (4 bytes) POS = RxData[1] + (RxData[2] <<
(RxData[5] << 16) + (RxData[6] << 24).
Segmented PID: 4-segment PID intervals: zero speed, zero speed-low speed, low speed-high speed, h
LSpeed_KpSpeed; int16_t ZSpeed_KpSpeed; int16_t HSpeed_Kp; int16_t LSpeed_Kp; int16_t ZSpeed_
LSpeed_KiSpeed; int16_t ZSpeed_KiSpeed; int16_t HSpeed_Ki; int16_t LSpeed_Ki; int16_t ZSpeed_Ki;
situation) bit0-bit13-kp value max bit16-bit29: speed value (0 when compatible with the old PID setti
low speed 1, high speed 2, reserved 3
Get CSP: Current = RxData[0] + (RxData[1] << 8) Speed = RxData[2] + (RxData[3] << 8) Position = RxDa
(RxData[7] << 24) Get TSP: Torque = RxData[0] + (RxData[1] << 8) Speed = RxData[2] + (RxData[3] << 8
(RxData[6] << 16) + (RxData[7] << 24)
Parameter description: The first byte is the code to be sent, the second to fifth bytes are the data to
is the low eight bits of the data to be sent.
Software version
Unit Conversion Page 2 number: 5.8.2.0
Hardware version
Updated
Return value (usually 5 bytes) or parameter description 8/9/2024
Date
(-1: Fault: The mode does not exist) 0: Stop mode 1: Current mode 2:
0 support
Speed mode 3: Position mode
support
The unit is mA support
The unit is mA support
The formula for conversion to degrees per second is: (return
support
value/100/reduction ratio)*360
The formula for conversion to degrees per second is: (return
support
value/100/reduction ratio)*360
Convert to reducer angle formula: (return value/65536/reduction
support
ratio)*360
Convert to reducer angle formula: (return value/65536/reduction
support
ratio)*360
The corresponding bit is 0 for no error, 1 for an error bit0 represents an
internal software error in the motor, such as writing to FLASH while the
motor is running, etc. bit1 represents overvoltage bit2 represents
undervoltage bit4 represents startup error bit5 represents speed feedback
error bit6 represents overcurrent bit7 represents software error, such as support
writing to FLASH while the motor is running, etc. bit16 represents encoder
communication error bit17 represents motor overtemperature bit18
represents circuit board overtemperature bit19 represents driver chip
error
support
Firmware version (trial - change according to the situation) (compatible
with the previous old bit16-bit31 setting is 0) bit0-bit13-kp value max bit16-
support
bit29: speed value (absolute value) bit30-bit31: high and low speed: zero
speed 0, low speed 1, high speed 2, reserved 3
Firmware version (trial - change according to the situation) (compatible
with the previous old bit16-bit31 setting is 0) bit0-bit13-ki value max bit16-
support
bit29: speed value (absolute value) bit30-bit31: high and low speed: zero
speed 0, low speed 1, high speed 2, reserved 3
support
support
support
support
support
The maximum and minimum current values of the motor settings, in mA support
The unit is mA support
The unit is mA support
support
support
The formula for conversion to degrees per second is: (return
support
value/100/reduction ratio)*360
The formula for conversion to degrees per second is: (return
support
value/100/reduction ratio)*360
The reducer angle is: (return value/65536/reduction ratio)*360 support
The reducer angle is: (return value/65536/reduction ratio)*360 support
support
support
After recovery, you need to save it and then power on again.Flash restore
support
to factory settings
Not supported
Unit: Celsius support
Unit: Celsius support
support
support
support
int32_t=(BRAKE<<24)+(OTHER<<16) + (ACTUATOR_TYPE<<8) + OTHER
BRAKE 1 ACTUATOR_TYPE 13 //CRA-RI30-40-PRO ACTUATOR_TYPE 11
//CRA-RI40-52-PRO ACTUATOR_TYPE 9 //CRA-RI50-60-PRO
ACTUATOR_TYPE 19//CRA-RI50-70-PRO ACTUATOR_TYPE 5 //CRA-RI60-70-
PRO ACTUATOR_TYPE 25//CRA-RI60-80-PRO ACTUATOR_TYPE 6 //CRA- support
RI70-90-PRO ACTUATOR_TYPE 20//CRA-RI70-80-PRO ACTUATOR_TYPE
21//CRA-RI70-90-PRO ACTUATOR_TYPE 7 //CRA-RI80-110-PRO
ACTUATOR_TYPE 17//CRA-RI80-97-PRO ACTUATOR_TYPE 8 //CRA-RI100-
142-PRO ACTUATOR_TYPE 14//CRA-RI132-170-PRO
Record the version in hexadecimal (software+Hardware) support
Record the version in hexadecimal (software) Added
Not supported
Current position = encoder position - current offset value support
support
Need new version (updated in May 2023) of the circuit board hardware
support
support section
The dual encoder version is for outer ring position, the single encoder is
support
for status
Unit: V Added
Unit: V Added
Unit: Celsius Added
Reference position mode, only 1 byte is sent to obtain the position Not supported
The unit is mA support
The unit is mA support
The value represents the allowed speed increase per millisecond. support
The value represents the allowed speed reduction per millisecond. support
The parameters sent are: (target speed (degrees per second) * reduction
support
ratio * 100) / 360
The parameters sent are: (target speed (degrees per second) * reduction
support
ratio * 100) / 360
The parameters sent are: (reducer target angle/360)*reduction
support
ratio*65536,
The parameters sent are: (reducer target angle/360)*reduction
support
ratio*65536,
Firmware version (trial - change according to the situation) (compatible
with the previous old bit16-bit31 setting is 0) bit0-bit13-kp value max bit16-
support
bit29: speed value (absolute value) bit30-bit31: high and low speed: zero
speed 0, low speed 1, high speed 2, reserved 3
Firmware version (trial - change according to the situation) (compatible
with the previous old bit16-bit31 setting is 0) bit0-bit13-kp value max bit16-
support
bit29: speed value (absolute value) bit30-bit31: high and low speed: zero
speed 0, low speed 1, high speed 2, reserved 3
Not supported
Position loop commonly used PD control support
/ Not supported
Position loop commonly used PD control support
1 to 127 support
Send 0, set the encoder position to 0, the position offset to 0, the encoder
Not supported
reports an error, and the error needs to be cleared
The parameters sent are: Stop time (MS) Motor deceleration stop support
Set the offset value and target position (target position = encoder position -
support
offset value)
1000, 500, 250, 125, 100, 50 support
bit0: Set to 1 to enable speed loop position limit, bit1: Set to 1 to enable
current loop position limit, (reserved) bit2: Set to 1 to enable (reserved)
support
bit3: Set to 1 to enable CSP replacement to obtain TSP; (reserved) bit4: Set
to 1 to enable, 0 bit5: Set to 1 to enable, 0 bit6: Set to 1 to enable, 0
Upload CSP message time: RxData[1] + (RxData[2] << 8) Communication
protection time RxData[3] + (RxData[4] << 8) Note: All units are in ms, and
are turned off when 0; CSP minimum setting time > (1000/current baud
support
rate * 250us) (otherwise it fails and returns 0) There is no CAN
communication within the communication protection time, and the motor
stops;
No return value Added
Added
Added
Added
Added
Added
support
Position mode: target position (4 bytes) + cycle (1 byte, 1ms difference is
Support (modified)
supplemented once, unit is 5ms) (not used)
test
Position mode: target position (4 bytes) + feedforward (2 bytes,
feedforward current unit: 0.1A)
Position mode: target position (4 bytes) + feedforward (2 bytes, speed)
Delete contour
position, add force
Please see the chapter on humanoid robots (ETHERCAT is being tested) position mixing
(supported by some
motors)
he other bytes are the returned target data. All data follow the low bit first and the
each group of data follows the low bit first and the high bit last. For example, the
s) POS = RxData[1] + (RxData[2] << 8). SPEED=RxData[3] + (RxData[4] << 8) +
ow speed, low speed-high speed, high speed int16_t HSpeed_KpSpeed; int16_t
nt16_t LSpeed_Kp; int16_t ZSpeed_Kp; int16_t HSpeed_KiSpeed; int16_t
16_t LSpeed_Ki; int16_t ZSpeed_Ki; Firmware version (trial-change according to
en compatible with the old PID setting) bit30-bit31: high and low speed: zero speed 0,
econd to fifth bytes are the data to be sent, the low bit is in front, and the second byte
Software
version
number 5.7
5/27/2024 Modify Project
support
support
support
support
support
support
support
support
Originally, bit 0
actually
represents FOC
support
rate to high, bit
7 represents
Software Error
support
Get three
frames
Get three
frames
support
support
support
support
support
support
support
support
support
support
support
support
support
support
support
support
support
Not
supported
support
support
support
support
support
support
support
support
Not
supported
support
support
support
support
Not
supported
Not
supported
Not
supported
Not
supported
support
support
support
support
support
support
Not
supported
support
support
support
support
support
support
support
support
Speed loop
support commonly used
PI control
Speed loop
support commonly used
PI control
Not
supported
support
Not
supported
support
support
Not
supported
support
support
support
Original bit0: set
to 1 to enable
support
speed loop
position limit
New (version
support
update lost)
Not
supported
Not
supported
Not
supported
Not
supported
support
Not
supported
Not
supported
Not
supported
Not
supported
Not
supported
support
support
support