<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Thank you Graeme for these thoughts.</p>
<p>I used a similar module (EL5101), I hadn't this problem but pdo assignment was different. I used cstruct command to get pdo informations.<br>
</p>
<p><br>
</p>
<p>1) With which value should I set the value in index 4339:5 ? <br>
</p>
<p><br>
</p>
<p>2) How can I see diagnostic messages ? with dmesg? <br>
</p>
<p><br>
</p>
<p>3) Is it possible to encounter PDO error only during sdo configuration? I don't understand why at the second start there is no PDO error ?</p>
<p><br>
</p>
<p>Regards<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> Graeme Foot <Graeme.Foot@touchcut.com><br>
<b>Envoyé :</b> jeudi 14 octobre 2021 23:36<br>
<b>À :</b> BUSSIERES Vincent; etherlab-users@etherlab.org<br>
<b>Objet :</b> RE: strange behaviour with sdo configuration</font>
<div> </div>
</div>
<div>
<div style="">
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">Hi Vincent,</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">I don’t have a module to play with so no real idea.  But here’s some thoughts:</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">1) The Beckhoff esi file “Beckhoff EL5xxx.xml” file shows setting the value in index 4339:5 to 0000 on transition from Init to PreOp:</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">            <InitCmd></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">              <Transition>IP</Transition></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">              <Index>4339</Index></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">              <SubIndex>5</SubIndex></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">              <Data AdaptAutomatically="1">0000</Data></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-family:"Courier New"">            </InitCmd></span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">You could try setting this value before activating your master.  I think 4339 is decimal so relates to 0x10F3:05.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">0x10F3:05 is the Diagnostics Flags value.  This is 0x0001 by default which reports the presence of a DiagMessage as an emergency.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">2) The module supports diagnostics.  Check the Diagnostic messages for issues during the startup with and without the SDO configs.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">3) On first application start from a cold boot, without any of the SDO config calls, check the dmesg log for any errors with assigning the PDO’s for the module.  It
 may be that if PDO errors are encountered along with the SDO config calls the module stays in PREOP + Error.  But without the SDO config calls it may get to OP OK.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">On the second start the PDO’s will already have been changed so the master / slave won’t report any errors (even though the module will ignore the changes internally
 as they are fixed PDO’s).  Due to no PDO errors being reported the second time it may be why the SDO config calls succeed.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">Regards,</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="">Graeme.</span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style=""> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Etherlab-users <etherlab-users-bounces@etherlab.org>
<b>On Behalf Of </b>BUSSIERES Vincent<br>
<b>Sent:</b> Friday, 15 October 2021 09:11<br>
<b>To:</b> etherlab-users@etherlab.org<br>
<b>Subject:</b> [Etherlab-users] strange behaviour with sdo configuration</span></p>
</div>
</div>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<div id="divtagdefaultwrapper">
<div>
<p style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-size:12.0pt; color:black">Dear Etherlab users,
</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">I bought a Beckhoff EtherCAT Terminal, 2-channel encoder interface EL5102. This product has just been released.</span></p>
<p><span style="font-size:12.0pt; color:black">I encounter problems when I configure sdos with « ecrt_slave_config_sdo8 » or « ecrt_slave_config_create_sdo_request » functions called before « ecrt_master_activate » as for my other slaves.</span></p>
<p><span style="font-size:12.0pt; color:black">This slave doesn’t switch at the OP State and stay in PRE-OP State with error « E » :</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><i><span style="font-size:12.0pt; color:black">"1 0:1 PREOP E EK5102 2K. Inc. Encoder 5V (RS422, TTL)"</span></i><span style="font-size:12.0pt; color:black"></span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">I noticed that when I comment sdo configuration methods and run my application, slave switches to OP State.</span></p>
<p><span style="font-size:12.0pt; color:black">After being switched one time to OP, if I uncomment configuration methods and run once again my application, slave behaviour seems to be OK, slave switches to OP State.</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">I don’t understand why after the fisrt boot, there is such a problem ?</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Could you help solving this problem ?</span></p>
</div>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Best regards</span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>