Robotis Dynamixel Pro Quick Start Manual page 61

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b
#define
P_TORQUE_ENABLE
#define
P_GOAL_POSITION
#define
ID
// Print error bit of status packet
void PrintErrorCode(int
{
if(ErrorCode & ERRBIT_VOLTAGE)
printf("Input voltage
if(ErrorCode & ERRBIT_ANGLE)
printf("Angle limit
if(ErrorCode & ERRBIT_OVERHEAT)
printf("Overheat
if(ErrorCode & ERRBIT_RANGE)
printf("Out of range
if(ErrorCode & ERRBIT_CHECKSUM)
printf("Checksum
if(ErrorCode & ERRBIT_OVERLOAD)
printf("Overload
if(ErrorCode & ERRBIT_INSTRUCTION)
printf("Instruction code
}
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
else
{
printf(
printf(
_getch();
return
}
int
Result, ErrorStatus;
//Torque on
printf(
"Torque on...\n"
562
596
1
//ID of Dynamixel PRO you use
ErrorCode)
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
USB2Dynamixel!\n");
"Failed to open USB2Dynamixel!\n"
"Press any key to terminate...\n"
0;
);
//Address of Torque Enable in Control Table
//Address of Goal Position in Contorl Table
);
);
Page 61 / 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