by JonHylands » Tue Jan 09, 2007 6:35 pm
by JonHylands
Tue Jan 09, 2007 6:35 pm
From what I've seen, the CM-5 is limited to 57,600 in communications with the PC.
If you are updating 18 servos, using the sync_write command, with just position (2 bytes per servo), you're looking at 3 bytes per servo plus 7 bytes overhead, which is 43 bytes total. You get 6 bytes back, so you're looking at (roughly) 50 bytes per cycle, or 500 bits.
If you weren't interested in any feedback, you could theoretically do 100 frames per second, although in reality there is a delay between sending and receiving.
However, there is no sync-read command, so you're stuck reading the bytes from each servo, one at a time. A read instruction is 8 bytes down, and you would get back 6 bytes plus the number of bytes you're reading from that servo. If all you wanted was position, that would be 8. If you want position and torque, you need to read speed as well, so you're up to 12 bytes total response.
Assuming the latter, you're looking at 20 bytes per servo, which is 360 bytes for all 18.
So, the total is now 410 bytes per cycle, which is 4100 bits (roughly). You're down to 10 frames per second, which is still doable, but slow.
Note that this analysis is based on the assumption that the CM-5 does nothing to the bytes you send and receive, which may not be the case.
All this is why I am developing a wifi link to the Bioloid. That will give me a straight-through link at 1.0 Mbps to the bus from my PC, for about $200 in hardware.
- Jon
From what I've seen, the CM-5 is limited to 57,600 in communications with the PC.
If you are updating 18 servos, using the sync_write command, with just position (2 bytes per servo), you're looking at 3 bytes per servo plus 7 bytes overhead, which is 43 bytes total. You get 6 bytes back, so you're looking at (roughly) 50 bytes per cycle, or 500 bits.
If you weren't interested in any feedback, you could theoretically do 100 frames per second, although in reality there is a delay between sending and receiving.
However, there is no sync-read command, so you're stuck reading the bytes from each servo, one at a time. A read instruction is 8 bytes down, and you would get back 6 bytes plus the number of bytes you're reading from that servo. If all you wanted was position, that would be 8. If you want position and torque, you need to read speed as well, so you're up to 12 bytes total response.
Assuming the latter, you're looking at 20 bytes per servo, which is 360 bytes for all 18.
So, the total is now 410 bytes per cycle, which is 4100 bits (roughly). You're down to 10 frames per second, which is still doable, but slow.
Note that this analysis is based on the assumption that the CM-5 does nothing to the bytes you send and receive, which may not be the case.
All this is why I am developing a wifi link to the Bioloid. That will give me a straight-through link at 1.0 Mbps to the bus from my PC, for about $200 in hardware.
- Jon