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 
20 #ifndef DYNAMIXEL_PROTOCOL_H
21 #define DYNAMIXEL_PROTOCOL_H
22 
23 #include <stdint.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #define DXL_HEADER ((uint8_t[]){0xFF,0xFF,0xFD})
30 
31 typedef enum {
37 
38 typedef enum {
40  XL320_ID = 3,
50  XL320_LED = 25,
51  XL320_D_GAIN = 27,
52  XL320_I_GAIN = 28,
53  XL320_P_GAIN = 29,
57  XL320_MOVING = 49,
58  XL320_ERROR = 50,
60 
61 typedef enum {
72  XL320_PUNCH = 51,
74 
75 typedef enum {
76  DXL_INST_PING = 0x01,
77  DXL_INST_READ = 0x02,
78  DXL_INST_WRITE = 0x03,
80  DXL_INST_ACTION = 0x05,
82  DXL_INST_REBOOT = 0x08,
83  DXL_INST_STATUS = 0x55,
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* DYNAMIXEL_PROTOCOL_H */
95 
XL320_B_9600
@ XL320_B_9600
XL320 available baudrate : 9600.
Definition: dynamixel_protocol.h:32
XL320_CW_ANGLE_LIMIT
@ XL320_CW_ANGLE_LIMIT
clockwise Angle Limit [RW] (default=0 ; min=0 ; max=1023)
Definition: dynamixel_protocol.h:63
XL320_ALARM_SHUTDOWN
@ XL320_ALARM_SHUTDOWN
Shutdown for Alarm [RW] (default=3 ; min=0 ; max=7)
Definition: dynamixel_protocol.h:48
XL320_MOVING
@ XL320_MOVING
Moving [R] (default=0)
Definition: dynamixel_protocol.h:57
DXL_INST_READ
@ DXL_INST_READ
read data from the Device
Definition: dynamixel_protocol.h:77
XL320_MAX_TORQUE
@ XL320_MAX_TORQUE
Lowest byte of Max.
Definition: dynamixel_protocol.h:65
XL320_P_GAIN
@ XL320_P_GAIN
P Gain [RW] (default=32 ; min=0 ; max=254)
Definition: dynamixel_protocol.h:53
XL320_LOWER_LIMIT_VOLTAGE
@ XL320_LOWER_LIMIT_VOLTAGE
Lowest Limit Voltage [RW] (default=60 ; min=50 ; max=250)
Definition: dynamixel_protocol.h:45
XL320_D_GAIN
@ XL320_D_GAIN
D Gain [RW] (default=0 ; min=0 ; max=254)
Definition: dynamixel_protocol.h:51
xl320_baudrate_t
xl320_baudrate_t
Definition: dynamixel_protocol.h:31
DXL_INST_FACTORY_RESET
@ DXL_INST_FACTORY_RESET
resets the Control Table to its initial factory default settings
Definition: dynamixel_protocol.h:81
XL320_CONTROL_MODE
@ XL320_CONTROL_MODE
Control Mode [RW] (default=2 ; min=1 ; max=2)
Definition: dynamixel_protocol.h:43
DXL_INST_REG_WRITE
@ DXL_INST_REG_WRITE
registers the write instruction to a standby status
Definition: dynamixel_protocol.h:79
XL320_PRESENT_VOLTAGE
@ XL320_PRESENT_VOLTAGE
Current Voltage [R].
Definition: dynamixel_protocol.h:54
XL320_LIMIT_TEMPERATURE
@ XL320_LIMIT_TEMPERATURE
Internal Limit Temperature [RW] (default=65 ; min=0 ; max=150)
Definition: dynamixel_protocol.h:44
DXL_INST_SYNC_READ
@ DXL_INST_SYNC_READ
(Multiple devices) read data with same Address and length at once
Definition: dynamixel_protocol.h:84
XL320_I_GAIN
@ XL320_I_GAIN
I Gain [RW] (default=0 ; min=0 ; max=254)
Definition: dynamixel_protocol.h:52
XL320_REGISTERED_INST
@ XL320_REGISTERED_INST
Registered Instruction [R] (default=0)
Definition: dynamixel_protocol.h:56
XL320_PRESENT_POSITION
@ XL320_PRESENT_POSITION
Current Position [R].
Definition: dynamixel_protocol.h:69
XL320_RETURN_DELAY_TIME
@ XL320_RETURN_DELAY_TIME
Return Delay Time [RW] (default=250 ; min=0 ; max=254)
Definition: dynamixel_protocol.h:42
DXL_INST_REBOOT
@ DXL_INST_REBOOT
reboot the Device
Definition: dynamixel_protocol.h:82
DXL_INST_ACTION
@ DXL_INST_ACTION
executes the write instruction previously registered
Definition: dynamixel_protocol.h:80
XL320_ERROR
@ XL320_ERROR
Hardware error status [R] (default=0)
Definition: dynamixel_protocol.h:58
XL320_RETURN_LEVEL
@ XL320_RETURN_LEVEL
Return Level [RW] (default=2 ; min=0 ; max=2)
Definition: dynamixel_protocol.h:47
xl320_register8_t
xl320_register8_t
Definition: dynamixel_protocol.h:38
DXL_INST_STATUS
@ DXL_INST_STATUS
Return Instruction for the Instruction Packet.
Definition: dynamixel_protocol.h:83
XL320_ID
@ XL320_ID
ID of Dynamixel [RW] (default=1 ; min=0 ; max=252)
Definition: dynamixel_protocol.h:40
XL320_PRESENT_LOAD
@ XL320_PRESENT_LOAD
Current Load [R].
Definition: dynamixel_protocol.h:71
XL320_MODEL_NUMBER
@ XL320_MODEL_NUMBER
Model number [R] (default=350)
Definition: dynamixel_protocol.h:62
XL320_LED
@ XL320_LED
LED On/Off [RW] (default=0 ; min=0 ; max=7)
Definition: dynamixel_protocol.h:50
XL320_PRESENT_TEMPERATURE
@ XL320_PRESENT_TEMPERATURE
Present temperature [R].
Definition: dynamixel_protocol.h:55
DXL_INST_BULK_WRITE
@ DXL_INST_BULK_WRITE
(Multiple devices) write data on different Addresses and lengths at once
Definition: dynamixel_protocol.h:87
XL320_GOAL_POSITION
@ XL320_GOAL_POSITION
Goal Position [RW] (min=0 ; max=1023)
Definition: dynamixel_protocol.h:66
XL320_GOAL_TORQUE
@ XL320_GOAL_TORQUE
Goal Torque [RW] (min=0 ; max=1023)
Definition: dynamixel_protocol.h:68
XL320_B_115200
@ XL320_B_115200
XL320 available baudrate : 115200.
Definition: dynamixel_protocol.h:34
DXL_INST_SYNC_WRITE
@ DXL_INST_SYNC_WRITE
(Multiple devices) write data on the same Address and length at once
Definition: dynamixel_protocol.h:85
DXL_INST_BULK_READ
@ DXL_INST_BULK_READ
(Multiple devices) read data from different Addresses and lengths at once
Definition: dynamixel_protocol.h:86
XL320_PRESENT_SPEED
@ XL320_PRESENT_SPEED
Current Speed [R].
Definition: dynamixel_protocol.h:70
XL320_B_57600
@ XL320_B_57600
XL320 available baudrate : 57600.
Definition: dynamixel_protocol.h:33
XL320_BAUD_RATE
@ XL320_BAUD_RATE
Baud Rate of Dynamixel [RW] (default=3 ; min=0 ; max=3)
Definition: dynamixel_protocol.h:41
DXL_INST_WRITE
@ DXL_INST_WRITE
write data on the Device
Definition: dynamixel_protocol.h:78
xl320_register16_t
xl320_register16_t
Definition: dynamixel_protocol.h:61
XL320_CCW_ANGLE_LIMIT
@ XL320_CCW_ANGLE_LIMIT
counterclockwise Angle Limit [RW] (default=1023 ; min=0 ; max=1023)
Definition: dynamixel_protocol.h:64
dynamixel_intruction_t
dynamixel_intruction_t
Definition: dynamixel_protocol.h:75
XL320_PUNCH
@ XL320_PUNCH
Punch [RW] (default=32 ; min=0 ; max=1023)
Definition: dynamixel_protocol.h:72
XL320_TORQUE_ENABLE
@ XL320_TORQUE_ENABLE
Torque On/Off [RW] (default=0 ; min=0 ; max=1)
Definition: dynamixel_protocol.h:49
XL320_B_1000000
@ XL320_B_1000000
XL320 available baudrate : 1000000.
Definition: dynamixel_protocol.h:35
XL320_UPPER_LIMIT_VOLTAGE
@ XL320_UPPER_LIMIT_VOLTAGE
Upper Limit Voltage [RW] (default=90 ; min=50 ; max=250)
Definition: dynamixel_protocol.h:46
XL320_GOAL_VELOCITY
@ XL320_GOAL_VELOCITY
Goal Speed [RW] (min=0 ; max=2047)
Definition: dynamixel_protocol.h:67
DXL_INST_PING
@ DXL_INST_PING
checks if ID is associated to a Device
Definition: dynamixel_protocol.h:76
XL320_VERSION
@ XL320_VERSION
Information on the version of firmware [R].
Definition: dynamixel_protocol.h:39