Skip to content

Usage Demo

1. Environment Configuration

  • Arbitration domain baud rate: 1Mbps 80%.
  • Data and baud rate: 5Mbps 75%.

2. 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)

3. 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......

4. Usage Examples

IAP Online Update Flag (Required Operation)

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x490x00

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x490x01

Get Current Joint Status

Command package:

CAN-IDDLC
0x6010x00

Response package:

CAN-IDDLCD0D1D2D3D4D5D6D7
0x7010x100x000x000xFC0x080xEA0x010x010x00
Error CodeSystem VoltageSystem TemperatureEnable StatusBrake Status
D8D9D10D11D12D13D14D15
0x610x0D0x030x000xFA0xFF0xFF0xFF
Current PositionCurrent Current

Position Mode Control

(1) Set Working Mode to Position Mode:

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x300x03

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x300x01

(2) Joint Movement via Position Servo Command:

After querying the current angle using the joint status query command, send a position servo command to move the joint within ±10°. For example, if the current angle is 20°, move the joint to 30°.

Command package:

CAN-IDDLCDATADATADATADATA
0x2010x040xE00x930x040x00

Response package:

CAN-IDDLCD0D1D2D3D4D5D6D7
0x5010x100xC00xFF0xFF0xFF0x000x000x000x00
Current CurrentCurrent Speed
D8D9D10D11D12D13D14D15
0x400x0D0x030x000x010x000x000x00
Current Position (Position before movement)Enable StatusError Code

After obtaining the joint status again, the current joint angle should be within ±10° of the initial position.

Current Mode Control

(1) Set Working Mode to Current Mode:

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x300x01

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x300x01

(2) Joint Movement via Current Servo Command:

Send a current servo command to move the joint in the positive or negative direction based on the current value (the joint moves in the opposite direction if the data is negative, and in the positive direction if the data is positive), for example, a current of 500 mA.

Command package:

CAN-IDDLCDATADATADATADATA
0x4010x040xF40x010x000x00

Response package:

CAN-IDDLCD0D1D2D3D4D5D6D7
0x5010x100xF30xFF0xFF0xFF0x020x000x000x00
Current CurrentCurrent Speed
D8D9D10D11D12D13D14D15
0xBB0xB00x090x000x010x000x000x00
Current Position (Position before movement)Enable StatusError Code

Speed Mode Control

(1) Set Working Mode to Speed Mode:

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x300x02

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x300x01

(2) Joint Movement via Speed Servo Command:

Send a speed servo command to move the joint in the positive or negative direction based on the speed value (the joint moves in the opposite direction if the data is negative, and in the positive direction if the data is positive), for example, a speed of 5 RPM.

Command package:

CAN-IDDLCDATADATADATADATA
0x3010x040xC40x090x000x00

Response package:

CAN-IDDLCD0D1D2D3D4D5D6D7
0x5010x100xC00xFF0xFF0xFF0x000x000x000x00
Current CurrentCurrent Speed
D8D9D10D11D12D13D14D15
0x760x140x030x000x010x000x000x00
Current Position (Position before movement)Enable StatusError Code

Clear Joint Error

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x0F0x01

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x0F0x01

WARNING

After clearing the joint error, switch the working mode to position servo mode, send an enable command, and the joint will be successfully enabled.

Set Joint Zero Position

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x0E0x01

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x0E0x01

Set Enable Status

Enable

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x0A0x01

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x0A0x01

Disable

Command package:

CAN-IDDLCCMDINDEXDATA
0x010x030x020x0A0x00

Response package:

CAN-IDDLCCMDINDEXDATA
0x1010x030x020x0A0x01

Low-Power Mode Description

After enabling low-power mode, the maximum power consumption of each joint does not exceed 80W. Low-power mode is activated when the memory vector table address 0x69 is set to 1, and it is deactivated when set to 0 returning, to the normal joint state.

TIP

Supported only for joints WHJ10N/WHJ30/WHJ60 with firmware version 519 and later versions.

End-Effector Mode Description

In end-effector mode, when the memory vector table address 0x79 is set to 0, the end-effector is non-joint; when set to 1, the end-effector is in joint mode, functioning as a joint.

TIP

Supported only for joints WHJ10N/WHJ30/WHJ60 with firmware version 519 and later versions.

Time-Sharing Power-On Mode Description

In time-sharing power-on mode, when the memory vector table address 0x1f is set to 0, the joint power-on is delayed; when set to 1, the joint power-on is immediate without delay.

TIP

Supported only for joints WHJ10N/WHJ30/WHJ60 with firmware version 519 and later versions.