How to call multi motors with Dynamixel Shield by using the positon mode and how to control the motor velocity?



Issue Description

I am using AX-12A motors and I have some questions:

  1. From the example code of “position mode”, the way to define single motor is “const uint8_t DXL_ID = 1;” so how should I define multi motors in this situation?
    I have solved the question by using code below, I am wondering if that the best way to call the motor?

const uint8_t DXL_FIRST_ID = 1;
const uint8_t DXL_SECONDARY_ID = 2;
const uint8_t DXL_THIRD_ID = 3;

  1. Can I ask how to control the motor rotation speed in the position mode?
  1. Yes, this is my personal recommendation for the best way to assign your DYNAMIXEL IDs.
  2. Rotation speed can be adjusted using the Moving Speed (32) control table item.

Thank you!

But can I ask the exact command for setting the velocity ?

The exact command will vary depending on your specific DYNAMIXEL control solution.

Since you mentioned the DYNAMIXEL Shield in your post title, I would recommend taking a look at the DYNAMIXEL Shield API documentation available on our eManual. The writeControlTableItem() function will allow you to modify any control table item available on your DYNAMIXEL actuator.

Hi Jonathon,

Your advice is really helpful! I will have a try later today! Before I start, there is two things I would like to confirm with you:

  1. I will use the following command to adjust the motor rotate speed:‘dxl.writeControlTable(MOVING_SPEED, DXL_ID, 0)’, is this one correct?
  2. There are two modes in the ‘AX-12A Moving Speed’ control table description. Joint and Wheel. How should I define which mode I am using?


  1. The format of the command is correct
  2. The DYNAMIXEL will interpret the Moving Speed according to which operating mode you are currently using. You do not need to define it additionally for this control table item.