Professional Documents
Culture Documents
E-COCKPIT EtherCAT
E-COCKPIT EtherCAT
COCKPIT
Configuring EtherCAT Networks in e!COCKPIT
2759-0101
Technical Support
Phone: +49 571/887 – 44555
Fax: +49 571/887 – 844555
E-Mail: * support@wago.com
Every conceivable measure has been taken to ensure the accuracy and completeness of
this documentation. However, as errors can never be fully excluded, we always appreci-
ate any information or suggestions for improving the documentation.
E-Mail: * documentation@wago.com
We wish to point out that the software and hardware terms as well as the trademarks of
companies used and/or mentioned in the present manual are generally protected by
trademark or patent.
Table of Contents
1 Terms ................................................................................................................................ 5
1.1 Intended Use ........................................................................................................... 5
1.2 Typographical Conventions..................................................................................... 6
1.3 Legal Information .................................................................................................... 8
2 Security ............................................................................................................................. 9
2.1 General Safety Regulations .................................................................................... 9
2.2 Indirect Safety ......................................................................................................... 9
3 Overview ......................................................................................................................... 10
4 EtherCAT......................................................................................................................... 11
9 Appendix......................................................................................................................... 47
9.1 EtherCAT Master: Features and Function ............................................................ 47
9.1.1 Relationship between Bus Cycle and Task .................................................. 48
9.1.2 EtherCAT-Specific Variables ........................................................................ 50
9.1.3 Libraries........................................................................................................ 50
9.1.3.1 Master.................................................................................................. 50
9.1.3.2 Slave.................................................................................................... 53
9.1.3.2.1 Linked List to Check All Slaves.................................................. 54
9.1.4 Reading and Writing Device Parameters ..................................................... 54
Terms
1
This documentation applies to the configuration of EtherCAT devices with the e!COCK-
PIT software (2759-0101), software version 1.10.0.
Note
Observe other applicable documentation!
The software must only be installed and operated according to the instructions of the
complete Instructions for use. Knowledge of the complete Instructions for use is required
for proper use.
1. First read the e!COCKPIT manual to familiarize yourself with the software. Safe op-
eration of e!COCKPIT is a prerequisite for understanding this documentation.
2. Also read the product manuals for the products you use (e.g., fieldbus couplers, con-
trollers and panels).
• e!COCKPIT manual
• Quick start reference
• Library descriptions
• Manuals for products used (e.g., PFC200)
• Release notes
• News
You can find the documents in PDF format in the Windows Start menu under WAGO
Software > e!COCKPIT.
You can open the context-sensitive online help within e!COCKPIT by pressing [F1] on
your keyboard.
Improper Use
Improper use of the products is not permitted. Specifically, improper use occurs in the fol-
lowing cases:
• Non-observance of the intended use
• Use of the products in areas with special risk that require flawless continuous operation
and in which failure or operation of the software can result in an imminent risk to life,
limb or health or cause serious damage to property or the environment (such as the
operation of nuclear power plants, weapon systems , aircraft and motor vehicles)
Obligations of Installers/Operators
The installers and operators bear responsibility for the safety of an installation or a sys-
tem assembled with the products. The installer/operator is responsible for proper installa-
tion and safety of the system. All laws, standards, guidelines, local regulations and ac-
cepted technology standards and practices applicable at the time of installation, and the
instructions in the the products’ Instructions for Use, must be complied with. In addition,
the Installation regulations specified by Approvals must be observed. In the event of non-
compliance, the products may not be operated within the scope of the approval.
Number Notation
100 Decimals: Normal notation
0x64 Hexadecimals: C-notation
‘100’ Binary: In single quotation marks
‘0110.0100’ Nibbles separated by a period
Text Formatting
italic Names of paths or files
bold Menu items, entry or selection fields, emphasis
Code Sections of program code
> Selection of a menu point from a menu
“Value” Value entries
[F5] Identification of buttons or keys
Action Instructions
ü This symbol identifies a precondition.
1. Action step
2. Action step
ð This symbol identifies an intermediate result.
ð This symbol identifies the result of an action.
Lists
• Lists, first level
– Lists, second level
Figures
Figures in this documentation are for better understanding and may differ from the actual
product design.
Notes
DANGER
Type and source of hazard
Possible consequences of hazard that also include death or irreversible injury
• Action step to reduce risk
WARNING
Type and source of hazard
Possible consequences of hazard that also include severe injury
• Action step to reduce risk
CAUTION
Type and source of hazard
Possible consequences of hazard that include at least slight injury
• Action step to reduce risk
! NOTICE
Type and source of malfunction (property damage only)
Possible malfunctions that may restrict the product’s scope of functions or ergonomics,
but do not lead to foreseeable risks to persons
• Action step to reduce risk
Note
Notes and information
Indicates information, clarifications, recommendations, referrals, etc.
Intellectual Property
Unless barred by applicable legal provisions, unauthorized copying and distribution of this
document, as well as the use and communication of its content are strictly prohibited un-
less expressly authorized by prior agreement. Third-party products are always mentioned
without any reference to patent rights. WAGO GmbH & Co. KG, or for third-party prod-
ucts, their manufacturer, retain all rights regarding patent, utility model or design registra-
tion.
Third-party trademarks are referred to in the product documentation. The “®” and “TM”
symbols are omitted hereinafter. The trademarks are listed in the Appendix (8 Protected
Rights [} 59]).
Subject to Change
The instructions, guidelines, standards, etc., in this manual correspond to state of the art
at the time the documentation was created and are not subject to updating service. The
installer and operator bear sole responsibility to ensure they are complied with in their
currently applicable form. WAGO GmbH & Co. KG retains the right to carry out technical
changes and improvements of the products and the data, specifications and illustrations
of this manual. All claims for change or improvement of products that have already been
delivered – excepting change or improvement performed under guarantee agreement –
are excluded.
Licenses
The e!COCKPIT software and related components are protected by license mechanisms.
Further information on licensing can be found in the e!COCKPIT product manual in
“Licenses.”
Use of the EtherCAT functionality requires a license for the master device used. The li-
cense depends on the performance class of the device (see 8 Licensing [} 57]).
Without a license, the EtherCAT functionality can be used free of charge for 30 days.
Security
2
2.1 General Safety Regulations
• This documentation is part of the product. Therefore, retain the documentation during
the entire service life of the product. Pass on the documentation to any subsequent
user of the product. In addition, ensure that any supplement to this documentation is
included, if necessary.
• Any actions related to the use of WAGO software may only be performed by qualified
staff with sufficient knowledge to use the respective PC system.
Steps in which files are created or changed on a PC system may only be performed by
qualified employees with sufficient knowledge in the administration of the PC system
used in addition to file creation or modification.
Steps that change the PC system’s behavior within a network may only be performed
by qualified employees with sufficient knowledge of administration of the responsible
network.
• Comply with the laws, standards, guidelines, local regulations and accepted technol-
ogy standards and practices applicable at the time of installation.
Overview
3
This documentation describes the EtherCAT-specific software interfaces in the e!COCK-
PIT software that are used to configure and parameterize EtherCAT devices. It also con-
siders examples of project engineering of EtherCAT networks on the basis of different
scenarios with different devices and device roles (master/slave).
e!COCKPIT is an integrated development environment with seamless data retention for
all automation tasks, such as configuration and parameterization of hardware, CODESYS
V3-based programming, visualization for operation and monitoring and diagnostics to find
and correct errors.
Devices from the product catalog can be arranged in the project by means of the network
scan function or by dragging and dropping them. Fieldbus-specific device description files
(e.g., EDS), device drivers and libraries allow systems from other suppliers to be inte-
grated into the topology along with WAGO devices.
The network is designed by connecting devices to each other. Device parameters can be
set on panels. Integrated configurators also support fieldbus-specific configuration of de-
vices and the network.
Note
Observe other applicable documentation!
First read the e!COCKPIT manual to familiarize yourself with the software. Safe operation
of e!COCKPIT is a prerequisite for understanding the following contents. Also read the
product manuals for the products you use (e.g., fieldbus couplers, controllers and pan-
els).
EtherCAT
4
The real-time Ethernet solution, EtherCAT (“Ethernet for Control Automation Technol-
ogy”) has been an IEC-standardized, open protocol that was standardized by the IEC in
2005 and is characterized specifically by the following properties:
• Very short cycle times
• Obtain accurate synchronization due to distributed clocks
• Jitter of only ≤ 1 µs
Thanks to its real-time capability, EtherCAT can be used, for example, where processes
should run with simultaneous actions despite being spatially distributed.
Fast and precise diagnostics are possible with EtherCAT using time stamps. Since Ether-
CAT, as an Ethernet-based fieldbus, uses the standard Ethernet frames in accordance
with IEEE 802.3, EtherCAT communication can be monitored using standard Ethernet
monitoring tools.
Note
Addition Information about EtherCAT
To further develop the technology, interested parties, manufacturers and users of Ether-
CAT are united in an “Industrial Ethernet EtherCAT Technology Group”, which provides
further information on the Internet:
ü http://www.ethercat.org
EtherCAT
5 Settings in e!COCKPIT
e!COCKPIT integrates various configurators and settings options to configure device pa-
rameters, as well as fieldbus-specific device interfaces and connections between devices.
Communication-related are made in e!COCKPIT in the following places:
• “Settings” panel
→ see 8 General Settings for Devices and Fieldbus Interface [} 15]
• Fieldbus configurator
→ Configuration of connections between the master and slave on the data point level
(see 8 Master and Connection Settings in the Fieldbus Configurator [} 25])
• The “Type plate” tab displays the manufacturer, item number and description of the de-
vice.
• Clicking the [Interface Settings] tab in the “EtherCAT” tab displays the configuration
of the slave device.
When Master is selected, an “EtherCAT” tab is displayed that includes the following set-
tings for the bus cycle task:
Table 1: “EtherCAT” (Master) Tab – Bus Cycle Task
Parameters Value Description
General Settings
Bus cycle task PLC_Task / EtherCAT Select cycle for variable updating
(additional; dynamic selection The task selection displayed here results from the created
based on the task configuration) task configurations of the application.
Use the cycle settings of the The device structure searches upward for the next valid
parent bus. definition of the bus cycle task.
• The [IEC Object] button opens a window that displays the libraries instantiated by the
master.
• The [Interface Settings] button displays the configuration of the slave device.
Interface settings for master and slave are described below.
Optional Only available of the “Autoconfig Master/Slaves” option is enabled in the interface set-
tings of the EtherCAT master and the function is supported by the EtherCAT slave.
Defines the slave as optional.
No error messages are generated if the device is not in the bus system.
Note: If you define a slave as “Optional”, it must have a unique ID. You
can make this setting in the “Identification” area.
If the device is not available, error messages are generated.
Distributed Clocks
Select distributed Selects the settings for distributed clocks from a list
clocks
The settings result from the respective device description file.
Can be selected if the device description files contain information.
Enable The master clock synchronizes data exchange in the network. The cy-
cle time (see “Sync-Unit Cycle” parameter below) is determined by the
cycle time of the master.
The “Distributed Clocks” function is disabled. There is no synchroniza-
tion.
Sync unit cycle (μs) Display of the cycle time for data exchange
The cycle time is determined by the cycle time of the master and can be
changed in the master interface settings (“Distributed Clocks” > “Cycle
Time”).
Sync0/1
Enable Sync 0/1 Synchronization unit Sync0 or Sync1 is used.
A synchronization unit describes a set of process data that is ex-
changed synchronously.
No synchronization unit is used.
Sync Unit Cycle / 16 … 1; Master cycle time multiplied by the selected factor of the selection list is
× 1 … 16 used as the synchronization cycle time for the slave.
The following areas are only displayed if “Expert settings” (see above) is enabled:
Startup Checking
Check vendor ID/ During boot up the system checks the manufacturer ID and/or product
Check product ID ID of the device against the current configuration setting (enabled by
default)
If they do not match, the bus is stopped to prevent loading faulty config-
urations onto the bus system.
The manufacture ID and product ID are not checked.
Check revision num- The revision number is checked when booting the system. The revision
ber number is checked based on the entry selected in the selection list over
the entire printout or over the front/back of the number (Low-Word
(LW) / High-Word (HW)):
• ==
• >=
• LW ==
• LW ==, HW >=
• HW ==
• HW ==, LW >=
The revision number is not checked.
Download expected The configured and actual module configurations are compared. If the
slot configuration configurations do not match, the device is still set to “Run”. An entry is
made in the device logbook.
No comparison is made.
Timeouts
By default, no timeout is defined for the following actions. However, a respective timeout time can be specified
in milliseconds:
SDO access (ms) 0 … 100000 Sends the SDO list at system startup
I → P (ms) 0 … 100000 Switches from “Init” mode to “Preoperational” mode
P → S / S → O (ms) 0 … 100000 Switches from “Preoperational” mode to “Safe Operational” mode or
from “Safe Operational” mode to “Operational” mode
DC Cycle Unit Control: Assign to Local μC
One or more options regarding the functionality of distributed clocks can be enabled that are to be used on the
local microprocessor. The check is performed in the registry 0x980 in the EtherCAT slave.
Cycle unit The slave performs the check.
Watchdog
Set multiplier Watchdogs, PDI (“Process Data Interface”) and SM (“SyncManager”)
(Reg. 16#400) get their pulses from the local clock of the I/O module divided by the
watchdog multiplier.
Set PDI watchdog If there is no PDI communication with the EtherCAT slave controller
(Reg. 16#410) longer than the active PDI watchdog time setting, the watchdog trig-
gers.
The PDI watchdog is not set.
Set SM watchdog If there is no EtherCAT process data communication with the I/O mod-
(Reg. 16#240) ule longer than the active SM watchdog time setting, the watchdog trig-
gers.
The SM watchdog is not set.
Identification
The device ID of the slave is set to make the address of the slave independent of its position in the bus.
The following options are only available if the “Enable Expert settings” or “Optional” options are enabled. If a
slave is marked as “Optional”, the slave must be assigned a unique ID.
Disabled - The slave ID is not checked.
Configured station - Address saved on the device EEPROM
alias (ADO 0x0012)
The value can be changed in online mode.
Value 1 … 65535 Expected value for the check. If the expected value does not match the
actual value, an error is generated.
Explicit device identi- - The device ID is permanently set on the hardware (e.g., via DIP switch).
fication (ADO The ID is displayed in online mode as “Actual address”.
0x0134)
Data word (2 bytes) - A 2-byte value for identification is stored on the slave.
ADO (hex) 16#12 Initial value from the device description. The Data word option can be
used to change this value.
Actual address The actual address is the slave address displayed in online mode only.
The readout can be used to check the success of the “Write EEprom”
command.
Diagnostic message
Diagnostic messages are displayed in online mode only.
Other diagnostic messages are available in the fieldbus configurator in the “Status” tab.
Diagnostic message - The “Diagnostics messages” field displays the status of the slave. Pos-
sible status include “Init”, “Pre-Operational”, “Save Operational” and
“Operational”.
The “Operational” status indicates that the slave configuration was com-
pleted successfully and input/output process data is applied.
Bus load 0 ... 100 % Indication of the bus load in percent
Note
Pay attention to the effects of the autoconfiguration mode!
Autoconfiguration mode is enabled by default and is suitable for most applications. Be-
cause many configurations are done automatically, some tabs for the Data Point Configu-
rator are irrelevant or unavailable in this mode. This affects the “FMMU/Sync” tab and the
Sync-Manager.
It may happen that you need to disable the autoconfiguration mode, for example, to con-
figure slave-to-slave communication. Note that expert knowledge is required in this case
because you must manually make all master and slave configuration settings.
Source address 00-00-00-00-00-00 MAC ID of the controller (target system) or network name
(MAC)
Note: “Select network by name” is enabled by default For this rea-
son, the setting remains “00-00-00-00-00-00”.
Recommendation: To remain device-independent, it makes
sense not to specify a fixed MAC ID at this point. Use network
names instead (see options below).
[Browse...] The MAC ID or name of available target devices are used to
search for the network.
Network name br1 Name or MAC ID of the network depending on which of the follow-
ing options is enabled. “br1” is preset and identifies the ETHER-
NET bridge used for EtherCAT.
The device port used for EtherCAT must be set to “separated”.
Since only port X2 is allowed for EtherCAT, it forms the EtherCAT
bridge “br1” that is selected in this case.
Select network by The network is specified by the MAC ID. The project cannot be
MAC used on another device because every network adapter has a
unique MAC ID. This setting is not recommended.
Select network by The network is identified by the network name (preset by default).
name The project is device-independent.
Redundancy EtherCAT NIC Settings
This area opens if the “Redundancy” function has been selected.
Note: WAGO devices do not currently support redundancy.
Messages per task Various tasks can be used to control read and write commands,
i.e., handling of input/output messages.
A task is used to control read and write commands.
Automatically restart Master tries to restart the slaves immediately after a communica-
slaves tion interruption.
There is not automatic restart after a communication interruption.
Master Settings
These additional settings are opened when autoconfiguration mode is disabled at the top of the dialog box
(“Autoconfig Master/Slaves”). Otherwise, the settings are applied automatically.
Image In Address 16#1 … First logical address of the first slave for input data
16#1FFFFFFF
Image Out Address 16#1 … First logical address of the first slave for output data
16#1FFFFFFF
Diagnostic message
Diagnostic messages are displayed in online mode only.
Other diagnostic messages are available in the fieldbus configurator in the “Status” tab.
Diagnostic message - The “Diagnostics messages” field displays the status of the mas-
ter. Possible status include “Init”, “Pre-Operational”, “Save Opera-
tional” and “Operational”.
The “Operational” status indicates that the master configuration
was completed successfully and input/output process data is ap-
plied.
Bus load 0 … 100 % Indication of the bus load in percent
The order in the SDO table (from top to bottom) specifies the order in which the SDOs are
transferred to the I/O module.
Table 4: EtherCAT Data Point Configurator – Start Parameters
Parameters Description
[Add] Opens a dialog box with available object directory entries based on the device descrip-
tion file.
The SDO parameters can be changed before the configuration is added.
By specifying new index/subindex entries, a new object can be added to the SDO that is
not yet described in the ESI file. This is useful if there is only an incomplete or no object
dictionary.
[Edit] Opens a dialog to change the parameters of the selected SDO or IDN.
[Delete] Deletes the selected entry.
[Up] Moves the selected line up one position.
[Down] Moves the selected line down one position.
Line Line number
Index:Subindex Index and subindex of the parameter in the object directory
Name SDO name
Value SDO value
Bit length SDO bit length
Break on error If an error occurs, transfer of the start parameters with error status is aborted.
Jump to line on error If an error occurs, transfer with the SDO of the next line is continued.
Next line Transfer is continued with the SDO of the next line.
Comments Input field for comment
5.2.2 FMMU/Sync
The “FMMU” table of the slave used to handle process data is displayed at the top. In
each case, mapping of the logical address (Global StartAdr) to a physical address (Phys
StartAdr) is defined. Bitwise mapping is possible.
Note: These are expert settings that are usually not required.
Tip: These are expert settings that are usually not required.
Phys. start add. Physical start address of the mailbox in the ESC (Electronic Speed
Controller) of the device
Length Data length of the sync manager
Buffer Selects buffer mode:
1 Mailbox Mode
3 Buffered Mode
Access Selects access direction from:
Read Read
Write Write
Interrupts
to EtherCAT Master is informed
to PDI Slave is informed
Flag check
Enable Enables the flag check
Watchdog
Trigger Enables the watchdog trigger
SyncMan type Selects the synchronization manager type
Inputs
Outputs
Mailbox In
Mailbox Out
[Edit] The “Syncman” dialog opens.
The content of the synchronization manager previously selected can be edited.
[Delete] Deletes the selected entry.
Settings are made in the “EtherCAT I/O Image”, “Process Data” and “Sync-Unit Mapping”
tabs.
The “Process Data Expert Mode” appears if expert settings are enabled in the interface
settings of the slave (via “Settings” control panel > [Interface Settings]).
The “Status” tab displays diagnostic messages in online mode.
The outputs are displayed on the left side and the inputs on the right side. Start address
(name), data type (type) and index are displayed for each input/output.
Outputs (to write) and inputs (to read) enabled in this tab with a check mark can be
mapped to application variables in the “EtherCAT I/O Image” tab.
Table 8: EtherCAT Fieldbus Configurator – Process Data
Parameters Description
Name Start address (name)
Type Data type of the input/output
Index Register index
Sync Manager
This list displays the Sync Managers with file size and PDO type.
PDO Assignement
This list displays the PDO to which selected synchronization managers are mapped. If
PDOs are selected with a check mark, then I/O channels are generated for this PDO
(similar to the “Process Data” tab).
PDO List
This list displays the PDO to which selected synchronization managers are mapped.
Table 9: PDO List
Parameters Description
[Add] Adds another PDO
[Edit] Opens a dialog to edit the PDO
[Delete] Deletes the selected PDO
Index Index of PDO
Size Size specified as “Byte.Bit”
Name Name of the process value
Flags Mandatory (M): The PDO is required and cannot be disabled in the PDO mapping.
Window Content (F): The content of the PDO is fixed and cannot be changed. Entries
cannot be added to the PDO content.
Virtual PDO: Reserved for future use
SM Number of the synchronization manager to which the PDO is mapped
PDO Content
Displays the content of the PDO selected in the PDO list.
Table 10: PDO Content
Parameters Description
[Insert] Adds an entry
[Edit] Opens a dialog to edit the entry
[Delete] Deletes an entry from the list
[Move up] Moves an entry in the list up one position
[Move down] Moves an entry in the list down one position
Index Index of PDO
Size Size of the PDO; specified as “Byte.Bit”
Offs Bit offset in the PDO
Name Name of the process value
Type Data type of the PDO
“Download” Area
PDO Assignment Special CoE commands for initializing 0x1cxx objects are generated and written to the
slave.
PDO Configuration The CoE commands for 0x16xx or 0x1axx are generated and the PDO Assignment is
thus uploaded to the slave.
[Load PDO Info The current PDO configuration is read from the slave and added to the configuration.
from the device]
All content of the “PDO List” and “PDO Content” areas is deleted and overwritten with
the read data.
This is always useful if the ESI file is incomplete and the configuration exists on the slave
only.
Diagnostic messages can also be viewed in online mode via the interface settings of the
master and slave (“Settings” control panel > EtherCAT tab > [Interface Settings]).
Set Up
6 an EtherCAT Network (Scenarios)
When setting up a network, various settings are necessary in order to connect devices to
each other and exchange data. The steps necessary for configuration depend on the ap-
plication, and, thus on the devices used and their roles as master or slave.
Note
Using the Term “Controller”
In this description, devices that can be programmed in CODESYS V3 or e!COCKPIT are
referred to as “controllers” (most PFCs, for example). The scenarios described for “con-
troller (master)” devices also apply to Touch Panels 600 and Edge controllers if they act
as control panels, i.e., if they have a corresponding license (provided by the vendor or
added subsequently).
Controllers cannot be operated as EtherCAT slaves.
The procedure described below for the individual applications represent the general
process for performing the configuration.
The order may vary. Depending on the communicating device selected, individual steps
may be largely or entirely omitted.
1. Select Devices
For devices to be used in e!COCKPIT, they must be known within e!COCKPIT, i.e.
they must be available in the product catalog. The installation of e!COCKPIT auto-
matically makes WAGO devices available in the product catalog. Third-party devices
are added to the product catalog by importing a device description file.
2. Place Devices in the Topology View
Devices are dragged from the product catalog into the Topology view.
3. Disconnect Ethernet Ports and Enable the EtherCAT Port
The master Ethernet ports are separated and port X2 is enabled for the EtherCAT
master function.
4. Disable Broadcast Protection Function
Since EtherCAT devices only communicate via broadcast, the broadcast protection
function must be disabled in the controller.
5. Connect Devices
Devices are first connected in the Topology view and then in the Communication view
via EtherCAT connectors.
6. Make the Device Settings on the “Settings” Panel
The device settings on the “Settings” panel are displayed in a context-sensitive way
for the specific selected device and its communication interfaces and can be modified
as needed.
7. Program Application
In the Device Detail view, the I/O map is created between the local bus and applica-
tion variables, and the applications are programmed
Note: This step is only relevant for controllers.
8. Configure Slave
Connections and slave data points can be created and configured in the data point
configurator. These are published and can be used by the master (see also 8 Slave
Settings in the Data Point Configurator [} 21]).
9. Configure Connection between Master and Slave
In the fieldbus configurator, you can set the communication relation on the data point
level. It is determined which data points of the slave are to be available in which form
for the master (see also 8 Master and Connection Settings in the Fieldbus Con-
figurator [} 25]).
10. Access Data Points
Slave data points that have been created can be accessed from the master’s applica-
tion.
ð A dialog informs you that the EtherCAT master functionality requires a license.
12. Click [Yes] to confirm the message.
ð The EtherCAT port is enabled.
Note
Establishing a connection with disconnected interfaces only possible via X1!
If you have set separate interfaces in “Ethernet Settings” (Network > Interfaces > “discon-
nected”), only the X1 interface can be used to establish a connection from e!COCKPIT to
the device. This is the case, for example, when using the “EtherCAT” fieldbus.
You do not need to assign any IP addresses for communication with the EtherCAT
slaves, as EtherCAT uses its own addressing.
Connect Devices
1. Connect the master to the slaves via EtherCAT connectors.
ð The EtherCAT devices are addressed automatically in the order of their configura-
tion.
2. Switch to Communication view.
3. Connect the devices to each other.
ð A yellow warning icon in the in the device tile of the master indicates that a li-
cense is required to use the EtherCAT Master functionality.
ð You can run the device without a license for 30 days in evaluation mode. Other-
wise, follow the steps below.
Use License for Master
1. If you have already purchased a license, first enter it in e!COCKPIT: Backstage View
> “Licensing” page, [License Management] > [Enter Licenses].
2. Once you have entered the license, open the “Available Licenses” and “Project Li-
censing” panels (via the ribbon > “VIEW” tab >[ Available Licenses] button and
[Project Licensing]).
3. Use the “Automatically Assign All” option on the “Project Licensing” panel (recom-
mended).
Alternatively, drag the license from the “Available Licenses” panel to the appropriate
device on the “Project Licensing” panel, or drag the license directly onto the device
in the Network view.
4. Then load the license onto the device by synchronizing it (the [Synchronize] button
on the DEVICE tab of the ribbon or on the “Project Licensing” panel).
ð The yellow warning icon disappears. The licensed EtherCAT Master functionality can
be used without limitation.
Note
Information about licensing in the e!COCKPIT product manual:
The e!COCKPIT product manual describes in detail how licensing is handled. It describes
how to acquire licenses, activate them, assign them to devices and link them in the de-
vice (see “Acquiring Licenses,” “Activating Licenses” and “Activating Runtime Licenses” in
the e!COCKPIT product manual).
Configure Slave
You configure the slaves in the data point configurator.
5. Select the ESI file for the device you want to import.
6. Click [Open].
7. Switch back to the Network view and to the “Product Catalog” panel.
ð You can find the new device in the “Other Communication Devices” folder of the
product catalog, under “EtherCAT” > <Manufacturer>.
Then proceed as described in 8 Connect Controller (Master) to Fieldbus Coupler
(Slave) [} 34].
Update
7 Firmware for EtherCAT Devices
(“FoE”)
The “File over EtherCAT” (FoE) communications protocol makes it possible to transfer
files within an EtherCAT system. Communication via FoE can be used in parallel to
process data communication. The update mechanism via FoE is defined by the EtherCAT
specification and is already implemented and usable for many EtherCAT devices, includ-
ing the 768-2201 EtherCAT coupler.
In this example, you use FoE to update the firmware for the 768-2201 EtherCAT Fieldbus
Coupler. To do this, the fieldbus coupler is set to a special mode (“bootstrap”). The
firmware is uploaded to the coupler in the form of a file with a specific name (device-spe-
cific) and used as new firmware after a restart. Using FoE, this update can be made from
a connected WAGO controller without connecting the fieldbus coupler to an engineering
PC directly.
Requirements
• The EtherCAT fieldbus coupler is connected to a WAGO controller (PFC, PFC ADV,
TP600 or Edge Controller).
• The WAGO controller is connected to an engineering PC on whiche!COCKPIT is in-
stalled.
• The WAGO controller is configured as the EtherCAT master.
• The network structure is configured in e!COCKPIT. There is an EtherCAT connection
between devices.
• The state of the EtherCAT Master is set to “RUN” (e.g., via the [Start] button in the rib-
bon, “PROGRAM” tab).
• The “Automatic Restart Slaves” must be disabled for the EtherCAT Master .
If necessary, check in the “Settings” control panel > “EtherCAT” tab > [Interface Set-
tings]. Automatic restart must be disabled so that the slave can be switched to “Boot-
strap” mode required for the update and the system does not immediately switch back
to “Operational” mode.
Reach
8 EtherCAT Slaves via Ethernet
(“EoE”)
”The communication protocol “Ethernet over EtherCAT” (EoE) is used to transfer process
data as well as standard Ethernet communication. EoE is used, for example, to access
the web server of an EtherCAT slave from an engineering PC. The Ethernet communica-
tion is tunneled through EtherCAT. In this way, for example, tunneled access to the inte-
grated webserver of EtherCAT slaves or to devices from third-party manufacturers is pos-
sible for maintenance purposes. From the network's point of view the EtherCAT network
then looks like an Ethernet subnet.
EoE functions are available in e!COCKPIT in the “EoE” Tab of the fieldbus configuration if
EoE is sported by the respective device description and if the expert settings are enabled
in the slave's interface settings (via “Settings” control panel > [Interface Settings]).
To use EoE, a so-called “Terminal Access Point”, or TAP for short, must be installed for
the EtherCAT Master (controller). TAPs are virtual network kernel drivers that simulate
network devices using software. Data packets are then not forwarded to hardware in the
form of network cards, but to a program. In this case, the data is sent to the EtherCAT
master which forwards it to the EtherCAT slave.
2. In the init script “/etc/init.d/networking”, add the following lines directly in front of the
entry “function do_ifupdown UP” (e.g., using WinSCP):
ip tuntap add dev tap0 mode tap
ip link set dev tap0 up
ip addr add <IP_ADDRESS/NETMASK> dev tap0
(e.g., “ip addr add 192.168.1.2/24 dev tap0”)
3. Save the init script.
Note: The IP address of the TAP device must be in a different subnet than the IP address
of the EtherCAT master device
Example: If the EtherCAT master is located in the IP network 192.168.1.0/24 with the IP
address 192.168.1.1/24, then the IP address of the TAP device should be located in an-
other network (for example 192.168.2.0/24) and have an IP address in this subnet, for ex-
ample 192.168.2.1/24.
7. Enter the IP address of the TAP device as the gateway address, e.g. 192.168.2.1.
This means that the subnet 192.168.2.0/24 is reached via the router in the device with the
IP address 192.168.1.100.
Test Routing
1. Select the EtherCAT Master.
2. Go online by clicking the [Connect] button.
ð The application is loaded on the EtherCAT Master. The EoE settings are enabled.
3. Launch the application.
ð You can now reach the EtherCAT slave from the EtherCAT Master.
Test this, for example, with a ping command from the EtherCAT Master.
Appendix
9
9.1 EtherCAT Master: Features and Function
EtherCAT is a powerful real-time ETHERNET fieldbus system that has become standard
in many industrial automation applications. With a software license, the 2nd generation
controllers (750-821x/xxx-xxx), Touch Panels 600 (762-xxxx/8000-xxxx) or Edge con-
trollers can run as an EtherCAT master.
The following functions are available:
• Distributed clocks
• Hot connect
• Bus diagnostics: In the configurator and with the PLC application
• Supported layer 7 protocols:
• CoE (CANopen / CAN over EtherCAT)
• FoE (File over EtherCAT)
• VoE (Vendor over EtherCAT)
The controller can be used as an EtherCAT master to control WAGO slaves with the
EtherCAT fieldbus system (e.g., the EtherCAT Fieldbus Couplers 750-354 of the WAGO-
I/O-SYSTEM 750). It is also possible to control field devices that are declared ine!COCK-
PIT via a standardized device description (see figure below).
Besides the protocol stack in the form of a library, the EtherCAT Master software also
provides the runtime system with components for direct access to the Ethernet interface
and diagnostics. The EtherCAT system is configured using a special configuration dialog
in the e!COCKPIT Engineering Software.
Note
Note the required settings for using the EtherCAT master!
Note the following settings. Correct operation of the EtherCAT master on the controller is
not possible without these settings:
• Disconnect the Ethernet ports and enable Port X2 for EtherCAT (see 8 Disconnect
Ethernet Ports and Enable EtherCAT Port [} 34]).
• You must disable the Broadcast Protection function in the controller. Otherwise, the
EtherCAT master functionality cannot be used (see 8 Disable Broadcast Protection
Function [} 37]).
Before the IEC inputs are copied, the network messages pending from the last cycle are
read.
When the “Send/Receive per Task” option is enabled in the EtherCAT Master settings,
additional telegrams are sent for each task to the device and the inputs and outputs used.
Channels used in a slow task are also transmitted less often. This helps reduce bus load.
Note
Undefined States due to Writing and Reading in Several Tasks
If an output is written in several tasks, because it can be overwritten, the state is unde-
fined. If the same inputs are used in different tasks, sometimes the input changes while a
task is processed. This happens when the task is interrupted by a higher-priority task, so
the process image is read in again.
Remedy:
At the start of the IEC task, copy the input variables into the variables; then, in further
code, only work with local variables.
Summary:
Using the same inputs and outputs for several tasks is not productive and in some cases,
can cause unforeseen states.
9.1.3 Libraries
9.1.3.1 Master
A type “IoDrvEtherCAT” instance is generated for each EtherCAT Master added to the
device tree.
Examples
• Initiate a master restart via the “xRestart” variable:
EtherCAT_Master.xRestart := xRestart;
• Stop communication to the bus via the “xStop” variable:
EtherCAT_Master.xStopBus := xStop;
• Call the master to retrieve information regarding the success of the configuration pa-
rameter download:
EtherCAT_Master(); xFinish := EtherCAT_Master.xConfigFinished;
Table 17: Properties of the Master
Parameter Description
AutoSetOperational TRUE: Master attempts to restart the slaves immediately after a communica-
tion interruption.
Default: FALSE
ConfigRead TRUE: Reading the configuration has ended and the user can edit the set-
tings, e.g., to add self-defined SDOs.
DCInSyncWindow Timeframe for XDistributedClockInSync. Jitter must remain within this time-
frame so the output signal “XDistributedClockInSync” always stays at TRUE.
Default: 50 microseconds
DCClockReferenceTime Returns the current time of the first slave with activated distributed clock. This
time serves as reference time for all other slaves and the PLC itself.
DCIntegralDivider Integral factor for the distributed clock control loop;
Default: 20
DCPropFactor Proportional factor for the distributed clock control loop;
Default: 25
Parameter Description
DCSyncToMaster Distributed-clock synchronization on the master when set to TRUE; then all
slaves are synchronized to the master instead of synchronization of the first
slave with the PLC.
Default: FALSE
DCSyncToMasterWithSysTime Distributed-clock synchronization on the master
TRUE: All slaves are synchronized to the system time on the master. The
time read from “SysTimeRtcHighResGet” is used to distribute the PLC sys-
tem time to all EtherCAT slaves.
Default: FALSE
EnableTaskOutputMessage Normally, EtherCAT messages are sent from the bus task and from each
task that uses slave outputs. In the bus task, all outputs are written and all in-
puts read. In other tasks, the outputs are transmitted once more, so they im-
mediately arrive to be written in the corresponding slaves. This is an attempt
to keep dead time until writing as short as possible. In conjunction with dis-
tributed clocks, this may cause problems in some devices; for instance, servo
controllers are not synchronized with “synch interrupt”; instead, they use the
time of the writing for internal synchronization. In this case, multiple writing
accesses may occur during a cycle. When “EnableTaskOutputMessage” is
set to FALSE, only the bus cycle task is used. No other tasks will cause addi-
tional messages.
Default: TRUE
FirstSlave Pointer to the first slave below the master
FrameAtTaskStart TRUE: To minimize jitter, the frame for the slaves is transmitted to start the
task (before the IEC task). This command is used to ensure servo drive
movements are smooth and not jerky. When this flag is set to TRUE, the
frame of the output buffer is written in the next cycle (see diagram below).
Default: FALSE
LastInstance Pointer to linked master list -> preceding master
LastMessage This property returns a string with the last message from the EtherCAT stack.
“All slaves done” is returned if the start is successful. The string used is the
same as the one for the diagnostics message displayed in the EtherCAT
Master Device Editor window during online mode.
NextInstance Pointer to linked master list -> next master
NumberActiveSlaves This property returns the number of slaves that are actually connected. Start-
ConfigWithLessDevice := TRUE: The number of real devices can be re-
turned.
OpenTimeout Timeout for opening the network adapter.
Default: 4 seconds
StartConfigWithLessDevice Used to affect the starting behavior of the stack. Normally, EtherCAT stack
stops when, for example, five servo controllers are configured in a project but
only three are connected. However, if StartConfigWithLessDevice := TRUE in
the first cycle, the stack will try to start anyhow. This makes it possible to, for
instance, arrange a universal configuration of 10 servo controllers but still be
able to vary the number that are actually connected. Note that in any case,
the manufacturer and product IDs of each slave are checked. If any discrep-
ancies are determined, the stack is stopped.
9.1.3.2 Slave
A data type “ETCSlave” instance is generated for each EtherCAT slave added to the
project. The instance name corresponds to the name of the slave in the project. The
slave instance is used in the application to poll and/or switch the slave status.
Table 18: Inputs (Slave)
Name Data Type Description
xSetOperational BOOL Rising edge: An attempt is made to switch to ETC_SLAVE_ OPERA-
TIONAL mode.
Parameter Description
ConfigProductID Reads the product ID from the configuration.
SerialID After the EtherCAT stack is started, this property contains the device serial number.
LastEmergency When a message is received, this information is saved in the slave and can be re-
quested by the application via this property. A log report is also added.
If the check of the manufacturer or product IDs is activated in the expert settings, stack
startup is stopped as soon as any discrepancies between VendorID and ConfigVendorID
or between ProductID and ConfigProductID are determined.
Program:
pSlave := EtherCAT_Master.FirstSlave;
WHILE pSlave <> 0 DO
pSlave^();
IF pSlave^.wState = ETC_SLAVE_STATE.ETC_SLAVE_OPERATIONAL
THEN
;
END_IF
pSlave := pSlave^.NextInstance;
END_WHILE
To start, the first slave on the master is called via “EtherCAT_Master.FirstSlave.” The re-
spective instance is called up during the WHILE loop, thus determining wState. Then the
status can be checked. The pointer on the next slave is called with “pSlave^.NextIn-
stance.” At the end of the list, the pointer is NULL and the loop is exited.
Note
Description of the Library Functions
Tables with a detailed description of the library functions are available in the integrated
online help in e!COCKPIT.
9.1.5 Performance
The cycle time that can be reached with an EtherCAT Master depends on several signifi-
cant environmental conditions, which may differ widely in different projects. Below you will
find information on configuration and tips on how to recognize whether the required func-
tionality can be provided by the device.
These factors are crucial:
• What device hardware is the software used on?
• How large is the bus's total process image?
• Depending on the devices and in some cases, their modular structure
• What is the maximum cycle time that can be used to perform the control processes
needed?
• Which task priority can be designated to the EtherCAT task?
• How much of the device capacity is already being utilized by other tasks?
Depending on the answers to these questions, there may be other performance restric-
tions to this function. The following procedure is recommended for commissioning:
Assumptions:
• A PFC200 (2nd generation) is used as the controller.
• The process image does not exceed 200 bytes (e.g., any number of 750-354 fieldbus
couplers with a total of 25 8-channel digital modules).
• The process permits a maximum cycle time setting of 5 ms.
Procedure:
• Configure the modular structure of the I/O nodes and busses as described in the e!
COCKPIT-manual.
• Write the PLC program, visual application, etc.
• Set the EtherCAT task cycle time to 5 ms.
• Set the EtherCAT task priority to 6.
Figure 30: e!COCKPIT Settings under Program Structure > Application > Task Configuration
• Check whether the cycle times are maintained on average or if the jitter information
changes frequently.
• Jitter (µs): Last measured jitter – Jitter is the difference between the time the task
should start and the time it actually does. Example: If a task should start every 1000 µs
and it only starts again after 1100 µs, the jitter is 100 µs.
• Min. jitter (µs): Minimum measured jitter
• Max. jitter (µs): Maximum measured jitter
Figure 32: e!COCKPIT Settings under Program Structure > Application > Task Configuration
If there are no telegram losses or errors and the jitter is not too high, the CPU load is
within the required range. The system can be operated with these settings. If necessary,
the cycle time can be restricted and the process checked again. However, if errors do oc-
cur during the check, try to change the settings described above to improve this state.
If there are telegram losses or errors or if the jitter is too high, even though the CPU load
is within the required range (~80 %), this can be improved by setting a higher task priority
(= lower number). If this does not succeed, the only remaining option is to restrict the cy-
cle time. Or, decide whether the application can accepted even with sporadic telegram
loss.
The cycle time for a PFC200 (2nd generation) should not be set to less than 2 ms.
9.1.6 Licensing
To use the e!RUNTIME EtherCAT master function, a license from WAGO is required.
The license is registered in e!COCKPIT, assigned to a device and loaded together with
the project into the device.
No further installation steps are required.
Table 21: Information about Licensing and Compatible Controllers
Item Description Item Number
e!RUNTIME-EtherCAT Master 300 2759-0263/0210-1000
individual license
Compatible Controllers
PFC200; G2; 2ETH RS 750-8212
PFC200; G2; 2ETH CAN 750-8213
PFC200; G2; 2ETH RS CAN 750-8214
PFC200; G2; 4ETH CAN USB 750-8215
PFC200; G2; 2ETH RS CAN DPS 750-8216
In addition to the basic controller variants in the table, the license can also be used on all
variants of these controllers.
Table 22: Information about Licensing and Compatible Controllers
Item Description Item Number
e!RUNTIME-EtherCAT Master 600 2759-0266/0210-1000
individual license
Compatible Touch Panels
TP600 4.3 480x272 PIO2 VP 0762-4201/8000-0001*)
TP600 5.7 640x480 PIO2 VP 0762-4202/8000-0001*)
TP600 7.0 800x480 PIO2 VP 0762-4203/8000-0001*)
TP600 10.1 1280x800 PIO2 VP 0762-4204/8000-0001*)
TP600 4.3 480x272 PIO3 CP 0762-4301/8000-0002
TP600 5.7 640x480 PIO3 CP 0762-4302/8000-0002
TP600 7.0 800x480 PIO3 CP 0762-4303/8000-0002
TP600 10.1 1280x800 PIO3 CP 0762-4304/8000-0002
TP600 7.0 800x480 PIO2 VP 0762-5203/8000-0001*)
TP600 10.1 1280x800 PIO2 VP 0762-5204/8000-0001*)
TP600 7.0 800x480 PIO3 CP 0762-5303/8000-0002
TP600 10.1 1280x800 PIO3 CP 0762-5304/8000-0002
TP600 4.3 480x272 PIO2 VP 0762-6201/8000-0001*)
TP600 5.7 640x480 PIO2 VP 0762-6202/8000-0001*)
TP600 7.0 800x480 PIO2 VP 0762-6203/8000-0001*)
TP600 10.1 1280x800 PIO2 VP 0762-6204/8000-0001*)
Compatible Controllers
Edge Controller 752-8303/8000-0002
*)
An “e!RUNTIME PLC 600” licenses is also required for these devices!
Minimum e!COCKPIT version: V1.5.1
Delivery type: License certificate via email (e!COCKPIT already contains the software itself)
Data sheet and further information:
ü http://www.wago.com/2759-0263/0210-1000
ü http://www.wago.com/2759-0266/0210-1000
A PC with both Internet connection and e!COCKPIT may be required for license activa-
tion.
A single license allows installation on one device. Every additional device requires its own
license.
List of Figures
Figure 1 “Settings” panel with EtherCAT interface settings ........................................................ 12
Figure 2 Data point configurator.................................................................................................. 13
Figure 3 Fieldbus configurator .................................................................................................... 14
Figure 4 “Settings” Control Panel – “EtherCAT” Tab .................................................................. 15
Figure 5 EtherCAT Data Point Configurator................................................................................ 21
Figure 6 EtherCAT Data Point Configurator – Start Parameters ................................................ 22
Figure 7 EtherCAT Data Point Configurator – FMMU/Sync ........................................................ 23
Figure 8 EtherCAT Data Point Configurator – Sync-Manager .................................................... 24
Figure 9 EtherCAT Fieldbus Configurator ................................................................................... 25
Figure 10 EtherCAT Fieldbus Configurator – EtherCAT I/O Image .............................................. 26
Figure 11 EtherCAT Fieldbus Configurator – Process Data ......................................................... 27
Figure 12 EtherCAT Fieldbus Configurator – Expert Mode .......................................................... 27
Figure 13 EtherCAT Fieldbus Configurator – Sync-Unit Mapping ................................................ 29
Figure 14 EtherCAT Fieldbus Configurator – Status..................................................................... 29
Figure 15 Drag Devices into the Network View............................................................................. 34
Figure 16 Disconnect Ports ........................................................................................................... 35
Figure 17 Disconnected Ports ....................................................................................................... 36
Figure 18 Connect Master to Slaves (Topology View) ................................................................ 37
Figure 19 Connect the Master to Slaves (Communication View) ............................................... 37
Figure 20 Mapping to IEC Variables ............................................................................................. 39
Figure 21 Import a Third-Party Device via ESI File ....................................................................... 41
Figure 22 Transfer Firmware to an EtherCAT Coupler ................................................................. 42
Figure 23 Reach EtherCAT Slaves via Ethernet ........................................................................... 44
Figure 24 EtherCAT System Example .......................................................................................... 47
Figure 25 EtherCAT Tasks............................................................................................................ 48
Figure 26 Task Processing without “Send/Receive per Task” Option........................................... 49
Figure 27 Task Processing with “Send/Receive per Task” Option................................................ 49
Figure 28 Effect of “FrameAtTaskStart” ........................................................................................ 53
Figure 29 “CAN over EtherCAT” Library Functions....................................................................... 55
Figure 30 e!COCKPIT Settings under Program Structure > Application > Task Configuration .... 56
Figure 31 “Status” Tab in the EtherCAT Fieldbus Configurator .................................................... 56
Figure 32 e!COCKPIT Settings under Program Structure > Application > Task Configuration .... 56
List of Tables
Table 1 “EtherCAT” (Master) Tab – Bus Cycle Task ...................................................................... 15
Table 2 “EtherCAT” Tab – Slave Interface Settings........................................................................ 16
Table 3 “EtherCAT Master” Tab...................................................................................................... 19
Table 4 EtherCAT Data Point Configurator – Start Parameters ..................................................... 22
Table 5 EtherCAT Data Point Configurator – FMMU/Sync............................................................. 23
Table 6 EtherCAT Data Point Configurator – Sync-Manager ......................................................... 24
Table 7 EtherCAT Fieldbus Configurator – EtherCAT I/O Image ................................................... 26
Table 8 EtherCAT Fieldbus Configurator – Process Data .............................................................. 27
Table 9 PDO List............................................................................................................................. 28
Table 10 PDO Content...................................................................................................................... 28
Table 11 EtherCAT Fieldbus Configurator – Sync-Unit Mapping ..................................................... 29
Table 12 EtherCAT Fieldbus Configurator – Online ......................................................................... 30
Table 13 EtherCAT Fieldbus Configurator – EoE ............................................................................. 31
Table 14 Legend for Figure “EtherCAT Tasks”................................................................................. 49
Table 15 Inputs (Master)................................................................................................................... 51
Table 16 Outputs (Master) ................................................................................................................ 51
Table 17 Properties of the Master..................................................................................................... 51
Table 18 Inputs (Slave)..................................................................................................................... 53
Table 19 Outputs (Slave) .................................................................................................................. 53
Table 20 Properties of the Slave....................................................................................................... 53
Table 21 Information about Licensing and Compatible Controllers .................................................. 57
Table 22 Information about Licensing and Compatible Controllers .................................................. 57