Hello
I have programmed the xc40 to move in wheel mode and it does but I wanted to see how should I make it go anticlockwise
The direction of movement can be changed by changing between positive and negative goal velocity values, or by changing the Drive mode.
So we don’t need to make the tenth byte 0 or 1
That method is for the old AX-12/18.
So what method should I use for the XC430
Use the one that @Jonathon mentioned previously, i.e. Goal Velocity (which can be positive and negative values).
Watch out for Velocity Limit (Add 44) also, it has a default limit
When you set Goal Velocity’s absolute value higher than Velocity Limit, the wheel just will not move at all (but the actuator is still OK).
I’ve tried to give it negative numbers but it doesn’t move when I give it negative numbers
As you khow hex code can’t be negative
In the dynamixel wisard when I give the velocity 1 the packet is 0x100000
But when I give it -1 the packet is 0xffffffB0 and for ax 12 for -1 the packet is 0xffB0
I am uncertain about what you are trying to do here - probably over-complicating things?
Which Dynamixel Wizard version are you using? Are you trying to prepare and send your own DXL packet? Or are you trying to use Dynamixel Wizard 2? (or through the DXL SDK?).
I do not have an XC-430, but I do have some XL-430s which are designed the same way.
I am using the Dynamixel Wizard 2 on my servo with ID=11:
First, make sure I got it set to Velocity Control Mode (Addr. 11):
Please note that my Velocity Limit (Add 44) is set at 250.
Then, I sent it a +200 Goal Velocity to Addr. 104
Then I sent in -200 to Addr. 104
Then I switched to the Packet Option and sent in -200 packet and then +200 packet
Then 0 packet to turn off the servo
And I did not have any problem with either approach.
Yes that’s on dynamixel wisard but in Arduino we can’t do that because hex code can’t be negative
If you are using Arduino, then are you aware of the ROBOTIS library named “Dynamixel2Arduino”?
This library has functions that take care of the number conversion and other communication tasks for you. For example you can use Function setOperatingMode() to set your servo to Velocity Control mode, and then setGoalVelocity() to set positive or negative values as needed. No need to worry about hex packets.
What kind of Arduino board are you using? You will need the “Dynamixel” shields also. They are two types of DXL Shield available depending on the format of your Arduino board.
If you really want to stay with sending raw packets, your other post already showed you the way at this link
I found that this web site is very helpful for converting signed decimal to hex
There is one more possible issue that I am wondering about is “Little Endian” vs “Big Endian” format.
Dynamixel Wizard sent this packet out for +200 (i.e. 00 00 00 C8)
and it sent this packet out for -200 (i.e. FF FF FF 38)
It looks like “Little Endian” format to me.
Thank you for your reply
I will test it