Limiting the range of motion of Dynamixel PRO....................23 vii. viii. Extending the range of motion of Dynamixel PRO ....................25 Accelerating Dynamixel PRO in Wheel Mode ......................27 Refer to ‘1.1.2.ⅱ ‘Operating Dynamixel PRO in Wheel Mode’ ................ 27 Torque Mode of Dynamixel PRO ..........................
Page 3
Controlling the Goal Position of 3 Dynamixel PRO .....................100 Reading the the Current Position of 3 Dynamixel PROs ..................103 iii. Read temperature of the first, position of the second, and present current of the third Dynamixel PRO 106 Linux ..................................109 Set-up ..................................109 1.3.1...
Page 4
L Series ..................................130 2.1.3 L54-50-S290-R ................................130 L54-30-S400-R ................................130 L42-10-S300-R ................................130 iii. Control Table of Dynamixel Pro ........................131 Features (by width size) ............................132 54-series (H54, M54, L54)..........................132 2.3.1 42-series (H42, L42) ............................133 2.3.2 Dimensions ................................134 H Series ...................................
Quick Start for Dynamixel Pro v1.00b Tutorial This guide is written for first-time Dynamixel PRO users, but, familiar with C and C++ programming languages. Roboplus 1.1.1 Preparation i. RoboPlus installation (Windows only) RoboPlus is a software package that allows you to easily control and program all ROBOTIS products.
Wiring of Dynamixel PRO 42 series Similar to the 54 series, the 42 series requires a 24V power supply. Dynamixel PRO 42 series can be powered by the 4-pin cable (low-power operations). Connecting via SMPS-to-Dynamixel is also allowed. A USB-to-Dynamixel dongle connects to SMPS-to-Dynamixel; then SMPS-to- Dynamixel to Dynamixel PRO(s).
Set the switch on the left hand side of the USB-to-Dynamixel dongle to RS485 (#2). COM Port Latency Time setting To control Dynamixel PRO using a USB-to-Dynamixel dongle, it is recommended to modify the Latency Time of the Port. Please refer to the images below to adjust the Latency Time.
Page 8
Quick Start for Dynamixel Pro v1.00b Page 8 / 139...
PC and click button to connect to USB-to-Dynamixel. Once the port is connected, select ‘DXL 2.0’ and ‘57600,’ then click ‘Start Searching.’ Dynamixel PRO’s Default ID setting is 1 and baud rate of 57600 bps. Page 9 / 139...
Page 10
Quick Start for Dynamixel Pro v1.00b Select the Dynamixel PRO that has been found on the left hand side. Page 10 / 139...
Page 11
Quick Start for Dynamixel Pro v1.00b Unlike other Dynamixel models, Dynamixel PRO is only drivable when torque is enabled. Therefore, torque must be enabled before driving Dynamixel PRO. Scroll down the middle table on Dynamixel PRO Wizard and locate Torque Enable (#562).
Page 12
Confirm that the ‘Torque Enable’ value is 1 and click Goal Position (#596). Change the value of Goal Position on the lower right hand corner with an appropriate value and click ‘Apply’. Check each Dynamixel PRO’s Min and Max Position Limits (lower and upper “soft” limits).
Page 13
Quick Start for Dynamixel Pro v1.00b If Dynamixel PRO does not move, check to see if the Torque Enable value is 1. If the value is not set to ‘1’ change the value and try again. Change the Goal Position value and click ‘Apply.’ Visually check Dynamixel PRO’s position.
× 151875 ii. Operating Dynamixel PRO in Wheel Mode There are 3 Modes in with Dynamixel PRO (Joint Mode, Wheel Mode, and Torque Mode). On Dynamixel Wizard, locate and click ‘Operating Mode’ (#11). When Torque Enable (#562) is turned ‘On’, the Operating Mode cannot be modified (left image below).
Page 15
3. Since position and velocity control are not possible, the performance is similar to Wheel Mode. Note: use the reference above to set Dynamixel PRO to an appropriate mode. Set Toque Enable value as 0 and Operating Mode as 1, then click ‘Apply.’...
Page 16
※ Notice 1 - If Torque Enable(#562) on the Table is set as 1, it means Dynamixel PRO is ready to operate. This is called the Torque On state. - If Torque Enable(#562) on the Table is set as 0, it means Dynamixel PRO is unable to operate. This is called the Torque Off state.
Page 17
EEPROM domain (non-volatile). - The values that are written on the EEPROM area are preserved even if the Dynamixel PRO is turned on/off. The value cannot be modified when the torque is on, and the torque needs to be off to modify the EEPROM area values.
Quick Start for Dynamixel Pro v1.00b iii. LED Control of Dynamixel PRO Unlike other Dynamixels, Dynamixel PRO Dynamixel PRO has 3 color LEDs. Therefore, LEDs can be set to emit multiple colors. Try clicking the LED RED. Input 255 under LED RED value and click ‘Apply’. The red LED should turn on.
Individual ID is required for communication when when multiple Dynamixel PROs are linked together. For example, a single Dynamixel PRO can be driven via its ID even when 3 Dynamixel PROs are linked together. A problem may occur if more than one Dynamixel with the same ID are linked together.
Set the baud rate value as 3 then click ‘Apply.’ Notice the change in baud rate to 1Mbps. If the baud rate cannot be modified check if Dynamixel PRO Torque Enable is turned on. Dynamixel PRO’s baud rate and Control Table values are as follows:...
Quick Start for Dynamixel Pro v1.00b vi. Accelerating Dynamixel PRO in Joint Mode Verify if Dynamixel PRO is set as torque off status. If not, click on the Torque Enable (#562) on Control Table and set the value to 0. Click the ‘Apply’ to change it to torque off status.
Page 22
Quick Start for Dynamixel Pro v1.00b If Dynamixel PRO cannot be driven check if Torque Enable is turned on. Also, if the Goal Acceleration movement does not differ from the input value, check if Goal Acceleration value is set to 4.
Quick Start for Dynamixel Pro v1.00b vii. Limiting the range of motion of Dynamixel PRO Set Dynamixel PRO to torque off status. Set +Position Limit (#36) value as 100,000 then click ‘Apply.’ Set –Position Limit (#40) value as -100,000 then click ‘Apply.’...
Page 24
Quick Start for Dynamixel Pro v1.00b Once Torque Enable is on set Goal Position (#596) value as 150,000. Even though the Dynamixel PRO is in a torque on state, there is no response becauase the Position Limit value exceeds the set limit.
Quick Start for Dynamixel Pro v1.00b viii. Extending the range of motion of Dynamixel PRO +Position Limit and –Position Limit restrict or extend Dynamixel PRO’s operation range. Turn off Torque Enable by changing the value to 0. On the Control Table, set +Position Limit (#36) value as 900,000 then click ‘Apply.’...
Page 26
900,000 turn Torque Enable off. Change the +Position Limit value to 900,000 and click on ‘Apply.’ Turn Torque Enable back on. Set Goal Position as -900,000. Dynamixel PRO will rotate a couple of times in a couter-clockwise direction and stop at the designated position.
Refer to ‘1.1.2.ⅱ ‘Operating Dynamixel PRO in Wheel Mode’ Set Goal Acceleration (#606) value as 4, and then click ‘Apply.’ Set Torque Enable (#562) as 1, and click ‘Apply’ to set Dynamixel PRO to torque on status. Set the Goal Velocity (#600) value to 5,000 or -5,000 and click ‘Apply.’ Compare the movement to the time when the Goal Acceleration value was set to 0.
Page 28
Quick Start for Dynamixel Pro v1.00b If the Goal Acceleration value is not zero Dynamixel PRO will create a ‘Trapezoidal Velocity Profile’ (2.2 reference). Input random values into Goal Acceleration and Goal Position to observe the different responses of Dynamixel PRO.
Set Goal Torque (#604) value as 100, and click ‘Apply’. Note the rotation of the Dynamixel PRO accelerating in the counter-clockwise direction. If Dynamixel PRO is not moving check if Dynamixel PRO is in torque off condition. Page 29 / 139...
Page 30
Goal Torque (#604) value controls the flow of current into Dynamixel PRO. The relationship between the Goal Torque value and the current is shown below. Please refer to Dynamixel PRO datasheet to see how current relates to torque. Model Relationship between goal torque and current 33000 ...
Dynamixel PRO. Dynamixel Wizard connects to the internet and checks for the latest firmware When a new firmware for Dynamixel PRO is detected a red checkmark appears on the Dynamixel PRO icon (see illustrations below). Only one Dynamixel PRO must be connected at a time during firmware update.
Page 32
Quick Start for Dynamixel Pro v1.00b The model number and firmware of the connected Dynamixel PRO can be verified. Click on ‘Next’ to begin firmware update. Be sure to maintain all connections and power supply until the update is complete.
Page 33
Quick Start for Dynamixel Pro v1.00b Check Dynamixel PRO firmware update results. Page 33 / 139...
Quick Start for Dynamixel Pro v1.00b xiii. Dynamixel PRO Firmware Recovery with Dynamixel Wizard. Dynamixel Wizard can be used to recover the Dynamixel PRO’s firmware if there is an issue. ※ When firmware is recovered, all the settings are set to default; therefore, the ID and baud rate must be checked.
Page 35
Select USB-to-Dynamixel-connected port and press "Search" button. Select the port the USB-to-Dynamixel dongle is connected to and click ‘Search.’ Turn off Dynamixel PRO then turn it back on to let the program detect Dynamixel PRO. If the Dynamixel PRO is not detected turn Dynamixel PRO off and on again.
Page 36
Quick Start for Dynamixel Pro v1.00b The screen will look like the following once Dynamixel PRO is detected. Once Dynamixel PRO is detected downloadable information will appear. In Dynamixel PRO firmware recovery mode select the correct Dynamixel PRO version. Dynamixel PRO may malfunction if an incorrect firmware is downloaded.
Page 37
Quick Start for Dynamixel Pro v1.00b Dynamixel PRO firmware recovery is complete. Page 37 / 139...
Visual Studio 2010 1.2.1 Preparation i. Setting the development envrionment. For the following tutorial, prepare one Dynamixel PRO with an ID 1 and baud rate of 57600 bps. To familiarize the terminology used in the tutorial please go over the previous chapters.
Page 39
Quick Start for Dynamixel Pro v1.00b Go to project properties (see illustration below). On ‘Properties’, click ‘Linker -> Input. Click on the ‘Additional Dependancies’, then select ‘Edit.’ Page 39 / 139...
Page 40
Quick Start for Dynamixel Pro v1.00b Enter ‘dynamixel.lib’ and click on ‘confirm’ to save the changes. Dynamixel SDK programming setup is complete. Page 40 / 139...
"dynamixel.h" #define COM_PORT_NUM //Comport Number of USB2DXL #define BAUD_RATE_NUM //Baudrate Number of Dynamixel PRO. 1 is 57600 bps main(void) SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) Page 41 / 139...
Page 42
Quick Start for Dynamixel Pro v1.00b printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return printf( "Press any key to terminate...\n" getch(); //Close the port of USB2DXL dxl_terminate(Port); return COMM_RXSUCCESS is returned when USB-to-Dynamixel dongle is successfully communicates with Dynamixel PRO.
1.2.2 Basic functions of Dynamixel PRO. i. Turning the torque On/Off of Dynamixel PRO. As explained in 1.1, Dynamixel PRO’s Control Table contains Torque Enable function that controls the torque to be on/off. The address for Torque Enable function is 562. Torque Enable is has 1 byte assigned.
Page 44
Quick Start for Dynamixel Pro v1.00b printf( "Press any key to terminate...\n" _getch(); dxl_terminate(Port); return The functions, such as dxl_initialize, dxl_write_byte, etc…, are used to communicate with Dynamixel PRO. These functions return communication results. COMM_RXSUCCESS is returned for successful communications. Page 44 / 139...
Quick Start for Dynamixel Pro v1.00b ii. Operating Dynamixel PRO using C programming language. As explained in 1.1, Dynamixel PRO’s Control Table’s Goal Position address is 562. Also, Goal Position is assigned 4 bytes of memory. Therefore, a function called dxl_write_dword function controls Goal position.
Page 46
Quick Start for Dynamixel Pro v1.00b //Change the vlaue of goal position printf("Press any key to roatate the Dynamixel PRO to position 1\n"); _getch(); Result = dxl_write_dword(Port, ID, P_GOAL_POSITION, Goal_Pos1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( " Failed to write!\n"...
Quick Start for Dynamixel Pro v1.00b iii. Modifying Dynamixel PRO’s ID using C programming language. As explained in 1.1, the address for the ID is 7 on the Control Table. ID can be modified with the function called dxl_write_byte. However, ID cannot be changed while the Torque Enable is on, so the torque must be turned off in order to change its value.
Page 48
"Press any key to terminate...\n" _getch(); return desired_ID = 3; //Change the ID of Dynamixel PRO you use printf("Press any key to change the ID of Dynamixel PRO you use\n"); _getch(); Result = dxl_write_byte(Port, ID, P_ID, desired_ID, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n"...
Please use Dynamixel Wizard to change Dynamixel PRO ID to 1. As explained in 1.1, the baud rate of Dynamixel PRO on the Control Table is in address #8. Also, the baud rate is assigned with 1 byte so it can be modified by implementing dxl_write_byte function.
Page 50
Quick Start for Dynamixel Pro v1.00b // Print error bit of status packet void PrintErrorCode(int ErrorCode) if(ErrorCode & ERRBIT_VOLTAGE) printf("Input voltage error!\n"); if(ErrorCode & ERRBIT_ANGLE) printf("Angle limit error!\n"); if(ErrorCode & ERRBIT_OVERHEAT) printf("Overheat error!\n"); if(ErrorCode & ERRBIT_RANGE) printf("Out of range error!\n");...
Page 51
_getch(); return desired_Baudrate = 3; //1 Mbps //Change the ID of Dynamixel PRO you use printf("Press any key to change the baudrate of Dynamixel PRO you use\n"); _getch(); Result = dxl_write_byte(Port, ID, P_BAUD_RATE, 3, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n"...
Page 52
Quick Start for Dynamixel Pro v1.00b Use Dynamixel Wizard to check if the baud rate has been changed to 1 Mbps. If the baud rate has not been changed check if Dynamixel PRO is in torque off status. The following content assumes Dynamixel PRO’s baud rate set to 1 Mbps.
#define BAUD_RATE_NUM //Baudrate Number of Dynamixel PRO As explained in 1.1, Dynamixel PRO Control Table contrains 3 addresses for the LEDs, each assigned with 1 byte of memory: LED_RED (#563), LED_GREEN (#564), and LED_BLUE (#565). Implement dxl_write_byte function to control its values.
Page 54
0, &ErrorStatus); Result = dxl_write_byte(Port, ID, P_LED_GREEN, 0, &ErrorStatus); Result = dxl_write_byte(Port, ID, P_LED_BLUE, 0, &ErrorStatus); //Turn on and change the color of LED in Dynamixel PRO printf("Press any key to change the color of LED in Dynamixel PRO\n"); _getch();...
Page 55
Quick Start for Dynamixel Pro v1.00b printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return else if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); else printf("Succeed to change the color of LED in Dynamixel PRO!\n"); printf("Press any key to change the color of LED in Dynamixel PRO\n");...
Dynamixel PRO implements PID control to maniputate its motor; therefore, the movement changes cooresponding to the gain values. On Dynamixel PRO’s Control Table, the Position_P_Gain address is set as 594 and it utilizes 2 bytes (1 word) of memory. Thus, dxl_write_word function, which modifies 2 bytes of memory, changes the P gain value.
Page 57
Quick Start for Dynamixel Pro v1.00b SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n"...
Page 58
Quick Start for Dynamixel Pro v1.00b printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return else if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); //change the position p gain printf("Press any key to change the position p gain\n"); _getch(); Result = dxl_write_word(Port, ID, P_POSITION_P_GAIN, 256, &ErrorStatus);...
Page 59
Quick Start for Dynamixel Pro v1.00b return Observe the diffenence in Dynamixel PRO’s movement speed relevant to the change in P Gain values. Page 59 / 139...
DXL_LOWORD, DXL_HIWORD, DXL_LOBYTE, and DXL_HIBYTE functions. Next, use dxl_write function to send the configured data to Dynamixel PRO. dxl_write(Port, ID, P_GOAL_POSITION, 8, data, &ErrorStatus); To simultaneously change the Goal Position and Goal Velocity implement dxl_write function to modify 8 bytes of memory.
Page 61
Quick Start for Dynamixel Pro v1.00b #define P_TORQUE_ENABLE //Address of Torque Enable in Control Table #define P_GOAL_POSITION //Address of Goal Position in Contorl Table #define //ID of Dynamixel PRO you use // Print error bit of status packet void PrintErrorCode(int ErrorCode) if(ErrorCode &...
Page 62
Quick Start for Dynamixel Pro v1.00b Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return position, velocity; position = 100000; velocity = 10000; //Make a tx data unsigned char data[8];...
Page 63
Quick Start for Dynamixel Pro v1.00b data[5] = DXL_HIBYTE(DXL_LOWORD(velocity)); data[6] = DXL_LOBYTE(DXL_HIWORD(velocity)); data[7] = DXL_HIBYTE(DXL_HIWORD(velocity)); //change the position value and moving speed printf( "Press any key to change the position value and moving speed...\n" _getch(); Result = dxl_write(Port, ID, P_GOAL_POSITION, 8, data, &ErrorStatus);...
Quick Start for Dynamixel Pro v1.00b viii. Internal temperature feedback of Dynamixel PRO So far, we have covered how to use the Write command to send commands to Dynamixel PRO. Next, we will go over how to use the Read command to receive data from Dynamixel PRO.
Page 65
Quick Start for Dynamixel Pro v1.00b SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n"...
Page 66
Quick Start for Dynamixel Pro v1.00b The present temperature is constantly read. Page 66 / 139...
Page 67
Quick Start for Dynamixel Pro v1.00b ix. Read the Present Position of Dynamixel PRO Present Position indicates the present position of Dynamixel PRO Its address is 611 and is assigned 4 bytes of memory. Therefore, implement dxl_read_dword function present position of Dynamixel PRO.
Page 68
Quick Start for Dynamixel Pro v1.00b printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result, ErrorStatus; printf("Press any key to terminate...\n" printf("\n"); temp; while(true) if(_kbhit()) break; //Read the present position Result = dxl_read_dword(Port, ID, P_PRESENT_POSITION, (unsigned*)&temp,...
EEPROM area so the Torque Enable must be off to modifiy its value. Also, as shown in 1.1, Torque Enable needs to be on to activate Dynamixel PRO in Wheel Mode. The speed of Dynamixel PRO can be controlled by modifying the Goal_Velocity values.
Page 70
Quick Start for Dynamixel Pro v1.00b main(void) SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n"...
Page 71
Quick Start for Dynamixel Pro v1.00b printf( "Torque On...\n" Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return //Change the Goal Velocity printf("Press any key to change goal velocity...\n");...
Quick Start for Dynamixel Pro v1.00b xi. Checking the current position and current velocity of Dynamixel PRO There are two methods to check the present position of Dynamixel PRO. First, is to implement dxl_read_dword function twice to change the values.
Modifying the zero value of Dynamixel PRO You can modify the zero-position of Dynamixel PRO. Change the Control table’s Homing Offset to modify Dynamixel PRO’s zero- position. Homing Offset address on the Control Tableis 13 and requires 4 bytes of memory.
Page 77
Quick Start for Dynamixel Pro v1.00b printf("Checksum error!\n"); if(ErrorCode & ERRBIT_OVERLOAD) printf("Overload error!\n"); if(ErrorCode & ERRBIT_INSTRUCTION) printf("Instruction code error!\n"); main(void) SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n");...
Page 78
Quick Start for Dynamixel Pro v1.00b if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); else printf("Succeed to chage the homing offset!\n"); //Torque On printf( "Torque On...\n" Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n" printf( "Press any key to terminate...\n"...
Quick Start for Dynamixel Pro v1.00b ii. Limiting the operating range of Dynamixel PRO Please refer to 1.1 for information regarding +, - Position Limit. The program’s entire source code is shown below. main.cpp #include <stdio.h> #include <conio.h> #include "dynamixel.h"...
Page 80
Quick Start for Dynamixel Pro v1.00b //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result, ErrorStatus; //Torque Off printf( "Torque Off...\n"...
Page 81
Quick Start for Dynamixel Pro v1.00b printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return else if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); else printf("Succeed to chage the minus position limit!\n"); //Torque On printf( "Torque On...\n" Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus);...
Page 82
Quick Start for Dynamixel Pro v1.00b else PrintErrorCode(ErrorStatus); //Change the Goal position printf("Press any key to change the Goal Position to -120000\n"); _getch(); Result = dxl_write_dword(Port, ID, P_GOAL_POSITION, -120000, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n" printf( "Press any key to terminate...\n"...
Quick Start for Dynamixel Pro v1.00b iii. Extending the operating range of Dynamixel PRO. Please refer to 1.1 for information regarding +/- Position Limits. The program’s entire source code is shown below. main.cpp #include <stdio.h> #include <conio.h> #include "dynamixel.h" #define...
Page 84
Quick Start for Dynamixel Pro v1.00b //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result, ErrorStatus; //Torque Off printf( "Torque Off...\n"...
Page 85
Quick Start for Dynamixel Pro v1.00b printf( "Press any key to terminate...\n" _getch(); return else if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); else printf("Succeed to chage the minus position limit!\n"); //Torque On printf( "Torque On...\n" Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus);...
Page 86
Quick Start for Dynamixel Pro v1.00b //Close the port of USB2DXL printf( "Press any key to terminate...\n" _getch(); dxl_terminate(Port); return If the program does not run properly check if the Operating Mode is set to Joint Mode. Page 86 / 139...
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.
Page 88
Quick Start for Dynamixel Pro v1.00b Table #define P_INDIRECT_ADDRESS_5 //Address of 6th Indirect Address in Control Table #define P_INDIRECT_ADDRESS_6 //Address of 7th Indirect Address in Control Table #define P_INDIRECT_ADDRESS_7 //Address of 8th Indirect Address in Control Table #define P_INDIRECT_ADDRESS_8 //Address of 9th Indirect Address in Control...
Page 89
Quick Start for Dynamixel Pro v1.00b main(void) SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n"...
Page 90
Quick Start for Dynamixel Pro v1.00b PrintErrorCode(ErrorStatus); else printf("Succeed to set the indirect address for goal position!\n"); //Set the Indirect Address for Goal Velocity printf("Press any key to set the indirect address for goal velocity...\n"); _getch(); Result = dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_4, P_GOAL_VELOCITY, &ErrorStatus);...
Page 91
Quick Start for Dynamixel Pro v1.00b if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); else printf("Succeed to set the indirect address for goal acceleration!\n"); //Torque On printf( "Torque On...\n" Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n"...
Page 92
Quick Start for Dynamixel Pro v1.00b else if(ErrorStatus != 0 ) PrintErrorCode(ErrorStatus); position = -100000; velocity = 1000; acceleration = 2; //Make a tx data data[0] = DXL_LOBYTE(DXL_LOWORD(position)); data[1] = DXL_HIBYTE(DXL_LOWORD(position)); data[2] = DXL_LOBYTE(DXL_HIWORD(position)); data[3] = DXL_HIBYTE(DXL_HIWORD(position)); data[4] = DXL_LOBYTE(DXL_LOWORD(velocity));...
Quick Start for Dynamixel Pro v1.00b ii. Reading the temperature and the current position using Indirect Address Implement Indirect Address to obtain read outputsl. Read the Present Position and Present Temperature by using Indirect Address. The program’s entire source code is shown below.
Page 94
"Press any key to terminate...\n" _getch(); return //change the operating mode to wheel mode printf( "Make the Mode of Dynamixel PRO to Wheel Mode...\n" Result = dxl_write_byte(Port, ID, P_OPERATING_MODE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n"...
Page 95
Quick Start for Dynamixel Pro v1.00b //Set the Indirect Address for Present Temperature printf("Press any key to set the indirect address for temperature...\n"); _getch(); Result = dxl_write_word(Port, ID, P_INDIRECT_ADDRESS_0, P_PRESENT_TEMPERATURE, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n"...
Page 96
Quick Start for Dynamixel Pro v1.00b Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus); if( Result != COMM_RXSUCCESS ) printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return //Rotating Start printf("Rotating Start\n"); Result = dxl_write_dword(Port, ID, 600, 5000, &ErrorStatus);...
Quick Start for Dynamixel Pro v1.00b 1.2.5 Using Multiple Dynamixel PROs i. Controlling the LEDs of 3 Dynamixel PROs Implement dxl_synch_write to simultaneously send a command to multiple Dynamixel PROs. The program’s entire source code is shown below. main.cpp #include <stdio.h>...
Page 98
Quick Start for Dynamixel Pro v1.00b //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result; unsigned char param[6]; param[0] = ID_1;...
Page 99
Quick Start for Dynamixel Pro v1.00b return //Close the port of USB2DXL printf( "Press any key to terminate...\n" _getch(); dxl_terminate(Port); return Page 99 / 139...
Quick Start for Dynamixel Pro v1.00b ii. Controlling the Goal Position of 3 Dynamixel PRO The program’s entire source code is shown below. main.cpp #include <stdio.h> #include <conio.h> #include "dynamixel.h" #define COM_PORT_NUM //Comport Number of USB2DXL #define BAUD_RATE_NUM //Baudrate Number of Dynamixel PRO...
Page 101
Quick Start for Dynamixel Pro v1.00b COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result; unsigned char param[15]; //Torque ON printf("Torque On\n"); param[0] = ID_1; param[1] = 1;...
Page 102
Quick Start for Dynamixel Pro v1.00b printf( "Failed to write!\n" printf( "Press any key to terminate...\n" _getch(); return param[0] = ID_1; param[1] = DXL_LOBYTE(DXL_LOWORD(0)); param[2] = DXL_HIBYTE(DXL_LOWORD(0)); param[3] = DXL_LOBYTE(DXL_HIWORD(0)); param[4] = DXL_HIBYTE(DXL_HIWORD(0)); param[5] = ID_2; param[6] = DXL_LOBYTE(DXL_LOWORD(0)); param[7] = DXL_HIBYTE(DXL_LOWORD(0));...
Quick Start for Dynamixel Pro v1.00b iii. Reading the the Current Position of 3 Dynamixel PROs Implement dxl_bulk_read to simultaneously read the values of multiple Dynamixel PROs. The program’s entire source code is shown below. main.cpp #include <stdio.h> #include <conio.h>...
Page 104
Quick Start for Dynamixel Pro v1.00b if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n" _getch(); return Result; position_length=4; unsigned char param[15]; param[0] = ID_1; param[1] = DXL_LOBYTE(P_PRESENT_POSITION);...
Page 105
Quick Start for Dynamixel Pro v1.00b printf("ID_1 : %d\n", present_position1); printf("ID_2 : %d\n", present_position2); printf("ID_3 : %d\n", present_position3); //Close the port of USB2DXL printf( "Press any key to terminate...\n" _getch(); dxl_terminate(Port); return Page 105 / 139...
Quick Start for Dynamixel Pro v1.00b iv. Read temperature of the first, position of the second, and present current of the third Dynamixel PRO Implement dxl_bulk_read to simultaneously read the values of multiple Dynamixel PROs. The program’s entire source code is shown below.
Page 107
Quick Start for Dynamixel Pro v1.00b SerialPort sp = {0,0,0,0,0}; SerialPort *Port = &sp; //Open the port of USB2DXL if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS ) printf("Succeed to open USB2Dynamixel!\n"); else printf( "Failed to open USB2Dynamixel!\n" printf( "Press any key to terminate...\n"...
Page 108
Quick Start for Dynamixel Pro v1.00b dxl_get_bulk_byte( pbd, ID_3, P_PRESENT_TEMPERATURE, &present_temperature); present_current = (short int) present_current printf("Present Position\n"); printf("ID_1 : %d\n", present_current); printf("ID_2 : %d\n", present_position); printf("ID_3 : %d\n", present_temperature); //Close the port of USB2DXL printf( "Press any key to terminate...\n"...
A text editor to read and change the code, if desired. Fortunately, Linux releases are accompanied by editors, such as Vim and G-edit. ii. Obtain the source Visit support.robotis.com and go to the Dynamixel PRO section Download Linux version of the zipped SDK file Page 109 / 139...
Page 110
Quick Start for Dynamixel Pro v1.00b iii. Setup the source The current source is a beta release. The next steps will ensure proper setup of the beta release. [1] create a directory under root with the name DXLDSK_cpp_forLinux (mkdir /DXLSDK_cpp_forLinux);...
Page 111
Quick Start for Dynamixel Pro v1.00b Set-up is complete 1.3.3 Monitoring Dynamixel PRO i. Monitor Linux is not currently supported by RoboPlus software. Fortunately, the downloaded SDK includes an utility called “monitor.” “Monitor is a simple command-line based tool that can perform every function of the Windows-based Dynamixel Wizard.
Page 112
ID 1 (factory default). Note: when connecting multiple Dynamxel PROs to the Pc do so one at a time. This is because every new Dynamixel PRO ships with factory default ID of 1; otherwise. When multiple Dynamixel PROs are connected simultaneously “monitor”...
Page 113
Quick Start for Dynamixel Pro v1.00b By default this utility sets USB-to-Dynamixel baud rate to 1 (57600 bps). Changes in baud rate for the USB-to-Dynamixel dongle and Dynamixel PRO will be expleained further in this guide. iii. Enabling Torque By default Torque Enable (address #562) is disabled. According to Dynamixel PRO’s control table the size of address 562 is of 1 byte.
Page 114
32 bits. vi. Min/Max Positions According to Dynamixel PRO’s Control Table Max Position is located on address 36 with a size of 4 bytes (a doble-word or “dword”) and Min Position is located on address 40 with 4 bytes as well.
Page 115
9000. vii. Goal Torque According to Dynamixel PRO’s Control Table Goal Torque is located on address 604 with a size of 2 bytes (a word). Keep in mind that by default the Operating Mode (address 11 of size 1 byte) is set to 3 (Joint Mode) therefore Operating Mode must be set to 0 (Toque Mode).
Page 116
0, i.e. wrd 1 600 -200. To stop Dynamixel PRO simply enter a velocity value of 0 (enter the command wrd 1 600 0) or turn Toruq Enable off ( enter the command wrb 1 562 0).
Page 117
Quick Start for Dynamixel Pro v1.00b This example illustrates a procedure to properly change of ID of a Dynamixel PRO from 1 to 39 With Dynamixel PRO assigned an ID number dffrent than 1 it is now possible to daisy-chain another Dynamixel PRO.
Page 118
In this example the first scan (highlighted in blue) is successful because both USB-to-Dynamixel and Dynamixel PRO have the same baud rate of 57600 bps. After changing baud rate to 1 Mbps to Dynamixel PRO scan fails (highlighted in red).
Page 119
Quick Start for Dynamixel Pro v1.00b The illustration above shows a Dynamixel PRO (blue line) with ID 39 and a baud rate of 1 Mbps (not shown) via alternative scan command bp. Then, this Dynamixel PRO is set to factory reset except for the ID number (reset 39 1).
Page 120
DXL.Disconnect(); return ii. Enabling Dynamixel PRO As previously mentioned baud rate of Dynamixel PRO and USB-to-Dynamixel must match. This can be easily achieved by simply setting the value for baud rate. After setting matching baud rate wirte commands to EEPROM area can be sent Torque Enable must be on to send write commands to the RAM area.
Page 121
Implement ReadDWord for addresses with size of 4 bytes Implement BulkRead (explained later) for multiple Dynamixel PROs at once. The following example is a simple read/write sample code of Dynamixel PRO in Joint Mode (default) /dxl_sdk-20/example/ReadWrite/main.cpp (partly shown) // declare the following in preprocessor for illustrative purposes...
Page 122
Quick Start for Dynamixel Pro v1.00b #define DEFAULT_BAUDNUM #define DEFAULT_ID … using namespace DXL_PRO; Dynamixel DXL("/dev/ttyUSB0"); // must declare location of USB-to-Dynamixel main() result, error = 0, index = 0, PresentPos = 0, On; // declare arbitrary variables for read commands GoalPos[2] = (-150000, 150000);...
Page 123
Quick Start for Dynamixel Pro v1.00b Similarly several types of write commands can be implemented according to the size of the corresponding address. The following example combines several features of Dyanmixel PRO, such as Operating Mode (11) and its different type of operations; and implementing their respective write function.
Page 124
// Goal Velocity (600) size is 4 bytes (a double-word) // WriteDWord is the appropriate function DXL.WriteDWord(1, GOAL_VELOCITY, GoalVel, 0); break; defaultt: // every other key and Dynamixel PRO remains in Joint Mode DXL.WriteByte(1, OPERATING_MODE, 3, 0); usleep(CONTROL_PERIOD*100); DXL.WriteByte(1, TORQUE_ENABLE, 1, 0); usleep(CONTROL_PERIOD*100);...
Page 125
Quick Start for Dynamixel Pro v1.00b // int GoalPos = 151875; // for 42-series GoalVel = -3000l GoalTorque = 120; result = COMM_TXFAIL; error = 0; val1, val2, val3; … // open device and set baud rate here if( DXL.Connect() == 0 ) …...
Page 126
SyncWrite allows one single commands to address multiple values for multiple Dynamixel PROs at a given address. The following example illustrates a single SyncWrite command to set different Goal Positions to more than 1 Dynamixel PRO /dxl_sdk-20/example/SyncWrite/main.cpp (partly shown) …...
Page 127
Quick Start for Dynamixel Pro v1.00b … using namespace DXL_PRO; Dynamixel DXL("/dev/ttyUSB0"); // must declare location of USB-to-Dynamixel main() GoalPos, i; id[NUM_ACTUATOR]; phase[NUM_ACTUATOR]; … // open device and set baud rate here if( DXL.Connect() == 0 ) … DXL.WriteByte(1, TORQUE_ENABLE, 1,...
Page 128
IDs at specific addresses (i.e. LED control on ID 1 while ID 2 rotates in wheel mode). The user has much greater control of Dynamixel PRO with these commands. The drawback on implementing this fuction is that with multiple IDs with multiple addresses then the code can become very long.
Quick Start for Dynamixel Pro v1.00b Reference Default values by model 2.1.1 H Series i. H54-200-S500-R Name Default Value BaudRate 1 (57600bps) Max Position Limit 251000 Min Position Limit -251000 Velocity Limit 16600 Current Limit Velocity I Gain Velocity P Gain Position P Gain ii.
Quick Start for Dynamixel Pro v1.00b Max Position Limit 125700 Min Position Limit -125700 Velocity Limit 8000 Current Limit Velocity I Gain Velocity P Gain Position P Gain ii. M54-40-S250-R Name Default Value BaudRate 1 (57600bps) Max Position Limit 125700...
Quick Start for Dynamixel Pro v1.00b Name Default Value BaudRate 1 (57600bps) Max Position Limit 151875 Min Position Limit -151875 Velocity Limit Current Limit Velocity I Gain Velocity P Gain Position P Gain Control Table of Dynamixel Pro (R : Read, RW : Read and Write)
Quick Start for Dynamixel Pro v1.00b 1 Torque Enable torque On/Off 1 LED RED RED LED intensity value GREEN LED intensity 1 LED GREEN value BLUE LED intensity 1 LED BLUE value 2 Velocity I Gain Velocity I Gain 2 Velocity P Gain...
Quick Start for Dynamixel Pro v1.00b Model notation Page 139 / 139...
Page 140
Largest Supplier of Electrical and Electronic Components Click to view similar products for manufacturer: robotis Other Similar products are found below : 903-0055-000 903-0037-001 902-0061-000 903-0143-001 902-0120-000 903-0076-000 903-0264-300 903-0242-000 903-0159-000 902- 0128-000 903-0270-300 902-0088-001 902-0141-000 PH54-200-S500-R 903-0273-000 904-0042-201 904-0039-201 903-0223-101 905-...
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?
Questions and answers