EtherCAT Diagnosis For Users
EtherCAT Diagnosis For Users
EtherCAT Diagnostic This slide set intends to provide an overview over the diagnostic
Diagnostic Features capabilities provided by EtherCAT.
Overview
Cyclic Synchronous
Diagnostic
It contains a description of the basic diagnosis functionalities and the
Hardware Diagnostic most typical error scenarios within an EtherCAT network.
Software Diagnostic
Diagnostic Procedure
It is primarily intended for end users, as well as for machine
Example builders and system integrators.
The knowledge of EtherCAT basics is taken for granted.
For additional information about EtherCAT diagnostics - including
more detailed error scenarios – which could be of interest for
EtherCAT master and slave manufacturers, please refer to slide set
“EtherCAT Diagnosis For Developers”.
EtherCAT Diagnostic Errors which can affect an EtherCAT (like any other fieldbus) network
Diagnostic Features can be grouped in two categories:
Overview
Cyclic Synchronous
Diagnostic 1. Hardware errors
Hardware Diagnostic
Software Diagnostic a. The physical medium is interrupted or the network topology is
Diagnostic Procedure unexpectedly changed, and frames do not reach all the network
Example
slaves or do not return to the master at all (e.g. damaged
cables, loose contacts, slave reset during operation).
b. All slaves are reached by frames, but the correct bit sequence
is corrupted (e.g. EMC disturbances, faulty devices).
2. Software errors
Example
Hardware Software
EtherCAT Diagnostic
Diagnostic Features
Overview
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
EtherCAT Diagnostic All addressed slaves (Digital Inputs, in the example below) successfully
Diagnostic Features process the datagram.
Overview
Cyclic Synchronous
Diagnostic WKC value returning to the master = expected value → WKC valid
Hardware Diagnostic
input data in the datagram forwarded by the master to the control
Software Diagnostic
application (PLC, NC, …)
Diagnostic Procedure
Example
EtherCAT Diagnostic One addressed slave (Digital Input, in the example below) fails to process
Diagnostic Features the datagram.
Overview
Cyclic Synchronous
Diagnostic WKC value returning to the master ≠ expected value → WKC invalid
Hardware Diagnostic
input data in the datagram are discarded by the master (PLC/NC
Software Diagnostic
uses old data)
Diagnostic Procedure
Example
EtherCAT Diagnostic The Working Counter is always received by the master together with the
Diagnostic Features corresponding datagram, and enables therefore an immediate reaction in
Overview case of invalid or inconsistent data.
Cyclic Synchronous
Diagnostic The information concerning the Working Counter is basically a digital
Hardware Diagnostic
information (“WKC correct” vs. “WKC invalid”), and therefore does not
Software Diagnostic
distinguish among different error causes. An invalid WKC can result from
Diagnostic Procedure
Example several different situations:
- One or more slaves are not physically connected to the network, or
they are not reached by the frames.
- One or more slaves have been reset
- One or more slaves are not in Operational state
Whenever Working Counter errors occur, the problem should be
investigated deeper by means of further Hardware Diagnostic and
Software Diagnostic functionalities.
EtherCAT Diagnostic Masters can optionally enable to group network slaves into disjoint
Diagnostic Features subsets called Sync Units. Slaves belonging to different Sync Units are
Overview served by separate datagrams, and therefore are also independent from
Cyclic Synchronous the point of view of the Working Counter diagnostics.
Diagnostic
Hardware Diagnostic
- One (default) Sync Unit: if one drive fails incrementing the WKC, the
Software Diagnostic
input data of all three drives are discarded by the master:
Diagnostic Procedure
Example
- Separate Sync Units: if one drive fails incrementing the WKC, only the
input data of that slave are discarded:
EtherCAT Diagnostic The basic diagnostic information at hardware level consists of error
Diagnostic Features counters provided by slave devices at standard memory addresses.
Overview
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
EtherCAT Diagnostic A frame shall be considered as „lost“ by the master either if it does not
Diagnostic Features return to the master at all (a), or it is corrupted and therefore the
Overview information contained in it is meaningless (b).
Cyclic Synchronous
Diagnostic Both situations can be monitored by the master by checking suitable
Hardware Diagnostic fields of the incoming frames, and reported to the user by means of a
Software Diagnostic corresponding Lost Frame Counter.
Diagnostic Procedure
Example
The master Lost Frame Counter can be considered as the first indicator
of communication issues at hardware level in an EtherCAT network:
an increment should trigger a deeper investigation by reading and
interpreting Hardware Error Counters of slave devices.
November 2018 © EtherCAT Technology Group 14
Hardware Error Counters
EtherCAT Diagnostic • Lost Link Counters (optional): incremented when physical link is
Diagnostic Features interrupted
Overview
Cyclic Synchronous Register Length Meaning
Diagnostic
0x0310 1 byte Lost Link Counter port 0
Hardware Diagnostic
Software Diagnostic 0x0311 1 byte Lost Link Counter port 1
Diagnostic Procedure 0x0312 1 byte Lost Link Counter port 2
Example
0x0313 1 byte Lost Link Counter port 3
EtherCAT Diagnostic EtherCAT slave devices mandatorily support a Link/Activity LED for each
Diagnostic Features port with removable connector.
Overview
Cyclic Synchronous
Diagnostic Before checking Link Lost Counters (or for slaves which do not support
Hardware Diagnostic Link Lost Counters at all), a visual inspection of Link/Activity LEDs can
Software Diagnostic therefore easily enable to detect permanent interruptions of the physical
Diagnostic Procedure
Example
link: in this case, the LED will be permanently off.
No Link!
EtherCAT Diagnostic A change of RX Error Counters indicates that the hardware signal
Diagnostic Features received was corrupted and that the carried data will be discarded:
Overview
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
RX Error Counter: +1
EtherCAT Diagnostic Invalid Frame Counters report the following compound information:
Diagnostic Features
Overview Physical Layer Errors (counted by Physical Layer Error Counters):
Cyclic Synchronous
Diagnostic • Correspond to individual invalid symbols
Hardware Diagnostic • Can occur both within and outside frames (when occurring within
Software Diagnostic
frames, they represent usually also Frame Errors)
Diagnostic Procedure
Example
Frame Errors (counted by Frame Error Counters):
• Correspond to frames whose overall bit sequence was corrupted
• Can occur only within frames
The difference between the two error types can be explained taking a
written language as comparison:
EtherCAT Diagnostic In particular, Frame Errors are checked by each slave port (which in case
Diagnostic Features increments the corresponding Frame Error Counter) when frames reach
Overview the port from the outside (x).
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
EtherCAT Diagnostic 1. Follow the frame path through the network and determine in which
Diagnostic Features sequence the CRC check is performed (according to Frame Error
Overview
Cyclic Synchronous
detection by each port).
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
EtherCAT Diagnostic 2. Detect the first port reporting a Frame Error Counter ≠ 0 according to
Diagnostic Features this sequence:
Overview
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
First port reporting Frame Error Counter ≠ 0 → most likely problem location.
November 2018 © EtherCAT Technology Group 24
Hardware Diagnostic Procedure
EtherCAT Diagnostic A careful planning and implementation of the network infrastructure is the
Diagnostic Features first and most important requisite in order to obtain a stable and error-free
Overview transmission.
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
For this purpose, the ETG.1600 “EtherCAT Installation Guidelines” is
Software Diagnostic
available for download (not only for ETG members!) on the ETG website:
Diagnostic Procedure
Example
EtherCAT Diagnostic The operation of every EtherCAT slave device is governed by the
Diagnostic Features EtherCAT state machine.
Overview
Init: neither acyclic (Mailbox)
Cyclic Synchronous
Diagnostic nor cyclic (Process Data)
communication is possible
Hardware Diagnostic
PreOP: acyclic, but not cyclic
Software Diagnostic
data exchange is possible
Diagnostic Procedure
Example SafeOP: both acyclic and
cyclic data exchange are
possible, yet cyclic outputs
remain in a predefined state.
OP: both acyclic and cyclic
exchange possible without
limitations.
Boot: optional state for
firmware update, only file
transfer over Mailbox
enabled.
• Each slave reports its current state, as well as the flag of an error
condition in the state machine, in AL Status register 0x0130.
• The master requests a new state to a slave by writing AL Control
register 0x0120 of the slave itself. Spontaneous (backward) transitions
can be performed by a slave without master request only in case an
error in the state machine occurs.
November 2018 © EtherCAT Technology Group 28
Run LED
EtherCAT Diagnostic The EtherCAT state machine provides the basic diagnostic information at
Diagnostic Features software level.
Overview
Cyclic Synchronous Slaves with removable connectors support a Run LED indicator reporting
Diagnostic
the current state of the slave device in the state machine:
Hardware Diagnostic
Software Diagnostic
Diagnostic Procedure
Example
- Init: off
- PreOP: blinking slowly
- SafeOP: single flash with longer pause
- OP: on
- Boot: flickering fast or off
EtherCAT Diagnostic Slaves with removable connectors can optionally support an Error LED
Diagnostic Features indicator reporting the main State Machine error categories:
Overview
Cyclic Synchronous
Diagnostic
- No error: off
Hardware Diagnostic
- Blinking: configuration error
Software Diagnostic
- Single Flash: generic runtime error
Diagnostic Procedure
Example
- Double Flash: process data watchdog expired
- …
Run and Error LEDs can also be combined in a two-coloured Status LED:
EtherCAT Diagnostic State Machine errors (and corresponding AL Status Codes) can be
Diagnostic Features grouped into the following two categories:
Overview
Cyclic Synchronous • Initialization errors (slave does not reach OP state during start-up):
Diagnostic
Hardware Diagnostic
the master requests a state transition, but the slave refuses it because
Software Diagnostic one or more necessary conditions to enter the new state are not
Diagnostic Procedure satisfied.
Example
Typical initialization errors:
EtherCAT Diagnostic The information needed by the master to properly configure a slave is
Diagnostic Features derived from the ESI file (typical) or from the slave EEPROM content.
Overview
Cyclic Synchronous If a slave does not reach the OP state during start-up:
Diagnostic
Hardware Diagnostic
Software Diagnostic
1. Check if slave default settings were changed, and in case delete and
Diagnostic Procedure append/scan the slave again (default settings will be restored).
Example
2. (In case network configuration is based on ESI) Check if the ESI file
containing the slave description is correctly provided to the master
configuration tool.
EtherCAT Diagnostic Once a slave reached OP state successfully, it should never leave this
Diagnostic Features state without an explicit master request.
Overview
Cyclic Synchronous If a slave suddenly leaves the OP state:
Diagnostic
Hardware Diagnostic
Software Diagnostic
1. Check if hardware errors (like link loss or frame corruption - see
Diagnostic Procedure hardware diagnostic features) occur, as such errors could indirectly
Example cause a watchdog reaction or a loss of synchronization.
EtherCAT Diagnostic In order to report application-specific errors, slave devices can optionally
Diagnostic Features support CoE Diagnosis History Object 0x10F3, which can be read by the
Overview master via standard SDO services.
Cyclic Synchronous
Diagnostic
Hardware Diagnostic
Configuration tools can support a graphical interface for the Diagnosis
Software Diagnostic
History Object:
Diagnostic Procedure
Example
EtherCAT Diagnostic Sometimes diagnostic registers are not directly accessible to machine
Diagnostic Features operators, therefore the suggested steps for hardware and software
Overview diagnostics cannot be immediately applied: in this case, some preliminary
Cyclic Synchronous
Diagnostic
steps can help to locate, and often solve the problem (especially if this is at
Hardware Diagnostic hardware level).
Software Diagnostic
If these steps do not help to troubleshoot the issue, deeper Hardware
Diagnostic Procedure
Example and/or Software Diagnostic should be performed with the help of the
operating interface (if diagnostic information is available) or of the machine
builder.
Whenever communication issues on the EtherCAT network occur:
1 Check Link/Activity LEDs of slave LED is stable OFF Check that devices at both ends of the link are on
ports connected to the network for
each link
Check that cable connectors are properly inserted
3 Check Run LED for each slave LED is not stable ON Check that Link/Activity LED is flickering (confirming
device that data are received by slave)
4 In all cases when the available information enables to identify a Check cables like at points 1 and 2, starting from the
precise location in the network where communication issues network segment(s) affected by the issue.
start to appear (only one part of the machine stops working, the
operator interface reports errors coming from a precise subset Replace cables, starting from the network segment(s)
of slaves, …) affected by the issue.
5 In the case when communication issues affect the whole Check cable between master and first slave like at
network points 1 and 2.