<div dir="ltr">My config matches output of 'ethercat cstruct' with one difference. Is it normally ok to zero out receive pdo's if I don't plan to using those? I've written an empty SM2 in place of what 'ethercat cstruct' populates with defaults. My syncs appear as:<br><br>ec_sync_info_t slave_0_syncs[] = {<br> {2, EC_DIR_OUTPUT, 0, 0, EC_WD_DISABLE},<br> {3, EC_DIR_INPUT, 1, 0x8dd315021341, EC_WD_DISABLE},<br> {255, EC_DIR_INVALID, 0, 0, EC_WD_DEFAULT},<br>};<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 3, 2020 at 7:26 PM Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-733072272616881737WordSection1">
<p class="MsoNormal">Typically, yes.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What you should try is this:<u></u><u></u></p>
<ol style="margin-top:0cm" type="1" start="1">
<li class="gmail-m_-733072272616881737MsoListParagraph" style="margin-left:0cm">Ensure that your master app is not running.<u></u><u></u></li><li class="gmail-m_-733072272616881737MsoListParagraph" style="margin-left:0cm">Physically reboot the slave (eg. power cycle).<u></u><u></u></li><li class="gmail-m_-733072272616881737MsoListParagraph" style="margin-left:0cm">Run “ethercat cstruct -p0” (substitute the position of your actual slave if different)<u></u><u></u></li><li class="gmail-m_-733072272616881737MsoListParagraph" style="margin-left:0cm">Compare the output to the code in your master app.<u></u><u></u></li></ol>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This will tell you the default PDO layout of the slave, which is typically what you want to use in your master app – unless you can prove otherwise, assume anything different in your code is a bug.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In some cases you may want to use some non-default PDOs, and there are ways to get the cstruct output for that as well, but typically slaves will only support a limited set of alternative configurations.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p style="font-size:100%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(89,89,89)"><strong>Gavin Lambert<br></strong>Senior Software Developer<br></p>
<p style="font-size:10pt;font-family:Arial">
</p><table>
<tbody style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(89,89,89)"> </tbody></table><p></p>
<p style="font-size:10pt;font-family:Arial"><img src="cid:1728039d4aaafb4e8f21" border="0"><br><a href="http://www.compacsort.com" target="_blank"><img alt="TOMRA" src="cid:1728039d4aa90a7d9422" width="33" height="37" border="0"></a> <a href="https://www.facebook.com/Compacsort" target="_blank"><img alt="Facebook" src="cid:1728039d4aa47db23823" width="35" height="37" border="0"></a> <a href="https://www.linkedin.com/company/compac-sorting-equipment/" target="_blank"><img alt="Linkedin" src="cid:1728039d4aa2ad4c06d4" width="35" height="37" border="0"></a> <a href="https://vimeo.com/compacsort" target="_blank"><img alt="Youtube" src="cid:1728039d4aa55aafbef5" width="37" height="37" border="0"></a>
<a href="https://twitter.com/compacsort" target="_blank"><img alt="twitter" src="cid:1728039d4aa72e1100b6" width="33" height="37" border="0"></a>
<a href="https://www.instagram.com/compacsort/" target="_blank"><img alt="instagram" src="cid:1728039d4aa79c835ac7" width="33" height="37" border="0"></a>
</p>
<p style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(89,89,89)"><b>COMPAC
SORTING EQUIPMENT LTD</b> | 4 Henderson Pl | Onehunga | Auckland 1061 | New
Zealand<br>Switchboard: +64 96 34 00 88 | <a href="http://www.tomra.com" target="_blank">tomra.com</a> </p>
<table style="border-style:none;border-collapse:collapse" cellspacing="0" cellpadding="0" border="1">
<tbody>
<tr>
<td style="border-style:solid none;border-top:1pt solid rgb(89,89,89);border-bottom:1pt solid rgb(89,89,89)" valign="top">
<p style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(89,89,89)">The
information contained in this communication and any attachment is
confidential and may be legally privileged. It should only be read by the
person(s) to whom it is addressed. If you have received this communication
in error, please notify the sender and delete the communication.
</p></td></tr></tbody></table>
<p style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(89,89,89)"></p><div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>From:</b> William Zumwalt<br>
<b>Sent:</b> Thursday, 4 June 2020 12:15<br>
<b>To:</b> <a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> [etherlab-users] Invalid output configuration<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">I getting "Invalid output configuration" when starting up a slave. Can anyone help narrow this down, to what this might refer to?<br>
<br>
[ 4101.757740] EtherCAT DEBUG 0-main-0: PREOP -> PREOP + ERROR.<br>
[ 4101.757751] EtherCAT ERROR 0-main-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).<br>
[ 4101.765760] EtherCAT 0: Slave states on main device: PREOP + ERROR.<br>
[ 4101.765769] EtherCAT ERROR 0-main-0: AL status message 0x001D: "Invalid output configuration".<br>
<br>
Could this be configuration issue with the sync EC_DIR_OUTPUT?<br>
<br>
<u></u><u></u></p>
</div>
</div>
</div>
</blockquote></div>