Ethercat HAL driver

More
12 Jan 2021 20:14 #195111 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @MRBaird

I am trying to get a EL3054 to work. I am completely new to Linux so everything is a bit challenging. Do I just modify a similar .H and .C file and add in lcec.conf? Does it compile when its run for the first time or do i have to compile myself?


every time you modify a file you have to compile it again and install it.
sudo make install

the files you have to modify for an existing device.
xxxx.c
xxxx.h
lcec_conf.c
lcec_conf.h
lcec_main.c

the files you have to modify to add a new controller
xxxx.c
xxxx.h
lcec_conf.c
lcec_conf.h
lcec_main.c
Kbuild

Greeting
Chimeno

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

More
12 Jan 2021 21:54 #195127 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @sqmathlete

Way back in April 2020 there was some discussion about the EL5101 incremental encoder. I have finally got around to hooking mine up and I am happy to say that it worked perfectly out of the box. However, I am running the encoder on the spindle of the lathe and I need to be able to monitor the index pulse in order for linuxcnc to synchronise motion while threading.

According to the manual (pg 144) the status of A,B and C inputs can be monitored via 0x6010:09, 0x6010:0A, and 0 x 6010:0B . Is it possible to add these pdo's either by twincat or by modifying the el5101 source file?



If possible and easy enough to do, you can do it in generic mode.

Greeting
Chimeno

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

More
15 Jan 2021 09:42 #195421 by JKAVS
Replied by JKAVS on topic Ethercat HAL driver
I've got EK1100 to test with. Looks like it should be rather quick to try with the ISO posted earlier.

A tutorial was posted some time ago showing how to generate XML for the generic driver from the XML supplied by the device manufacturer. To my understanding basically any Ethercat device could work that way. Is that true?

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

More
15 Jan 2021 18:43 #195475 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
@JKAVS

Yes your EK1100 will work with the Grotius ISO. The path to the HAL files are /usr/share/linuxcnc/hallib/

I believe your correct about the "generic' working for pretty much anything EtherCAT, but seems like the generic driver affects latency. Chimeno or Grotius will be able to advise you totally on the generic driver, as I have not used it.

I am at work, but later will try to give you some help with getting your EK1100 working unless someone chimes in before me.


Robert

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

More
16 Jan 2021 17:50 #195554 by JKAVS
Replied by JKAVS on topic Ethercat HAL driver
I installed the ISO and ran the Ethercat installer, but it doesn't seem to work. There is no blinking on the bus lights and trying to open LinuxCNC leads to error which seems to be caused by a missing Ethercat device. The lights blink a few times during the installation but then are continuously illuminated. If the bus works the lights should blink constantly, right?

Maybe the problem is that my computer has two network cards. One is some Realtek integrated to the motherboard and the other is Intel PRO/1000 GT network card. I'm planning to use the integrated for network traffic and Intel for Ethercat. I also didn't have the EK1100 connected during OS installation. Was that wrong?

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

More
17 Jan 2021 00:43 #195612 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
JKAVS

Just a really quick reply.... No you don't need the EK1100 hooked up during installation....

The network card is specific... you must have a Intel chip.. Beckhoff has a list of the compatible cards, but only Intel chips work. Will try to get list later. Just busy with paperwork this weekend.

If you open a command prompt and do a "ethercat" and it generates the ethercat info list, then you have it installed and it would be the network card. Also you must edit /etc/default/ethercat to match the hardware of the installation PC... do a "ifconfig" to get the address. Then pico /etc/default/ethercat to edit the MASTER0_DEVICE= section. Afterwards do a "sudo update-ethercat-config" If you haven't done any of this, then that is the problem, or one of the problems.

Also you must have the XML file loaded to get LCNC to fire up. It must match what you have for hardware... if only a EK1100 and no terminals, then real simple XML.

Sorry so quick and short, just busy with paperwork.
Robert

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

More
17 Jan 2021 01:26 #195618 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
JKAVS.

My bad, if you are using the Grotius ISO, then you don't need to do the XML as it will work out the box... just make sure you edit /etc/default/ethercat to match the hardware and it should work.

Will reply later if you don't understand.


Robert

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

More
17 Jan 2021 01:40 #195620 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Just to be clear, I meant no XML for simply getting the EK1100 recognized and working. If you are doing other terminals that need the "generic" driver, then yes will need to re-vise for what you have. I would start with only the EK1100 to get it working and then add terminals. I don't remember re-doing the XML in Grotius ISO, but I have several EtherCAT setups and I might be wrong.... but seems like his out of the box worked without re-working the XML for just a EK1100 only.

Robert

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

More
17 Jan 2021 04:22 #195632 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Ok, I went back and took a quick look as I have not worked on Grotius ISO in a bit... I know I altered the 2 setups that I put together, so I need to go back and do a fresh install to make sure I don't screw you up.

Once again I may have changed things and this info may be incorrect...

The /Desktop/Linuxcnc_axis/configs/sim.qtvcp_screens folder should have the qtvcp_postgui.hal and the ethercat-conf.xml file. I don't think I put the xml there and it was part of the ISO, but then again this was a couple months back and I have been working on 2 other setups. I am super pressed for time as I have to get some paperwork out this weekend, but will try to take time and do a fresh install to help you out.... but I really think you are needing to edit the MASTER0_DEVICE section in the /etc/default/ethercat file to get it working.


Robert

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

More
17 Jan 2021 08:27 #195639 by JKAVS
Replied by JKAVS on topic Ethercat HAL driver
The problem must be caused by not having edited the MASTER0_DEVICE. I'll try again today.

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

Time to create page: 0.156 seconds
Powered by Kunena Forum