Quick Start for Dynamixel Pro v1.00b
Page
83
/
139
iii.
Extending the operating range of Dynamixel PRO.
-
Please refer to 1.1 for information reg/- 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 17
//Comport Number of USB2DXL
#define
BAUD_RATE_NUM 3
//Baudrate Number of Dynamixel PRO
#define
P_PLUS_POSITION_LIMIT 36
//Address of Plus Position Limit in Control Table
#define
P_MINUS_POSITION_LIMIT 40
//Address of Minus Position 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_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;
Summary of Contents for Dynamixel Pro
Page 1: ...Quick Start for Dynamixel Pro ...
Page 8: ...Quick Start for Dynamixel Pro v1 00b Page 8 139 ...
Page 33: ...Quick Start for Dynamixel Pro v1 00b Page 33 139 Check Dynamixel PRO firmware update results ...
Page 37: ...Quick Start for Dynamixel Pro v1 00b Page 37 139 Dynamixel PRO firmware recovery is complete ...
Page 66: ...Quick Start for Dynamixel Pro v1 00b Page 66 139 The present temperature is constantly read ...
Page 133: ...Quick Start for Dynamixel Pro v1 00b Page 133 139 2 3 2 42 series H42 L42 ...
Page 136: ...Quick Start for Dynamixel Pro v1 00b Page 136 139 ...
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 ...