<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=5&amp;t=3377" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2009-03-01T15:55:11+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=5&amp;t=3377</id>
<entry>
<author><name><![CDATA[Starlight]]></name></author>
<updated>2009-03-01T15:55:11+01:00</updated>
<published>2009-03-01T15:55:11+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19304#p19304</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19304#p19304"/>
<title type="html"><![CDATA[Programming for AX-12]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19304#p19304"><![CDATA[
Hi all. I have another question about the time delay of programming. As I know that Ax-12 have the feedback position, so how can I using this kind of method? let say I have movement1 and movement2. after the execution of movement1, wait for about 2 second, the movement2 are execute. So how we write this kind of programming using the feedback position of movement1, confirm the position of movement1(executed), then execute movement2 ? Thanks.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1192">Starlight</a> — Sun Mar 01, 2009 3:55 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Starlight]]></name></author>
<updated>2009-02-28T08:01:19+01:00</updated>
<published>2009-02-28T08:01:19+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19290#p19290</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19290#p19290"/>
<title type="html"><![CDATA[Programming for AX-12]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19290#p19290"><![CDATA[
<blockquote class="uncited"><div><br />uint8_t packetchecksum;<br /><br />void packet_start(uint8_t id, uint8_t length) {<br />   checksum = id + length;<br />   uart_send(0xff);<br />   uart_send(0xff);<br />   uart_send(id);<br />   uart_send(length);<br />}<br /><br />void packet_data(uint8_t *data, uint8_t length) {<br />   uint8_t count = length;<br />   uint8_t *ptr = data;<br />   while (count--) {<br />      uart_send(*ptr);<br />      checksum += *ptr;<br />      ptr++;<br />   }<br />}<br /><br />void packet_end(void) {<br />   uart_send(~checksum);<br />}<br /><br />void send_ping(uint8_t id) {<br />   packet_start(id, PING_LENGTH);<br />   packet_data(PING_DATA, PING_DATALENGTH);<br />   packet_end();<br />}<br /></div></blockquote><br /><br />is that the above code controlling 1 dynamixel ? I wanna control up to 14 dynamixel on the same time for sync write. from the user manual page 23, there is more like instruction(0x83), ID(0xfe), .etc.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1192">Starlight</a> — Sat Feb 28, 2009 8:01 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Starlight]]></name></author>
<updated>2009-02-28T07:51:40+01:00</updated>
<published>2009-02-28T07:51:40+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19289#p19289</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19289#p19289"/>
<title type="html"><![CDATA[Programming for AX-12]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19289#p19289"><![CDATA[
Hi. May I ask how to implementing a continuously rotating wheel ? from the manual, it state that set the CW and CCW angle limit to 0. then set the Goal Speed. <br /><br />uart_send(0xff);<br />uart_send(0xff);<br />uart_send(0x0d);//ID<br />uart_send(0x07);//length<br />uart_send(0x03);//write_data<br />uart_send(0x06);//starting address: CW angle limit<br />uart_send(0x00);//CW angle limit<br />uart_send(0x00);<br />uart_send(0x00);//CCW angle limit<br />uart_send(0x00);<br />uart_send(0xe9);//checksum<br /><br />~~waiting for transmit <br /><br /><br />uart_send(0xff);<br />uart_send(0xff);<br />uart_send(0x0d);//ID<br />uart_send(0x05);//length<br />uart_send(0x03);//write data<br />uart_send(0x20);//starting address: moving speed<br />uart_send(0x50);<br />uart_send(0x01);<br />uart_send(0x79);//checksum<br /><br />while(TXSTAbits.TRMT==0);<br /><br />LATCbits.LATC0 =1;<br /><br />So the above code is the correct one?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1192">Starlight</a> — Sat Feb 28, 2009 7:51 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[StuartL]]></name></author>
<updated>2009-02-27T22:14:19+01:00</updated>
<published>2009-02-27T22:14:19+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19284#p19284</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19284#p19284"/>
<title type="html"><![CDATA[Re: Programming for AX-12]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19284#p19284"><![CDATA[
<blockquote><div><cite>Starlight wrote:</cite><br />Or have anyone came out with better method for controlling up to 14 number of dynamixel without wasting lots of time in calculating the checksum and reduce the line of programming ?<br /></div></blockquote><br /><br />The way we do it in libbioloid (check out the other threads on this) is to have a function to send the start of a packet, a function to send packet data and a function to send the end of a packet.<br /><br />The logic goes something like this:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>uint8_t packetchecksum;<br /><br />void packet_start&#40;uint8_t id, uint8_t length&#41; &#123;<br />   checksum = id + length;<br />   uart_send&#40;0xff&#41;;<br />   uart_send&#40;0xff&#41;;<br />   uart_send&#40;id&#41;;<br />   uart_send&#40;length&#41;;<br />&#125;<br /><br />void packet_data&#40;uint8_t *data, uint8_t length&#41; &#123;<br />   uint8_t count = length;<br />   uint8_t *ptr = data;<br />   while &#40;count--&#41; &#123;<br />      uart_send&#40;*ptr&#41;;<br />      checksum += *ptr;<br />      ptr++;<br />   &#125;<br />&#125;<br /><br />void packet_end&#40;void&#41; &#123;<br />   uart_send&#40;~checksum&#41;;<br />&#125;<br /><br />void send_ping&#40;uint8_t id&#41; &#123;<br />   packet_start&#40;id, PING_LENGTH&#41;;<br />   packet_data&#40;PING_DATA, PING_DATALENGTH&#41;;<br />   packet_end&#40;&#41;;<br />&#125;<br /></code></dd></dl><br /><br />Please don't use the code above as-is without sanity checking it, it's written off the top of my head and probably has many bugs.  It's more to illustrate a point <img src="http://forum.robosavvy.com/images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=645">StuartL</a> — Fri Feb 27, 2009 10:14 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Starlight]]></name></author>
<updated>2009-02-27T09:44:47+01:00</updated>
<published>2009-02-27T09:44:47+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19278#p19278</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19278#p19278"/>
<title type="html"><![CDATA[Programming for AX-12]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3377&amp;p=19278#p19278"><![CDATA[
Hi all. currently I'm writing moving position for sync write. I'm using PIC18F4550, and for single dynamixel, it perform well. By the way, I wanna control up to 14 number of  dynamixel, so it will waste a lots of time to calculate the checksum. So I came up with the following code:<br />(control only 2 number of dynamixel)<br /><br />*******MOVING POSITION (SYNC WRITE)***********<br />uart_send(0xFF);<br />uart_send(0xFF);<br />uart_send(0xFE);<br />uart_send(0x0E);//LENGTH = (L+1)*N+4<br />uart_send(0x83);<br />uart_send(0x1E);//goal position<br />uart_send(0x04);//length of data to be written (1 dynamixel)<br />sendSW(1,0x0010,0x0150);<br />checksum_1 = sendSW (1,0x0010,0x0150);<br />sendSW(2,0x0220,0x0360);<br />checksum_2 = sendSW (2,0x0220,0x0360);<br />t_checksum = checksum_1 + checksum_2;<br />uart_send(0x4E+t_checksum);//total checksum<br /><br />char sendSW (char id, int pos, int speed)<br />{<br />uart_send(id);//ID<br />uart_send((char)pos);<br />uart_send((char)(pos&gt;&gt;8));<br />uart_send((char)speed);//Moving Speed<br />uart_send((char)(speed&gt;&gt;8));<br />return(~(char)(id+(char)pos+(char)(pos&gt;&gt;8)+(char)speed+(char)(speed&gt;&gt;8)));//checksum<br />}<br /><br />But it seem not exactly corret, is there any error or mistake in calculating the return value of checksum ?<br /><br />Or have anyone came out with better method for controlling up to 14 number of dynamixel without wasting lots of time in calculating the checksum and reduce the line of programming ? <br /><br />Thanks !<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1192">Starlight</a> — Fri Feb 27, 2009 9:44 am</p><hr />
]]></content>
</entry>
</feed>