Skip to content

Usage Demo

1. Basic demo

Read the current position of the module whose ID is 1

Command = CMD_RD; Current position low 16-bit address = 0x14, read the data of two registers;

Command package:

CAN-IDDLCByte1Byte2Byte3
0x010x030x010x140x02
Current position query

Response package:

CAN-IDDLCByte1Byte2Byte3Byte4Byte5Byte6
0x1010x060x010x140x100x270x000x00
Current position

Current position: position = 0x00002710/10000 = 1°

Set the target position of the module whose ID is 1 to 1°

Command = CMD_WR; address = 0x36; data = 10000 = 0x00002710;

(1) Normal mode:

Command package:

CAN-IDDLCByte1Byte2Byte3Byte4Byte5Byte6
0x010x060x020x360x100x270x000x00
Set the target position

Response package:

CAN-IDDLCByte1Byte2Byte3
0x1010x030x020x360x01
Target position set successfully

(2) Servo mode:

Command package:

CAN-IDDLCByte1Byte2Byte3Byte4
0x2010x040x100x270x000x00
Set the target position

Response package:

CAN-IDDLC123456789101112
0x5010x100x640x000x000x000x000x000x000x000x100x200x000x00
Current current (100 mA)Current speed (0)Current position
13141515
0x010x000x000x00
Enable status (Enable status)Error code (no error)

2. Demo of common command package

Position servo command package

When the joint is in the position servo mode, it enters the cyclic position servo control stage. At this stage, the controller sends position command frames to each joint module, and each joint module that has received the command frames performs corresponding position servo control and sends the current position information, current information, speed information, enable status, and error code to the controller through a feedback frame.
If 7 modules on a bus participate in cyclic servo control, 14 frames of communication will be generated on the bus within one control cycle to reduce the bus load.

Position servo command frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1IDEFDFR0BRSESIDLC/4Data(4Byte)CRCACKEOFIFS
ID+0x200001010LengthD0D1D2D3
4Current position

Servo feedback frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1......DLC/4Data(16Byte)......
ID+0x5000......LengthD0~D3D4~D7D8~D11D12~D13D14~D15......
16Current currentCurrent speedCurrent positionEnable statusError code......

Speed servo command package

When the joint is in the speed servo mode, it enters the cyclic speed servo control stage. At this stage, the controller sends speed command frames to each joint module, and each joint module that has received the command frames performs corresponding speed servo control and sends the current position information, current information, speed information, enable status, and error code to the controller through a feedback frame.

Speed servo command frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1IDEFDFR0BRSESIDLC/4Data(4Byte)CRCACKEOFIFS
ID+0x300001010LengthD0D1D2D3
4Target speed

Servo feedback frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1......DLC/4Data(16Byte)......
ID+0x5000......LengthD0~D3D4~D7D8~D11D12~D13D14~D15......
16Current currentCurrent speedCurrent positionEnable statusError code......

Current servo command package

To control the joint current. Once a current servo command frame is issued, a servo feedback frame is returned.

Current servo command frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1IDEFDFR0BRSESIDLC/4Data(4Byte)CRCACKEOFIFS
ID+0x400001010LengthD0D1D2D3
4Target speed

Servo feedback frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1......DLC/4Data(16Byte)......
ID+0x5000......LengthD0~D3D4~D7D8~D11D12~D13D14~D15......
16Current currentCurrent speedCurrent positionEnable statusError code......

Joint status query command package

To query the joint status in cycles. To improve the bus utilization, the common joint data is queried through a command frame, and after the joint receives the command frame, it integrates the error code, system voltage, system temperature, enable status, and current position into a joint status feedback frame for feedback.

Joint status query command frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1IDEFDFR0BRSESIDLC/4Data(0Byte)CRCACKEOFIFS
ID+0x600001010Length
0

Joint status feedback frame:

Arbitration fieldControl fieldData fieldCRC and other fields
STID/11R1......DLC/4Data(16Byte)......
ID+0x7000.......LengthD0~D1D2~D3D4~D5D6~D7D8~D11D12~D15.......
12Error codeSystem voltageSystem temperatureD6 Enable status
D7 Brake status
Current positionCurrent current......