Home e-Manual

Trouble with Sync Write

Use the following template to help create your post:

  1. What model of servo are you using?
    MX-28 (also tested with MX-106’s with same result)

  2. Describe your control environment. This includes the controller or interface, and any power source.
    U2D2 with power direct from variable power supply

  3. Specify the operating mode for applicable models, and any firmware settings you are using.
    Ubuntu 18.04.5, Dynamixel SDK 3.7.31, Python 2.7.17

  4. Include pictures if possible.

  5. Include a full description of the issue.
    The “ping.py”, “read_write.py”, and “multi_port.py” scripts in DynamixelSDK-3.7.31/python/tests/protocol1_0/ work great after I change baud rate, IDs, and control table addresses to match my setup. When I try to run “sync_write.py”, I get the following:

Succeeded to open the port
Succeeded to change the baudrate
Dynamixel#1 has been successfully connected
Dynamixel#2 has been successfully connected
Press any key to continue! (or press ESC to quit!)
[ID:001] groupSyncWrite addparam failed

I haven’t edited the addparam lines at all. It should be sending the motors to same goal positions as in the read_write.py example, so not sure what could be the issue. Thanks in advance for any help.

Hi @sudoSurf,

Thank you for your post, and welcome to our Community page! Based on the information you’ve shared, allow me to confirm some details:

  1. Can you confirm whether your DYNAMIXEL MX-series models are using the default firmware (with Protocol “1.0”) or the updated “2.0” firmware? MX-series models may be upgraded to an updated “2.0” firmware using ROBOTIS software, which may affect which example code is recommended.

  2. Have you confirmed whether the control table addresses for Goal Position and Present Position match your current firmware version?

I’ll also tag @Yogurt_Man and @willson, for any suggestions they may be able to provide.

Thanks Andrew, actually I solved it just now!

Line 137 of sync_write.py converts the goal position into a 4 byte message. My MX-28s require a 2 byte length message. I changed Line 137 to:

param_goal_position = [DXL_LOBYTE(dxl_goal_position[index]), DXL_HIBYTE(dxl_goal_position[index])]

FYI. Yes, Protocol 1.0, and confirmed the proper control table addresses by running the read_write.py script with no errors.

1 Like

Hi

I tested the Protocol 1.0 example, and there is a uncertain bug with addParam

What I am doubting for code is, the example code for Protocol 1.0 is designed for DYNAMIXEL Protocol 2.0, but 1.0 (Not sure…)

But When I used the Protocol 2.0’s example, it works perfect.

I will report this issue and request to fix it. In the mean time, I recommend using the Protocol 2.0 (Honestly, the Protocol 2.0 has more advantages rather than using Protocol 1.0)

You can switch Protocol 1.0 to Protocol 2.0 by performing the Firmware Recovery.

  • The latest released DYNAMIXEL SDK is 3.7.51
    Make sure to use the latest released version.

@sudoSurf
Thank you for reporting the issue :+1:
The Python code will be updated next week.

@sudoSurf,

Thanks for your response and for letting us know what resolved the issue for you! Glad to hear you’ve been able to get the models working, and it looks like the example code should be planned for update soon. Please let us know if you have any other questions we can help with!