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
COM_PORT_NUM
#define
BAUD_RATE_NUM
#define
P_PLUS_POSITION_LIMIT
#define
P_MINUS_POSITION_LIMIT 40
Table
#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;
17
3
36
562
596
1
ErrorCode)
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
//Comport Number of USB2DXL
//Baudrate Number of Dynamixel PRO
//Address of Plus Position Limit in Control Table
//Address of Minus Position Limit in Control
//Address of Torque Enable in Control Table
//Address of Goal Position in Control Table
//ID of Dynamixel PRO you use
Page 83 / 139
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?
Questions and answers