Ethercat HAL driver

More
11 Nov 2020 13:56 - 11 Nov 2020 13:58 #188996 by Grotius
Replied by Grotius on topic Ethercat HAL driver
Hi Nico,

Thanks for your reply !

You could also use the EtherCAT commands to identify all pdos directly.

It think for me that's the way to go.

I can set up a program that does the terminal command's to retrieve all the info.
Then setup the xml file. This program can be distributed as a Appimage.

Can you provide me a example of a servo example?
If you provide me the terminal command's with the required outputs and the correspondenting xml file. I can check that and write
the translation code for it quite quickly.

To other users, please do the same, so we can write the program.
If it all goes well, we can supply the program within the next "debian buster ethercat iso" release.
Last edit: 11 Nov 2020 13:58 by Grotius.
The following user(s) said Thank You: Nico2017

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

More
12 Nov 2020 12:03 #189101 by tetw
Replied by tetw on topic Ethercat HAL driver

Hi Tetw,

The bus is trying to connect to mac adres : 00:A0:D2:A5:C0:73
Look if you have the correct mac adres in your ethercat config file. $ ip addr show
I am not sure it's working correct.

Your output : ERROR 0 0:1: PDO entry 0x6000:01 is not mapped. Someone has a similar problem here :
etherlab-dev.etherlab.narkive.com/bqcnVQ...030-01-is-not-mapped

What does this command tell you : $ ethercat cstruct

Hi Grotius,
thanks for the quick answer, since the mac is correct the solution could be to re-install EtherCAT or change the source code installing this.
ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:a0:d2:a5:c0:73 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/24 brd 10.0.0.255 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:11:25:36:ab:91 brd ff:ff:ff:ff:ff:f
Attachments:

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

More
12 Nov 2020 16:37 #189123 by Grotius
Replied by Grotius on topic Ethercat HAL driver
Hi,

One thing you can check is the following. You have used capital letters in your mac. They are different then your terminal output.
Maybe it can cause an issue.

This one is oke : 00:a0:d2:a5:c0:73

Installing your link is an option. But there is a iso you can use. Wich makes the full process about 10 minutes.

What does this command tell you : $ ethercat cstruct ?? or ./ethercat cstruct
I still don't know what is working at your place.

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

More
13 Nov 2020 15:01 #189213 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver
Hi Jan,

may i ask you if you could upload your ethercat_conf.xml which you used in your Youtube video?

Have started to make my own for my Ethercat Stepper Driver and Stuck at the Section of the Control Word.

Thanks

Sven

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

More
16 Nov 2020 20:43 #189545 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @JanMrlth,

Do I need a 'real' driver to be able to run a axis in real time? How much slower is the generic driver?


In my experience, the generic driver works very well if you have few connected devices, enough if they are in free mode and if it is in SYNC0 mode, nothing happens if a cycle is lost because the next cycle I will read the data again, but if you have many devices and you use the SYNC0 and SYNC1 mode, I advise you to use the e1000e controller, the configuration of the devices is much faster and you have no loss of synchronism.

Greeting
Chimeno
The following user(s) said Thank You: JanMrlth

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

More
16 Nov 2020 20:50 #189547 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @tetw

I don't understand what your problem is, it is best to start a device one by one, first the ones included in linuxcnc-ethercat and the generic ones are the last ones, don't configure anything until you have registered PDOs and devices in OP.

Greeting
Chimeno

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

More
18 Nov 2020 19:11 - 18 Nov 2020 19:14 #189712 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver
Hi,

i got following Error message if i try to run my first created ethercat_conf.xml
it says: lcec_conf: ERROR: Parse error at line 52: mismatched tag.
It is the </master> tag in my XML, but i don´t know what it should look like.

The complete error log follows.

File Attachment:

File Name: ethercat-conf.txt
File Size:3 KB
Attachments:
Last edit: 18 Nov 2020 19:14 by jc2ktr. Reason: log files added

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

More
18 Nov 2020 19:56 #189719 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @jc2ktr

I attach modified file, the error is that you have to close the slave at the end
<slave idx="0" type="generic" vid="00000A88" pid="0A880002" configPdos"true">
......
......
 </slave>

Greeting
Chimeno
Attachments:
The following user(s) said Thank You: jc2ktr

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

More
19 Nov 2020 16:52 #189791 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver
Thank you i must have missed this. I found another error in my Config. There was an <syncManager> entry which was not neccesary.

My Device Runs now, but how can i get my I/O´s to my axis configuration.

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

More
20 Nov 2020 12:13 #189886 by tetw
Replied by tetw on topic Ethercat HAL driver

Hi,

One thing you can check is the following. You have used capital letters in your mac. They are different then your terminal output.
Maybe it can cause an issue.

Hi Grotius,
Yes the mac is correct, I tried with uppercase and lowercase

What does this command tell you : $ ethercat cstruct ?? or ./ethercat cstruct

I attach l’output file

File Attachment:

File Name: slave_2020-11-20.c
File Size:20 KB


Installing your link is an option. But there is a iso you can use. Wich makes the full process about 10 minutes.

If you can marbles the link the ISO and the installation steps
thanks for your time.

Hello @tetw

I don't understand what your problem is, it is best to start a device one by one, first the ones included in linuxcnc-ethercat and the generic ones are the last ones, don't configure anything until you have registered PDOs and devices in OP.

Greeting
Chimeno

Hi Chimeno,
I can't bring the slaves to OP mode.
dmesg | egrep EtherCAT
[   10.316518] EtherCAT: Master driver 1.5.2 unknown
[   10.316767] EtherCAT: 1 master waiting for devices.
[   10.325681] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[   10.325708] EtherCAT: Accepting 00:A0:D2:A5:C0:73 as main device for master 0.
[   10.336070] EtherCAT 0: Starting EtherCAT-IDLE thread.
[   10.336161] EtherCAT 0: Link state of ecm0 changed to UP.
[   10.345732] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[   11.350801] EtherCAT WARNING 0: 125 datagrams TIMED OUT!
[   12.354137] EtherCAT WARNING 0: 125 datagrams TIMED OUT!
[   13.358682] EtherCAT WARNING 0: 121 datagrams TIMED OUT!
[   14.151273] EtherCAT 0: Link state of ecm0 changed to DOWN.
[   80.361852] EtherCAT: Requesting master 0...
[   80.361861] EtherCAT: Successfully requested master 0.
[   80.361899] EtherCAT 0: Domain0: Logical address 0x00000000, 0 byte, expected working counter 0.
[   80.363775] EtherCAT 0: Master thread exited.
[   80.363780] EtherCAT 0: Starting EtherCAT-OP thread.
[   80.369196] EtherCAT WARNING 0: 97 datagrams TIMED OUT!
[   80.397692] EtherCAT 0: Master thread exited.
[   80.397706] EtherCAT 0: Starting EtherCAT-IDLE thread.
[   80.397810] EtherCAT 0: Releasing master...
[   80.397815] EtherCAT 0: Released.
[   80.625045] EtherCAT WARNING: Datagram f6a2e250 (master-fsm) was SKIPPED 1 time.
[   94.471306] EtherCAT: Requesting master 0...
[   94.471315] EtherCAT: Successfully requested master 0.
[   94.471382] EtherCAT ERROR 0 0:1: PDO entry 0x6000:01 is not mapped.
[   94.471965] EtherCAT 0: Releasing master...
[   94.471977] EtherCAT 0: Released.
thanks chimeno.
Attachments:

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

Time to create page: 0.320 seconds
Powered by Kunena Forum