Indirect Addressing Function Of Dynamixel Pro; Change The Position, Velocity, And Acceleration Using Indirect Address Fucntion - Robotis Dynamixel Pro Quick Start Manual

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b

1.2.4 Indirect Addressing function of Dynamixel PRO

i. Change the position, velocity, and acceleration using Indirect Address fucntion.
-
On Dynamixel PRO's Control Table-Goal Position, Goal Velocity, and Goal
Acceleration addresses-are not arranged in consecutive order. Thus, dxl_write
and dxl_write_dword need to be implemented 3 times to change all 3
addresses.
-
To resolve this issue, Dynamixel PRO has Indirect Address function.
-
Indirect Address assignes another address to the default one.
-
For example, Goal Position (#596) address can be assigned another address (#634).
-
Start by writing the value of the desired address in the EEPROM area of the
Indirect Address.
-
The written value is the default address. Please refer to the source code below
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_0, P_GOAL_POSITION,
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_1, P_GOAL_POSITION+1, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_2, P_GOAL_POSITION+2, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_3, P_GOAL_POSITION+3, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_4, P_GOAL_VELOCITY,
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_5, P_GOAL_VELOCITY+1, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_6, P_GOAL_VELOCITY+2, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_7, P_GOAL_VELOCITY+3, &ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_8, P_GOAL_ACCELERATION,
&ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_9, P_GOAL_ACCELERATION+1,
&ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_10, P_GOAL_ACCELERATION+2,
&ErrorStatus);
dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_11, P_GOAL_ACCELERATION+3,
&ErrorStatus);
-
The program's entire source code is shown below.
main.cpp
#include
<stdio.h>
#include
<conio.h>
#include
"dynamixel.h"
#define
COM_PORT_NUM
#define
BAUD_RATE_NUM
#define
P_INDIRECT_ADDRESS_0
Table
#define
P_INDIRECT_ADDRESS_1
Table
#define
P_INDIRECT_ADDRESS_2
Table
#define
P_INDIRECT_ADDRESS_3
Table
#define
P_INDIRECT_ADDRESS_4
17
//Comport Number of USB2DXL
3
//Baudrate Number of Dynamixel PRO
49
//Address of 1st Indirect Address in Control
51
//Address of 2nd Indirect Address in Control
53
//Address of 3rd Indirect Address in Control
55
//Address of 4th Indirect Address in Control
57
//Address of 5th Indirect Address in Control
&ErrorStatus);
&ErrorStatus);
Page 87 / 139

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Dynamixel Pro and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents