在树莓派4B上运行IgH EtherCAT master主站

igh ethercat不介绍了,用的非常广泛,开源的,官方网址:

IgH EtherCAT Master for Linux

代码:

git clone https://gitlab.com/etherlab.org/ethercat.git
git checkout stable-1.5

编译

$ ./bootstrap # to create the configure script, if downloaded from the repo

$ ./configure
$ make all modules

$ sudo su

# make modules_install install
# depmod

PREFIX默认是/usr/local/

  linking the init script and copying the sysconfig file from $PREFIX/etc
to the appropriate locations and customizing the sysconfig file.

# ln -s ${PREFIX}/etc/init.d/ethercat /etc/init.d/ethercat
# cp ${PREFIX}/etc/sysconfig/ethercat /etc/sysconfig/ethercat
# vi /etc/sysconfig/ethercat

Make sure, that the 'udev' package is installed, to automatically create the
EtherCAT character devices. The character devices will be created with mode
0660 and group root by default. If you want to give normal users reading
access, create a udev rule like this:

# echo KERNEL==\"EtherCAT[0-9]*\", MODE=\"0664\" > /etc/udev/rules.d/99-EtherCAT.rules

Now you can start the EtherCAT master:

# /etc/init.d/ethercat start

然后在examples目录下会有一些示例,可以运行看一看。

参考:

i在树莓派/4.x内核下安装IgH EtherCAT master主站_IGH EtherCAT的博客-CSDN博客

树莓派 IgH EtherCAT主站搭建_Eaglewzw的博客-CSDN博客

你可能感兴趣的:(物联网,ethercat,树莓派4B)