Arduino sync_read_write_position example cannot read present position

Issue:

I connected XW540, MX-28 to OpenCR and tried to run the sync_read_write_position example in the Arduino Dynamixel2Arduino library as it is.
Positon control using syncRead works well.
However, only one Dynamixel’s position is read, or both of them does not work, as shown in the following output.
Is there a way to read the positions of two consecutively position-controlled Dynamixels?

Sync Instruction Test : 436
[SyncWrite] Success
ID: 1
Goal Position: 1024
ID: 2
Goal Position: 1024

[SyncRead] Success, Received ID Count: 1
ID: 1, Error: 0
Present Position: 1030

Sync Instruction Test : 437
[SyncWrite] Success
ID: 1
Goal Position: 2048
ID: 2
Goal Position: 2048

[SyncRead] Success, Received ID Count: 1
ID: 1, Error: 0
Present Position: 2043


DYNAMIXEL Servo:

XW540, MX-28


DYNAMIXEL Controller:

OpenCR


Software Interface:

Arduino

In the past I had problems with that example sketch too. I had to go back to an earlier approach (now deprecated) but you still can use it. See post below.

Hopefully it can work better for you.

Previously, I connected the MX-28 directly to OpenCR’s 3Pin connector (TTL).
So I think syncRead was not working properly because the XW540 is RS485 and the MX-28 is TTL.

After connecting the MX-28 through DYNAMIXEL Communication Bridge, syncRead works fine.

That is good to know. Thanks for sharing.