<div dir="ltr"><div id="gmail-:18j" class="gmail-Am gmail-aiL gmail-aO9 gmail-Al editable gmail-LW-avf gmail-tS-tW gmail-tS-tY" aria-label="Message Body" role="textbox" aria-multiline="true" tabindex="1" style="direction:ltr;min-height:85px" aria-controls=":1bj" aria-expanded="false">Oguz,<div><br></div><div>I recently rebased the old feature patch onto 1.6.8 for my own purposes.  It can be found here: <a href="https://github.com/DSI-Gleeble/ethercat/tree/sii-from-file">DSI-Gleeble/ethercat at sii-from-file</a>.</div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Mar 17, 2026 at 3:57 AM Bilko AS, Oguz Dilmac <<a href="mailto:odilmac@bilko-automation.com">odilmac@bilko-automation.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"><u></u>

  
    
  
  <div>
    <p>Hi Richard and Graeme,</p>
    <p>Richard, do you know if the feature Graeme mentioned is included
      in official branch?</p>
    <p>And thank you Graeme for your message. What should I check if the
      version I used has this patch? It was some time ago when my
      colleague created an image of the system, and I'm not sure where
      is the source code of the EtherCAT master that was used.</p>
    <p>Best regards,</p>
    <p>Oguz.</p>
    <div>On 15-Mar-26 11:28 PM, Graeme Foot
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span style="font-size:11pt">Hi Oguz,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt">I
            haven’t looked at all closely to the issue (and a couple of
            emails got blocked by our spam/virus filter), but if you
            suspect that the slaves SII information is incorrect then
            you can try supplying the SII information yourself, rather
            than the master downloading if from the slave.  If that then
            works, you can check for the differences between the SII on
            the slave and the data provided by the esi file.  If
            confirmed you can request the vendor provides an update for
            the slave with the correct SII information (or continue
            using the manual SII file).<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt">We use
            quite an old EtherLab master with patches to allow loading
            your own SII file instead of the master downloading it from
            the slave (from gavinl’s patchset
            “0001-load-sii-from-file.patch”).  I don’t know what’s
            available in your master configuration, but in ours we copy
            the SII file to “/lib/firmware/ethercat”<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt">To
            create an SII file:<u></u><u></u></span></p>
        <ul style="margin-top:0cm" type="disc">
          <li style="margin-left:0cm"><span style="font-size:11pt">Start
              a new TwinCAT project (TwinCAT XAE Project (XML Format))<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Under
              I/O, Devices add an EtherCAT Master device<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">If you
              don’t have the correct esi (.xml) file loaded:<u></u><u></u></span>
            <ul style="margin-top:0cm" type="circle">
              <li style="margin-left:0cm"><span style="font-size:11pt">copy
                  the slaves esi (.xml) file into:
                  C:\TwinCAT\3.1\Config\Io\EtherCAT<u></u><u></u></span></li>
              <li style="margin-left:0cm"><span style="font-size:11pt">Select
                  the TwinCAT, EtherCAT Devices, Reload Device
                  Descriptions menu option<u></u><u></u></span></li>
            </ul>
          </li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Add
              you EtherCAT slave to the EtherCAT master device<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Open
              your slave<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Select
              the EtherCAT tab<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Select
              Advanced Settings...<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Select
              the ESC Access, E2PROM, Hex Editor item<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Confirm
              the SII contains the expected values (for Vendor ID ,
              Product Code etc)<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Select
              the Write to File... button<u></u><u></u></span></li>
          <li style="margin-left:0cm"><span style="font-size:11pt">Save
              with a filename in the format
              “ec_{vendor_id_hex}_{product_code_hex}[_{revision_hex}].bin”<u></u><u></u></span>
            <ul style="margin-top:0cm" type="circle">
              <li style="margin-left:0cm"><span style="font-size:11pt">The
                  revision part is optional.<u></u><u></u></span></li>
              <li style="margin-left:0cm"><span style="font-size:11pt">e.g.:
                  ec_00000539_02200001_00010000.bin<u></u><u></u></span></li>
            </ul>
          </li>
        </ul>
        <p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt">Regards,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt">Graeme.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
        <div>
          <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
            <p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">
                Etherlab-users
                <a href="mailto:etherlab-users-bounces@etherlab.org" target="_blank"><etherlab-users-bounces@etherlab.org></a>
                <b>On Behalf Of </b>Bilko AS, Oguz Dilmac<br>
                <b>Sent:</b> Saturday, 7 March 2026 02:30<br>
                <b>To:</b> Richard Hacker <a href="mailto:ha@igh.de" target="_blank"><ha@igh.de></a>;
                <a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
                <b>Subject:</b> Re: [Etherlab-users] Timeout while
                setting state INIT.<u></u><u></u></span></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p>Hi,<u></u><u></u></p>
        <p>We are still working on the problematic slave which doesn't
          go to INIT. I'm trying to understand the difference by
          examining wireshark logs.<u></u><u></u></p>
        <p>I noticed these following messages are sent at the beginning.
          And the device changed to INIT itself. It seems as if there is
          something wrong with SM configuration?<u></u><u></u></p>
        <table border="1" cellpadding="0" width="100%" style="width:100%">
          <tbody>
            <tr>
              <td valign="top" style="padding:1.5pt">
                <p><span style="font-size:10pt;font-family:"Times New Roman",serif">FPRD:
                    0x80d Return value: 0x30 (SM error / sm enable
                    acknowledged)<br>
                    <br>
                    FPWR: 0x800 16 byte data: 0    (Clear SM0 and 1?)<br>
                    FPWR: 0x800 8 byte data: 0010000426000100  (Re write
                    SM according to XML file?)<br>
                    FPWR: 0x808 8 byte data: 0014000422000100<br>
                    FPWR: 0x810 16 byte data: 0     (Clear SM2 and 3?)<br>
                    <br>
                    FPWR: 0x620 16 byte data:
                    00000009010000000d08000101000000 (define FMMU?)<br>
                    FPWR: 0x500 1 byte data: 01<u></u><u></u></span></p>
                <p><span style="font-size:10pt;font-family:"Times New Roman",serif">FPWR:
                    0x120 2 byte data: 0012 (PreOP + Error ACK)<br>
                    FPRD: 0x130 Return value: 0x0002 (PREOP)<u></u><u></u></span></p>
                <p><span style="font-size:10pt;font-family:"Times New Roman",serif">FPRD:
                    0x80D Return value: 0x00 (The error is gone!)<br>
                    <br>
                    FPRD: 0x1400 Return value: 0x00 (but WC is zero. I
                    guess the slave didn't processed it)<u></u><u></u></span></p>
                <p><span style="font-size:10pt;font-family:"Times New Roman",serif">FPRD:
                    0x130 Return value: 0x0001 (INIT) (Slave went to
                    INIT. But I didn't see a write to 0x120 to go to
                    INIT)<br>
                    <br>
                    FPWR: 0x800 16 byte data: 0<br>
                    FPRD: 0x1400 Return value: 0x5208<br>
                    FPWR: 0x620 16 byte data: 0<br>
                    FPRD: 0x1400 Return value: 1024 byte data...0x80<u></u><u></u></span></p>
                <p class="MsoNormal">...<u></u><u></u></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p>Could this be the reason why the slave don't go to INIT when
          IgH master ask? <u></u><u></u></p>
        <p>By the way I tried to write the right values to 0x800 via
          ecrt_reg_request_write. I tried to call this function right
          after ecrt_master_activate. But it didn't work. <u></u><u></u></p>
        <p>You can find the log file at the attachments. I hope someone
          can give me a suggestion.<u></u><u></u></p>
        <p>Best regards,<u></u><u></u></p>
        <p>Oguz.<u></u><u></u></p>
        <p><u></u> <u></u></p>
        <div>
          <p class="MsoNormal">On 25-Feb-26 3:42 PM, Bilko AS, Oguz
            Dilmac wrote:<u></u><u></u></p>
        </div>
        <blockquote style="margin-top:5pt;margin-bottom:5pt">
          <p>Hi Again,<u></u><u></u></p>
          <p>I just sent some dmesg outputs and a test program using a
            new ethercat library. Unfortunately it hit a max 200KB
            attachment limit. Sorry I didn't notice this limit before.
            And could not cancel my message either.<u></u><u></u></p>
          <p>Anyway, I uploaded the files to wetransfer. I also uploaded
            a wireshark log of twincat while the problem device goes to
            OP. Here is the link:<u></u><u></u></p>
          <p><a href="https://we.tl/t-Yl7iRMSadB" target="_blank">https://we.tl/t-Yl7iRMSadB</a><u></u><u></u></p>
          <p>I also copy my previous message here:<u></u><u></u></p>
          <p><i>Hello, <br>
              <br>
              We went to customer side and used a test PC with ethercat
              library 1.6.7. We also used slave timeout function with 10
              seconds.
              <br>
              <br>
              We build a simple setup with only one device and one test
              PC. Still the old device is going OP, and the new device
              don't.
              <br>
              <br>
              At the attachments you can find some dmesg outputs. I also
              attached the simple test program I used.
              <br>
              <br>
              Some explanations for dmesg outputs: <br>
              <br>
              * dmesg.OK.txt: Output for the working device. I just put
              it here as a reference <br>
              <br>
              * dmesg.Problem.txt: Output of the problematic device. <br>
              <br>
              * dmesg.Problem.freerun.txt: I tried to activate freerun
              with ecrt_slave_config_dc(sc, 0, 0, 0, 0, 0); I put it
              right before ecrt_master_activate().
              <br>
              <br>
              * dmesg.Problem.ManualStateChange: I tried to change state
              via command line tool.
              <br>
              <br>
              We also checked and see that both devices are going to OP
              with twincat. If you suggest a way to get some log from
              twincat, we can try.
              <br>
              <br>
              We are stuck </i><i><span style="font-family:"Segoe UI Emoji",sans-serif">🙁</span> If
              you have any idea It would be great.
              <br>
              <br>
              Best regards, <br>
              <br>
              Oguz. </i><u></u><u></u></p>
          <p><u></u> <u></u></p>
          <div>
            <p class="MsoNormal">On 20-Feb-26 1:30 PM, Richard Hacker
              wrote:<u></u><u></u></p>
          </div>
          <blockquote style="margin-top:5pt;margin-bottom:5pt">
            <pre>On Fri, 2026-02-20 at 12:49 +0300, Bilko AS, Oguz Dilmac wrote:<u></u><u></u></pre>
            <blockquote style="margin-top:5pt;margin-bottom:5pt">
              <pre>Hi,<u></u><u></u></pre>
              <pre><u></u> <u></u></pre>
              <pre>We will try to install the newest ethercat library version.<u></u><u></u></pre>
              <pre><u></u> <u></u></pre>
              <pre>By the way, we tried one version older of this device. It goes to OP <u></u><u></u></pre>
              <pre>with no problem.<u></u><u></u></pre>
            </blockquote>
            <pre>Well, this shows that your configuration is probably not the issue and<u></u><u></u></pre>
            <pre>is at the problem is at the slave's side<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre><u></u> <u></u></pre>
            <blockquote style="margin-top:5pt;margin-bottom:5pt">
              <pre>Also our customer has a bechoff controller as well, and they say that<u></u><u></u></pre>
              <pre>with twincat both devices are going to OP without a problem.<u></u><u></u></pre>
            </blockquote>
            <pre>TwinCAT is not the standard, neither is our EtherCAT master. However,<u></u><u></u></pre>
            <pre>both should implement the standard, but they do it differently<u></u><u></u></pre>
            <pre>(naturally), especially regarding timing. The standard however ensures<u></u><u></u></pre>
            <pre>that EtherCAT masters and slaves are immune to timing issues, but there<u></u><u></u></pre>
            <pre>are always exceptions!<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <blockquote style="margin-top:5pt;margin-bottom:5pt">
              <pre>We will try to go to the customer and check with the newest ethercat <u></u><u></u></pre>
              <pre>master version. We are also considering to connect the both devices<u></u><u></u></pre>
              <pre>to <u></u><u></u></pre>
              <pre>the twincat and see if the twincat behaves different. Do you think <u></u><u></u></pre>
              <pre>checking the transmitted data via wireshark worth trying?<u></u><u></u></pre>
            </blockquote>
            <pre>You can try, but I do not see that you'll get much insight using<u></u><u></u></pre>
            <pre>wireshark. The master commands the slave to go to INIT and there is<u></u><u></u></pre>
            <pre>simply no reply from the slave acknowledging the state change. That is<u></u><u></u></pre>
            <pre>why the master times out and gives up trying to bring the slave online.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Going to INIT is such a primitive state change for a slave that there<u></u><u></u></pre>
            <pre>should be absolutely _no_ reason it takes any amount of time. So I am<u></u><u></u></pre>
            <pre>not even convinced that ecrt_slave_config_state_timeout() would work.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>I only know that some (complex) slaves may take time between PREOP-<u></u><u></u></pre>
            <blockquote style="margin-top:5pt;margin-bottom:5pt">
              <pre>SAFEOP and SAFEOP->OP transition when certain hardware needs to be<u></u><u></u></pre>
            </blockquote>
            <pre>configured based on its configuration. But your slave is not there yet.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Before you use wireshark you can try switching debug to 1<u></u><u></u></pre>
            <pre>`ethercat debug 1`<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre><u></u> <u></u></pre>
          </blockquote>
          <pre>-- <u></u><u></u></pre>
          <pre>Oguz Dilmac<u></u><u></u></pre>
          <pre><u></u> <u></u></pre>
          <pre>Bilko AS, R&D Manager<u></u><u></u></pre>
          <pre>====================================<u></u><u></u></pre>
          <pre>Perpa Ticaret Merkezi B Blok Kat 13 Nr. 2536<u></u><u></u></pre>
          <pre>TR-34384 Okmeydani Istanbul Turkey<u></u><u></u></pre>
          <pre>Tel : +90 212 563 00 00<u></u><u></u></pre>
          <pre>e-mail : <a href="mailto:odilmac@bilko-automation.com" target="_blank">odilmac@bilko-automation.com</a><u></u><u></u></pre>
          <pre>web site : <a href="http://www.bilko-automation.com" target="_blank">http://www.bilko-automation.com</a><u></u><u></u></pre>
          <pre><a href="https://www.youtube.com/@LyncaCNC" target="_blank">https://www.youtube.com/@LyncaCNC</a><u></u><u></u></pre>
        </blockquote>
        <pre>-- <u></u><u></u></pre>
        <pre>Oguz Dilmac<u></u><u></u></pre>
        <pre><u></u> <u></u></pre>
        <pre>Bilko AS, R&D Manager<u></u><u></u></pre>
        <pre>====================================<u></u><u></u></pre>
        <pre>Perpa Ticaret Merkezi B Blok Kat 13 Nr. 2536<u></u><u></u></pre>
        <pre>TR-34384 Okmeydani Istanbul Turkey<u></u><u></u></pre>
        <pre>Tel : +90 212 563 00 00<u></u><u></u></pre>
        <pre>e-mail : <a href="mailto:odilmac@bilko-automation.com" target="_blank">odilmac@bilko-automation.com</a><u></u><u></u></pre>
        <pre>web site : <a href="http://www.bilko-automation.com" target="_blank">http://www.bilko-automation.com</a><u></u><u></u></pre>
        <pre><a href="https://www.youtube.com/@LyncaCNC" target="_blank">https://www.youtube.com/@LyncaCNC</a><u></u><u></u></pre>
      </div>
    </blockquote>
    <pre cols="72">-- 
Oguz Dilmac

Bilko AS, R&D Manager
====================================
Perpa Ticaret Merkezi B Blok Kat 13 Nr. 2536
TR-34384 Okmeydani Istanbul Turkey
Tel : +90 212 563 00 00
e-mail : <a href="mailto:odilmac@bilko-automation.com" target="_blank">odilmac@bilko-automation.com</a>
web site : <a href="http://www.bilko-automation.com" target="_blank">http://www.bilko-automation.com</a>
<a href="https://www.youtube.com/@LyncaCNC" target="_blank">https://www.youtube.com/@LyncaCNC</a></pre>
  </div>

-- <br>
Etherlab-users mailing list<br>
<a href="mailto:Etherlab-users@etherlab.org" target="_blank">Etherlab-users@etherlab.org</a><br>
<a href="https://lists.etherlab.org/mailman/listinfo/etherlab-users" rel="noreferrer" target="_blank">https://lists.etherlab.org/mailman/listinfo/etherlab-users</a><br>
</blockquote></div>

<br>
<hr><font face="Arial" color="#808080" style="background-color:white" size="2">The contents of this e-mail and any attachments are confidential. They are intended for the named recipient(s) only.  If you are not the intended recipient of this message, please notify the sender immediately and delete the message and any attachments. Thank you. </font>