background image

 

 

 

 

 

 

Quick Start for Dynamixel Pro 

 

 

 

 

 

 

Summary of Contents for Dynamixel Pro

Page 1: ...Quick Start for Dynamixel Pro ...

Page 2: ...the baud rate 20 vi Accelerating Dynamixel PRO in Joint Mode 21 vii Limiting the range of motion of Dynamixel PRO 23 viii Extending the range of motion of Dynamixel PRO 25 ix Accelerating Dynamixel PRO in Wheel Mode 27 x Refer to 1 1 2 ⅱ Operating Dynamixel PRO in Wheel Mode 27 xi Torque Mode of Dynamixel PRO 29 xii Update Dynamixel PRO s firmware 31 xiii Dynamixel PRO Firmware Recovery with Dynam...

Page 3: ...ending the operating range of Dynamixel PRO 83 1 2 4 Indirect Addressing function of Dynamixel PRO 87 i Change the position velocity and acceleration using Indirect Address fucntion 87 ii Reading the temperature and the current position using Indirect Address 93 1 2 5 Using Multiple Dynamixel PROs 97 i Controlling the LEDs of 3 Dynamixel PROs 97 ii Controlling the Goal Position of 3 Dynamixel PRO ...

Page 4: ...ynamixel Pro 131 2 3 Features by width size 132 2 3 1 54 series H54 M54 L54 132 2 3 2 42 series H42 L42 133 2 4 Dimensions 134 2 4 1 H Series 134 i H54 200 S500 R 134 ii H54 100 S500 R 134 iii H42 20 S300 R 135 2 4 2 M Series 135 i M54 60 S250 R 135 ii M54 40 S250 R 135 2 4 3 L Series 137 i L54 50 S290 R 137 ii L54 30 S400 R 137 iii L42 10 S300 R 138 2 5 Model notation 139 ...

Page 5: ...ad the most current version of RoboPlus at http www robotis com xe download ii Wiring of Dynamixel PRO 54 series To operate a Dynamixel PRO at least a USB to Dynamixel dongle and 24V power supply for high power operations or ROBOTIS conventional 12V SMPS for low power operations are required Dynamixel PRO 54 series can be powered via external power cable or 4 pin cable however it is recommended to...

Page 6: ... 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 iv Wiring of Dynamixel PRO 54 42 series First connect an USB to Dynamixel dongle and Dynamixel PRO via 4 pin cable Second connect a dedicated power supply to Dynamixel PRO via power c...

Page 7: ... of the USB to Dynamixel dongle to RS485 2 vi 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 Under Windows Device Manager à Port à USB Serial Port right mouse click à properties à Port Setting Advanced à Latency Timer msec à set to 1msec ...

Page 8: ...Quick Start for Dynamixel Pro v1 00b Page 8 139 ...

Page 9: ...For safety finish connecting the wires before supplying the power Open RoboPlus to run Dynamixel Wizard Select a COM Port that refers to the correction of USB to Dynamixel dongle to your 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 10: ...Quick Start for Dynamixel Pro v1 00b Page 10 139 Select the Dynamixel PRO that has been found on the left hand side ...

Page 11: ...Page 11 139 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: ...ick 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 by default Dynamixel PRO 54 series 251000 251000 and Dynamixel PRO 42 series 151875 151875 Visually verify position of Dynamixel PRO after clicking on Apply ...

Page 13: ...the Goal Position value and click Apply Visually check Dynamixel PRO s position The relationship between the Goal Position value and degree of rotation is shown below Model Relationship between angle deg and position value H54 200 S500 R H54 100 S500 R 180 180 deg 251000 251000 180 251000 M54 60 S250 R M54 40 S250 R 180 180 deg 125700 125700 180 125700 L54 50 S290 R 180 180 deg 103860 103860 ...

Page 14: ...erating 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 The Operating Modes can be modified once the Torque Enable is turned Off by setting it to 0 right image below ...

Page 15: ...the velocity of the servo 1 Can rotate the servo at a desired velocity 2 Can move using self assigned trapezoidal Velocity Profile 3 Cannot control the position of the servo Torque Mode 0 Controls the torque of the servo 1 Cannot control velocity and position 2 Only controls the output torque 3 Since position and velocity control are not possible the performance is similar to Wheel Mode Note use t...

Page 16: ...ity as 0 and Dynamixel PRO stops moving Try changing the Goal Velocity value as 3000 10000 15000 3000 10000 15000 0 etc and observe the changes in rotation The relationship between Goal Velocity 600 values and rpm is as follows Sign of Value Rotating Direction RPM 20V minimum CCW CW 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...

Page 17: ...ble when the Torque Mode is on is referred as the 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 EEPROM area is indicated as pink on Dynamixel Wizard The section that is indicated as blue on the Contro...

Page 18: ... 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 The intensity of the LED emission can be adjusted by changing the values between 0 255 Try changing the values of the LED RED LED GREEN and LED BLUE to observe the change in colors ...

Page 19: ...her A problem may occur if more than one Dynamixel with the same ID are linked together 7 on the Control Table of the Dynamixel Wizard is the value for ID ID is a part of the EEPROM area on the Control Table Be sure to check if Dynamixel PRO torque is Off before changing the ID Once changes are made to ID 7 value to 3 click on Apply The change of value can be observed on the left table If the Dyna...

Page 20: ...e 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 Value of Control Table Baud Rate bps bit for seconds 0 2400 bps 1 57600 bps 2 115200 bps 3 1 Mbps 4 2Mbps 5 3Mbps 6 4Mbps 7 4 5Mbps 8 10 5Mbps When using a USB to Dynamixwl dongle Dyna...

Page 21: ... change it to torque off status Modify the Operating Mode 11 value as 3 then click Apply to set Dynamixel PRO as Joint Mode Set Goal Acceleration 606 value as 4 then click Apply Set Torque Enable 562 value as 1 and click Apply to change Dynamixel PRO to Torque On status Set the Goal Position 596 value to 100 000 or 100 000 then click Apply Note the difference in the movement of Dynamixel PRO from ...

Page 22: ...l Acceleration movement does not differ from the input value check if Goal Acceleration value is set to 4 If the Goal Acceleration value is not zero Dynamixel PRO will create a Trapezoidal Velocity Profile 2 2 reference Input random variables into Goal Acceleration and Goal Position to observe the different responses of Dynamixel PRO ...

Page 23: ...t 36 value as 100 000 then click Apply Set Position Limit 40 value as 100 000 then click Apply On the Control Table Position Limit 36 and Position Limit 40 are a part of the EEPROM area Therefore if the values cannot be changed check if the Torque Enable is turned On If Position Limitd and Position Limit values can be modified it means Torque Enable is on ...

Page 24: ...l check the Position Limit value and if the value is not 100 000 turn torque off Input the Position Limit value as 100 000 and click Apply then turn torqueoOn This time set the Goal Position value as 100 000 Observe movement to position value 100 000 Input the Goal Position value as 150 000 there should be no movement Try inputting 100 000 instead Dynamixel PRO will move Input random Goal Position...

Page 25: ...le by changing the value to 0 On the Control Table set Position Limit 36 value as 900 000 then click Apply On the Control Table set Position Limit 40 value as 900 000 then click Apply Position Limit 36 and Position Limit 40 on the Control Table are a part of EEPROM area If the values cannot be changed check if Torque Enable is on Change the Position and Position Limit values and then turn Torque E...

Page 26: ...e value is not 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 Input random values into the Goal Position and click Apply Verify that Dynamixel PRO reaches the Goal Position Please refer ...

Page 27: ...rque 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 If Dynamixel PRO does not move check it the Enable Torque value is 1 If the movement is no different than when the Goal Acceleration value was 0 check if the Goal Acceleration v...

Page 28: ...Page 28 139 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 ...

Page 29: ...ion and input the Operating Mode value as 0 Click on Apply Enable the torque by turning Torque Enable on 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 30: ...nputing 30 100 400 400 100 30 0 etc values into Goal Velocity and click on Apply Observe how the Dynamixel PRO responds 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 H54 ...

Page 31: ...or 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 For firmware update select the correct Dynamixel PRO device and click the Firmware update button Begin firmware update by following the instructions Be sure to maintain all connec...

Page 32: ...xel Pro v1 00b Page 32 139 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 Page 33 139 Check Dynamixel PRO firmware update results ...

Page 34: ...perly set to the appropriate connector RS 485 When recoverying the firmware Dynamixel PRO must be connected one at a time Dynamixel PRO may malfunction if two or more Dynamixel PROs are daisy chained when recoverying the firmware Begin Dynamixel PRO firmware recovery by clicking on the firmware recovery icon from the toolbar Select thet COM port number of the dongle to begin firmware recovery Plea...

Page 35: ...Dynamixel PRO cannot be recognized if the port is in use finish other programs and then continue the procedure 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 o...

Page 36: ...ixel 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 Click on Next to start firmware recovery Be sure to maintain all connections and power supply until the recovery is complete ...

Page 37: ...Quick Start for Dynamixel Pro v1 00b Page 37 139 Dynamixel PRO firmware recovery is complete ...

Page 38: ...s with the included USB memory dongle Extract the compressed file Dynamixel SDK for Windows contains the following bin DLL for Windows import header and library files are located lib h src Contains DLL source code example examples of various examples commonly used to control Dynamixel PRO Properly set settings to use Dynamixel SDK in Visual Studio 2010 Create New Project on Visual Studio 2010 In t...

Page 39: ...Quick Start for Dynamixel Pro v1 00b Page 39 139 Go to project properties see illustration below On Properties click Linker Input Click on the Additional Dependancies then select Edit ...

Page 40: ...Quick Start for Dynamixel Pro v1 00b Page 40 139 Enter dynamixel lib and click on confirm to save the changes Dynamixel SDK programming setup is complete ...

Page 41: ...ps 7 4 5 Mbps 8 10 5 Mbps Declare the SerialPort type variable and then initialize all the values to zero Declare the SerialPort pointer type variable then initialize it with addresss of the predefined variable Please refer to the source code shown below SerialPort sp 0 0 0 0 0 SerialPort Port sp Next implement functions dxl_initialize and dxl_terminate to connect and disconnect to USB to Dynamixe...

Page 42: ...y key to terminate n _getch return 0 printf Press any key to terminate n getch Close the port of USB2DXL dxl_terminate Port return 0 COMM_RXSUCCESS is returned when USB to Dynamixel dongle is successfully communicates with Dynamixel PRO When using the Dynamixel SDK to communicate with USB to Dynamixel you can check if communication is successful ...

Page 43: ...BAUD_RATE_NUM 1 Baudrate Number of Dynamixel PRO 1 is 57600 bps define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define ID 1 ID of Dynamixel PRO you use int 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 ...

Page 44: ...ss any key to terminate n _getch dxl_terminate Port return 0 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 45: ...RO 1 is 57600 bps define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_GOAL_POSITION 596 Address of Goal Position in Control Table define ID 1 ID of Dynamixel PRO you use int 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...

Page 46: ...intf Press any key to roatate the Dynamixel PRO to position 2 n _getch Result dxl_write_dword Port ID P_GOAL_POSITION Goal_Pos2 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 Torque OFF printf Press any key to turn off the torque n _getch Result dxl_write_dword Port ID P_TORQUE_ENABLE 0 ErrorStatus if Result COMM_RXSUCCESS printf F...

Page 47: ...ine BAUD_RATE_NUM 1 Baudrate Number of Dynamixel PRO define P_ID 7 Address of ID in Contorl Table define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define ID 1 ID of Dynamixel PRO you use 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 ERR...

Page 48: ...f Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 int 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 printf Press any key to terminate n _getch return 0 else if Err...

Page 49: ...n 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 The baud rate cannot be changed while Dynamixel PRO is in torque on status Torque must be turned off in order to change its value The program s entire source is shown below main cpp include stdio h include conio h include dynamixel h define COM_PORT_NUM 17 Co...

Page 50: ...ksum error n if ErrorCode ERRBIT_OVERLOAD printf Overload error n if ErrorCode ERRBIT_INSTRUCTION printf Instruction code error n int 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 _getc...

Page 51: ...rate 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 printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed to chage the baudrate of Dynamixel PRO you use n Close the port of USB2DXL printf Press any key to terminate n _getch dxl_terminate Po...

Page 52: ...age 52 139 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 ...

Page 53: ...e is shown below main cpp include stdio h include conio h include dynamixel h define COM_PORT_NUM 17 Comport Number of USB2DXL define BAUD_RATE_NUM 3 Baudrate Number of Dynamixel PRO define P_LED_RED 563 Address of LED_RED in Contorl Table define P_LED_GREEN 564 Address of LED_RED in Contorl Table define P_LED_BLUE 565 Address of LED_RED in Contorl Table define ID 1 ID of Dynamixel PRO you use Pri...

Page 54: ...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 Result dxl_write_byte Port ID P_LED_RED 255 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode...

Page 55: ...ynamixel PRO n _getch Result dxl_write_byte Port ID P_LED_GREEN 0 ErrorStatus Result dxl_write_byte Port ID P_LED_BLUE 255 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed to change the color of LED in Dynamixel PRO n Close the port of USB2DXL printf Press any key t...

Page 56: ...UM 17 Comport Number of USB2DXL define BAUD_RATE_NUM 3 Baudrate Number of Dynamixel PRO define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_POSITION_P_GAIN 594 Address of Position P Gain in Contorl Table define P_GOAL_POSITION 596 Address of Goal Position in Contorl Table define ID 1 ID of Dynamixel PRO you use Print error bit of status packet void PrintErrorCode int Erro...

Page 57: ...UE_ENABLE 1 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 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 8 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 P...

Page 58: ...t COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus change the goal position value printf Press any key to change the goal position n _getch Result dxl_write_dword Port ID P_GOAL_POSITION 100000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 ...

Page 59: ...Quick Start for Dynamixel Pro v1 00b Page 59 139 return 0 Observe the diffenence in Dynamixel PRO s movement speed relevant to the change in P Gain values ...

Page 60: ...itten like the example below int position velocity position 100000 velocity 10000 Make a tx data unsigned char data 8 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 data 5 DXL_HIBYTE DXL_LOWORD velocity data 6 DXL_LOBYTE DXL_HIWORD velocity data 7 DXL_HIBYT...

Page 61: ... ErrorCode ERRBIT_OVERHEAT printf Overheat error n if ErrorCode ERRBIT_RANGE printf Out of range error n if ErrorCode ERRBIT_CHECKSUM printf Checksum error n if ErrorCode ERRBIT_OVERLOAD printf Overload error n if ErrorCode ERRBIT_INSTRUCTION printf Instruction code error n int 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_RA...

Page 62: ...locity 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 if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return ...

Page 63: ... and moving speed n _getch Result dxl_write Port ID P_GOAL_POSITION 8 data ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus Close the port of USB2DXL printf Press any key to terminate n _getch dxl_terminate Port return 0 The velocity should be fast when rotating towards the first posit...

Page 64: ...nclude conio h include dynamixel h define COM_PORT_NUM 17 Comport Number of USB2DXL define BAUD_RATE_NUM 3 Baudrate Number of Dynamixel PRO define P_PRESENT_TEMPERATURE 625 Address of Present Temperature in Contorl Table define ID 1 ID of Dynamixel PRO you use Print error bit of status packet void PrintErrorCode int ErrorCode if ErrorCode ERRBIT_VOLTAGE printf Input voltage error n if ErrorCode ER...

Page 65: ...ess any key to terminate n _getch return 0 int Result ErrorStatus printf Press any key to terminate n printf n int temp while true if _kbhit break Read the present temperature Result dxl_read_byte Port ID P_PRESENT_TEMPERATURE temp ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else PrintErrorCode ErrorStatus printf r printf curren...

Page 66: ...Quick Start for Dynamixel Pro v1 00b Page 66 139 The present temperature is constantly read ...

Page 67: ...P_PRESENT_POSITION 611 Address of Present Position in Contorl Table define ID 1 ID of Dynamixel PRO you use 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 if Error...

Page 68: ...te n printf n int temp while true if _kbhit break Read the present position Result dxl_read_dword Port ID P_PRESENT_POSITION unsigned temp ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else PrintErrorCode ErrorStatus printf r printf present position d temp Close the port of USB2DXL dxl_terminate Port return 0 The Present Position ...

Page 69: ...include Windows h include stdio h include conio h include dynamixel h define COM_PORT_NUM 17 Comport Number of USB2DXL define BAUD_RATE_NUM 3 Baudrate Number of Dynamixel PRO define P_OPERATING_MODE 11 Address of Operation Mode in Control Table define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_GOAL_VELOCITY 600 Address of Goal Velocity in Control Table define ID 1 ID of...

Page 70: ...lt ErrorStatus Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 printf Press any key to change the operating mode n _getch Result dxl_write_byte Port ID P_OPERATING_MODE 1 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key t...

Page 71: ... Port ID P_GOAL_VELOCITY 5000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed to chage the operationg mode n Close the port of USB2DXL printf Press any key to terminate n _getch Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 ErrorSta...

Page 72: ..._MAKEDWORD DXL_MAKEWORD data 0 data 1 DXL_MAKEWORD da ta 2 data 3 present_velocity DXL_MAKEDWORD DXL_MAKEWORD data 4 data 5 DXL_MAKEWORD da ta 6 data 7 The unsigned char type array data obtained is converted into the present position and velocity with DXL_MAKEWORD DXL_MAKEDWORD refer to the source code above The program s entire source code is shown below main cpp include stdio h include conio h i...

Page 73: ...on code error n int 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 _getch return 0 int Result ErrorStatus Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 E...

Page 74: ...esult 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 0 Change the Goal Velocity printf Press any key to change goal velocity n _getch Result dxl_write_dword Port ID P_GOAL_VELOCITY 5000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch ret...

Page 75: ... 3 present_velocity DXL_MAKEDWORD DXL_MAKEWORD data 4 data 5 DXL_MAKEWORD data 6 data 7 printf r printf present position d presen velocity d present_position present_velocity printf n Close the port of USB2DXL printf Press any key to terminate n _getch Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf...

Page 76: ...on 50000 needs to be entered as the Homing Offset value The program s entire source code is shown below Check if the Operation Mode is set as Joint Mode before running the program below main cpp include stdio h include conio h include dynamixel h define COM_PORT_NUM 17 Comport Number of USB2DXL define BAUD_RATE_NUM 3 Baudrate Number of Dynamixel PRO define P_HOMING_OFFSET 13 Address of Homing Offs...

Page 77: ...amixel n else printf Failed to open USB2Dynamixel n printf Press any key to terminate n _getch return 0 int Result ErrorStatus Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 Change the zero point printf Press any key to change the zero point n _getch Res...

Page 78: ...y key to terminate n _getch return 0 Change the Goal position printf Press any key to change the Goal Position n _getch Result dxl_write_dword Port ID P_GOAL_POSITION 0 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else PrintErrorCode ErrorStatus Close the port of USB2DXL printf Press any key to terminate n _getch dxl_terminate Po...

Page 79: ... Limit in Control Table define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_GOAL_POSITION 596 Address of Goal Position in Control Table define ID 1 ID of Dynamixel PRO you use 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_O...

Page 80: ...o write n printf Press any key to terminate n _getch return 0 Change the Plus Position Limit printf Press any key to change the plus position limit n _getch Result dxl_write_dword Port ID P_PLUS_POSITION_LIMIT 100000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed ...

Page 81: ...key to terminate n _getch return 0 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 _getch return 0 else PrintErrorCode ErrorStatus Change the Goal position printf Press any key to change the Goal Positio...

Page 82: ...n _getch return 0 else PrintErrorCode ErrorStatus Change the Goal position printf Press any key to change the Goal Position to 100000 n _getch Result dxl_write_dword Port ID P_GOAL_POSITION 100000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else PrintErrorCode ErrorStatus Close the port of USB2DXL printf Press any key to termina...

Page 83: ...on Limit in Control Table define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_GOAL_POSITION 596 Address of Goal Position in Control Table define ID 1 ID of Dynamixel PRO you use 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...

Page 84: ...ntf Press any key to terminate n _getch return 0 Change the Plus Position Limit printf Press any key to change the plus position limit n _getch Result dxl_write_dword Port ID P_PLUS_POSITION_LIMIT 5000000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed to chage the...

Page 85: ...turn 0 Change the Goal position printf Press any key to change the Goal Position to 500000 n _getch Result dxl_write_dword Port ID P_GOAL_POSITION 500000 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else PrintErrorCode ErrorStatus Change the Goal position printf Press any key to change the Goal Position to 500000 n _getch Result ...

Page 86: ... Dynamixel Pro v1 00b Page 86 139 Close the port of USB2DXL printf Press any key to terminate n _getch dxl_terminate Port return 0 If the program does not run properly check if the Operating Mode is set to Joint Mode ...

Page 87: ...P_GOAL_POSITION 3 ErrorStatus dxl_write_word Port ID P_INDIRECT_ADDRESS_4 P_GOAL_VELOCITY ErrorStatus 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 ...

Page 88: ...ENABLE 562 Address of Torque Enable in Control Table define P_GOAL_POSITION 596 Address of Goal Position in Control Table define P_GOAL_VELOCITY 600 Address of Goal Velocity in Control Table define P_GOAL_ACCELERATION 606 Address of Goal Acceleration in Control Table define P_INDIRECT_DATA_0 634 Address of Goal Indirect Data in Control Table define ID 1 ID of Dynamixel PRO you use Print error bit ...

Page 89: ...COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 Set the Indirect Address for Goal Position printf Press any key to set the indirect address for goal position n _getch Result dxl_write_word Port ID P_INDIRECT_ADDRESS_0 P_GOAL_POSITION ErrorStatus Result dxl_write_word Port ID P_INDIRECT_ADDRESS_1 P_GOAL_POSITION 1 ErrorStatus Result dxl_write_word Port ID...

Page 90: ...Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 else if ErrorStatus 0 PrintErrorCode ErrorStatus else printf Succeed to set the indirect address for goal velocity n Set the Indirect Address for Goal Acceleration printf Press any key to set the indirect address for goal acceleration n _getch Result dxl_write_word Port ID P_INDIRECT_ADDRESS_8 P_GOAL...

Page 91: ...TE DXL_LOWORD position data 2 DXL_LOBYTE DXL_HIWORD position data 3 DXL_HIBYTE DXL_HIWORD position data 4 DXL_LOBYTE DXL_LOWORD velocity data 5 DXL_HIBYTE DXL_LOWORD velocity data 6 DXL_LOBYTE DXL_HIWORD velocity data 7 DXL_HIBYTE DXL_HIWORD velocity data 8 DXL_LOBYTE DXL_LOWORD acceleration data 9 DXL_HIBYTE DXL_LOWORD acceleration data 10 DXL_LOBYTE DXL_HIWORD acceleration data 11 DXL_HIBYTE DXL...

Page 92: ...DXL_HIWORD velocity data 8 DXL_LOBYTE DXL_LOWORD acceleration data 9 DXL_HIBYTE DXL_LOWORD acceleration data 10 DXL_LOBYTE DXL_HIWORD acceleration data 11 DXL_HIBYTE DXL_HIWORD acceleration change the position value moving speed acceleration using indirect addr printf Press any key to change the position speed acceleration n _getch Result dxl_write Port ID P_INDIRECT_DATA_0 12 data ErrorStatus if ...

Page 93: ...n Control Table define P_INDIRECT_ADDRESS_2 53 Address of 3rd Indirect Address in Control Table define P_INDIRECT_ADDRESS_3 55 Address of 4th Indirect Address in Control Table define P_INDIRECT_ADDRESS_4 57 Address of 5th Indirect Address in Control Table define P_TORQUE_ENABLE 562 Address of Torque Enable in Control Table define P_PRESENT_POSITION 611 Address of Present Position in Control Table ...

Page 94: ...pen USB2Dynamixel n else printf Failed to open USB2Dynamixel n printf Press any key to terminate n _getch return 0 int Result ErrorStatus Torque Off printf Torque Off n Result dxl_write_byte Port ID P_TORQUE_ENABLE 0 ErrorStatus if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 change the operating mode to wheel mode printf Make the Mode of Dynam...

Page 95: ...t Address for Goal Velocity printf Press any key to set the indirect address for present position n _getch Result dxl_write_word Port ID P_INDIRECT_ADDRESS_1 P_PRESENT_POSITION ErrorStatus Result dxl_write_word Port ID P_INDIRECT_ADDRESS_2 P_PRESENT_POSITION 1 ErrorStatus Result dxl_write_word Port ID P_INDIRECT_ADDRESS_3 P_PRESENT_POSITION 2 ErrorStatus Result dxl_write_word Port ID P_INDIRECT_AD...

Page 96: ...esult COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 printf Press any key to terminate n printf n while true if _kbhit break unsigned char data 5 dxl_read Port ID P_INDIRECT_DATA_0 5 data ErrorStatus int temp present_position temp data 0 present_position DXL_MAKEDWORD DXL_MAKEWORD data 1 data 2 DXL_MAKEWORD data 3 data 4 printf r printf present temperat...

Page 97: ...ne P_LED_RED 563 Address of LED RED in Control Table define ID_1 1 ID of Dynamixel PRO you use define ID_2 2 define ID_3 3 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 e...

Page 98: ...ram 1 255 param 2 ID_2 param 3 255 param 4 ID_3 param 5 255 LED On printf Press any to turn on the LED n _getch Result dxl_sync_write Port P_LED_RED 1 param 6 if Result COMM_RXSUCCESS printf Failed to write n printf Press any key to terminate n _getch return 0 param 0 ID_1 param 1 0 param 2 ID_2 param 3 0 param 4 ID_3 param 5 0 LED Off printf Press any to turn off the LED n _getch Result dxl_sync_...

Page 99: ...Quick Start for Dynamixel Pro v1 00b Page 99 139 return 0 Close the port of USB2DXL printf Press any key to terminate n _getch dxl_terminate Port return 0 ...

Page 100: ...define ID_1 1 ID of Dynamixel PRO you use define ID_2 2 define ID_3 3 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 if ErrorCode ERRBIT_CHECKSUM printf Checksum e...

Page 101: ... any key to terminate n _getch return 0 param 0 ID_1 param 1 DXL_LOBYTE DXL_LOWORD 100000 param 2 DXL_HIBYTE DXL_LOWORD 100000 param 3 DXL_LOBYTE DXL_HIWORD 100000 param 4 DXL_HIBYTE DXL_HIWORD 100000 param 5 ID_2 param 6 DXL_LOBYTE DXL_LOWORD 50000 param 7 DXL_HIBYTE DXL_LOWORD 50000 param 8 DXL_LOBYTE DXL_HIWORD 50000 param 9 DXL_HIBYTE DXL_HIWORD 50000 param 10 ID_3 param 11 DXL_LOBYTE DXL_LOWO...

Page 102: ...YTE DXL_LOWORD 0 param 8 DXL_LOBYTE DXL_HIWORD 0 param 9 DXL_HIBYTE DXL_HIWORD 0 param 10 ID_3 param 11 DXL_LOBYTE DXL_LOWORD 0 param 12 DXL_HIBYTE DXL_LOWORD 0 param 13 DXL_LOBYTE DXL_HIWORD 0 param 14 DXL_HIBYTE DXL_HIWORD 0 printf Press any to change goal position n _getch Result dxl_sync_write Port P_GOAL_POSITION 4 param 15 if Result COMM_RXSUCCESS printf Failed to write n printf Press any ke...

Page 103: ...ss of Goal Position in Control Table define ID_1 1 ID of Dynamixel PRO you use define ID_2 2 define ID_3 3 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 if ErrorC...

Page 104: ...ENT_POSITION param 7 DXL_HIBYTE P_PRESENT_POSITION param 8 DXL_LOBYTE position_length param 9 DXL_HIBYTE position_length param 10 ID_3 param 11 DXL_LOBYTE P_PRESENT_POSITION param 12 DXL_HIBYTE P_PRESENT_POSITION param 13 DXL_LOBYTE position_length param 14 DXL_HIBYTE position_length BulkData bd 256 BulkData pbd 256 for unsigned int i 0 i 256 i pbd i bd i dxl_bulk_read Port param 15 pbd int presen...

Page 105: ...el Pro v1 00b Page 105 139 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 0 ...

Page 106: ...in Control Table define P_PRESENT_CURRENT 621 Address of Present Current in Control Table define P_PRESENT_TEMPERATURE 625 Address of Present Temperature in Control Table define ID_1 1 ID of Dynamixel PRO you use define ID_2 2 define ID_3 3 Print error bit of status packet void PrintErrorCode int ErrorCode if ErrorCode ERRBIT_VOLTAGE printf Input voltage error n if ErrorCode ERRBIT_ANGLE printf An...

Page 107: ...am 3 DXL_LOBYTE current_length param 4 DXL_HIBYTE current_length param 5 ID_2 param 6 DXL_LOBYTE P_PRESENT_POSITION param 7 DXL_HIBYTE P_PRESENT_POSITION param 8 DXL_LOBYTE position_length param 9 DXL_HIBYTE position_length param 10 ID_3 param 11 DXL_LOBYTE P_PRESENT_TEMPERATURE param 12 DXL_HIBYTE P_PRESENT_TEMPERATURE param 13 DXL_LOBYTE temperature_length param 14 DXL_HIBYTE temperature_length ...

Page 108: ...ERATURE 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 _getch dxl_terminate Port return 0 ...

Page 109: ...to reassign ttyUSB0 to USB to Dynamixel disconnect all serial devices then connect USB to Dynamixel loffowed by inputting the command ls dev The device should appear as ttyUSB0 Afterwards you may connect other serial devices 1 3 2 Download and install Dynamixel SDK 2 0 i Preparing your system in Linux assuming the PC is connected to the internet Make sure to update your Linux OS package repositori...

Page 110: ... downloaded zip file to the new directory cp dxlsdk_cpp_forlinux zip DXLDSK_cpp_forLinux 3 go to the directory cd DXLSDK_cpp_forLinux 4 unzip the file unzip dxlsdk_cpp_forlinux zip After decompression verify the contents type the command ls Ignoring the zip file there should be the a few sub directories build example include lib and src and ReleaseNote txt Compile and build the source with the com...

Page 111: ...ill be 4 other sub directories each one is an example on implementation of Dynamixel SDK 2 0 Go to the monitor sub directory cd monitor Borwse the contents with the ls command and you will see 3 files main cpp Makefile and monitor the file monitor in white is a remnant during the development of the SDK and it is not functional Ignore monitor in white font since its not functional simple recompile ...

Page 112: ...an Another alternative command to check connected Dynamixel PRO s is bp You will see ID 001 This means that the connected Dynamixel PRO is assigned 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 will n...

Page 113: ...ms Torque Enable being off To turn Torque Enable on enter the command wrb 1 562 1 Don t forget to be able to change address values from the EEPROM area ensure that address 562 is set to off Dynamixel PRO is now ready to operate iv Goal Position According to Dynamixel PRO s Control Table Goal Position is located on address 596 with a size of 4 bytes a doble word or dword To set a Goal Position to t...

Page 114: ...alue A value with a magnitude is 4e10 is only possible when is binary equivalent is at least 32 bit long integer Present Position is 4 bytes in size or 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 Both addresses are in the EEPR...

Page 115: ...set to 0 Toque Mode Operating Mode is in the EEPROM area so Torque Enable must of turned off before making any changes Before testing Goal Torque make sure to check Torque Limit address 30 2 bytes as Goal Troque cannot exceed Torque Limit Remember Torque Limit is also in the EEPROM area so Torque Enable must be turned off to make any changes Obtain a reading of Torque Limit rdw 1 30 then set Goal ...

Page 116: ...lockwise CCW direction by setting values above 0 i e wrd 1 600 200 Try the same in the clockwise direction CW direction by setting values below 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 ix Changing ID According to Dynamixel PRO s Control Table ID is located on address 7 with a si...

Page 117: ...xel PRO is also 1 According to Dynamixel PRO s Control Table ID is located on address 8 with a size of 1 byte ID is located under the EEPROM area so Torque Enable 562 must be turned off before making any changes Assuming that Torque Enable is set to off let s change the baud rate of Dynamixel PRO to 1 Mbps value 3 In this case since the ID has been changed from 1 to 39 the proper command should be...

Page 118: ...also change the baud rate of these Dynamixel PROs too before changing the baud rate of USB to Dynamixel When performing this procedure the Dynamixel PROs may remain daisy chained xi Resetting Dynamixel PRO to factory default settings Monitor allows for resetting any Dynamixel PRO to factory default settings Before exercising this option it is strongly recommended that only one Dynamixel PRO is con...

Page 119: ...sumes the following 1 USB to Dynamixel dongle is registered under ttyUSB0 2 Dynamixel PRO device is in factory default settings 3 SDK 2 0 is properly set up 4 Torque Enable 562 is set to 0 off state 1 4 2 Initializing USB to Dynamixel and Dynamixel PRO i Connect sdk_20_directory example Connect main cpp USB to Dynamixel is registered under ttyUSB0 in dev To initialize open port simply enter its lo...

Page 120: ...value dxl_sdk 20 example TorqueEnable main cpp partly shown declare the following in preprocessor for illustrative purposes define TORQUE_ENABLE 562 define DEFAULT_BAUDNUM 1 using namespace DXL_PRO Dynamixel DXL dev ttyUSB0 must declare location of USB to Dynamixel int main int result error 0 On declare arbitrary variables for read commands open device if DXL Connect 0 printf Failed to open USB2Dy...

Page 121: ...e for addresses with size of 1 byte Implement WriteWord for addresses with size of 2 bytes Implement WriteDWord for addresses with size of 4 bytes Implement SyncWrite explained later for for multiple Dynamixel PROs at once ii Read functions Monitor for Dynamixel PRO in Linux emphasized that different size addresses required different type of read commands The same concept applies at the source cod...

Page 122: ... Dynamixel if DXL SetBaudrate DEFAULT_BAUDNUM true printf Succeed to set USB2DXL baudrate to 57600 bps n else printf Failed to set USB2DXL baudrate to 57600 bps n printf Press any key to end n _getch return 0 printf Turning Torque Enable on for ID 1 n This step is essential After Torque Enable is on RAM area addresses can be changed DXL WriteByte DEFAULT_ID P_TORQUE_ENABLE 1 error While 1 DXL Writ...

Page 123: ...VELOCITY 600 define DEFAULT_BAUDNUM 1 define CONTROL_PERIOD 10 time period arbitrary value using namespace DXL_PRO Dynamixel DXL dev ttyUSB0 must declare location of USB to Dynamixel int main int GoalPos 250000 for 54 series int GoalPos 151875 for 42 series int GoalVel 3000l int GoalTorque 120 open device and set baud rate here if DXL Connect 0 Torque Enable is off by default The following line is...

Page 124: ...sition 596 size is 4 bytes a double word WriteDWord is the appropriate function DXL WriteDWord 1 GOAL_POSITION GoalPos 0 break must close USB to Dynamixel before ending DXL Disconnect return 0 Similarly as multiple write functions can be applied multiple read functions can be implemented dxl_sdk 20 example ReadValues main cpp partly shown declare the following in preprocessor for illustrative purp...

Page 125: ...0 0 usleep CONTROL_PERIOD 100 DXL WriteByte 1 TORQUE_ENABLE 1 0 usleep CONTROL_PERIOD 100 Goal Torque 604 size is 2 bytes a word WriteWord is the appropriate function DXL WriteWord 1 GOAL_TORQUE GoalTorque error usleep CONTROL_PERIOD 200 after an arbitrary period i e 2 secs in this case output onscreen Present Current 621 size is 2 bytes a word ReadWord is the appropriate function result DXL ReadW...

Page 126: ... appropriate function result DXL ReadDWord 1 PRESENT_POSITION val3 error if result COMM_RXSUCCESS printf d n val3 break must close USB to Dynamixel before ending DXL Disconnect return 0 iii SyncWrite While the abovementioned read and write commands are simple to implement the amount of code lines necessary for multiple addresses on multiple Dynamixel PROs can be rather staggering SynchWrite simpli...

Page 127: ...tion values for different ID param i 1 4 0 unsigned char id i param i 1 4 1 DXL_LOBYTE DXL_LOWORD GoalPos param i 1 4 2 DXL_HIBYTE DXL_LOWORD GoalPos param i 1 4 3 DXL_LOBYTE DXL_HIWORD GoalPos param i 1 4 4 DXL_HIBYTE DXL_HIWORD GoalPos 4 is for size of Goal Position NUM_ACTUATOR is for size of array result DXL SyncWrite P_GOAL_POSITION_LL 4 param NUM_ACTUATOR 1 4 while theta 2 PI must close USB ...

Page 128: ...write commands that allow writing specific 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 SyncWrite in the other hand is a more implicit write command One command is ...

Page 129: ...P Gain 32 ii H54 100 S500 R Name Default Value ID 1 BaudRate 1 57600bps Max Position Limit 251000 Min Position Limit 251000 Velocity Limit 17000 Current Limit 310 Velocity I Gain 16 Velocity P Gain 256 Position P Gain 32 iii H42 20 S300 R Name Default Value ID 1 BaudRate 1 57600bps Max Position Limit 151875 Min Position Limit 151875 Velocity Limit 10300 Current Limit 465 Velocity I Gain 40 Velocit...

Page 130: ...00 Current Limit 180 Velocity I Gain 16 Velocity P Gain 256 Position P Gain 32 2 1 3 L Series i L54 50 S290 R Name Default Value ID 1 BaudRate 1 57600bps Max Position Limit 103860 Min Position Limit 103860 Velocity Limit 8000 Current Limit 180 Velocity I Gain 16 Velocity P Gain 256 Position P Gain 32 ii L54 30 S400 R Name Default Value ID 1 BaudRate 1 57600bps Max Position Limit 144180 Min Positio...

Page 131: ...RW 50 21 1 Temperature limit Internal temperature limit RW 80 22 2 Max Voltage Limit Opeting upper limit voltage RW 400 24 2 Min Voltage Limit Operating lower limit voltage RW 150 26 4 acceleration Limit Acceleration limit RW 30 2 Torque limit Torque limit RW 32 4 Velocity Limit Velocity limit RW 36 4 Max Position Limit Position upper limit RW 40 4 Min Position Limit Position lower limit RW 44 1 E...

Page 132: ...rrent velocity R 621 2 Present Current Present current value R 623 2 Present input voltage Current input voltage R 625 1 Present temperature Current internal temperature R 626 2 External Port Data 1 External Port Data 1 R RW 0 628 2 External Port Data 2 External Port Data 2 R RW 0 630 2 External Port Data 3 External Port Data 3 R RW 0 632 2 External Port Data 4 External Port Data 4 R RW 0 634 1 In...

Page 133: ...Quick Start for Dynamixel Pro v1 00b Page 133 139 2 3 2 42 series H42 L42 ...

Page 134: ...Quick Start for Dynamixel Pro v1 00b Page 134 139 2 4 Dimensions 2 4 1 H Series i H54 200 S500 R ii H54 100 S500 R ...

Page 135: ...Quick Start for Dynamixel Pro v1 00b Page 135 139 iii H42 20 S300 R 2 4 2 M Series i M54 60 S250 R ii M54 40 S250 R ...

Page 136: ...Quick Start for Dynamixel Pro v1 00b Page 136 139 ...

Page 137: ...Quick Start for Dynamixel Pro v1 00b Page 137 139 2 4 3 L Series i L54 50 S290 R ii L54 30 S400 R ...

Page 138: ...Quick Start for Dynamixel Pro v1 00b Page 138 139 iii L42 10 S300 R ...

Page 139: ...Quick Start for Dynamixel Pro v1 00b Page 139 139 2 5 Model notation ...

Page 140: ...0 902 0088 001 902 0141 000 PH54 200 S500 R 903 0273 000 904 0042 201 904 0039 201 903 0223 101 905 0024 000 902 0131 000 903 0178 000 903 0220 001 901 0036 201 901 0125 201 902 0121 000 903 0245 000 903 0087 001 902 0065 000 903 0248 000 903 0244 000 902 0095 000 903 0246 000 903 0074 000 903 0084 000 903 0240 000 905 0023 000 902 0156 000 904 0040 201 902 0137 000 902 0063 000 903 0144 000 903 0...

Reviews: