<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Richard,</p>
    <p>Here are the outputs of the commands after a fresh start. No
      application is running.</p>
    <p><font face="monospace">lynca@lynca:~$ sudo
        /usr/local/etc/init.d/ethercat restart<br>
        Shutting down EtherCAT master 1.6.8  done<br>
        Starting EtherCAT master 1.6.8  done<br>
        lynca@lynca:~$ ethercat slave -v<br>
        === Master 0, Slave 0 ===<br>
        Device: Main<br>
        State: PREOP<br>
        Flag: +<br>
        Identity:<br>
          Vendor Id:       0x6167656d<br>
          Product code:    0x00000000<br>
          Revision number: 0x00000000<br>
          Serial number:   0x00000000<br>
        DL information:<br>
          FMMU bit operation: no<br>
          Distributed clocks: yes, 64 bit<br>
          DC system time transmission delay: 0 ns<br>
        Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff
        [ns]   NextDc [ns]<br>
           0  MII   up    open    yes             -    811350812       
           0           0<br>
           1  MII   down  closed  no              -            -       
           -           -<br>
           2  N/A   down  closed  no              -            -       
           -           -<br>
           3  N/A   down  closed  no              -            -       
           -           -<br>
        Mailboxes:<br>
          Bootstrap RX: 0x1000/1024, TX: 0x1400/1024<br>
          Standard  RX: 0x1000/1024, TX: 0x1400/1024<br>
          Supported protocols: CoE, FoE<br>
        General:<br>
          Group: SSC_Device<br>
          Image name: <br>
          Order number: Megatec_ESC_NLCH<br>
          Device name: Megatec_ESC_NLCH<br>
          CoE details:<br>
            Enable SDO: yes<br>
            Enable SDO Info: yes<br>
            Enable PDO Assign: no<br>
            Enable PDO Configuration: no<br>
            Enable Upload at startup: no<br>
            Enable SDO complete access: yes<br>
          Flags:<br>
            Enable SafeOp: no<br>
            Enable notLRW: no<br>
          Current consumption: 0 mA<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0000<br>
        0x98 152<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0001<br>
        0x01 1<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0002<br>
        0x0001 1<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0004<br>
        0x08 8<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0005<br>
        0x08 8<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0006<br>
        0x08 8<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint8 0x0007<br>
        0x0f 15<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0008<br>
        0x01cc 460<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0120<br>
        0x0002 2<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0130<br>
        0x0002 2<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0134<br>
        0x0000 0<br>
        lynca@lynca:~$ sudo ethercat state -p0 init<br>
        lynca@lynca:~$ ethercat slaves<br>
        0  0:0  PREOP  E  Megatec_ESC_NLCH<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0120<br>
        0x0001 1<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0130<br>
        0x0002 2<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0134<br>
        0x0000 0<br>
        lynca@lynca:~$ sudo ethercat state -p0 preop<br>
        lynca@lynca:~$ ethercat slaves<br>
        0  0:0  PREOP  +  Megatec_ESC_NLCH<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0120<br>
        0x0001 1<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0130<br>
        0x0002 2<br>
        lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x0134<br>
        0x0000 0<br>
        lynca@lynca:~$ <br>
      </font><br>
    </p>
    <p>The documents of the slave is mostly focused on the application.
      I screen copied the Ethercat related section below. The rest
      describes the content of the PDOs</p>
    <p><i><b>----</b></i></p>
    <p><i><b>1 Introduction</b><br>
        This document describes a communication protocol between the CNC
        and the processing optic using the EtherCAT bus.<br>
        All information is transferred inside cyclical process data
        objects (PDO). Specific data in PDOs is referenced as following:
        TxPDO 4 – TxPDO, word 4 TxPDO 2/3 – TxPDO, word 2, bit 3 Words
        and bits are counted from 0.<br>
        After the power is switched on the processing optic’s controller
        is booted up and references the lens motor. This takes approx.
        10 seconds. Afterwards that the optic is ready for operation and
        does not need any additional initialization.<br>
        <b>2 EtherCAT protocol description</b><br>
        The processing optic is an EtherCAT slave device. The minimum
        cycle time is 1 millisecond.<br>
      </i></p>
    <p><i><b>-------</b></i></p>
    <p>Below that point, the document describes the PDO content...</p>
    <p>By the way, I will ask which ESC controller is used. What else do
      you suggest to ask?</p>
    <p>Best regards,</p>
    <p>Oguz.</p>
    <div class="moz-cite-prefix">On 24-Mar-26 11:23 AM, Richard Hacker
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:8e7c910ebc08d43deacc0545b7a4a1b83d6d65c7.camel@igh.de">
      <pre wrap="" class="moz-quote-pre">OK, the slave does not transition to INIT, regardless (0x130 should
match 0x120).

Next test:
with a fresh restart (no application running)
        ethercat slave -v
        ethercat reg_read -p0 -tuint8 0x0000
        ethercat reg_read -p0 -tuint8 0x0001
        ethercat reg_read -p0 -tuint16 0x0002
        ethercat reg_read -p0 -tuint8 0x0004
        ethercat reg_read -p0 -tuint8 0x0005
        ethercat reg_read -p0 -tuint8 0x0006
        ethercat reg_read -p0 -tuint8 0x0007
        ethercat reg_read -p0 -tuint16 0x0008
        ethercat reg_read -p0 -tuint16 0x0120
        ethercat reg_read -p0 -tuint16 0x0130
        ethercat reg_read -p0 -tuint16 0x0134
        ethercat state -p0 init
        ethercat sl
        ethercat reg_read -p0 -tuint16 0x0120
        ethercat reg_read -p0 -tuint16 0x0130
        ethercat reg_read -p0 -tuint16 0x0134
        ethercat state -p0 preop
        ethercat sl
        ethercat reg_read -p0 -tuint16 0x0120
        ethercat reg_read -p0 -tuint16 0x0130
        ethercat reg_read -p0 -tuint16 0x0134

The important address is 0x0134 (AL Status code). Can you check in the
documentation what the manufacturor writes about the status code


On Tue, 2026-03-24 at 10:36 +0300, Bilko AS, Oguz Dilmac wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Hi Richard, Graeme,

I was out of the office. Thank you for the suggestions. Graeme I'll
try 
to look into it.

Mr Richard, here are the outputs of the commands after I powered both
PC 
and the slave:

lynca@lynca:~$ sudo /usr/local/etc/init.d/ethercat restart
Shutting down EtherCAT master 1.6.8  done
Starting EtherCAT master 1.6.8  done
lynca@lynca:~$ ethercat slave
0  0:0  PREOP  +  Megatec_ESC_NLCH
lynca@lynca:~$ ethercat slaves
0  0:0  PREOP  +  Megatec_ESC_NLCH
lynca@lynca:~$ sudo ethercat state -p0 init
lynca@lynca:~$ ethercat slave
0  0:0  PREOP  E  Megatec_ESC_NLCH
lynca@lynca:~$ sudo ethercat state -p0 preop
lynca@lynca:~$ ethercat slave
0  0:0  PREOP  +  Megatec_ESC_NLCH
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint32 0x900
0x0af50b04 183831300
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint64 0x910
0x00000051a7927504 350703744260
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x120
0x0001 1
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x130
0x0002 2
lynca@lynca:~$

And these are executed while the application is running:

lynca@lynca:~$ sudo ethercat slave
0  0:0  PREOP  E  Megatec_ESC_NLCH
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x120
0x0001 1
lynca@lynca:~$ sudo ethercat reg_read -p0 -tuint16 0x130
0x0002 2

The installed ethercat master is 1.6.8 with Mr James Benway's patch 
for 
reading sii from a 
file (<a class="moz-txt-link-freetext" href="https://github.com/DSI-Gleeble/ethercat/tree/sii-from-file">https://github.com/DSI-Gleeble/ethercat/tree/sii-from-file</a>).
But I 
removed the binary sii files so that the master can read from slave
as 
normal.

Can you see something?

Best regards,

Oguz.


On 20-Mar-26 6:34 PM, Richard Hacker wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">My suspicion is that your problem is way before the master tries to
configure the slave, as I have said before.

When the master is activated, it jogs the slave through the INIT,
PREOP, SAFEOP and eventually OP states. A slave gets configured
(SDO
parameters, PDO setup) between the PREOP and SAFEOP state -- but
your
slave never gets there. Your slave might go into INIT, but somehow
the
master does not get this state change.

Can you change the slave state from the command line? With your
slave
attached but without your application running (i.e. idle free-run
bus),
what is the output of:
        ethercat slave
        ethercat state -p0 init
        ethercat slave
        ethercat state -p0 preop
        ethercat slave
        ethercat reg_read -p0 -tuint32 0x900
        ethercat reg_read -p0 -tuint64 0x910
        ethercat reg_read -p0 -tuint16 0x120
        ethercat reg_read -p0 -tuint16 0x130

Now start your application and:
        ethercat state
        ethercat reg_read -p0 -tuint16 0x120
        ethercat reg_read -p0 -tuint16 0x130


-p0 assumes the affedted slave is the first slave in the network.
Adjust accordingly if that is not the case.

On Fri, 2026-03-20 at 00:02 +0000, Graeme Foot wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">
Hi Oguz,
  
If this is a potential fix for your slave, you would require more
separation, plus I’m not sure you got your reads vs writes
assigned
quite right.  i.e. from your log 0x6000:01 is being assigned to
domain 0 when it looks like it should be assigned to domain 1.
  
  
The issue with the Texas Instruments ESC’s in particular is that
if
you use one domain the writes (control) and reads (status) are
too
close together for the ESC’s syncs to handle gracefully.  E.g.:
  
+ domain 0 -------------------+
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">[slave 0 write][slave 0 read]|
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">  
If you split them into two domains you get:
  
+ domain 0 -----+ domain 1 ----+
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">[slave 0 write]|[slave 0 read]|
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">  
Which timing wise is no real difference and still a problem.
  
But if you add a few more slaves (they don’t even need to be
online)
you get:
  
+ domain 0 -------------------------+ domain 1 ------------------
----
--+
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">[slave 0 write][slave 1 write][...]| [slave 0 read][slave 1
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">read][...]|
  
You can see you now have more separation between the slave 0
write
and read.
  
In your example (apart from the potential incorrect allocation
which
could itself cause issues) I don’t think the EL2008 would be
enough
to give a big enough separation (only 1 byte?).  Try adding two
or
three more of your problem slaves (they’re around 78 bytes each).
  
  
Here’s some background info on the Texas Instruments
issue:
<a class="moz-txt-link-freetext" href="https://www.ti.com/lit/an/spracj7/spracj7.pdf?ts=1669243747147">https://www.ti.com/lit/an/spracj7/spracj7.pdf?ts=1669243747147</a>
  * section 3.1.3 describes the TI ESC not working with non-
overlapping PDOs
  * Section 3.6 describes a malformed packet issue and its
workarounds, due to overlapping PDOs
  
In our cases where we’ve had problems with slaves our symptoms
were:
    1. On assigning the FMMU configuration the slave would stop
forwarding on frames
    2. I think we had one that got stuck in INIT, but can’t
remember
for sure
  
Regards,
Graeme.
  
  


From: Bilko AS, Oguz Dilmac <a class="moz-txt-link-rfc2396E" href="mailto:odilmac@bilko-automation.com"><odilmac@bilko-automation.com></a>
Sent: Thursday, 19 March 2026 23:49
To: Graeme Foot <a class="moz-txt-link-rfc2396E" href="mailto:Graeme.Foot@touchcut.com"><Graeme.Foot@touchcut.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a>
Subject: Re: [Etherlab-users] Timeout while setting state INIT.
  
Hi Graeme,
I connected a EK1100 bus coupler and a EL2008 digital output
card.
The first slave is the EK1100, and my device stay at the end.
I created two domains
Unfortunately the device still don't go to INIT.
Here, I put my test code and the dmesg output:
<a class="moz-txt-link-freetext" href="https://we.tl/t-Dj1MtId6LA">https://we.tl/t-Dj1MtId6LA</a>
Best regards,
Oguz.
  

On 19-Mar-26 1:16 AM, Graeme Foot wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">Hi Oguz,
  
It’s not looking likely to be an SII problem then.
  
 From the log it looks like you’re using a single Read/Write
domain.  I don’t recall if you mentioned, have tried putting it
in
separate read and write domains?  If you try this, also ensure
that
there are at least two other separate read and write domain
slaves
also configured in your system.
  
I’ve had a few slaves in the past (generally with Texas
Instruments
ESC’s) that work well with overlapped PDO’s in a single
Read/Write
domain (TwinCat’s default method), but fail when the PDO’s are
not
overlapped (EtherLab’s default).  If this is the case you can
put
them in separate read and write domains to separate them within
the
EtherCat frame.  But, you need to ensure there’s a couple of
other
read and write domain devices also configured to ensure there’s
enough separation in the frame.
  
  
Graeme.
  


From: Bilko AS, Oguz Dilmac<a class="moz-txt-link-rfc2396E" href="mailto:odilmac@bilko-automation.com"><odilmac@bilko-automation.com></a>
Sent: Thursday, 19 March 2026 02:33
To: Graeme Foot <a class="moz-txt-link-rfc2396E" href="mailto:Graeme.Foot@touchcut.com"><Graeme.Foot@touchcut.com></a>; Richard
Hacker<a class="moz-txt-link-rfc2396E" href="mailto:ha@igh.de"><ha@igh.de></a>; <a class="moz-txt-link-abbreviated" href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a>;
<a class="moz-txt-link-abbreviated" href="mailto:james.benway@gleeble.com">james.benway@gleeble.com</a>
Subject: Re: [Etherlab-users] Timeout while setting state INIT.
  
Hi,
I noticed, the correct path with option is: "--enable-sii-
override=/lib/firmware"
This way, the master can find my ec_xxx.bin file. But still at
the
end, slave doesn't respond to go INIT command.
Here is the dmesg output:
<a class="moz-txt-link-freetext" href="https://we.tl/t-BGDmNzZv2b">https://we.tl/t-BGDmNzZv2b</a>
Best regards,
Oguz.
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">-- 
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 class="moz-txt-link-abbreviated" href="mailto:odilmac@bilko-automation.com">odilmac@bilko-automation.com</a>
web site : <a class="moz-txt-link-freetext" href="http://www.bilko-automation.com">http://www.bilko-automation.com</a>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/@LyncaCNC">https://www.youtube.com/@LyncaCNC</a>
</pre>
          </blockquote>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">
-- 
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 class="moz-txt-link-abbreviated" href="mailto:odilmac@bilko-automation.com">odilmac@bilko-automation.com</a>
web site : <a class="moz-txt-link-freetext" href="http://www.bilko-automation.com">http://www.bilko-automation.com</a>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/@LyncaCNC">https://www.youtube.com/@LyncaCNC</a>

</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
</pre>
    </blockquote>
    <pre class="moz-signature" 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 class="moz-txt-link-abbreviated" href="mailto:odilmac@bilko-automation.com">odilmac@bilko-automation.com</a>
web site : <a class="moz-txt-link-freetext" href="http://www.bilko-automation.com">http://www.bilko-automation.com</a>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/@LyncaCNC">https://www.youtube.com/@LyncaCNC</a></pre>
  </body>
</html>