How: Add more (Beckhoff) devices to EtherCAT HAL driver?

More
5 years 5 months ago #208731 by Stormholt
Hello Grotius

here you go, thank you for looking into my problem.
The following user(s) said Thank You: Grotius

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

More
5 years 5 months ago - 5 years 5 months ago #208735 by Grotius
Hi Stormhold,There are no compile errors or warnings. Everything ok.If i compare the 2 files. I see at line 72 there is a diff. At 170 there is a diff.For the rest it looks good.
1

2

3

4


[edit]
Look at line 69.
Last edit: 5 years 5 months ago by Grotius.
The following user(s) said Thank You: Stormholt

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

More
5 years 5 months ago #209200 by Stormholt
Indeed line 69 is curious, however looking at both the cstruct of both devices and using Twincat the pdo entries are correct. Also i did try changing that and some other entries and it showed no results.

line 170 to 175 are some old test code that i thought i removed.

Are there any other tools useful in debugging ethercat devices ?

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

More
5 years 5 months ago #209214 by Grotius
Hi Stormhold,

You can write a driver following the ethercat source examples. The mini.c is a example that worked for me in the past.
If it works over there, you are one step ahead.

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

More
5 years 4 months ago - 5 years 4 months ago #210997 by Stormholt
I have identified the problem. however not the solution.

Whenever i use a device with 3xxx in its name, then devices after that in the stack will fail. So when i used both el3314 and el3202, the device with the highest slave address(furthest to the right in EK1100) will fail
Or if i have a stack like: EL2004, EL3004, EL1004, EL3314, EL3202, then every device after EL3004 will fail.
Using wireshark i can see that data from the failing device are not sent.
In linuxcnc, failing devices show weird values often depending on the first terminal in the stack. I suspect Ethercat, expecting x bytes from the failing device(s), will wrap-around reading from the next datagram resulting in mysterious values.

I cannot figure out the root of the problem, perhaps the drivers compromise each other.

any insight is appreciated

Edit: attached drivers for 3xxx devices
Last edit: 5 years 4 months ago by Stormholt. Reason: Device drivers

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

More
5 years 4 months ago #211217 by Grotius
Hi Stromhold,

What if we remove the "xxx"' in all the code, and just compile it with the correct driver names?
Did you already try this out?

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

Time to create page: 0.258 seconds
Powered by Kunena Forum