
mtiberia
Today is the first time I really had a chance to play with the EZB-4.
I've connected a Dynamixel servos and had mixed results.
The resolution is 0 to 170 but the servos are unresponsive from 81 to 89 for some reason.
I tried communicating with the servos with EZ script using UART 2 with no luck.
I'm using the communication protocol for the servos.
This works with Python through a serial connection.
UARTInit(0,1,1000000)
$AX_Write_Data=3 #Dynamixel Instruction Code
$AX_ID=14 #Servo ID
$length=7
$table=30 #this is the entry code for setting the goal position of the servo
$position=100 #set goal position for servo
$speed=20 #set the speed of the servo
$MSB=Round($position/256,0)
$LSB=$position%256
$MSB2=Round($Speed/256,0)
$LSB2=$Speed%256
$checksum= 255-(($AX_ID+$length+$AX_Write_Data+$table+$MSB+$LSB+$MSB2+$LSB2)%256)
$handshake=GetAsByte(255)
$AX_ID=GetAsByte(14)
$length=GetAsByte(5)
$AX_Write_Data=GetAsByte($AX_Write_Data)
$table=GetAsByte($table)
$LSB=GetAsByte($LSB)
$MSB=GetAsByte($MSB)
$LSB2=GetAsByte($LSB2)
$MSB2=GetAsByte($MSB2)
$checksum=GetAsByte($checksum)
UARTWrite(0,1,$handshake)
UARTWrite(0,1,$handshake)
UARTWrite(0,1,$AX_ID)
UARTWrite(0,1,$AX_Write_Data)
UARTWrite(0,1,$table)
UARTWrite(0,1,$LSB)
UARTWrite(0,1,$MSB)
UARTWrite(0,1,$LSB2)
UARTWrite(0,1,$MSB2)
UARTWrite(0,1,$checksum)
Thanks
I should be able to communicate with the servos through the EZ script,
what I'm I doing wrong?
I'm unsure of what you mean by not being able to move to positions outside of 81-89? Can you clarify and I'll help you. It works with our servos, but they are standard and have the factory settings still. Perhaps you need to reset yours?
it stops responding until position 90 is indicated. The servo then becomes responsive again all the way to 170.
As for your code, it appears you are using UART 0 and not UART 2.
It really would cool if it would.
As for the dynamixel, I did notice there was an occasional checksum calculation error in the old ARC. It is fixed in the new one. Download the new one from here: ARC release
As you can see, I initialize UART 2 at 9600. I then write the word "Banana" to UART2 on every loop. The Dynamixels work great
Code:
Now I don't want to be a pain in the butt.
The torque release and enable for the dynamixel is instruction code 24.
To have the servo send it's present position is instruction code 36 but you would have to receive data from the servo from UART port D6.
Thanks DJ
As for Torque Release, I will add that for you
We also have support for the XL-320's - but that hasn't been added yet. Maybe i'll do that tonight or tomorrow.
Thanks