Ethercat HAL driver

More
24 Oct 2018 03:45 #119313 by gbcwbz
Replied by gbcwbz on topic Ethercat HAL driver
According to IgH Master 1.5.2 Documentation - EtherLab

# cd /opt/etherlab
# cp etc/sysconfig/ethercat /etc/sysconfig/
# ln -s etc/init.d/ethercat /etc/init.d/
# insserv ethercat
Now the sysconfig file /etc/sysconfig/ethercat (see subsection 7.4.2), or the con-
figuration file /etc/ethercat.conf, if using systemd, has to be customized. The minimal
customization is to set the MASTER0_DEVICE variable to the MAC address of the Ether-
net device to use (or ff:ff:ff:ff:ff:ff to use the first device offered) and selecting
the driver(s) to load via the DEVICE_MODULES variable.

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

More
24 Oct 2018 05:00 #119320 by gbcwbz
Replied by gbcwbz on topic Ethercat HAL driver
@Nico2017

I had the same problem, and found that lcec.so is not linked with liblinuxcnchal.so and libethercat.so.
You can check that by:
ldd lcec.so
I reverted commit 7b1e4bb and it works.

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

More
24 Oct 2018 21:43 - 24 Oct 2018 22:34 #119363 by Nico2017
Replied by Nico2017 on topic Ethercat HAL driver
Hi,
committing to 7b1e4bb I got a different issue:

LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/plotter/linuxcnc/configs/LAMGUI'
Machine configuration file is 'lam.ini'
Starting LinuxCNC...
Found file(REL): ./lam-v1.hal
Note: Using POSIX realtime
lcec: dlopen: /usr/lib/linuxcnc/modules/lcec.so: undefined symbol: ecrt_slave_config_sdo
./lam-v1.hal:2: waitpid failed /usr/bin/rtapi_app lcec
./lam-v1.hal:2: /usr/bin/rtapi_app exited without becoming ready
./lam-v1.hal:2: insmod for lcec failed, returned -1
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/plotter/linuxcnc_debug.txt
and
/home/plotter/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

Are you running linuxcnc 2.7 or 2.8? Here are some of my system details:
uname -a
Linux plotter 4.9.0-8-rt-686-pae #1 SMP PREEMPT RT Debian 4.9.110-3+deb9u6 (2018-10-08) i686 GNU/Linux

cat /etc/debian_version
9.5
lsb_release -da
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch

Cheers,
Nicolas
Last edit: 24 Oct 2018 22:34 by Nico2017. Reason: More precise answer

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

More
24 Oct 2018 22:06 #119364 by Grotius
Replied by Grotius on topic Ethercat HAL driver
Hi Rene,

After my post i did a new install from clean hard disk. 64 bit debian stretch version.
After finishing i got a other error message, file not found....

I installed version from orginal ethercat site, because they say it's 64 bit compatible.
So i need more time. And will follow exactly the documentation line's.

What mr. gbcwbz, says. I always configure my mac adres and use a generic driver. This is the best way to get it work.
So there is work to do.

Is someone already succeeded on a linuxcnc 64 bit system?

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

More
25 Oct 2018 20:31 - 25 Oct 2018 20:37 #119410 by Grotius
Replied by Grotius on topic Ethercat HAL driver
Hi it works.



I did a new instal :
hg clone hg.code.sf.net/p/etherlabmaster/code ethercat-hg
cd ethercat-hg
hg update stable-1.5 ( i think next time i don't do this one )

./bootstrap
./configure --disable-8139too --enable-generic --enable-e1000e

make
make modules
sudo make install
sudo make modules_install
depmod

Open the sysconfig, in total there are 2 files with the same name, hmmm strange :
input mac adres
input generic driver

Then my previous error is solved by copy this entire folder :
sysconfig map copy to :
etc directory.

And i made a empty file in the dev folder with name :
EtherCAT0

And i make a few files from root to user privileges in the etherlab directory.

Now the ethernet is starting. Now i need to connect it to linuxcnc. Someone has expirience with this?

my system : Linux grotius 4.9.0-8-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
Attachments:
Last edit: 25 Oct 2018 20:37 by Grotius.

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

More
26 Oct 2018 01:11 #119416 by gbcwbz
Replied by gbcwbz on topic Ethercat HAL driver
Hi Nicolas,
I'm using LinuxCNC 2.7.14 from this repository Ubuntu PPA . Ubuntu 16.04 kernel 4.4.12-rt20

You may have a different problem. And you can check if lcec.so is linked with libethercat.so by running
ldd lcec.so
ecrt_slave_config_sdo is defined in libethercat.so and rtapi_mutex_get in liblinuxcnchal.so

@Grotius You can compile linuxcnc-ethercat and use config file from ethercat_3axis_CIA402 , use basic_3_CIA402_new.xml and add <masters></masters> in front and at the end of the file

Regards,
Bryan

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

Time to create page: 0.209 seconds
Powered by Kunena Forum