Skip to main content

Lingxi Gloria-D Series Servo Communication Protocol Manual

1. Overview

This document applies to the servo communication control of the Lingxi Gloria-D Series robotic arms.

2. Communication Protocol Specification

2.1 Basic Communication Parameters

ParameterValue
Baud Rate1000000 bps (default)
Data Bits8 bits
Stop Bits1 bit
ParityNone
CommunicationHalf-duplex UART

2.2 Packet Format

The communication packet uses the following format:

Header (2 bytes: 0xFF, 0xFF) + ID (1 byte) + Length (1 byte) + Instruction (1 byte) + Parameters (N bytes) + Checksum (1 byte)
FieldDescription
HeaderFixed as two bytes 0xFF, 0xFF
IDServo ID (0-254, 0xFE is the broadcast ID)
LengthParameter length + 3 (Instruction + Checksum)
InstructionCommand type
ParametersCommand parameters
ChecksumChecksum

2.3 Checksum Calculation

Checksum calculation formula:

Checksum = ~(ID + Length + Instruction + Parameter1 + ... + ParameterN) & 0xFF

3. Main Command Descriptions

3.1 PING Instruction

Function: Test whether the servo is connected properly

Instruction Format:

HeaderIDLengthInstructionChecksum
0xFF, 0xFFID0x020x01Checksum

Response:

HeaderIDLengthErrorChecksum
0xFF, 0xFFID0x02ErrorChecksum

3.2 READ Instruction

Function: Read servo data

Instruction Format:

HeaderIDLengthInstructionAddressLengthChecksum
0xFF, 0xFFID0x040x02AddressLengthChecksum

Parameter Description:

  • Address: Read start address
  • Length: Length of data to read

3.3 WRITE Instruction

Function: Write data to the servo

Instruction Format:

HeaderIDLengthInstructionAddressData1Data2...Checksum
0xFF, 0xFFIDLength0x03AddressDataData...Checksum

3.4 REG WRITE Instruction

Function: Write data and wait for the ACTION instruction to execute

Instruction Format:

HeaderIDLengthInstructionAddressData1Data2...Checksum
0xFF, 0xFFIDLength0x04AddressDataData...Checksum

3.5 ACTION Instruction

Function: Trigger the previously written action

Instruction Format:

HeaderIDLengthInstructionChecksum
0xFF, 0xFFID0x020x05Checksum

3.6 RESET Instruction

Function: Reset servo settings

Instruction Format:

HeaderIDLengthInstructionChecksum
0xFF, 0xFFID0x020x06Checksum

4. Control Table Description

4.1 Basic Information Area (Address 0-23)

AddressNameDescriptionLengthAccess
0Model Number LModel number low byte1Read-only
1Model Number HModel number high byte1Read-only
2VersionFirmware version1Read-only
3IDServo ID1Read/Write
4Baud RateBaud rate1Read/Write
5Return Delay TimeReturn delay time1Read/Write
6CW Angle Limit LClockwise angle limit low byte1Read/Write
7CW Angle Limit HClockwise angle limit high byte1Read/Write
8CCW Angle Limit LCounterclockwise angle limit low byte1Read/Write
9CCW Angle Limit HCounterclockwise angle limit high byte1Read/Write
10System Data2System data 21Read-only
11Limit TemperatureMaximum temperature limit1Read/Write
12Down Limit VoltageMinimum voltage limit1Read/Write
13Up Limit VoltageMaximum voltage limit1Read/Write
14Max Torque LMaximum torque low byte1Read/Write
15Max Torque HMaximum torque high byte1Read/Write
16Return LevelReturn status level1Read/Write
17Alarm LEDLED alarm1Read/Write
18Alarm ShutdownShutdown alarm1Read/Write
19Operating ModeOperating mode1Read/Write
20Down Calibration LLower-limit calibration low byte1Read/Write
21Down Calibration HLower-limit calibration high byte1Read/Write
22Up Calibration LUpper-limit calibration low byte1Read/Write
23Up Calibration HUpper-limit calibration high byte1Read/Write

4.2 Status Information Area (Address 24-35)

AddressNameDescriptionLengthAccess
24Torque EnableTorque enable1Read/Write
25LEDLED status1Read/Write
26CW Compliance MarginClockwise compliance margin1Read/Write
27CCW Compliance MarginCounterclockwise compliance margin1Read/Write
28CW Compliance SlopeClockwise compliance slope1Read/Write
29CCW Compliance SlopeCounterclockwise compliance slope1Read/Write
30Goal Position LGoal position low byte1Read/Write
31Goal Position HGoal position high byte1Read/Write
32Moving Speed LMoving speed low byte1Read/Write
33Moving Speed HMoving speed high byte1Read/Write
34Torque Limit LTorque limit low byte1Read/Write
35Torque Limit HTorque limit high byte1Read/Write

4.3 Feedback Information Area (Address 36-49)

AddressNameDescriptionLengthAccess
36Present Position LCurrent position low byte1Read-only
37Present Position HCurrent position high byte1Read-only
38Present Speed LCurrent speed low byte1Read-only
39Present Speed HCurrent speed high byte1Read-only
40Present Load LCurrent load low byte1Read-only
41Present Load HCurrent load high byte1Read-only
42Present VoltageCurrent voltage1Read-only
43Present TemperatureCurrent temperature1Read-only
44Registered InstructionRegistered instruction1Read-only
45ReservedReserved1Read-only
46MovingMoving status1Read-only
47LockLock1Read-only
48Punch LPunch low byte1Read/Write
49Punch HPunch high byte1Read/Write

5. Angle and Position Conversion

5.1 Angle Range

  • Minimum Angle: 0°
  • Maximum Angle: 300° (depending on the specific model)
  • Resolution: 0.29°

5.2 Position Value Calculation

Position value range: 0 - 1023

Angle to Position Value:

Position = (Angle / 300) * 1023

Position Value to Angle:

Angle = (Position / 1023) * 300

6. Complete Example: Angle Control and Angle Feedback for Each Servo of the Robotic Arm

Please refer to the following complete protocol in detail and familiarize yourself with the meaning of each part:

  1. Header Default is 0xFF, 0xFF: | 0xFF | 0xFF | 0x01 | 0x02 | 0x01 | 0xFB |

  2. Instruction ID 0x01, executes the PING instruction: | 0xFF | 0xFF | 0x01 | 0x02 | 0x01 | 0xFB |

  3. Instruction Length 0x02, indicates the instruction length is 2 bytes: | 0xFF | 0xFF | 0x01 | 0x02 | 0x01 | 0xFB |

  4. Instruction Type 0x01, PING instruction: | 0xFF | 0xFF | 0x01 | 0x02 | 0x01 | 0xFB |

  5. Checksum 0xFB, checksum calculation: | 0xFF | 0xFF | 0x01 | 0x02 | 0x01 | 0xFB |

  6. Response Frame | 0xFF | 0xFF | 0x01 | 0x02 | 0x00 | 0xFB |


7. Complete Example: Reading the Current Servo Position

Please refer to the following complete protocol in detail and familiarize yourself with the meaning of each part:

  1. Header Default is 0xFF, 0xFF: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  2. Instruction ID 0x01, executes the READ instruction: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  3. Instruction Length 0x04, indicates the parameter length is 4 bytes: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  4. Instruction Type 0x02, READ instruction: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  5. Parameter 0x24, read start address (current position): | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  6. Read Length 0x02, read 2 bytes: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  7. Checksum 0xD9, checksum calculation: | 0xFF | 0xFF | 0x01 | 0x04 | 0x02 | 0x24 | 0x02 | 0xD9 |

  8. Response Frame Example | 0xFF | 0xFF | 0x01 | 0x04 | 0x00 | 0xE8 | 0x03 | 0x16 |

  9. Response Parsing

    • 0xFF, 0xFF: Header
    • 0x01: Servo ID
    • 0x04: Data length
    • 0x00: Error code (no error)
    • 0xE8: Position low byte
    • 0x03: Position high byte
    • 0x16: Checksum

8. Error Codes

Error ValueMeaning
0No error
1Input voltage error
2Angle limit error
4Overheating error
8Angle range error
16Overload error
32Instruction error
64Checksum error

9. Notes

  1. Communication Timing: There should be at least a 1 ms interval between two adjacent packets
  2. Servo ID: It is recommended to use an ID between 1 and 253; avoid using the broadcast ID (0xFE) for write operations
  3. Baud Rate Setting: The servo must be restarted after changing the baud rate
  4. Temperature Monitoring: Monitor the servo temperature during prolonged operation
  5. Load Limit: Ensure the servo load does not exceed the rated value
  6. Firmware Upgrade: Periodically check and upgrade the servo firmware

10. Troubleshooting

Common Issues:

  1. Communication failure: Check the baud rate, servo ID, and connection cables
  2. Servo not responding: Check the power supply voltage and whether the servo is locked
  3. Inaccurate position: Check the angle limit settings and calibration parameters
  4. Overheat protection: Reduce the load and improve heat dissipation