<?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=8890" />

<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>2012-11-14T15:01:20+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=5&amp;t=8890</id>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-14T15:01:20+01:00</updated>
<published>2012-11-14T15:01:20+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36541#p36541</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36541#p36541"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36541#p36541"><![CDATA[
Hi Fritzoid,<br />The method you describe seems to have been used in earlier versions of DARwin, but in the latest CM730 firmware, and the latest DARwin software from Robotis, BULK_READ does appear to be an MX servo command, and there is no bulk read table in the CM730. <br />Take a look at the latest versions and see what you think.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Wed Nov 14, 2012 3:01 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Fritzoid]]></name></author>
<updated>2012-11-14T14:39:22+01:00</updated>
<published>2012-11-14T14:39:22+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36540#p36540</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36540#p36540"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36540#p36540"><![CDATA[
Bulk-read is NOT a servo command per se.  The CM730 maintains an internal table which includes the most recent position readings from the servos.  It keeps this table up-to-date by continuously polling the servos in the background.  This works for Darwin because the bus speed is so fast that the time constraint of issuing 20 read-data commands is minimal.  The bulk-read command allows you to read sections of this table from the CM730 memory.<br /><br />By the way, you can control what servo control table fields are maintained in the bulk-read table.  The current position is included by default but other fields like speed and load can be extracted.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=438">Fritzoid</a> — Wed Nov 14, 2012 2:39 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-14T12:39:26+01:00</updated>
<published>2012-11-14T12:39:26+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36537#p36537</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36537#p36537"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36537#p36537"><![CDATA[
In the latest CM730 application code the following instructions are defined:<br /><dl class="codebox"><dt>Code: </dt><dd><code>#define INST_PING           0x01<br />#define INST_READ           0x02<br />#define INST_WRITE          0x03<br />#define INST_REG_WRITE      0x04<br />#define INST_ACTION         0x05<br />#define INST_RESET          0x06<br />#define INST_DIGITAL_RESET  0x07<br />#define INST_SYSTEM_READ    0x0C<br />#define INST_SYSTEM_WRITE   0x0D<br />#define INST_SYNC_WRITE     0x83<br />#define INST_SYNC_REG_WRITE 0x84<br />#define INST_BULK_READ       0x92</code></dd></dl><br /><br />I think the additional SYSTEM and DIGITAL instructions are to do with firmware down load.<br />The SYNC REG write may be useful if you have a large number of servos.<br /><br />The format of the BULK_READ appears to be:<br /><br />Instruction:<br />0xFF First Sync<br />0xFF Second Sync<br />0xFE Broadcast Address<br />0x0A Packet length(Param + 2)<br />0x92 BULK_READ instruction<br />0x00 Parameter 0 = 0x00<br />0x02 Parameter 1 = Number of bytes to read from first device<br />0x01 Parameter 2 = ID of first device<br />0x24 Parameter 3 = Start address in control table for first device<br />0x02 Parameter 4 = Number of bytes to read from next device<br />0x02 Parameter 6 = ID of next device<br />0x24 Parameter 7 = Start address in control table for next device<br />.....<br />0x?? Checksum<br /><br />The lengths and addresses can be different for each ID, so you can read FSR, servo positions and IMU from CM730 in the same bulk read.<br /><br />The multiple replies are exactly the same as they would be for a normal read to those devices, and are returned in the order their id appears in the parameters. Special application software is needed to handle the multiple replies, I don't think it is supported in the existing DXL libraries, only in the DARwin code.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Wed Nov 14, 2012 12:39 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xevel]]></name></author>
<updated>2012-11-14T01:46:58+01:00</updated>
<published>2012-11-14T01:46:58+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36532#p36532</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36532#p36532"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36532#p36532"><![CDATA[
There is no documentation that I know of for BULK_READ. You can have a look at the source code for the CM-730 in the Darwin-OP source repository.<br /><br />Also, i-Bot talks a little about it here : <!-- m --><a class="postlink" href="http://robosavvy.com/forum/viewtopic.php?t=8859">http://robosavvy.com/forum/viewtopic.php?t=8859</a><!-- m --><br /><br />And some more stuff here : <!-- m --><a class="postlink" href="http://www.robotis.com/robotsource/6338">http://www.robotis.com/robotsource/6338</a><!-- m --><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2658">xevel</a> — Wed Nov 14, 2012 1:46 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[petercohen]]></name></author>
<updated>2012-11-14T01:31:09+01:00</updated>
<published>2012-11-14T01:31:09+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36531#p36531</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36531#p36531"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36531#p36531"><![CDATA[
<blockquote><div><cite>i-Bot wrote:</cite><br />In the DARwin code, the largest SYNC_WRITE appears to be writing 5 bytes (position and PID) to 20 servos [&lt; 143 bytes], so I would stick to 143 unless you can get Robotis to answer otherwise or try it yourself.<br /><br />If you want to read the position, then you would need to use BULK_READ on the MX servos, though this instruction is not available on the AX and RX servos.<br /></div></blockquote><br /><br />Could you please let me know where a description/example of BULK_READ is?  This is the first time I heard about it. Under Instruction Packet, there are only 7 instructions (PING, READ_DATA, WRITE_DATA, REG WRITE, ACTION, RESET, SYNC_WRITE). Thank you.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2821">petercohen</a> — Wed Nov 14, 2012 1:31 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xevel]]></name></author>
<updated>2012-11-13T15:51:35+01:00</updated>
<published>2012-11-13T15:51:35+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36523#p36523</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36523#p36523"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36523#p36523"><![CDATA[
If you only send position data, you have to send 3 bytes per servo (one for ID + 2 for Goal Position), plus the command header (7 bytes in all) and checksum (1byte). That means you can send it to at most 44 or 45 servos (45 servos gives a total of 143 bytes, but since in the example they say you can send data to 26 servos even if it's 27 that would give exactly 143 bytes).<br /><br />All this is, of course, if you want to limit yourself to only one command to write data to all your servos. you could send two or more consecutive SYNC_WRITE commands to write data to many more servos, up to the maximum of 253 (or 254, depends on your controller).<br /><br />That's for writing data to the servos, reading data is a whole other story. You can not both write and read with just one command. So the comment about being able to control only half the number of servos when you want the get data back from them misses the point.<br /><br />Please read at least the basics of the dynamixel protocol, this is fairly thoroughly explained here: <br /><!-- m --><a class="postlink" href="http://support.robotis.com/en/product/dynamixel/dxl_communication.htm">http://support.robotis.com/en/product/d ... cation.htm</a><!-- m --> and <!-- m --><a class="postlink" href="http://support.robotis.com/en/product/dynamixel/communication/dxl_instruction.htm">http://support.robotis.com/en/product/d ... uction.htm</a><!-- m --><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2658">xevel</a> — Tue Nov 13, 2012 3:51 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-13T15:45:58+01:00</updated>
<published>2012-11-13T15:45:58+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36522#p36522</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36522#p36522"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36522#p36522"><![CDATA[
In the DARwin code, the largest SYNC_WRITE appears to be writing 5 bytes (position and PID) to 20 servos [&lt; 143 bytes], so I would stick to 143 unless you can get Robotis to answer otherwise or try it yourself.<br /><br />If you want to read the position, then you would need to use BULK_READ on the MX servos, though this instruction is not available on the AX and RX servos.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Tue Nov 13, 2012 3:45 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[petercohen]]></name></author>
<updated>2012-11-13T15:07:40+01:00</updated>
<published>2012-11-13T15:07:40+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36521#p36521</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36521#p36521"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36521#p36521"><![CDATA[
<blockquote><div><cite>xevel wrote:</cite><br /><blockquote><div><cite>petercohen wrote:</cite><blockquote class="uncited"><div>Generally, in the event 1 command packet is 4 byte, 26 Dynamixel can be controlled simultaneously. Make sure that the length of packet does not to exceed 143 bytes since the volume of receiving buffer of RX-64 is 143 bytes.<br /></div></blockquote><br />This is also valid for other AX, RX and EX servos. I don't know if they use a bigger buffer for MX.</div></blockquote></div></blockquote><br /><br />I cannot find the buffer size for the MX. So, at least for the pre-MX motors, if I only send position data to each motor, I can control 26x2 Dynamixel simultaneously? However, if in addition I want to get back the angle data from the motors, I will again be able to control only 26 Dynamixel. Am I right? <br /><br />What is the practical maximum number of motors one could control via usb2dynamixel and robotis controllers, with and without angle data feedback for recording?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2821">petercohen</a> — Tue Nov 13, 2012 3:07 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-13T11:48:49+01:00</updated>
<published>2012-11-13T11:48:49+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36517#p36517</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36517#p36517"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36517#p36517"><![CDATA[
For general purpose write to the servos, I usually use the WRITE _DATA, it is more flexible, easier to use, and more robust. It is more robust because it can give you a status byte back.<br /><br />As Xevel said the advantages of the SYNC_WRITE are performance and synchronisation. These factors are especially important if you drive the Dynamixel bus from a PC, because each transaction has to pass through the operating system between your application and the Dyanmixel bus. These delays really add up over 18 or 20 servos, making a slow update rate and also adding a slew in the time each servo is updated. The control table places the slope(PID on MX servo) and the speed next to the goal position to help to use SYNC_WRITE.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Tue Nov 13, 2012 11:48 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xevel]]></name></author>
<updated>2012-11-13T11:26:37+01:00</updated>
<published>2012-11-13T11:26:37+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36516#p36516</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36516#p36516"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36516#p36516"><![CDATA[
<blockquote><div><cite>petercohen wrote:</cite><br />In practice, what are the advantages and disadvantages of using SyncWrite vs. calling dxl_write_word( DEFAULT_ID, P_GOAL_POSITION_L, GoalPos[index]) in a loop when we want to turn different motors at once? Is there a limitation on the number of motors?<br /></div></blockquote><br /><br />With SYNC_WRITE, you can send data to a lot of servos faster than with a loop of WRITE_DATA.<br />You also get the added bonus of having the data written simultaneously, as the name implies (iirc), or close enough to make no matter. With a loop of WRITE_DATA over a lot of servo, when the servos are configured to send back a status packet to acknowledge each command, a delay might get noticeable between when the first servo start moving and when the last one does. <br /><br />There is a limitation to the length of the packets : 143 bytes (see <!-- m --><a class="postlink" href="http://support.robotis.com/en/product/dynamixel/communication/dxl_instruction.htm">http://support.robotis.com/en/product/d ... uction.htm</a><!-- m -->):<br /><blockquote class="uncited"><div><br />Generally, in the event 1 command packet is 4 byte, 26 Dynamixel can be controlled simultaneously. Make sure that the length of packet does not to exceed 143 bytes since the volume of receiving buffer of RX-64 is 143 bytes.<br /></div></blockquote><br />This is also valid for other AX, RX and EX servos. I don't know if they use a bigger buffer for MX.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2658">xevel</a> — Tue Nov 13, 2012 11:26 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[petercohen]]></name></author>
<updated>2012-11-13T08:29:18+01:00</updated>
<published>2012-11-13T08:29:18+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36515#p36515</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36515#p36515"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36515#p36515"><![CDATA[
<blockquote><div><cite>i-Bot wrote:</cite><br />In example 5, 4 bytes are written to each servo...<br /></div></blockquote><br /><br />Thanks i-Bot for the explanations. <br /><br />In practice, what are the advantages and disadvantages of using SyncWrite vs. calling dxl_write_word( DEFAULT_ID, P_GOAL_POSITION_L, GoalPos[index]) in a loop when we want to turn different motors at once? Is there a limitation on the number of motors?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2821">petercohen</a> — Tue Nov 13, 2012 8:29 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-11T17:16:55+01:00</updated>
<published>2012-11-11T17:16:55+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36493#p36493</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36493#p36493"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36493#p36493"><![CDATA[
In example 5, 4 bytes are written to each servo.<br />The instruction bytes are:<br /><br />0xFF First Sync<br />0xFF Second sync<br />0xFE Broadcast address<br />0x18 Length<br />0x83 Sync Write Instruction<br />0x1E Address in control table to start writing<br />0x04 number of bytes to write in control table for each id <br />0x00 id of first servo<br />0x10 start of data bytes for first servo<br />..... etc.<br /><br />Number of parameters = (1[id] + 4[bytes per servo]) * 4(number of servos) + 2(start address and length) = 22 <br />Length = Number of parameters + 2 = 24 (0x18)<br />The length in the example is written with the dxl_set_txpacket_length(Length)<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Sun Nov 11, 2012 5:16 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[petercohen]]></name></author>
<updated>2012-11-11T14:32:56+01:00</updated>
<published>2012-11-11T14:32:56+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36489#p36489</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36489#p36489"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36489#p36489"><![CDATA[
<blockquote><div><cite>i-Bot wrote:</cite><br />Q3 dxl_set_txpacket_parameter(1, 2); means set parameter 1 to the value 2. In SYNC write this parameter is the number of control table entries to write, so wirites both P_GOAL_POSITION_L and P_GOAL_POSITION_H<br /><br />Q4 If NUM_actuator is 3, then the parameters are:<br />First parameter (0) = P_GOAL_POSITION_L<br />Second Parameter(1) = 2 bytes to send<br />Third Parameter(2) = First actuator ID<br />Fourth Paramater(3) = First actuator goal position low value<br />Fifth Parameter(4) = First actuator goal position high value<br />Sixth Parameter(5) = Second actuator ID<br />Seventh Paramater(6) = Second actuator goal position low value<br />Eighth Parameter(7) = Second actuator goal position high value<br />Ninth Parameter(8 ) = Third actuator ID<br />Tenth Paramater(9) = Third actuator goal position low value<br />Eleventh Parameter(10) = Third actuator goal position high value<br /><br />txpacket_length = number of parameters + 2 = 13<br /></div></blockquote><br /><br /><br />Thanks again i-Bot for the explanations. <br /><br />Do you mean by setting the second parameter of <br />dxl_set_txpacket_parameter as 2, for each motor id, write to both P_GOAL_POSITION_L and P_GOAL_POSITION_H as in parameters 3,4,6,7,9,10?<br /><br />In Kind of Instruction, there is an example on Sync Write (Example 5). In that example, the Instruction Packet is: 0xFF 0xFF 0xFE 0x18 0x83 0x1E 0x04...<br /><br />i) Due to 0x04, four bytes (2 for position and 2 for speed) are written for each motor. Am I right?<br /><br />ii) In that example, 0x83 is the length calculated by (L+1)XN+4. Why this length parameter is not required when setting up the packet in the C++ program fragment I posted?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2821">petercohen</a> — Sun Nov 11, 2012 2:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2012-11-11T11:53:26+01:00</updated>
<published>2012-11-11T11:53:26+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36486#p36486</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36486#p36486"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36486#p36486"><![CDATA[
I don't use this library, but based on other Robotis similar code.<br /><br />Q1 dxl_txrx_packet(); will send the two 0xff sync bytes and then transmit the packet based on the values set with dxl_set_packet_... . It will then send a valid checksum and wait for the reply back. The dxl_set_txpacket_length is used to set the length based on the number of parameters and is used by the tx routine. Make sure you understand the parameter layout specific to the SyncWrite.<br />I don't know why the example uses dxl_txrx_packet(); when no packet will be returned from a broadcast, so dxl_tx_packet(); could be used.<br /><br />Q2 Checksum is calculated and sent automatically<br /><br />Q3 dxl_set_txpacket_parameter(1, 2); means set parameter 1 to the value 2. In SYNC write this parameter is the number of control table entries to write, so wirites both P_GOAL_POSITION_L and P_GOAL_POSITION_H<br /><br />Q4 If NUM_actuator is 3, then the parameters are:<br />First parameter (0) = P_GOAL_POSITION_L<br />Second Parameter(1) = 2 bytes to send<br />Third Parameter(2) = First actuator ID<br />Fourth Paramater(3) = First actuator goal position low value<br />Fifth Parameter(4) = First actuator goal position high value<br />Sixth Parameter(5) = Second actuator ID<br />Seventh Paramater(6) = Second actuator goal position low value<br />Eighth Parameter(7) = Second actuator goal position high value<br />Ninth Parameter(8 ) = Third actuator ID<br />Tenth Paramater(9) = Third actuator goal position low value<br />Eleventh Parameter(10) = Third actuator goal position high value<br /><br />txpacket_length = number of parameters + 2 = 13<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Sun Nov 11, 2012 11:53 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[petercohen]]></name></author>
<updated>2012-11-11T07:18:51+01:00</updated>
<published>2012-11-11T07:18:51+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36484#p36484</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36484#p36484"/>
<title type="html"><![CDATA[Questions about Sync Write example]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=8890&amp;p=36484#p36484"><![CDATA[
Hello, I have some questions about the SyncWrite C++ example given in:<br />e-Manual Software Help &gt; Dynamixel SDK &gt; USB2Dynamixel &gt; Windows <br />DXL_SDK_Win64_v1_02.zip. For your convenience, I am posting the code fragment. <br /><br />In example/visual c++/SyncWrite/SyncWrite.cpp, they have:<br /><br />do<br />{<br />// Make syncwrite packet<br />  dxl_set_txpacket_id(BROADCAST_ID);<br />  dxl_set_txpacket_instruction(INST_SYNC_WRITE);<br />  dxl_set_txpacket_parameter(0, P_GOAL_POSITION_L);<br />  dxl_set_txpacket_parameter(1, 2);<br />  for( i=0; i &lt; NUM_ACTUATOR; i++ )<br />  {<br />    dxl_set_txpacket_parameter(2+3*i, id[i]);<br />    GoalPos = (int)((sin(theta+phase[i]) + 1.0) * (double)AmpPos);<br />    printf( &quot;%d  &quot;, GoalPos );<br />    dxl_set_txpacket_parameter(2+3*i+1, dxl_get_lowbyte(GoalPos));<br />    dxl_set_txpacket_parameter(2+3*i+2, dxl_get_highbyte(GoalPos));<br />  }<br /><br />  dxl_set_txpacket_length((2+1)*NUM_ACTUATOR+4);<br />  printf( &quot;\n&quot; );<br />  dxl_txrx_packet();<br />:<br />:<br /><br /><br />Q1: It seems that after setting up the id, instruction and parameters 0 to 10, one only needs to call dxl_txrx_packet() to send the entire packet to the motors. Am I right?<br /><br />Q2: In Dynamixel/Communication/Instruction/Status Packet, one has to include the Checksum at the end of the packet. Why it is not necessary in this case?<br /><br />Q3:  What does dxl_set_txpacket_parameter(1, 2); mean? I do not understand what the 2 represents.<br /><br />Q4: Here, the txpacket_length is 13 if NUM_ACTUATOR is 3. The reason is that id + instruction + 11 parameters. Am I right? This txpacket length seems to be different from the LENGTH (length of packet) listed under Instruction Packet. I am a bit confused. Could anybody please clarify?<br /><br />Thanks.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2821">petercohen</a> — Sun Nov 11, 2012 7:18 am</p><hr />
]]></content>
</entry>
</feed>