Kind of Instruction  

To operate Dynamixel, Instruction Packet, which is binary type data, should be sent to Dynamixel from Main Controller. Instruction Packet has seven kinds of commands. (Refer to “Instruction Packet”)

In addition, Dynamixel receives Instruction Packet to perform a command and returns the result as Status Packet to Main Controller. This section describes examples of the usage of each command of Instruction Packet.

 

The following example is written based on Dynamixel Actuator RX-64.  Since other Dynamixels such as AX-12/12+, DX etc. consist of equal command, the same Packet type can be used.

 

READ DATA

Function This command is to read data in the Control Table inside of RX-64.

 

Length 0X04

Instruction 0X02

Parameter1 Start Address of data to be read

Parameter2 Length of Data to be read

 

 

 

WRITE DATA

Function This command is to write data to the Control Table inside of RX-64.

 

Length N+3 (if the number of writing data is N)

Instruction 0X03

Parameter1 Start address to write data

Parameter2 First data to write

Parameter3 Second data to write

Parameter N+1 Nth Data to write

 

 

 

REG WRITE

Function The REG_WRITE command is similar to the WRITE_DATA command in terms of function, but differs in terms of the timing that a command is executed. When Instruction Packet arrives, it is saved in Buffer and the Write operation remains in the standby state. At this moment, Registered Instruction (Address 44 (0x2C)) is set as “1”. Then, when Action Instruction Packet arrives, Registered Instruction changes into “‘0” and the registered Write command is finally executed.

 

Length N+3 (if the number of Writing Data is N)

Instruction 0X04

Parameter1 Start Address to write Data

Parameter2 First data to write

Parameter N+1 Nth data to write

 

 

 

ACTION

Function This command is to execute the Write action registered by REG_WRITE

 

Length 0X02

Instruction 0X05

Parameter NONE

 

The Action command is useful when several RX-64s are moved with accuracy at the same time. When several running gears are controlled via communication, there is a little time difference in terms of enabling time between the first and the last running gear getting commands. RX-64 has resolved this problem by using Action Instruction.

 

 

PING

Function This command does not instruct anything. It is only used when receiving Status Packet or confirming the existence of RX-64 with a specific ID. .

 

Length 0X02

Instruction 0X01

Parameter NONE

 

Although Status Return Level (Address 16 (0X10)) is 0, it returns Status Packet all the time for Ping Instruction. But, it does not return Status Packet when Check Sum Error occurs in spite of using PING Instruction.

 

 

RESET

Function This command is to reset the Control Table of RX-64 to the factory default setting
 

Please be careful since the value set by users can be erased if RESET command is used.

 

Length 0X02

Instruction 0X06

Parameter NONE

 

 

 

SYNC WRITE

Function This command is used to control several RX-64s simultaneously with one Instruction Packet transmission. When this command is used, several commands are transmitted at once, so that the communication time is reduced when multiple RX-64s are controlled. However, the SYNC WRITE command can be used only if both of the address and length of the Control Table to write is identical. Besides, ID should be transmitted as Broadcasting ID.

 

Generally, in the event 1 command packet is 4 byte, 26 Dynamixel can be controlled simultaneously. Make sure that the length of packet does not to exceed 143 bytes since the volume of receiving buffer of RX-64 is 143 bytes.

 

ID 0XFE

Length (L+1) X N + 4   (L: Data Length per RX-64, N: the number of RX-64s)

Instruction 0X83

Parameter1 Start address to write Data

Parameter2 Length of Data to write

Parameter3 First ID of RX-64

Parameter4 First data of the first RX-64

Parameter5 Second data of the first RX-64

Parameter L+3 Lth Data of the first RX-64

Parameter L+4 ID of the second RX-64

Parameter L+5 First data of the second RX-64

Parameter L+6 Second data of the second RX-64

Parameter 2L+4 Lth data of the second RX-64

 

 

BULK READ (This command only works for MX series)

Function This command is used for reading the values of several DYNAMIXELs simultaneously, by sending a single Instruction Packet. The packet length is lessened compared to sending many READ commands, and the idle time between the status packets being returned is also lessened to save communication time. But, this cannot be used to read many times on a single module, and if several of the same module ID is designated, only the firstly designated parameter will be processed.

 

ID 0XFE

Length 3N+3

Instruction 0X92

Parameter1  0X00

Parameter2 Length of the data to be read from the first module [L]

Parameter3 ID of the first module

Parameter4 Starting address of the data to be read from the first module

Parameter 3N+2 : Length of the data to be read from the Nth module [L]

Parameter 3N+3 : ID of the Nth module

Parameter 3N+4 : Starting address of the data to be read from the Nth module

 

example)

DYANMIXEL with ID 1 : Brings the goal position value (2 bytes from 0x1E).

DYNAMIXEL with ID 2 : Brings the current position value (2 bytes from 0x24).

The command packet to order this movement is as follows;

0XFF 0XFF 0XFE 0X09 0X92 0X00 0X02 0X01 0X1E 0X02 0X02 0X24 0X1D

During this time, module with ID 2 monitors the status packet being sent from ID 1 of the data bus (the very previous parameter ID), then right when module ID 1’s status packet completes transmission, sends its own status packet. The returned status packet is as follows;

0XFF 0XFF 0X01 0X04 0X00 0X00 0X80 0X7A 0XFF 0XFF 0X02 0X04 0X00 0X00 0X80 0X79

Status packets from each of module ID 1 and ID 2 will come in one after another.

 

Other Example

 

The following examples are assumed that ID = 1, and Baud rate = 57142 BPS.