Robotis Dynamixel Pro Quick Start Manual page 80

Table of Contents

Advertisement

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
else
{
printf(
printf(
_getch();
return
}
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(
printf(
_getch();
return
}
//Change the Plus Position Limit
printf("Press any key to change the plus position
_getch();
Result = dxl_write_dword(Port, ID, P_PLUS_POSITION_LIMIT, 100000, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
else
{
if(ErrorStatus != 0 )
else
}
//Change the Minus Position Limit
printf("Press any key to change the minus position
_getch();
Result = dxl_write_dword(Port, ID, P_MINUS_POSITION_LIMIT, -100000, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
USB2Dynamixel!\n");
"Failed to open USB2Dynamixel!\n"
"Press any key to terminate...\n"
0;
);
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
PrintErrorCode(ErrorStatus);
printf("Succeed to chage the plus position
);
);
);
limit...\n");
);
limit!\n");
limit...\n");
Page 80 / 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