UART/RS-485 Bus Servo Communication Protocol
v1.0.25-test
1. Introduction
This document introduces the UART/RS485 Bus servo communication protocol. The protocol uses asynchronous serial communication technology, providing a standardized solution for the transmission of control commands and status feedback between the master device and multiple servos.
1.1 Communication Mechanism
This protocol is based on half-duplex asynchronous serial communication, using 8 data bits, 1 stop bit, and no parity bit. During communication, TxD and RxD cannot be used simultaneously; therefore, only one device can transmit data at a time, while the other devices remain in receiving mode. This half-duplex communication mode is suitable for scenarios where multiple devices share the same communication bus.
1.2 Servo ID
In the entire communication system, each servo is assigned a unique ID for effective device addressing on the bus. The communication protocol uses a command-response mechanism to ensure reliable interaction in multi-device environments. The protocol defines the packet structure, parameter fields, checksum rules, and error handling methods in detail to ensure stable operation of the servos in various applications.
Note
The default factory servo ID is 0.
1.3 Command Interval
To ensure stable communication, it is recommended that the command interval be between 5-10ms.
By ensuring a sufficient time interval, communication timeouts or errors can be effectively avoided, and reliable transmission of data packets is ensured.
2. Control Commands
| Command Name | Command ID | Response Packet Type |
|---|---|---|
| Ping | 01 (0x01) | Fixed |
| Single-Turn Position Control (Basic) | 08 (0x08) | Optional |
| Single-Turn Position Control (Advanced - Time-based) | 11 (0x0b) | Optional |
| Single-Turn Position Control (Advanced - Speed-based) | 12 (0x0c) | Optional |
| Read Single-Turn Current Position | 10 (0x0a) | Fixed |
| Multi-Turn Position Control (Basic) | 13 (0x0d) | Optional |
| Multi-Turn Position Control (Advanced - Time-based) | 14 (0x0e) | Optional |
| Multi-Turn Position Control (Advanced - Speed-based) | 15 (0x0f) | Optional |
| Read Multi-Turn Current Position | 16 (0x10) | Fixed |
| Stop Instructions | 24 (0x18) | Optional |
| Reset Loop | 17 (0x11) | Optional |
| Damping Control | 09 (0x09) | Optional |
| Set Origin Point | 23 (0x17) | Optional |
| Synchronous Instruction | 25 (0x19) | / |
| Asynchronous Write Instruction | 18 (0x12) | Optional |
| Asynchronous Activate Instruction | 19 (0x13) | / |
| Read Data | 03 (0x03) | Fixed |
| Data Monitor | 22 (0x16) | Fixed |
| Customize Configuration Parameters | 04 (0x04) | Optional |
3. Packet Structure
3.1 Command Packet
Command Packet is the standard data structure used by the master control to send control or query commands to the servo.
- header: Fixed as
0x12 0x4C, used to identify the start of the command packet. - cmd_id: The control command for this packet.
-
length: Indicates the number of bytes of the subsequent data (content), used for packet parsing.
-
content: Stores control parameters (e.g., servo ID, target position, motion time, power, etc.), depending on the control command.
- checksum: The result of adding all bytes and taking the modulo 256, used to check data integrity.
Communication Mechanism: The master control sends a command packet to the servo to send control or read requests. After receiving a valid command packet, the servo parses the parameters and returns the corresponding Response Packet.
3.2 Response Packet
Response Packet is the standard data structure returned by the servo to the master control after receiving and parsing a valid Command Packet. It contains the execution result and related data. The overall structure is the same as the command packet, but the starting position identifier and data content definitions differ.
- header: Fixed as
0x05 0x1C, used to identify the start of the response packet. - cmd_id: The control command for this packet.
-
length: Indicates the number of bytes of the subsequent data (content), used for packet parsing.
-
content: Returns the execution result or corresponding data (e.g., current angle, voltage, temperature, version, read-back parameters, etc.), depending on the control command.
- checksum: The result of adding all bytes and taking the modulo 256, used to check data integrity.
Note
Response Packet Types
- Fixed Response: Response packet is always returned.
- Optional Response: Whether a response is returned depends on the PC configuration parameter
Response after action(default = No). - Recommendation: For time-sensitive batch control scenarios (e.g., multi-servo synchronous control), it is recommended to disable configurable responses to reduce bus occupation. However, during debugging and fault diagnosis, enabling them is recommended for quick issue identification.
4. Data Types
| Data Types | Data Name | Length | Minimum Value | Maximum Value |
|---|---|---|---|---|
| uint8_t | Signed Short Int | 1 | 0 | 255 |
| uint16_t | Unsigned Short Int | 2 | 0 | 65,535 |
| int16_t | Signed Short Int | 2 | -32,768 | 32,767 |
| uint32_t | Unsigned Long Int | 4 | 0 | 4,294,967,295 |
| int32_t | Signed Long Int | 4 | -2,147,483,648 | 2,147,483,647 |
| uint8_t[n] | Variable-Length Byte Array | n |
Caution
The byte order used in the servo communication protocol is Little Endian. For example, a uint16_t value of 4,660, represented in hexadecimal as 0x1234, will be sent/received in the order of 0x34 0x12, with the low byte first and the high byte last.
5. Ping
5.1 Overview
-
By sending the Ping command to the target servo ID, you can determine whether the servo is online from the response packet.
-
Command ID: 01 (0x01)
5.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Ping (0x01) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID (range 0 ~ 254) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
0x12 0x4c 0x01 0x01 0x00 0x60
Example Explanation:
- Check if the servo with ID 0 is online.
5.3 Response
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x05 0x1c) |
cmd_id |
1 | uint8_t | Ping (0x01) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID (range 0 ~ 254) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
0x05 0x1c 0x01 0x01 0x00 0x23
Example Explanation:
- Calculate and compare the theoretical
checksumwith thechecksumin the response packet: If they match, then Servo with ID 0 is online. - It is recommended to set a maximum wait time
timeout. If no response is received within this time, it indicates that the servo is offline.
6. Single-Turn Position Control (Basic)
6.1 Overview
-
Use this command to move the specified servo (or all servos) to the target position (±180°) within the specified motion time. The output power can also be configured.
-
Command ID: 08 (0x08)
6.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Single-Turn Position Control (Basic) (0x08) |
length |
1 | uint8_t | 7 bytes (0x07) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) 0xff represents all online servos |
position |
2 | int16_t | Target position, unit: 0.1° range : +1800 ~ -1800 (+CW / −CCW) |
time |
2 | uint16_t | Motion time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..10]) % 256 |
0x12 0x4c 0x08 0x07 0x00 0x84 0x03 0xf4 0x01 0x00 0x00 0xe9
Example Explanation:
- Set servo ID 0,
- Move to the target position of +90° within 500ms,
- Configure the
power protection thresholdto the maximum output power, operating at maximum power.
6.3 Response (Optional)
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x05 0x1c) |
cmd_id |
1 | uint8_t | Single-Turn Position Control (Basic) (0x08) |
length |
1 | uint8_t | 2 bytes (0x02) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
result |
1 | uint8_t | 0x01: Success execution| 0x00: Failure |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..5]) % 256 |
0x05 0x1C 0x08 0x02 0x00 0x01 0x2c
Example Explanation:
- The ID 0 servo returns a value of 0x01, indicating successful execution.
Caution
By default, no response packet is returned. A response will only be sent if the servo configuration parameter Respond after action is set to Yes in the PC configuration.
7. Single-Turn Position Control (Advanced - Time-based)
7.1 Overview
-
Use this command to move the specified servo (or all servos) to the target position (±180°) within the specified motion time. The output power can be configured, and acceleration/deceleration parameters are supported for trapezoidal motion profiles.
-
Command ID: 11 (0x0b)
7.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Single-Turn Position Control (Advanced - Time-based) (0x0b) |
length |
1 | uint8_t | 11 bytes (0x0b) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) 0xff represents all online servos |
position |
2 | int16_t | Target position, unit: 0.1° range : +1800 ~ -1800 (+CW / −CCW) |
time |
2 | uint16_t | Motion time, unit: ms |
accel |
2 | uint16_t | Acceleration time, unit: ms |
decel |
2 | uint16_t | Deceleration time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..14]) % 256 |
Warning
The acceleration and deceleration time settings cannot be less than 20 ms, otherwise they will not take effect.
0x12 0x4c 0x0b 0x0b 0x00 0x84 0x03 0x58 0x02 0x64 0x00 0xc8 0x00 0x00 0x00 0x81
Example Explanation:
-
Set servo ID 0,
-
Move to the target position of +90° within 500ms,
-
Acceleration time: 100 ms, deceleration time: 200 ms,
-
Configure the
power protection thresholdto the maximum output power, operating at maximum power.
7.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
8. Single-Turn Position Control (Advanced - Speed-based)
8.1 Overview
-
Use this command to move the specified servo (or all servos) to the target position (±180°) at the specified speed. The output power can be configured, and acceleration/deceleration parameters are supported for trapezoidal motion profiles.
-
Command ID: 12 (0x0c)
8.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Single-Turn Position Control (Advanced - Speed-based) (0x0c) |
length |
1 | uint8_t | 11 bytes (0x0b) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) 0xff represents all online servos |
position |
2 | int16_t | Target position, unit: 0.1° range : +1800 ~ -1800 (+CW / −CCW) |
speed |
2 | uint16_t | Motion speed, unit: 0.1°/s |
accel |
2 | uint16_t | Acceleration time, unit: ms |
decel |
2 | uint16_t | Deceleration time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..14]) % 256 |
Warning
The acceleration and deceleration time settings cannot be less than 20 ms, otherwise they will not take effect.
0x12 0x4c 0x0c 0x0b 0x00 0x84 0x03 0xd0 0x07 0x64 0x00 0xc8 0x00 0x00 0x00 0xff
Example Explanation:
-
Set servo ID 0,
-
Move to the target position +90° at 200°/s,
-
Acceleration time: 100 ms, deceleration time: 200 ms,
-
Configure the
power protection thresholdto the maximum output power, operating at maximum power.
8.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
9. Read Single-Turn Current Position
9.1 Overview
-
Read the current position of the servo with a specified ID via command. The returned value represents the single-turn current position (±180°) of the servo. This function can be used for real-time monitoring of the servo's motion status.
-
Command ID: 10 (0x0a)
9.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Read Single-Turn Current Position (0x0a) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
0x12 0x4c 0x0a 0x01 0x00 0x69
Example Explanation:
- Read Single-Turn Current Position of the servo with ID 0.
9.3 Response
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x05 0x1c) |
cmd_id |
1 | uint8_t | Read Single-Turn Current Position (0x0a) |
length |
1 | uint8_t | 3 bytes (0x03) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
position |
2 | int16_t | Target position, unit: 0.1° range : +1800 ~ -1800 (+CW / −CCW) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..6]) % 256 |
0x05 0x1C 0x0a 0x03 0x00 0x86 0x03 0xb7
Example Explanation:
- The position value returned by the servo with ID 0 is 0x86 0x03. After unpacking, the obtained value is +902,
- Converted to degrees, this indicates that the servo's current single-turn position is +90.2°.
10. Multi-Turn Position Control (Basic)
10.1 Overview
-
Use this command to move the specified servo (or all servos) to the target position (±3,686,400° / 1,024 turns) within the specified motion time. The output power can also be configured.
-
Command ID: 13 (0x0d)
10.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Multi-Turn Position Control (Basic) (0x0d) |
length |
1 | uint8_t | 11 bytes (0x0b) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254(0x00 ~ 0xfc ) 0xff represents all online servos |
position |
4 | int32_t | Target position, unit: 0.1° range : +3,686,400 ~ -3,686,400 (+CW / −CCW) |
time |
4 | uint32_t | Motion time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..14]) % 256 |
0x12 0x4c 0x0d 0x0b 0x00 0xa0 0x0f 0x00 0x00 0x88 0x13 0x00 0x00 0x00 0x00 0xc0
Example Explanation:
-
Set servo ID 0,
-
Move to the target position of +400° within 5000ms,
-
Configure the
power protection thresholdto the maximum output power, operating at maximum power.
10.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
11. Multi-Turn Position Control (Advanced - Time-based)
11.1 Overview
-
Use this command to move the specified servo (or all servos) to the target position (±3,686,400° / 1,024 turns) within the specified motion time. The output power can be configured, and acceleration/deceleration parameters are supported for trapezoidal motion profiles.
-
Command ID: 14 (0x0e)
11.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Multi-Turn Position Control (Advanced - Time-based) (0x0e) |
length |
1 | uint8_t | 15 bytes (0x0f) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254(0x00 ~ 0xfc ) 0xff represents all online servos |
position |
4 | int32_t | Target position, unit: 0.1° range : +3,686,400 ~ -3,686,400 (+CW / −CCW) |
time |
4 | uint32_t | Motion time, unit: ms |
accel |
2 | uint16_t | Acceleration time, unit: ms |
decel |
2 | uint16_t | Deceleration time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..18]) % 256 |
Warning
The acceleration and deceleration time settings cannot be less than 20 ms, otherwise they will not take effect.
0x12 0x4c 0x0e 0x0f 0x00 0x70 0x17 0x00 0x00 0xb0 0x04 0x00 0x00 0x64 0x00 0x64 0x00 0x00 0x00 0x7e
Example Explanation:
- Set servo ID 0,
- Move to the target position of +600° within 1200ms,
- Acceleration time: 100 ms, deceleration time: 100 ms,
- Configure the
power protection thresholdto the maximum output power, operating at maximum power.
11.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
12. Multi-Turn Position Control (Advanced - Speed-based)
12.1 Overview
- Use this command to move the specified servo (or all servos) to the target position (±368,640°) at the specified speed. The output power can be configured, and acceleration/deceleration parameters are supported for trapezoidal motion profiles.
- Command ID: 15 (0x0f)
12.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Multi-Turn Position Control (Advanced - Speed-based) (0x0f) |
length |
1 | uint8_t | 13 bytes (0x0d) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) 0xff represents all online servos |
position |
4 | int32_t | Target position, unit: 0.1° range : +3,686,400 ~ -3,686,400 (+CW / −CCW) |
speed |
2 | uint16_t | Motion speed, unit: 0.1°/s |
accel |
2 | uint16_t | Acceleration time, unit: ms |
decel |
2 | uint16_t | Deceleration time, unit: ms |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..16]) % 256 |
Warning
The acceleration and deceleration time settings cannot be less than 20 ms, otherwise they will not take effect.
0x12 0x4c 0x0f 0x0d 0x00 0x70 0x17 0x00 0x00 0xd0 0x07 0x64 0x00 0x64 0x00 0x00 0x00 0xa0
Example Explanation:
- Set servo ID 0,
- Move to the target position +600° at 200°/s,
- Acceleration time: 100 ms, deceleration time: 100 ms,
- Configure the
power protection thresholdto the maximum output power, operating at maximum power.
12.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
13. Read Multi-Turn Current Position
13.1 Overview
- Read the current angle of the servo with a specified ID via command. The returned angle value represents the servo's multi-turn current position (±3,686,400°), along with information on the number of turns (±1,024 turns). This function can be utilized for real-time monitoring of the servo's motion status.
- Command ID: 16 (0x10)
13.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Read Multi-Turn Current Position(0x10) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254(0x00 ~ 0xfc ) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
0x12 0x4c 0x10 0x01 0x00 0x6f
Example Explanation:
- Read Multi-Turn Current Position of the servo with ID 0.
13.3 Response
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x05 0x1c) |
cmd_id |
1 | uint8_t | Read Multi-Turn Current Position (0x10) |
length |
1 | uint8_t | 7 bytes (0x07) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
position |
4 | int32_t | Target position, unit: 0.1° range :+3,686,400 ~ -3,686,400 (+CW / −CCW) |
turns |
2 | int16_t | Lap information, unit: turn range : -1024 ~ 1,024 |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..6]) % 256 |
0x05 0x1c 0x10 0x07 0x00 0x23 0x13 0x00 0x00 0x01 0x00 0x6f
Example Explanation:
- The position value returned by the servo with ID 0 is 0x23 0x13 0x00 0x00. After unpacking, the obtained value is +4,899,
- Converted to degrees, this indicates that the servo's current multi-turn position is +489.9°,
- The turn count returned by the servo with ID 0 is 0x01 0x00. After unpacking, the value is 1,
- Combined with the direction of the position value above, this indicates that the servo's current turn count is +1 turn.
14. Reset Loop
14.1 Overview
- Reset loop of the servo via command, and re-record the current absolute position as the present position.
- Command ID: 17 (0x11)
14.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Reset Loop (0x11) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
Warning
The command to reset loop is effective only when the servo is in the released state. To ensure proper execution, it is recommended to first issue a stop instruction before performing the reset loop.
0x12 0x4c 0x11 0x01 0x00 0x70
Example Explanation:
- Assuming the current position is +489.9°,
- Reset the loop information of servo ID 0 and re-record the current absolute position as the current position,
- If a read-position command is sent afterward, the returned position will be +489.9° - 360° = +129.9°.
14.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
15. Damping Control
15.1 Overview
- Allow the servo to adjust to different positions under external force and set its output power.
- Command ID: 09 (0X09)
15.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Damping Control (0x09) |
length |
1 | uint8_t | 3 bytes (0x03) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, execution follows the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..6]) % 256 |
Warning
The damping control command is effective only when the servo is in the released state or damping state. To ensure proper execution, it is recommended to first issue a stop instruction before performing damping control.
0x12 0x4c 0x09 0x03 0x00 0xf4 0x01 0x5f
Example Explanation:
- Set servo ID 0 to damping control,
- Set the output power to 500 mW. (If the set power exceeds the
power protection threshold, the servo follows thepower protection threshold.)
15.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
16. Stop Instructions
16.1 Overview
- The stop instruction is utilized for rapid halting in servo motion control. Users can select different stop types according to their needs. This instruction can also be applied to restore the locking force after stall protection is triggered, as well as to re-establish the locking force at the current position when the locking force has been released.
- Command ID: 24 (0x18)
16.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Stop Instructions (0x18) |
length |
1 | uint8_t | 4 bytes (0x04) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
mode |
1 | uint8_t | Release locking force after stopping: 0x10 Maintain locking force after stopping: 0x11 Enter damping control after stopping: 0x12 |
power |
2 | uint16_t | output power, unit: mW If power = 0 or exceeds the power protection threshold, the execution will follow the power protection threshold |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..7]) % 256 |
0x12 0x4c 0x18 0x04 0x00 0x11 0x70 0x17 0x12
Example Explanation:
- Set servo with ID 0 to enter the stop motion state,
- With the stop mode set to 0x11, the servo maintains holding torque after stopping. The output power remains at 6,000 mW (if the set power exceeds the
power protection threshold, the servo follows thepower protection threshold).
16.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
17. Synchronous Instruction
17.1 Overview
- The synchronous instruction is used to simultaneously send control information for multiple servos in a single command. Each servo matches and parses the corresponding parameters based on its unique ID, and only executes the content relevant to itself. After all servos have received the information, they start simultaneously, achieving coordinated and synchronized movement of multiple servos.
- Command ID: 25 (0x19)
17.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Synchronous Instruction (0x19) |
length |
1 | uint8_t | (%d*%n+3) bytes |
cmd_id |
1 | uint8_t | Effective Synchronous Command id |
length |
1 | uint8_t | Effective Synchronous Command length: %d |
count |
1 | uint8_t | Number of servos: %n |
content |
1 | uint8_t | Payload of the effective command |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..%d%n+6]) % 256 |
Warning
- Synchronous instructions apply only to the commands listed in Effective Synchronous Command.
0x12 0x4c 0x19 0x11 0x08 0x07 0x02 0x01 0x2c 0x01 0xe8 0x03 0x00 0x00 0x02 0x58 0x02 0xd0 0x07 0x00 0x00 0xe5
Example Explanation:
- Send a synchronous instruction to servos ID 1 and ID 2,
- Move servo ID 1 to the target position +30° within 1000 ms, with the
power protection thresholdset to the maximum output power so it runs at maximum power. - Move servo ID 2 to the target position +60° within 2000 ms, with the
power protection thresholdset to the maximum output power so it runs at maximum power. - Both servos execute the commands simultaneously after receiving them.
17.3 Effective Synchronous Command
| Command Name | Command ID | Length (%d) |
|---|---|---|
| Single-Turn Position Control (Basic) | 08 (0x08) | 7 (0x07) |
| Single-Turn Position Control (Advanced - Time-based) | 11 (0x0b) | 11 (0x0b) |
| Single-Turn Position Control (Advanced - Speed-based) | 12 (0x0c) | 11 (0x0b) |
| Multi-Turn Position Control (Basic) | 13 (0x0d) | 11 (0x0b) |
| Multi-Turn Position Control (Advanced - Time-based) | 14 (0x0e) | 15 (0x0f) |
| Multi-Turn Position Control (Advanced - Speed-based) | 15 (0x0f) | 13 (0x0d) |
| Data Monitor | 22 (0x16) | 1 (0x01) |
17.4 Response
- The synchronous instruction itself does not have a response packet.
- If the embedded effective synchronous command is configured to return a response, each servo returns its own response data.
18. Asynchronous Write Instruction
18.1 Overview
- Asynchronous write consists of an Asynchronous Write Instruction followed by one Effective Asynchronous Command.
- After this instruction is sent, each online servo stores the next Effective Asynchronous Command in its buffer and executes it when the Asynchronous Activate Instruction is received.
- Command ID: 18 (0x12)
18.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Asynchronous Write Instruction (0x12) |
length |
1 | uint8_t | 0 bytes (0x00) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..3]) % 256, fixed at 0x70 |
Important
- This instruction applies to all servos on the bus and enables the buffer when received.
- The buffer can store only one Effective Asynchronous Command at a time.
- If a servo with the same ID receives another command, it is executed as a normal command.
0x12 0x4c 0x12 0x00 0x70
0x12 0x4c 0x08 0x07 0x00 0x84 0x03 0xf4 0x01 0x00 0x00 0xe9
Example Explanation:
- Step 1: Send the asynchronous write instruction so all online servos enable their buffers.
- Step 2: Send a control command for ID 0; the command is written to the buffer.
- Move servo ID 0 to the target position +90° within 500 ms;
- Set the
power protection thresholdto the maximum output power so it runs at maximum power.
18.3 Effective Asynchronous Command
| Command Name | Command ID | Length |
|---|---|---|
| Single-Turn Position Control (Basic) | 08 (0x08) | 7 (0x07) |
| Single-Turn Position Control (Advanced - Time-based) | 11 (0x0b) | 11 (0x0b) |
| Single-Turn Position Control (Advanced - Speed-based) | 12 (0x0c) | 11 (0x0b) |
| Multi-Turn Position Control (Basic) | 13 (0x0d) | 11 (0x0b) |
| Multi-Turn Position Control (Advanced - Time-based) | 14 (0x0e) | 15 (0x0f) |
| Multi-Turn Position Control (Advanced - Speed-based) | 15 (0x0f) | 13 (0x0d) |
18.4 Response
- This instruction does not have a response packet.
19. Asynchronous Activate Instruction
19.1 Overview
- The Asynchronous Activate Instruction triggers execution of the command stored in the buffer. After execution, the buffer is cleared and disabled.
- Command ID: 19 (0x13)
19.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Asynchronous Activate Instruction (0x13) |
length |
1 | uint8_t | 1 byte (0x01) |
action |
1 | uint8_t | 0x01: Cancel | 0x00: Execute |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
Caution
-
Regardless of whether the instruction is executed or canceled, the servo buffer will be cleared and closed.
-
After power-off, the buffer content automatically becomes invalid.
0x12 0x4c 0x13 0x01 0x00 0x72
Example Explanation:
- Send the Asynchronous Activate Instruction,
- Clear and disable the buffers on all servos.
19.3 Response
- There is no response packet for this instruction.
20. Read Data
20.1 Overview
- By sending instructions, you can individually obtain the working status parameters (such as voltage, current, temperature, etc.) and configuration parameters of the servo; the relevant information is returned via response data packets.
- Command ID: 03 (0x03)
20.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Read Data (0x03) |
length |
1 | uint8_t | 2 bytes (0x02) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
data_id |
1 | uint8_t | Please refer to the working status parameters and servo configuration parameters. |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..5]) % 256 |
0x12 0x4c 0x03 0x02 0x00 0x03 0x66
Example Explanation:
- Read the current power of the servo with ID 0.
20.3 Response
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x05 0x1c) |
cmd_id |
1 | uint8_t | Read Data (0x03) |
length |
1 | uint8_t | 3 bytes (0x03) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
data_content |
1/2 | int8/16_t | Based on the return values of the parameters read from the instructions, Please refer to the operating status parameters and servo configuration parameters. |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..6]) % 256 |
0x05 0x1C 0x03 0x03 0x00 0xf4 0x01 0x1c
Example Explanation:
- The power value returned by the servo with ID 0 is 0xf4 0x01. After unpacking, the obtained value is +500, indicating that the current servo power is 500mW.
21. Data Monitor
21.1 Overview
- By sending instructions, the operating status parameters (such as angle, voltage, current, temperature, etc.) of servos can be obtained in batches; the relevant information is returned via response data packets.
- Command ID: 22 (0x16)
21.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Data Monitor (0x16) |
length |
1 | uint8_t | 1 byte (0x01) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..4]) % 256 |
0x12 0x4c 0x16 0x01 0x00 0x75
Example Explanation:
- Obtain the operating status data of the servo with ID 0.
21.3 Response
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier ( 0x05 0x1c ) |
cmd_id |
1 | uint8_t | Data Monitor (0x16) |
length |
1 | uint8_t | 16 bytes (0x10) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
voltage |
2 | uint16_t | Current operating voltage, unit: mV |
current |
2 | uint16_t | Current operating current, unit: mA |
power |
2 | uint16_t | Current operating power, unit: mW |
temperature |
2 | uint16_t | Current operating temperature, please refer to the ADC-temperature mapping table. |
status |
1 | uint8_t | Status indicator bit |
position |
4 | uint32_t | Current position, unit: 0.1° |
turns |
2 | int16_t | Current turn count, unit: turns |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..19]) % 256 |
Tip
It is recommended to set a maximum waiting time, timeout. If no response is received within this time, it indicates that the servo is not online.
0x05 0x1c 0x16 0x10 0x00 0x83 0x1e 0x1e 0x00 0xea 0x00 0x2c 0x07 0x00 0xaf 0x0b 0x00 0x00 0x00 0x00 0xdd
Example Explanation:
- By unpacking the response data of the servo with ID 0, the obtained operating status data is as follows:
- ID:
0x00 = 0 - Voltage:
0x1e 0x83 = 7811mV - Current:
0x00 0x1e = 30mA - Power:
0x00 0xea = 234mW - Temperature:
0x07 0x2C = 1836adc value - Status:
0x00 = 0 - Posotion:
0x00 0x00 0x0b 0xaf = 2991299.1degrees - Turn:
0x00 0x00 = 0
22. Set Origin Point
22.1 Overview
- Set the current position as the Origin Point of the servo via the command.
- Command ID: 23 (0x17)
22.2 Command
| Byte Name | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Set Origin Point (0x17) |
length |
1 | uint8_t | 2 bytes (0x02) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
reset |
1 | uint8_t | 0x00 (Default) |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..5]) % 256 |
Warning
The set origin point command is only effective when the servo is in the released state. To ensure proper execution, it is recommended to first issue a stop instruction before setting the origin point.
0x12 0x4c 0x17 0x02 0x00 0x00 0x77
Example Explanation:
- Set the current position of servo ID 0 as its origin point.
22.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
23. Customize Configuration Parameters
23.1 Overview
- Write the servo's configuration parameters via commands.
- Command ID: 04 (0x04)
23.2 Command
| Command | Length | Data Type | Description |
|---|---|---|---|
header |
2 | uint16_t | Fixed identifier (0x12 0x4c) |
cmd_id |
1 | uint8_t | Customize Configuration Parameters (0x04) |
length |
1 | uint8_t | 2 bytes (0x02) |
servo_id |
1 | uint8_t | servo ID, range 0 ~ 254 (0x00 ~ 0xfc ) |
data_id |
1 | uint8_t | Please refer to the servo configuration parameters. |
data_content |
n | int8/16_t | Please refer to the servo configuration parameters. |
checksum |
1 | uint8_t | checksum = Σ(Byte[0..n+6]) % 256 |
23.3 Response (Optional)
- For details, please refer to Section 6.3 Response (Optional).
Appendix
A. operating status parameters
| data_id | Parameter Name | Data Type | Unit | Notes |
|---|---|---|---|---|
| 1 | Voltage | uint16_t | mV | |
| 2 | Current | uint16_t | mA | |
| 3 | Power | uint16_t | mW | |
| 4 | Temperature | uint16_t | ADC | Please refer to the ADC-temperature mapping table |
| 5 | Status indicator bits | uint8_t | BIT[0] - Set to 1 when instruction is being executed, clear to 0 after execution is complete BIT[1] - Set to 1 for instruction execution error, clear to 0 after next correct execution BIT[2] - Set to 1 for stall protection, clear to 0 after stall is resolved BIT[3] - Set to 1 for overvoltage protection, clear to 0 after voltage returns to normal BIT[4] - Set to 1 for undervoltage protection, clear to 0 after voltage returns to normal BIT[5] - Set to 1 for overcurrent protection, clear to 0 after current returns to normal BIT[6] - Set to 1 for overpower protection, clear to 0 after power returns to normal BIT[7] - Set to 1 for overtemperature protection, clear to 0 after temperature returns to normal |
ADC-temperature mapping table
| Temperature(℃) | ADC | Temperature(℃) | ADC | Temperature(℃) | ADC |
|---|---|---|---|---|---|
| 50 | 1191 | 60 | 941 | 70 | 741 |
| 51 | 1164 | 61 | 918 | 71 | 723 |
| 52 | 1137 | 62 | 897 | 72 | 706 |
| 53 | 1110 | 63 | 876 | 73 | 689 |
| 54 | 1085 | 64 | 855 | 74 | 673 |
| 55 | 1059 | 65 | 835 | 75 | 657 |
| 56 | 1034 | 66 | 815 | 76 | 642 |
| 57 | 1010 | 67 | 796 | 77 | 627 |
| 58 | 986 | 68 | 777 | 78 | 612 |
| 59 | 963 | 69 | 759 | 79 | 598 |
B. servo configuration parameters
| data_id | Parameter Name | Data Type | Unit | Notes |
|---|---|---|---|---|
| 33 | Command Response Switch | uint8_t | 0x00: Do not send response packet (default) 0x01: Send response packet |
|
| 34 | Servo ID | uint8_t | Range 0 ~ 254 | |
| 36 | Baud Rate Configuration | uint8_t | 0x01 - 9,600 0x02 - 19,200 0x03 - 38,400 0x04 - 57,600 0x05 - 115,200 (default) 0x06 - 250,000 0x07 - 500,000 0x08 - 1,000,000 |
|
| 37 | Stall Protection Switch | uint8_t | When the servo operates beyond the Power Protection Threshold0x00: (Stall protection OFF) Reduce output to the power protection threshold (default) 0x01: (Stall protection ON) Release holding torque |
|
| 38 | Stall Power Upper Limit | uint16_t | mW | |
| 39 | Voltage Protection Lower Limit | uint16_t | mV | |
| 40 | Voltage Protection Upper Limit | uint16_t | mV | |
| 41 | Temperature Protection Threshold | uint16_t | ADC | |
| 42 | Power Protection Threshold | uint16_t | mW | |
| 43 | Current Protection Value | uint16_t | mA | |
| 46 | Power‑On Holding Torque Switch | uint8_t | 0x00: Release torque (default) 0x01: Maintain torque |
|
| 48 | Angle Limit Switch | uint8_t | 0x00: Off (default) 0x01: On |
|
| 49 | Power‑On Soft‑Start Switch | uint8_t | 0x00: Off (default) 0x01: On |
|
| 50 | Power‑On Soft‑Start Time | uint16_t | ms | |
| 51 | Servo Angle Upper Limit | int16_t | 0.1° | |
| 52 | Servo Angle Lower Limit | int16_t | 0.1° |