- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Long initialization of Ethercat on servo drive SV660N
Long initialization of Ethercat on servo drive SV660N
- Hakan
- Offline
- Platinum Member
-
- Posts: 1152
- Thank you received: 412
Chatgpt says the likely reason for EoE drives to hang is that the EoE mailbox isn't serviced/emptied.
Yes, it isn't. Maybe one can try that, it doesn't have to be more advanced. A code snippet that does that
static void *eoe_worker(void *arg)
{
while (eoe_running) {
/* Receive mailbox data */
ecrt_master_receive(lcec.master);
for_each_eoe_ctx(ctx) {
ecrt_eoe_process(ctx->eoe);
}
/* Transmit */
ecrt_master_send(lcec.master);
usleep(1000); /* 1 ms, configurable */
}
return NULL;
}I would need a slave with EoE. I don't have that. Maybe maybe I can make one, there
is an example in SOES with lwip. Or anyone know of a not too pricey servo drive with EoE?
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 11653
- Thank you received: 3924
- where is eoe_running defined?
- where is *arg used?
- the for statement seems invalid.
I find Grok lies less than ChatGPT but still gives me wrong code sometimes.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 11653
- Thank you received: 3924
the official linuxcnc Ethercat driver at github.com/linuxcnc-ethercat/linuxcnc-ethercat does not currently support EoE (Ethernet over Ethercat) drives such as the SV660N drive. Can you suggest modifications to the code to enable EoE support?
And he gave a very comprehensive answer.
Its far to comprehsensive to share on the forum due to formatting but I saved hos answer to markdown and converted to pdf which is attached
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
- Posts: 1152
- Thank you received: 412
I'll keep searching.
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
- Posts: 290
- Thank you received: 96
E.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 11653
- Thank you received: 3924
I don't think it works. The master is meant to sense if of EoE is available but 2 things collide.Did anybody get it to run with Rods guide??
E.
1. There is a bug affecting this drive in the ethercat master
2. the Linuxcnc driver does not support EoE
I think without the bug it should fall back to supporting non-EoE mode but its a long time since I looked at this.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
- Posts: 1152
- Thank you received: 412
Ethercat master creates a handler, documentation page 104 docs.etherlab.org/ethercat/1.6/pdf/ethercat_doc.pdf
The queue in the EoE handler needs to be processed by the EoE state machine. And that is what doesn't happen.Creation of EoE Handlers
During bus scanning (see section 5.4), the master deter-
mines the supported mailbox protocols for each slave. This is done by examining the
“Supported Mailbox Protocols” mask field at word address 0x001C of the SII. If bit
1 is set, the slave supports the EoE protocol. In this case, an EoE handler is created
for that slave.
The queue gets filled up and everything stops. Lcec should process the queue regularly when
in cyclous mode, to get packets in and out. That's the code that need to be in place and I think
that is what grok and Chatgpt both are proposing. And also kworm identified that.
Three out of three, majority win right?, so I think that's what's needs to be done.
There is no disabling of EoE support in the Ethercat master code. As in the quote above, if byte 0x38 (word 0x1c) is "1"
in the right place, EoE handlers are created, queue gets built up and everything stops.
What people do are
1. Read out the eeprom and change that "1" in byte 0x38 to "0" and write back the new eeprom contents to the drive.
Ethercat master will then identify no support for EoE and go on with that track.
2. Disable EoE altogether in the Ethercat master with ./configure --disable-eoe during build.
The outcome is the same as above. No EoE processing, no queues that build up.
So what is broken and what isn't? Don't fix what isn't broken. It looks like the Ethercat master is broken, but that is not the case.
It is doing its part. Lcec on the other hand doesn't do what it should do to make EoE work. Lcec should regularly
process the EoE queue that are being built up. That's what needs to be added.
I have looked at what I have and I don't have any equipment with EoE to practice on.
I can always buy one, it's an interesting enough task, but EoE servo drives seems to cost multum.
And I haven't really found one. Looks like I'll be standing on the sidelines cheering.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
- Posts: 1152
- Thank you received: 412
Time to open an issue github.com/linuxcnc-ethercat/linuxcnc-ethercat/issues/458
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Long initialization of Ethercat on servo drive SV660N