Ubuntu14.04安装igH EtherCAT Master

一、下载EtherCAT安装包

安装包下载路径:EtherLab EtherCAT Master / Code / [334c34],打开后点击Download下载

二、安装前置依赖库

最好切换到root用户进行下列步骤

apt-get install autoconf automake libtool net-tools

三、编译安装

解压安装包,进入安装包目录

root@ubuntu:/usr/local/4412# unzip etherlabmaster-code-33b922ec1871ea835f662ac1041317e815a8fdfd/

root@ubuntu:/usr/local/4412# cd  etherlabmaster-code-33b922ec1871ea835f662ac1041317e815a8fdfd/

生成配置文件、配置

./bootstrap

./configure --enable-cycles --enable-hrtimer --enable-8139too=no --enable-generic=yes

编译,加载模块;注:在depmod前将驱动拷贝lib目录下,不然系统默认搜索目录找不到,最后执行start时报错;参考:ethercat master Module ec_master not found_F_hawk189的博客-CSDN博客

make all modules

make modules_install install

depmod

注:网上看到的,如果遇到 implicit declaration of function 'signal_pending';did you mean 'timer_pending'错误;

解决办法:在master.c中加入 #include <linux/sched/signal.h>,然后重新编译

这个是网上看到的,我没遇到这个错误。

四、修改网卡地址

使用ifconfig查看机器的网卡信息

ifconfig

 

五、修改EtherCAT配置文件

注:网上很多教程是修改/usr/local/下的etc里,是因为不同版本的安装目录不同,我这个是安装在/opt目录下的的,这个视你使用的版本修改。

gedit /opt/etherlab/etc/sysconfig/ethercat

 六、创建连接

要使用root权限执行以下命令

ln -s /opt/etherlab/etc/init.d/ethercat /etc/init.d/ethercat

mkdir /etc/sysconfig

ln -s /opt/etherlab/etc/sysconfig/ethercat /etc/sysconfig/ethercat

ln -s /opt/etherlab/bin/ethercat /usr/bin/ethercat

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

七、启动EtherCAT

/etc/init.d/ethercat start

ethercat master

ethercat slave

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值