Robotis Dynamixel Pro Quick Start Manual page 62

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b
Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
int
position, velocity;
position = 100000;
velocity = 10000;
//Make a tx data
unsigned char
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_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(
printf(
_getch();
return
}
else
{
if(ErrorStatus != 0 )
}
position = -100000;
velocity =
//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));
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
data[8];
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
PrintErrorCode(ErrorStatus);
2000;
);
);
);
Page 62 / 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

Table of Contents