I am having trouble moving the motor between two predefined positions using the attached code. The code is almost similar to the example 'read_write_x' . Changes have been made to have a void loop() instead of an while(1) loop inside void setup(), like the one used in the example. Even though the logic of operation is same, the motor does not move. I fail to see the reason.
Any help on this matter is appreciated.
Thanks in advance.
It is because you are resetting the index to "0" at the beginning of loop.
Since I do not have any device information from you, I'll assume that you are using OpenCM9.04 + DYNAMIXEL X series.
Control mode address is in EEPROM area that cannot be modified after enabling the Torque.
You should change the operating mode before enabling the Torque.
Yes i am using OpenCM9.04 and Dynamixel XL430-250T. I made modifications based on your suggestion but the motor still does not move based on loop. It goes to the initial position but fails to move to the secondary position.