dynamixel_protocol.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
9 #pragma once
10 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #define DXL_HEADER ((uint8_t[]){0xFF,0xFF,0xFD})
29 
30 typedef enum {
36 
37 typedef enum {
39  XL320_ID = 3,
49  XL320_LED = 25,
50  XL320_D_GAIN = 27,
51  XL320_I_GAIN = 28,
52  XL320_P_GAIN = 29,
56  XL320_MOVING = 49,
57  XL320_ERROR = 50,
59 
60 typedef enum {
71  XL320_PUNCH = 51,
73 
74 typedef enum {
75  DXL_INST_PING = 0x01,
76  DXL_INST_READ = 0x02,
77  DXL_INST_WRITE = 0x03,
79  DXL_INST_ACTION = 0x05,
81  DXL_INST_REBOOT = 0x08,
82  DXL_INST_STATUS = 0x55,
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
xl320_baudrate_t
@ XL320_B_1000000
XL320 available baudrate : 1000000.
@ XL320_B_57600
XL320 available baudrate : 57600.
@ XL320_B_9600
XL320 available baudrate : 9600.
@ XL320_B_115200
XL320 available baudrate : 115200.
xl320_register8_t
@ XL320_I_GAIN
I Gain [RW] (default=0 ; min=0 ; max=254)
@ XL320_REGISTERED_INST
Registered Instruction [R] (default=0)
@ XL320_LIMIT_TEMPERATURE
Internal Limit Temperature [RW] (default=65 ; min=0 ; max=150)
@ XL320_LOWER_LIMIT_VOLTAGE
Lowest Limit Voltage [RW] (default=60 ; min=50 ; max=250)
@ XL320_PRESENT_VOLTAGE
Current Voltage [R].
@ XL320_ALARM_SHUTDOWN
Shutdown for Alarm [RW] (default=3 ; min=0 ; max=7)
@ XL320_ID
ID of Dynamixel [RW] (default=1 ; min=0 ; max=252)
@ XL320_RETURN_LEVEL
Return Level [RW] (default=2 ; min=0 ; max=2)
@ XL320_RETURN_DELAY_TIME
Return Delay Time [RW] (default=250 ; min=0 ; max=254)
@ XL320_UPPER_LIMIT_VOLTAGE
Upper Limit Voltage [RW] (default=90 ; min=50 ; max=250)
@ XL320_CONTROL_MODE
Control Mode [RW] (default=2 ; min=1 ; max=2)
@ XL320_LED
LED On/Off [RW] (default=0 ; min=0 ; max=7)
@ XL320_D_GAIN
D Gain [RW] (default=0 ; min=0 ; max=254)
@ XL320_MOVING
Moving [R] (default=0)
@ XL320_ERROR
Hardware error status [R] (default=0)
@ XL320_PRESENT_TEMPERATURE
Present temperature [R].
@ XL320_TORQUE_ENABLE
Torque On/Off [RW] (default=0 ; min=0 ; max=1)
@ XL320_VERSION
Information on the version of firmware [R].
@ XL320_BAUD_RATE
Baud Rate of Dynamixel [RW] (default=3 ; min=0 ; max=3)
@ XL320_P_GAIN
P Gain [RW] (default=32 ; min=0 ; max=254)
dynamixel_intruction_t
@ DXL_INST_WRITE
write data on the Device
@ DXL_INST_STATUS
Return Instruction for the Instruction Packet.
@ DXL_INST_SYNC_WRITE
(Multiple devices) write data on the same Address and length at once
@ DXL_INST_READ
read data from the Device
@ DXL_INST_REG_WRITE
registers the write instruction to a standby status
@ DXL_INST_REBOOT
reboot the Device
@ DXL_INST_SYNC_READ
(Multiple devices) read data with same Address and length at once
@ DXL_INST_FACTORY_RESET
resets the Control Table to its initial factory default settings
@ DXL_INST_BULK_WRITE
(Multiple devices) write data on different Addresses and lengths at once
@ DXL_INST_ACTION
executes the write instruction previously registered
@ DXL_INST_BULK_READ
(Multiple devices) read data from different Addresses and lengths at once
@ DXL_INST_PING
checks if ID is associated to a Device
xl320_register16_t
@ XL320_PRESENT_SPEED
Current Speed [R].
@ XL320_PRESENT_LOAD
Current Load [R].
@ XL320_GOAL_VELOCITY
Goal Speed [RW] (min=0 ; max=2047)
@ XL320_GOAL_POSITION
Goal Position [RW] (min=0 ; max=1023)
@ XL320_GOAL_TORQUE
Goal Torque [RW] (min=0 ; max=1023)
@ XL320_CW_ANGLE_LIMIT
clockwise Angle Limit [RW] (default=0 ; min=0 ; max=1023)
@ XL320_PUNCH
Punch [RW] (default=32 ; min=0 ; max=1023)
@ XL320_MAX_TORQUE
Lowest byte of Max.
@ XL320_PRESENT_POSITION
Current Position [R].
@ XL320_MODEL_NUMBER
Model number [R] (default=350)
@ XL320_CCW_ANGLE_LIMIT
counterclockwise Angle Limit [RW] (default=1023 ; min=0 ; max=1023)