<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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Gavin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for your advices and I really appreciated. I still get several questions that I want to double check with you.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">First, I assume the error on return non-zero exit code in case of error only check whether the linux command is executed successfully or not. It does not actually get the status of the slave to see whether it
received the file successfully. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">For example, I am trying to send a file in a folder over ethercat while leave the folder empty by issuing the command<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:maroon">ethercat -m0 foe_write -p0 /var/ftp/gather/Drive_configuration.ccd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">it shows that Failed to open ‘/var/ftp/gather/Drive_configuration.ccd’ in stderr. However, the exit code is still 0 which means no error.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Second, is there a specific document on how to use ioctl to send file over FoE in detail because I am not exactly sure on where to start on the source code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Lingjie (Kimi) Kong<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Software Engineer – Servo Control Engineering || Common Solution Group || Applied Materials<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B"><a href="mailto:lingjie_kong@amat.com"><span style="color:#0563C1">lingjie_kong@amat.com</span></a> || Office: (408)563-4400 || Cell: (858)242-9076</span><span style="color:gray"><br>
<br>
</span><span style="font-size:10.0pt;color:gray">The content of this message is Applied Materials Confidential. If you are not the intended recipient and have received this message in error, any use or distribution is prohibited. Please notify me immediately
by reply e-mail and delete this message from your computer system. Thank you. </span>
<span style="color:gray"><br>
<br>
</span><span style="font-size:10.0pt;color:gray">** Save a tree. Please don't print this e-mail unless needed.</span><span style="color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Gavin Lambert [mailto:gavinl@compacsort.com] <br>
<b>Sent:</b> Thursday, September 14, 2017 3:52 PM<br>
<b>To:</b> Lingjie Kong --TR <Lingjie_Kong@amat.com>; etherlab-dev@etherlab.org<br>
<b>Subject:</b> RE: foe_write result<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif">The “foe_write” ethercat command will print an error on stderr and return a non-zero exit code in case of error. It’s intended to be used interactively by
whoever is commissioning the system, although it can be used in a script.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif">Alternatively if you want to call it programmatically you could use the equivalent master ioctl call directly, which provides the specific FoE error code.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif">The unofficial patchset also adds some additional ecrt.h APIs that you can call for FoE, although these require more “plumbing” to use.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="font-size:12.0pt;font-family:"Times New Roman",serif"> </span><span lang="EN-NZ" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:Lingjie_Kong@amat.com">Lingjie_Kong@amat.com</a><br>
<b>Sent:</b> Friday, 15 September 2017 10:25<br>
<b>To:</b> <a href="mailto:etherlab-dev@etherlab.org">etherlab-dev@etherlab.org</a><br>
<b>Subject:</b> [etherlab-dev] foe_write result<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am working on file over ethercat (FOE) to send motor driver’s configuration file. From the ethercat 1.5.2 document, it looks like I can use foe_write to send the file. However, I am just wondering that what I can check to see whether
the file transfer is successfully or not. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Lingjie (Kimi) Kong<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B">Software Engineer – Servo Control Engineering || Common Solution Group || Applied Materials<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#7B7B7B"><a href="mailto:lingjie_kong@amat.com">lingjie_kong@amat.com</a> || Office: (408)563-4400</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Black" size="2"><br>
</font>
</body>
</html>