<div dir="ltr"><div dir="ltr"><div><div><div><br></div>I still haven't been able to enable sync managers (and thus change the state to SAFEOP)<br></div>Currently, I'm executing <a href="https://github.com/mohse-n/L7N_EtherLab/blob/master/simple_test.c">this code</a>, which is basically the user example.<br></div>Output of $ethercat xml of the slave is:<br><br><?xml version="1.0" ?><br><EtherCATInfo><br> <!-- Slave 0 --><br> <Vendor><br> <Id>30101</Id><br> </Vendor><br> <Descriptions><br> <Devices><br> <Device><br> <Type ProductCode="#x00000000" RevisionNo="#x00000002">L7N</Type><br> <Name><![CDATA[L7N]]></Name><br> <Sm Enable="1" StartAddress="#x1000" ControlByte="#x26" DefaultSize="128" /><br> <Sm Enable="1" StartAddress="#x1400" ControlByte="#x22" DefaultSize="128" /><br> <Sm Enable="0" StartAddress="#x1800" ControlByte="#x24" DefaultSize="0" /><br> <Sm Enable="0" StartAddress="#x1c00" ControlByte="#x20" DefaultSize="0" /><br> <RxPdo Sm="2" Fixed="1" Mandatory="1"><br> <Index>#x1601</Index><br> <Name>2nd Receive PDO Mapping</Name><br> <Entry><br> <Index>#x6040</Index><br> <SubIndex>0</SubIndex><br> <BitLen>16</BitLen><br> <Name>Controlword</Name><br> <DataType>UINT16</DataType><br> </Entry><br> <Entry><br> <Index>#x607a</Index><br> <SubIndex>0</SubIndex><br> <BitLen>32</BitLen><br> <Name>Target Position</Name><br> <DataType>UINT32</DataType><br> </Entry><br> </RxPdo><br> <TxPdo Sm="3" Fixed="1" Mandatory="1"><br> <Index>#x1a01</Index><br> <Name>2nd Transmit PDO Mapping</Name><br> <Entry><br> <Index>#x6041</Index><br> <SubIndex>0</SubIndex><br> <BitLen>16</BitLen><br> <Name>Statusword</Name><br> <DataType>UINT16</DataType><br> </Entry><br> <Entry><br> <Index>#x6064</Index><br> <SubIndex>0</SubIndex><br> <BitLen>32</BitLen><br> <Name>Position Actual Value</Name><br> <DataType>UINT32</DataType><br> </Entry><br> </TxPdo><br> </Device><br> </Devices><br> </Descriptions><br></EtherCATInfo><br><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 3:02 AM Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-NZ" link="blue" vlink="purple">
<div class="m_8505502813051334212WordSection1">
<p class="MsoNormal"><span>You typically don’t need to explicitly disable a sync manager; you simply don’t refer to it or any PDOs it contains, and then it will not be included in the domain’s data.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Alternatively, you can configure the sync manager but then list zero PDOs for it, to explicitly set the PDO Assign register for that SM to 0 (for slaves that support flexible assignment). Note that
you should not enable the SM watchdog if you’re setting it to have zero PDOs.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>It sounds like you should probably read the documentation for the EtherCAT protocol and for the Etherlab master in particular.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Mohsen Alizadeh Noghani <<a href="mailto:m.alizad3h@gmail.com" target="_blank">m.alizad3h@gmail.com</a>>
<br>
<b>Sent:</b> Wednesday, 26 September 2018 04:52<br>
<b>To:</b> Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com" target="_blank">gavin.lambert@tomra.com</a>>; <a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> Re: [etherlab-users] API for enabling/disabling sync managers of a slave<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Thanks Gavin.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">1- Would<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE )<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">enable Sync Manager 2 of slave sc?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">2- How can I disable it then? I doesn't seems the function provides an option to enable/disable.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Best,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Mohsen<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com" target="_blank">gavin.lambert@tomra.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">You need to write an application, and then use ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the Sync Managers for each slave.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Mohsen Alizadeh Noghani<br>
<b>Sent:</b> Tuesday, 25 September 2018 02:29<br>
<b>To:</b> <a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> [etherlab-users] API for enabling/disabling sync managers of a slave</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hello everyone.<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Is there a function call that I can use for enabling a particular sync manager of a slave?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">For example, I'd like to enable sync manager 2 of slave 1.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><br>
Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Mohsen<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</blockquote></div>