<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40" xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1354066715;
mso-list-type:hybrid;
mso-list-template-ids:1592144512 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal">Hi Etherlab-dev.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">During development and testing of the Etherlab EtherCAT C master I found a minor bug which has been fixed in our version.
<o:p></o:p></p>
<p class="MsoNormal">I tested with version 1.5-pre and the new 1.5.2.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Bug description :<o:p></o:p></p>
<p class="MsoNormal">When the C master adds slaves to a domain there is a problem with LRD/LWR/LRW assignment if the last slave alone expands to a new EtherCAT telegram because the first one is full.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Example:<o:p></o:p></p>
<p class="MsoNormal">We have a slave that has 284 bytes inputs and 264 bytes output<o:p></o:p></p>
<p><b><span style="font-family:"Calibri","sans-serif"">BAD SETUP: (6 slaves, 284 byte WRITE, 264 READ)<o:p></o:p></span></b></p>
<p><span style="font-family:"Calibri","sans-serif"">SLAVE READ DOMAIN<br>
Feb 27 09:37:06 kernel: [ 2560.537230] EtherCAT 0: Domain1: Logical address 0x00000006, 1704 byte, expected working counter 6.<br>
Feb 27 09:37:06 kernel: [ 2560.537256] EtherCAT 0: Datagram domain1-6: Logical offset 0x00000006, 1420 byte, type LRD. <-- (first 5 slaves 284*5 = 1420, READ)<br>
Feb 27 09:37:06 kernel: [ 2560.537280] EtherCAT 0: Datagram domain1-1426: Logical offset 0x00000592, 284 byte, type LRD. <-- (last slave, READ)<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif"">SLAVE WRITE DOMAIN<br>
Feb 27 09:37:06 kernel: [ 2560.537325] EtherCAT 0: Domain2: Logical address 0x000006ae, 1584 byte, expected working counter 6.<br>
Feb 27 09:37:06 kernel: [ 2560.537351] EtherCAT 0: Datagram domain2-1710: Logical offset 0x000006ae, 1320 byte, type LWR. <-- (first 5 slaves 264*5 = 1320, WRITE)<br>
Feb 27 09:37:06 kernel: [ 2560.537375] EtherCAT 0: Datagram domain2-3030: Logical offset 0x00000bd6, 264 byte, type LRD. <-- (last slave, WRITE became READ which is a error)<o:p></o:p></span></p>
<p><b><span style="font-family:"Calibri","sans-serif"">OK SETUP: (7 slaves, 284byte WRITE, 264 READ)<o:p></o:p></span></b></p>
<p><span style="font-family:"Calibri","sans-serif"">SLAVE READ DOMAIN<br>
Feb 27 09:55:40 kernel: [ 3674.831832] EtherCAT 0: Domain1: Logical address 0x00000006, 1988 byte, expected working counter 7.<br>
Feb 27 09:55:40 kernel: [ 3674.831858] EtherCAT 0: Datagram domain1-6: Logical offset 0x00000006, 1420 byte, type LRD. <-- (first 5 slaves 284*5 = 1420, READ)<br>
Feb 27 09:55:40 kernel: [ 3674.831882] EtherCAT 0: Datagram domain1-1426: Logical offset 0x00000592, 568 byte, type LRD. <-- (last 2 slaves 284*2=568, READ)<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif"">SLAVE WRITE DOMAIN<br>
Feb 27 09:55:40 kernel: [ 3674.831930] EtherCAT 0: Domain2: Logical address 0x000007ca, 1848 byte, expected working counter 7.<br>
Feb 27 09:55:40 kernel: [ 3674.831955] EtherCAT 0: Datagram domain2-1994: Logical offset 0x000007ca, 1320 byte, type LWR. <-- (first 5 slaves 264*5 = 1320, WRITE)<br>
Feb 27 09:55:40 kernel: [ 3674.831980] EtherCAT 0: Datagram domain2-3314: Logical offset 0x00000cf2, 528 byte, type LWR. <-- (last 2 slaves, 264*2=528, READ error was corrected to correct WRITE again when we added a extra slave)<o:p></o:p></span></p>
<p class="MsoNormal">I found the problem in master/domain.c and fixed it and have included a git patch that you can evaluate.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Best regards,</span><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif";
color:navy"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Times New Roman","serif""><ns0:PersonName><ns0:PersonName></ns0:PersonName></ns0:PersonName></span><b><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Johnny
Rasmussen</span></b><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif";
color:navy"><br>
</span><i><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:black">DEIF Wind Power Technology</span></i><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif";color:navy"><br>
</span><i><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:black">Software Developer</span></i><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
</div>
</body>
</html>