
11.4.3 System integration
An
init
script and a
sysconfig
file are provided to integrate the EtherCAT master as a service into a running system. These
are described below.
• Init Script
The EtherCAT master
init
script conforms to the requirements of the 'Linux Standard Base' (LSB). The script is installed to
etc/
init.d/EtherCAT
, before the master can be inserted as a service. Please note, that the
init
script depends on the
sysconfig
file described below.
LSB defines a special comment block to provide service dependencies (that is, which services should be started before others)
inside the init script code. System tools can extract this information to insert the EtherCAT init script at the correct place in the
startup sequence:
# Required - Start: $local_fs $syslog $network
# Should - Start: $time ntp
# Required - Stop: $local_fs $syslog $network
# Should - Stop: $time ntp
# Default - Start: 3 5
# Default - Stop: 0 1 2 6
# Short - Description: EtherCAT master
# Description: EtherCAT master 1.5.2
### END INIT INFO
• Sysconfig file
For persistent configuration, the
init
script uses a
sysconfig
file installed to
etc/sysconfig/EtherCAT
, that is mandatory for
the
init
script. The sysconfig file contains all configuration variables needed to operate one or more masters. The documentation
is inside the file and included below:
#------------------------------------------------------------------------------
## Main Ethernet devices.
#
# The MASTER <X> _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"
#
# 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 <X> _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.
#
MASTER0_DEVICE =""
# MASTER1_DEVICE =""
#
# Backup Ethernet devices
#
# The MASTER <X> _BACKUP variables specify the devices used for redundancy. They
# behaves nearly the same as the MASTER <X> _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.
#
NXP Semiconductors
EtherCAT
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
150 / 199