LinuxCNC Beckhoff EK1100 EL2004 EL1014 Failed to register PDO entry

More
30 May 2024 14:18 #301844 by Tobi
Hi, i'm new to LinuxCNC with ethercat. I followed the pined Instruction to install ethercat from apt.
I want to use an Beckhoff EK1100 with EL2004 and EL1014. When i try to run my linuxcnc configuration i get following error:
Failed to register PDO entry: No such file or directory
LCEC: master 0 PDO entry registration failed
LCEC: failure, clearing config
LCEC: exiting
LCEC: returning -EINVAL
lcec: rtapi_app_main: Invalid argument (-22)
./ethercat.hal:2: waitpid failed /usr/bin/rtapi_app lcec
./ethercat.hal:2: /usr/bin/rtapi_app exited without becoming ready
./ethercat.hal:2: insmod for lcec failed, returned -1
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime

I created an ethercat.hal which i added to the axis.ini file. I created a ethercat-conf.xml which i added to the ethercat.hal file.

Many thanks in advance, with kind regards
Tobi
 

Please Log in or Create an account to join the conversation.

More
30 May 2024 15:33 #301851 by TangentAudio
What do you get from running "ethercat slaves" and "ethercat pdos" from the command line?

Please Log in or Create an account to join the conversation.

More
31 May 2024 19:30 #301986 by Tobi
Hi, thank you for your rapid answer. Regarding your question i get following results:
tobi@linuxcnc:~$ ethercat slaves
0  0:0  PREOP  +  0x00000002:0x044c2c52
1  0:1  PREOP  +  EL2004 4K. Dig. Ausgang 24V, 0,5A
2  0:2  PREOP  +  EL1014 4K. Dig. Eingang 24V, 10�s
tobi@linuxcnc:~$ ethercat pdos
=== Master 0, Slave 1 ===
SM0: PhysAddr 0x0f00, DefaultSize    0, ControlRegister 0x46, Enable 1
  RxPDO 0x1600 "Channel 1"
    PDO entry 0x3001:01,  1 bit, "Output"
  RxPDO 0x1601 "Channel 2"
    PDO entry 0x3001:02,  1 bit, "Output"
  RxPDO 0x1602 "Channel 3"
    PDO entry 0x3001:03,  1 bit, "Output"
  RxPDO 0x1603 "Channel 4"
    PDO entry 0x3001:04,  1 bit, "Output"
=== Master 0, Slave 2 ===
SM0: PhysAddr 0x1000, DefaultSize    0, ControlRegister 0x00, Enable 1
  TxPDO 0x1a00 "Channel 1"
    PDO entry 0x3101:01,  1 bit, "Input"
  TxPDO 0x1a01 "Channel 2"
    PDO entry 0x3101:02,  1 bit, "Input"
  TxPDO 0x1a02 "Channel 3"
    PDO entry 0x3101:03,  1 bit, "Input"
  TxPDO 0x1a03 "Channel 4"
    PDO entry 0x3101:04,  1 bit, "Input"

Please Log in or Create an account to join the conversation.

More
03 Jun 2024 12:54 #302238 by TangentAudio
Your EK1100 is showing up strangely in the output:
0 0:0 PREOP + 0x00000002:0x044c2c52

0x00000002:0x044c2c52 is the correct VID:PID for an EK1100, but normally it would show something like:
1 1:1 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)

I'm not sure what this means in and of itself, but it's suspicious.

You might try opening another terminal and running "dmesg -wH" in it while you start up linuxcnc. This will show you some output from the low level ethercat drivers and can be very helpful with debugging.

Please Log in or Create an account to join the conversation.

More
03 Jun 2024 20:18 #302266 by Tobi
Hi, thank you for your help and your suggestions.
I'm already suspicious on the EK1100 too. I already tested linuxcnc with following ethercat-config and it ran just fine, showing data from the EK1100 in hal terminal:
<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
      <slave idx="0" type="EK1100"/>
  </master>
</masters>
I ran the command you suggested on my normal ethercat-config and filtered the output by using "grep EtherCAT" i got following output with 2 ERRORS:
Before running linuxcnc:
[  +0,011274] EtherCAT: Master driver 1.5.2 1.5.2.433.g30b782e-1+467.1
[  +0,000090] EtherCAT: 1 master waiting for devices.
[  +0,026181] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 1.5.2.433.g30b782e-1+467.1
[  +0,000012] EtherCAT: Accepting 64:51:06:2E:AA:E5 as main device for master 0.
[  +0,013530] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  +0,000062] EtherCAT 0: Link state of ecm0 changed to UP.
[  +0,004562] EtherCAT 0: Link state of ecm0 changed to DOWN.
[  +0,001934] EtherCAT 0: Link state of ecm0 changed to UP.
[  +0,012006] EtherCAT 0: 3 slave(s) responding on main device.
[  +0,000003] EtherCAT 0: Slave states on main device: INIT.
[  +0,000058] EtherCAT 0: Scanning bus.
[  +0,119514] EtherCAT 0: Bus scanning completed in 116 ms.
[  +0,000005] EtherCAT 0: Using slave 0 as DC reference clock.
[  +0,000001] EtherCAT ERROR 0: Failed to calculate bus topology.
[  +0,023868] EtherCAT 0: Slave states on main device: PREOP.

New entrys after running linuxcnc:
[Jun 3 21:59] EtherCAT: Requesting master 0...
[  +0,000005] EtherCAT: Successfully requested master 0.
[  +0,000152] EtherCAT ERROR 0 0:1: PDO entry 0x7000:01 is not mapped.
[  +0,000035] EtherCAT 0: Releasing master...
[  +0,000005] EtherCAT 0: Released.

I also ran the command on my ethercat-configuration with only the EK1100 and got following output:
[Jun 3 22:14] EtherCAT: Requesting master 0...
[  +0,000004] EtherCAT: Successfully requested master 0.
[  +0,000036] EtherCAT 0: Domain0: Logical address 0x00000000, 0 byte, expected working counter 0.
[  +0,000015] EtherCAT 0: Master thread exited.
[  +0,000002] EtherCAT 0: Starting EtherCAT-OP thread.
[  +0,000327] EtherCAT WARNING 0: 57 datagrams TIMED OUT!
[  +0,035152] EtherCAT 0: Slave states on main device: PREOP, OP.
[  +0,887990] EtherCAT WARNING 0: 7 datagrams UNMATCHED!
[  +1,999988] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[  +8,016000] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ +18,039998] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[  +0,715671] EtherCAT 0: Master thread exited.
[  +0,000010] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  +0,000208] EtherCAT 0: Releasing master...
[  +0,000001] EtherCAT 0: Released.
[  +0,031909] EtherCAT 0: Slave states on main device: PREOP.

Please Log in or Create an account to join the conversation.

More
03 Jun 2024 20:57 #302268 by TangentAudio
[ +0,000152] EtherCAT ERROR 0 0:1: PDO entry 0x7000:01 is not mapped.

I think that you have very old modules (EL2004, EL1014) in your system.

From what I've read, older versions of the modules (before revision 10) have their PDOs mapped differently. The EtherCAT code is expecting to find PDOs at 0x7000 on the EL2004, but your older unit has them at 0x3001.

I am not sure if it's possible to update/fix the unit by using the TwinCAT software on Windows, but there's also a way to use a modified ethercat XML file.

Take a look at this thread, it sounds very similar to your situation.

www.forum.linuxcnc.org/ethercat/44685-the-holy-grail?start=60

Please Log in or Create an account to join the conversation.

More
03 Jun 2024 21:02 #302269 by TangentAudio
That thread I linked has an example of a manually configured PDO entry for the older unit.  Replace the EL2004 line in your XML with:
<slave idx="1" type="generic" vid="00000002" pid="07D43052" name="el2004_dout">
<syncManager idx="0" dir="out">
<pdo idx="1600">
<pdoEntry idx="3001" subIdx="01" bitLen="1" halPin="dout-0" halType="bit"/>
</pdo>
<pdo idx="1601">
<pdoEntry idx="3001" subIdx="02" bitLen="1" halPin="dout-1" halType="bit"/>
</pdo>
<pdo idx="1602">
<pdoEntry idx="3001" subIdx="03" bitLen="1" halPin="dout-2" halType="bit"/>
</pdo>
<pdo idx="1603">
<pdoEntry idx="3001" subIdx="04" bitLen="1" halPin="dout-3" halType="bit"/>
</pdo>
</syncManager>
</slave>

Try your setup with just the EK1100 and EL2004, take the other module off for now.  I think the EL1014 is probably also old and may need a similar manual configuration.  It's easier to get one working at a time.


 

Please Log in or Create an account to join the conversation.

More
04 Jun 2024 15:41 #302324 by Tobi
Thank you for your great help. I modified my XML file with the code you provided and its working now.
I will copy and modify the code for the EL1014 Module as well.
You are right, i have an older system from Beckhoff.
The next days i should get an newer EL2008 I'm looking forward to try an newer module.

Thank you for your help.
Kind regards,
Tobi

Please Log in or Create an account to join the conversation.

More
04 Jun 2024 16:43 #302325 by TangentAudio

Thank you for your great help. I modified my XML file with the code you provided and its working now.
I will copy and modify the code for the EL1014 Module as well.


Great news, good luck with the EL1014!
cheers,
Steve
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum