使用新力川步进电机测试ether cat-igh的环境搭建

#1.树莓派4B作为主控
#2.开关电源24V明纬供电
#3.新力川ethercat步进控制器CL3-E57H
#4.新力川42步进闭环电机LC42H249

#使用了以上四个部件,来搭建现有的测试硬件环境

使用新力川步进电机测试ether cat-igh的环境搭建_第1张图片

#使用命令行测试正常
#ethercat软件的安装需要从码云上git最新的
# https://gitee.com/cheni/ethercat.git
#这个是从github上镜像过来的,速度比较快,安装到最新版的ubuntu没有太多异常,可以正常运行。

 使用新力川步进电机测试ether cat-igh的环境搭建_第2张图片

 使用新力川步进电机测试ether cat-igh的环境搭建_第3张图片

#一开始遇到不能找到从站的问题,主要是配置文件中有点儿问题

#两个地方都要改才行

MASTER0_DEVICE="e4:5f:01:27:1b:3c"
DEVICE_MODULES="generic"

#------------------------------------------------------------------------------
#
#  EtherCAT master configuration file for use with init.d.
#
#  $Id$
#
#  vim: spelllang=en spell tw=78
#
#------------------------------------------------------------------------------

#
# Main Ethernet devices.
#
# The MASTER_DEVICE variable specifies the Ethernet device for a master
# with index 'X'.
#
# Specify the MAC address (hexadecimal with colons) of the Ethernet device to
# use. Example: "00:00:08:44:ab:66"
#
# Alternatively, a network interface name can be specified. The interface
# name will be resolved to a MAC address using the 'ip' command.
# Example: "eth0"
#
# The broadcast address "ff:ff:ff:ff:ff:ff" has a special meaning: It tells
# the master to accept the first device offered by any Ethernet driver.
#
# The MASTER_DEVICE variables also determine, how many masters will be
# created: A non-empty variable MASTER0_DEVICE will create one master, adding a
# non-empty variable MASTER1_DEVICE will create a second master, and so on.
#
# Examples:
# MASTER0_DEVICE="00:00:08:44:ab:66"
# MASTER0_DEVICE="eth0"
#
MASTER0_DEVICE="e4:5f:01:27:1b:3c"
#MASTER1_DEVICE=""

#
# Backup Ethernet devices
#
# The MASTER_BACKUP variables specify the devices used for redundancy. They
# behaves nearly the same as the MASTER_DEVICE variable, except that it
# does not interpret the ff:ff:ff:ff:ff:ff address.
#
#MASTER0_BACKUP=""

#
# Ethernet driver modules to use for EtherCAT operation.
#
# Specify a non-empty list of Ethernet drivers, that shall be used for
# EtherCAT operation.
#
# Except for the generic Ethernet driver module, the init script will try to
# unload the usual Ethernet driver modules in the list and replace them with
# the EtherCAT-capable ones. If a certain (EtherCAT-capable) driver is not
# found, a warning will appear.
#
# Possible values: 8139too, e100, e1000, e1000e, r8169, generic, ccat, igb.
# Separate multiple drivers with spaces.
#
# Note: The e100, e1000, e1000e, r8169, ccat and igb drivers are not built by
# default. Enable them with the --enable- configure switches.
#
DEVICE_MODULES="generic"

#
# List of interfaces to bring up and down automatically.
#
# Specify a space-separated list of interface names (such as eth0 or
# enp0s1) that shall be brought up on `ethercatctl start` and down on
# `ethercatctl stop`.
#
# When using the generic driver, the corresponding Ethernet device has to be
# activated before the master is started, otherwise all frames will time out.
# This the perfect use-case for `UPDOWN_INTERFACES`.
#
UPDOWN_INTERFACES=""

#
# Flags for loading kernel modules.
#
# This can usually be left empty. Adjust this variable, if you have problems
# with module loading.
#
#MODPROBE_FLAGS="-b"

#------------------------------------------------------------------------------

查看了一下dmesg命令,也有相关信息

使用新力川步进电机测试ether cat-igh的环境搭建_第4张图片

 

 

你可能感兴趣的:(ethercat,开源主站IGH使用,git)