Loading...
Searching...
No Matches
dynamixel_protocol.h File Reference

Dynamixel protocol definitions. More...

Detailed Description

Dynamixel protocol definitions.

Author
Loïc Dauphin loic..nosp@m.daup.nosp@m.hin@i.nosp@m.nria.nosp@m..fr

Definition in file dynamixel_protocol.h.

#include <stdint.h>
+ Include dependency graph for dynamixel_protocol.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define DXL_HEADER   ((uint8_t[]){0xFF,0xFF,0xFD})
 
enum  xl320_baudrate_t { XL320_B_9600 = 0 , XL320_B_57600 = 1 , XL320_B_115200 = 2 , XL320_B_1000000 = 3 }
 
enum  xl320_register8_t {
  XL320_VERSION = 2 , XL320_ID = 3 , XL320_BAUD_RATE = 4 , XL320_RETURN_DELAY_TIME = 5 ,
  XL320_CONTROL_MODE = 11 , XL320_LIMIT_TEMPERATURE = 12 , XL320_LOWER_LIMIT_VOLTAGE = 13 , XL320_UPPER_LIMIT_VOLTAGE = 14 ,
  XL320_RETURN_LEVEL = 17 , XL320_ALARM_SHUTDOWN = 18 , XL320_TORQUE_ENABLE = 24 , XL320_LED = 25 ,
  XL320_D_GAIN = 27 , XL320_I_GAIN = 28 , XL320_P_GAIN = 29 , XL320_PRESENT_VOLTAGE = 45 ,
  XL320_PRESENT_TEMPERATURE = 46 , XL320_REGISTERED_INST = 47 , XL320_MOVING = 49 , XL320_ERROR = 50
}
 
enum  xl320_register16_t {
  XL320_MODEL_NUMBER = 0 , XL320_CW_ANGLE_LIMIT = 6 , XL320_CCW_ANGLE_LIMIT = 8 , XL320_MAX_TORQUE = 15 ,
  XL320_GOAL_POSITION = 30 , XL320_GOAL_VELOCITY = 32 , XL320_GOAL_TORQUE = 35 , XL320_PRESENT_POSITION = 37 ,
  XL320_PRESENT_SPEED = 39 , XL320_PRESENT_LOAD = 41 , XL320_PUNCH = 51
}
 
enum  dynamixel_intruction_t {
  DXL_INST_PING = 0x01 , DXL_INST_READ = 0x02 , DXL_INST_WRITE = 0x03 , DXL_INST_REG_WRITE = 0x04 ,
  DXL_INST_ACTION = 0x05 , DXL_INST_FACTORY_RESET = 0x06 , DXL_INST_REBOOT = 0x08 , DXL_INST_STATUS = 0x55 ,
  DXL_INST_SYNC_READ = 0x82 , DXL_INST_SYNC_WRITE = 0x83 , DXL_INST_BULK_READ = 0x92 , DXL_INST_BULK_WRITE = 0x93
}
 

Macro Definition Documentation

◆ DXL_HEADER

#define DXL_HEADER   ((uint8_t[]){0xFF,0xFF,0xFD})

Definition at line 29 of file dynamixel_protocol.h.

Enumeration Type Documentation

◆ dynamixel_intruction_t

Enumerator
DXL_INST_PING 

checks if ID is associated to a Device

DXL_INST_READ 

read data from the Device

DXL_INST_WRITE 

write data on the Device

DXL_INST_REG_WRITE 

registers the write instruction to a standby status

DXL_INST_ACTION 

executes the write instruction previously registered

DXL_INST_FACTORY_RESET 

resets the Control Table to its initial factory default settings

DXL_INST_REBOOT 

reboot the Device

DXL_INST_STATUS 

Return Instruction for the Instruction Packet.

DXL_INST_SYNC_READ 

(Multiple devices) read data with same Address and length at once

DXL_INST_SYNC_WRITE 

(Multiple devices) write data on the same Address and length at once

DXL_INST_BULK_READ 

(Multiple devices) read data from different Addresses and lengths at once

DXL_INST_BULK_WRITE 

(Multiple devices) write data on different Addresses and lengths at once

Definition at line 75 of file dynamixel_protocol.h.

◆ xl320_baudrate_t

Enumerator
XL320_B_9600 

XL320 available baudrate : 9600.

XL320_B_57600 

XL320 available baudrate : 57600.

XL320_B_115200 

XL320 available baudrate : 115200.

XL320_B_1000000 

XL320 available baudrate : 1000000.

Definition at line 31 of file dynamixel_protocol.h.

◆ xl320_register16_t

Enumerator
XL320_MODEL_NUMBER 

Model number [R] (default=350)

XL320_CW_ANGLE_LIMIT 

clockwise Angle Limit [RW] (default=0 ; min=0 ; max=1023)

XL320_CCW_ANGLE_LIMIT 

counterclockwise Angle Limit [RW] (default=1023 ; min=0 ; max=1023)

XL320_MAX_TORQUE 

Lowest byte of Max.

Torque [RW] (default=1023 ; min=0 ; max=1023)

XL320_GOAL_POSITION 

Goal Position [RW] (min=0 ; max=1023)

XL320_GOAL_VELOCITY 

Goal Speed [RW] (min=0 ; max=2047)

XL320_GOAL_TORQUE 

Goal Torque [RW] (min=0 ; max=1023)

XL320_PRESENT_POSITION 

Current Position [R].

XL320_PRESENT_SPEED 

Current Speed [R].

XL320_PRESENT_LOAD 

Current Load [R].

XL320_PUNCH 

Punch [RW] (default=32 ; min=0 ; max=1023)

Definition at line 61 of file dynamixel_protocol.h.

◆ xl320_register8_t

Enumerator
XL320_VERSION 

Information on the version of firmware [R].

XL320_ID 

ID of Dynamixel [RW] (default=1 ; min=0 ; max=252)

XL320_BAUD_RATE 

Baud Rate of Dynamixel [RW] (default=3 ; min=0 ; max=3)

XL320_RETURN_DELAY_TIME 

Return Delay Time [RW] (default=250 ; min=0 ; max=254)

XL320_CONTROL_MODE 

Control Mode [RW] (default=2 ; min=1 ; max=2)

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_UPPER_LIMIT_VOLTAGE 

Upper Limit Voltage [RW] (default=90 ; min=50 ; max=250)

XL320_RETURN_LEVEL 

Return Level [RW] (default=2 ; min=0 ; max=2)

XL320_ALARM_SHUTDOWN 

Shutdown for Alarm [RW] (default=3 ; min=0 ; max=7)

XL320_TORQUE_ENABLE 

Torque On/Off [RW] (default=0 ; min=0 ; max=1)

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_I_GAIN 

I Gain [RW] (default=0 ; min=0 ; max=254)

XL320_P_GAIN 

P Gain [RW] (default=32 ; min=0 ; max=254)

XL320_PRESENT_VOLTAGE 

Current Voltage [R].

XL320_PRESENT_TEMPERATURE 

Present temperature [R].

XL320_REGISTERED_INST 

Registered Instruction [R] (default=0)

XL320_MOVING 

Moving [R] (default=0)

XL320_ERROR 

Hardware error status [R] (default=0)

Definition at line 38 of file dynamixel_protocol.h.