Quick Start for Dynamixel Pro v1.00b
Page
64
/
139
viii.
Internal temperature feedback of Dynamixel PRO
-
So far, we have covered how to use the Write command to send commands to
Dynamixel PRO.
-
Next, we will go over how to use the Read command to receive data from
Dynamixel PRO.
-
The address of Present Temperature on the Control Table is 625 and is assigned 1
byte of memory.
-
Thus, dxl_read_byte function can be used to obtain the Current Temperature of
Dynamixel PRO.
-
The program’s entire source 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_PRESENT_TEMPERATURE 625
//Address of Present Temperature in Contorl
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
)
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 ...