You are on page 1of 218

EtherCAT Technology Group

EtherCAT Communication

Communication Principles

24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 1


Agenda
EtherCAT Basics
Slave Structure • EtherCAT Basics
Device Model (ISO/OSI)
• Slave Structure
Physical Layer
Data Link Layer • Device Model
Frame Structure • Physical Layer
Addressing
Commands • Data Link Layer
Memory/Registers – Frame Structure
SyncManager
FMMU – Addressing, Commands
Diagnosis – Memory, SyncManager, FMMUs
Distributed Clocks
Application Layer – Diagnosis
State Machine • Distributed Clocks
Mailbox
Mailbox Interface • Application Layer
EoE Ethernet – State Machine
CoE CANopen
FoE File Access
– Mailbox (Mailbox Protocols)
SoE Servo Drive – Slave Information Interface (EEPROM)
Slave Information /IF
Device Profiles
• Device Profiles
Modular Devices • Device Description
Drives
Device Description
• Tools (Configuration Tool, Monitor, …)
Configuration Tool • EtherCAT Master
EtherCAT Master
Standards&Implementation
• Standard & References
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 2
Functional Principle: Ethernet „on the Fly“
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Car
Distributed Clocks
27
Application Layer
State Machine
Mailbox Analogy Fast Train:
Mailbox Interface
EoE Ethernet • „Train“ (Ethernet Frame) does not stop
CoE CANopen
FoE File Access • Even when watching „train“ through narrow window one
SoE Servo Drive
Slave Information /IF sees the entire train
Device Profiles
Modular Devices • „Car“ (Sub-Telegram) has variable length
Drives
Device Description • One can „extract“ or „insert“ single „persons“ (Bits) or
Configuration Tool
EtherCAT Master
entire „groups“ – even multiple groups per train
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 3
Functional Principle: Ethernet „on the Fly“
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Slave Device Slave Device
Physical Layer
Data Link Layer
Frame Structure
Addressing EtherCAT Slave EtherCAT Slave
Commands Controller Controller
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer • Process data is extracted and inserted on the fly
State Machine
Mailbox • Process data size per slave almost unlimited
Mailbox Interface
EoE Ethernet (1 Bit…60 Kbyte, if needed using several frames)
CoE CANopen
FoE File Access • Compilation of process data can change in each cycle,
SoE Servo Drive
Slave Information /IF
e.g. ultra short cycle time for axis, and longer cycles for I/O
Device Profiles update possible
Modular Devices
Drives • In addition asynchronous, event triggered communication
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 4
Topology
EtherCAT Basics • Flexible Topology
Slave Structure
Device Model (ISO/OSI) – Line
Physical Layer – Daisy chain
Data Link Layer
Frame Structure – Daisy chain with branches
Addressing – Tree Structure
Commands
Memory/Registers – Star
SyncManager – Cable Redundancy
FMMU
Diagnosis • Any number of physical layer changes possible
Distributed Clocks • Standard Ethernet 100m cable distance between 2 devices
Application Layer
State Machine • Up to 65.535 devices possible
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 5
Topology – Line topology
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• Arbitrary number of devices in a line
Physical Layer
Data Link Layer
• Up to 65535 devices
Frame Structure
Addressing IPC
Commands
Memory/Registers
SyncManager
FMMU
..
.. DVI
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 6
Topology – Daisy Chain
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing IPC
Commands
Memory/Registers
SyncManager
FMMU
..
.. DVI
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 7
Topology – daisy chain with drop lines
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing IPC
Commands
Memory/Registers
SyncManager
FMMU
..
.. DVI
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 8
Topology – Tree structure
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing IPC
Commands
Memory/Registers
SyncManager
FMMU
..
.. DVI
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 9
Topology – Star topology with real time
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks IPC
Application Layer
State Machine
Mailbox
Mailbox Interface
..
EoE Ethernet .. DVI

CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 10
Topology – Star topology and fibre optics
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
fibre optics
FMMU
Diagnosis
Distributed Clocks IPC
Application Layer
State Machine
Mailbox
Mailbox Interface
..
EoE Ethernet .. DVI

CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 11
Cable Redundancy
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer IPC
Data Link Layer
Frame Structure
Addressing
Commands
..
.. DVI
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description • Only a second Ethernet Port is needed on the master –
Configuration Tool
EtherCAT Master
possible with all EtherCAT Slave devices
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 12
Frame Processing within one node
EtherCAT Basics
Slave Structure Master EtherCAT Segment (Slaves)
Device Model (ISO/OSI)
Physical Layer
Data Link Layer IPC
Frame Structure
Addressing
Commands
Memory/Registers
..
.. DVI
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
vom
vom Master
Master
Mailbox
Mailbox Interface zum Master
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 13
Logical Process Data Image
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) IPC
Physical Layer
Data Link Layer
Frame Structure
Addressing ..
..
DVI

Commands logisches Prozessabbild: bis 4 GByte 232 Telegrammstruktur


Memory/Registers
Ethernet HDR HDR 1 PLC Data HDR 2 NC Data HDR n Data n CRC
SyncManager
FMMU
Diagnosis
Distributed Clocks Data n
Application Layer
State Machine PLC Data

Mailbox NC Data
Mailbox Interface Sub- Sub- Sub-
EoE Ethernet Telegramm 1 Telegramm 2 Telegramm n
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
0
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 14
EtherCAT Slave Structure
EtherCAT Basics EtherCAT Master
Slave Structure
Device Model (ISO/OSI)
Physical Layer EDS Electronic
Data Link Layer XML Data Sheet
Frame Structure .... DVI

Addressing
Commands
Slave Application Layer
Memory/Registers
SyncManager Host (Mailbox Protocols)
FMMU
EtherCAT
Slave CPU
Diagnosis ESC
Distributed Clocks Controller Configuration
Application Layer
State Machine EEPROM Data
Mailbox ESC
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access

Trafo
Trafo

RJ45
RJ45

SoE Servo Drive


PHY PHY
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool Standard Ethernet
Slave-Hardware
EtherCAT Master Physical Layer Components
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 15
EtherCAT Slave Evaluation Kit (by Beckhoff)
EtherCAT Basics
Slave Structure
EtherCAT Programmer for PIC Program &
Device Model (ISO/OSI)
Slave Controller Board FPGA Debug Interface Power
Physical Layer
Data Link Layer
Supply
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks PDI
Application Layer Selector
State Machine Basic
Mailbox Board
Mailbox Interface EL9800
EoE Ethernet
CoE CANopen SPI
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description 32 bit
Configuration Tool 8/16bit µC PIC over SPI
parallel
EtherCAT Master interface
Standards&Implementation interface
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 16
EtherCAT Slave Controller Board
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure Status LED
Addressing RJ45
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis EtherCAT
Distributed Clocks
Slave
Application Layer Trafo Controller
State Machine
Mailbox (FPGA)
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive PHY EEPROM
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation * Post stamp design, not cost and space optimized
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 17
ISO/OSI Layer Model
EtherCAT Basics
Slave Structure OSI
Device Model (ISO/OSI)
Layers
Physical Layer
Data Link Layer
Frame Structure 7 Application Layer (AL) IEC 61158-5/-6 Type 12
Addressing
Commands 6
Memory/Registers
SyncManager 5
FMMU empty*
Diagnosis 4
Distributed Clocks
Application Layer 3
State Machine
Mailbox 2 Data Link Layer (DLL) IEC 61158-3/-4 Type 12
Mailbox Interface
EoE Ethernet 1 Physical Layer (PhL) IEC 61158-2 Type 12
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
• * „empty“ means that the layer behavior exists, but is not shown explicitly
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 18
Device Model – ISO/OSI Reference
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Servo
Physical Layer Application Appli- HTTP, Application
According cation FTP, … e.g. DS402 Drive Profile
Data Link Layer
IEC 61491
Frame Structure
Addressing
Commands
TCP UDP
Memory/Registers Application Object Dictionary

Slave Information
SyncManager Layer SoE IP
File
FMMU (AL) Service
Access SDO PDO Mapping
Channel Ethernet
Diagnosis
Distributed Clocks
Application Layer
AL Control/ Sync Man
State Machine Mailbox Process Data AL Status Settings
Mailbox Data
Mailbox Interface FMMU
FMMU
Link FMMU
FMMU n
EoE Ethernet Layer DL DL Layer
CoE CANopen (DL) Info Address Management
FoE File Access DL Control/
SoE Servo Drive DL Status
EtherCAT Data Link Layer
Slave Information /IF
Device Profiles Physical
Modular Devices Layer (PHY) Physical Layer
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 19
Application
Appli- HTTP, Application
….
cation FTP, .. e.g. CiA402 Drive Profile

Object Dictionary Application


RD / WR TCP, UDP PDO Mapping Layer
File
... Access
IP SDO PDO (AL)
VoE FoE EoE CoE CoE
Mailbox DLL
Process Data Interface (µC, SSI, I/O )
SII
EEPROM Registers Mailbox Process Data

0x0000 0x1000
ESC Address Space (DPRAM)
SyncMan0 MbxOut SyncMan1 MbxIn SyncMan2 SyncMan3
Data
FMMU n FMMU n
FMMU Link
EtherCAT Slave Controller (ESC) FMMU
FMMU
Layer
EtherCAT Processing Unit (DL)
and Auto-Forwarder with Loop Back

PHY MII / EBUS MII / EBUS MII / EBUS MII / EBUS


Management Port 0 Port 3 Port 2 Port 1

Physical
Trafo

Trafo
RJ45
RJ45

PHY PHY

Con
LVDS Layer
(PL)
WKC

WKC

HDR
HDR

FCS More Datagrams..


24.02.2008
Mailbox
EtherCAT Data FPWR
Communication Process Data LRW ECAT HDR Ethernet
© Copyright byHDR
Beckhoff, 2007 20
EtherCAT Physical Layers
EtherCAT Basics
Slave Structure • On cables: 100BaseTX or 100BaseFx
Device Model (ISO/OSI)
Physical Layer • Device internal: E-Bus (LVDS)
Data Link Layer
Frame Structure
Addressing Ethernet on LVDS physics E-Bus
Commands (E-Bus):
Memory/Registers for modular devices
SyncManager
FMMU
Diagnosis IPC
Distributed Clocks
Application Layer
State Machine
Mailbox
..
Mailbox Interface .. DVI

EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices Ethernet on
Drives 100BASE-TX; any number of
Device Description
up to 100 m, with physical layer
Configuration Tool
EtherCAT Master transformer coupling changes allowed
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 21
Physical Layer
EtherCAT Basics
Slave Structure • 100 BASE-TX
Device Model (ISO/OSI)
Physical Layer
– Most popular physical layer for Fast Ethernet
Data Link Layer – Shielded twisted pair (STP) with 2 pairs of wires
Frame Structure
Addressing
– Cable categories CAT5, 6, 7 can be used
Commands – RJ45 connector standard, M12 connector for IP67
Memory/Registers
SyncManager
– PHY Support for auto negotiation and auto crossover
FMMU
recommended
Diagnosis • 100 BASE-FX
Distributed Clocks
Application Layer
– All media options possible
State Machine – Simple solution for TX-to-FX converter
Mailbox
Mailbox Interface
EoE Ethernet • E-BUS
CoE CANopen
FoE File Access
– Interface for low cost backplane applications
SoE Servo Drive – Widely used LVDS (Low Voltage Differential Signaling)
Slave Information /IF adopted
Device Profiles
Modular Devices – Use Manchester Bit Coding
Drives
– LVDS: Low Voltage Differential Signaling according to
Device Description
Configuration Tool
ANSI/TIA/EIA-644, also used in IEEE 802.3ae (10Gigabit
EtherCAT Master Ethernet)
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 22
Port Management
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• A Slave Controller can have up to 4 EtherCAT Ports
Physical Layer
Data Link Layer
Frame Structure
Addressing
• If a Port is closed the controller forward it to the next port
Commands Ports can be opened/closed automatically with link up or
Memory/Registers
SyncManager opened closed by EtherCAT command
FMMU
Diagnosis
Distributed Clocks
Application Layer • The EtherCAT frame processing and forwarding order
State Machine
Mailbox
depends on logical ports configured:
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
2 ports 0EtherCAT Processing Unit1 / 10
SoE Servo Drive
Slave Information /IF 3 ports 0ECAT Proc. Unit1 / 12 / 20 (log. ports 0,1, and 2)
Device Profiles
Modular Devices
or
Drives 0ECAT Proc.Unit3 / 31 / 10 (log. ports 0,1, and 3)
Device Description
Configuration Tool 4 ports 0EtherCAT Processing Unit3 / 31 / 12 / 20
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 23
Frame Processing
Auto Forwarder and Loop Back
EtherCAT Basics
Slave Structure
Port 3
Device Model (ISO/OSI)
Physical Layer
Auto-
Data Link Layer Forwarder
Frame Structure
Addressing port 3 open

Commands
Memory/Registers EtherCAT
Processing Unit port 3 closed
SyncManager
FMMU Loopback function
Diagnosis
Distributed Clocks
Application Layer
State Machine Port 0 ET1100 Port 1
1
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
Loopback function
FoE File Access port 2 closed
SoE Servo Drive
Slave Information /IF
Device Profiles port 2 open

Modular Devices
Drives Auto-
Forwarder
Device Description
Configuration Tool
Port 2
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 24
Application
Appli- HTTP, Application
….
cation FTP, .. e.g. CiA402 Drive Profile

Object Dictionary Application


RD / WR TCP, UDP PDO Mapping Layer
File
... Access
IP SDO PDO (AL)
VoE FoE EoE CoE CoE
Mailbox DLL
Process Data Interface (µC, SSI, I/O )
SII
EEPROM Registers Mailbox Process Data

0x0000 0x1000
ESC Address Space (DPRAM)
SyncMan0 MbxOut SyncMan1 MbxIn SyncMan2 SyncMan3
Data
FMMU n FMMU n
FMMU Link
EtherCAT Slave Controller (ESC) FMMU
FMMU
Layer
EtherCAT Processing Unit (DL)
and Auto-Forwarder with Loop Back

PHY MII / EBUS MII / EBUS MII / EBUS MII / EBUS


Management Port 0 Port 3 Port 2 Port 1

Physical
Trafo

Trafo
RJ45
RJ45

PHY PHY

Con
LVDS Layer
(PL)
WKC

WKC

HDR
HDR

FCS More Datagrams..


24.02.2008
Mailbox
EtherCAT Data FPWR
Communication Process Data LRW ECAT HDR Ethernet
© Copyright byHDR
Beckhoff, 2007 25
Purpose of Data Link Layer
EtherCAT Basics
Slave Structure • Data Link Layer links Physical and Application Layer
Device Model (ISO/OSI)
Physical Layer • Data Link Layer takes care of the underlying communication
Data Link Layer
Frame Structure
infrastructure
Addressing – Link Control
Commands
Memory/Registers – Access to Transceivers (PHY)
SyncManager
FMMU – Addressing
Diagnosis
Distributed Clocks – Slave Controller configuration
Application Layer
State Machine
– EEPROM access
Mailbox
Mailbox Interface
– SyncManager configuration and management
EoE Ethernet – FMMU configuration and management
CoE CANopen
FoE File Access – Process Data Interface configuration
SoE Servo Drive
Slave Information /IF – Distributed Clock
Device Profiles
Modular Devices – Set Up AL State Machine interactions
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 26
Data Link Layer – Overview
EtherCAT Basics
Slave Structure • Standard IEEE 802.3 Ethernet Frame
Device Model (ISO/OSI)
Physical Layer – No special requirements for the master
Data Link Layer – Use of standard Ethernet infrastructure
Frame Structure
Addressing • IEEE Registered EtherType: 88A4h
Commands
Memory/Registers – Optimized frame overhead
SyncManager – IP stack not required
FMMU
Diagnosis – Simple master implementation
Distributed Clocks
Application Layer
• Additionally over UDP
State Machine (IANA registered Port 88A4h)
Mailbox
Mailbox Interface – EtherCAT communication over the Internet possible
EoE Ethernet – Using of standard sockets
CoE CANopen
FoE File Access • Frame processing at Slave side
SoE Servo Drive
Slave Information /IF
– EtherCAT Slave Controller processes the frame in
Device Profiles hardware
Modular Devices
Drives • Communication Performance independent from processor power
Device Description – no time critical reaction at slave side in software
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 27
Ethernet / EtherCAT Frame Structure
EtherCAT Basics Ethernet Frame: max. 1514 Byte
Slave Structure
Device Model (ISO/OSI)
Physical Layer Ethernet Header Ethernet Data FCS
Data Link Layer
Frame Structure
Addressing 48 Bit 48 Bit 16 Bit 32 Bit
Commands
Destination Source EtherType EtherCAT Data FCS
Memory/Registers
SyncManager EtherType 88A4h
FMMU
16 Bit 48 -1498 Byte
Diagnosis
Distributed Clocks 1 Destination Source EtherType Header Datagrams FCS
Application Layer
State Machine
Mailbox
Mailbox Interface
160 Bit 64 Bit 16 Bit 48 -1470 Byte
EoE Ethernet
CoE CANopen
2 Dest Src Type IP Header UDP H. Header Datagrams FCS
EtherType 0800h UDP Destination Port 88A4h
FoE File Access
SoE Servo Drive 11 Bit 1 Bit 4 Bit
Slave Information /IF
Device Profiles 1 Simple EtherCAT Communication Length Res. Type
Modular Devices
Drives 2 EtherCAT communication over Internet
Type of following data
Device Description
Reserved
Configuration Tool
Length of following EtherCAT datagrams
EtherCAT Master
(not checked by slave)
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 28
EtherCAT Frame Header
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
11 Bit 1 Bit 4 Bit
Data Link Layer 0 Length 11Res. 12 Type 15
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Type Meaning
FMMU -----------------------------------------------------------------------
Diagnosis
Distributed Clocks
0: Reserved
Application Layer 1: EtherCAT Datagram (s)
State Machine
Mailbox
the only type that is evaluated by the ESC
Mailbox Interface 2,3: Reserved
EoE Ethernet
CoE CANopen
4: Network Variables (used e.g. for Master-Master Communication)
FoE File Access 5: Mailbox over IP (used e.g. for Master-Master Communication)
SoE Servo Drive
Slave Information /IF
6-15: Reserved for future use
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 29
EtherCAT Datagram Header Address
EtherCAT Basics
Slave Structure
* add 1-32 padding bytes if Ethernet frame is less than 64
Device Model (ISO/OSI)
Physical Layer Ethernet H. Ethernet Data FCS
Data Link Layer
Frame Structure
Addressing 14 Byte 2 Byte 44*-1498 Byte 4 Byte
Commands
Ethernet H. Len 0 1 EtherCAT Datagrams FCS
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks 1st EtherCAT Datagram 2nd…. …. nth EtherCAT Datagram
Application Layer
State Machine
Mailbox
Mailbox Interface 10 Byte max. 1486 Byte 2 Byte
EoE Ethernet
CoE CANopen
Datag. Header Data WKC
FoE File Access WKC = Working Counter
SoE Servo Drive
Slave Information /IF
Device Profiles 8 Bit 8 Bit 32 Bit 11 Bit 2 1 1 1 16 Bit
Modular Devices
Cmd Idx Address Len R C R M IRQ
Drives
Device Description
Configuration Tool
EtherCAT Master
Circulating Datagram? More EtherCAT Datagrams?
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 30
EtherCAT Addressing Overview
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Ethernet Frame Header Address
Physical Layer
Data Link Layer
Frame Structure
Addressing MAC
Commands Segment Addressing Address
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks Device Addressing Logical Addressing
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet Position Addressing Node Addressing
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles Address by Assigned Node Process Data
Modular Devices physical Position Address Address
Drives
Device Description EtherCAT Datagram Header Address
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 31
Segment Addressing by MAC Address
EtherCAT Basics
Slave Structure
• Direct mode (no switch): broadcast MAC Address
Device Model (ISO/OSI)
EtherCAT Segment = Ethernet Device
Physical Layer
Data Link Layer
Frame Structure Master Slave Slave Slave Slave Slave Slave
Addressing Device Device Device Device Device Device Device
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis • Open mode: One MAC-Address for an EtherCAT Segment
Distributed Clocks
Application Layer
State Machine EtherCAT Segment = Ethernet Device
Mailbox Segment
Mailbox Interface Master Address Slave Slave Slave Slave Slave
EoE Ethernet Device Switch Slave Device Device Device Device Device
Device
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF Generic
Device Profiles Ethernet Device
EtherCAT Segment = Ethernet Device
Modular Devices
Drives Segment
Address Slave Slave Slave Slave Slave
Device Description Slave
Master Device Device Device Device Device
Configuration Tool Device
EtherCAT Master Device
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 32
EtherCAT Datagram Header Address
EtherCAT Basics
Slave Structure
* add 1-32 padding bytes if Ethernet frame is less than 64
Device Model (ISO/OSI)
Physical Layer Ethernet H. Ethernet Data FCS
Data Link Layer
Frame Structure
Addressing 14 Byte 2 Byte 44*-1498 Byte 4 Byte
Commands
Ethernet H. Len 0 1 EtherCAT Datagrams FCS
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks 1st EtherCAT Datagram 2nd…. …. nth EtherCAT Datagram
Application Layer
State Machine
Mailbox
Mailbox Interface 10 Byte max. 1486 Byte 2 Byte
EoE Ethernet
CoE CANopen
Datag. Header Data WKC
FoE File Access WKC = Working Counter
SoE Servo Drive
Slave Information /IF
Device Profiles 8 Bit 8 Bit 32 Bit 11 Bit 2 1 1 1 16 Bit
Modular Devices
Cmd Idx Address Len R C R M IRQ
Drives
Device Description
Configuration Tool
EtherCAT Master
Circulating Datagram? More EtherCAT Datagrams?
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 33
Address Field
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer 8 Bit 8 Bit 32 Bit 11 Bit 2 1 1 1 16 Bit
Data Link Layer Cmd Idx Address Len R C R M IRQ
Frame Structure
Addressing
16 Bit 16 Bit
Commands
Memory/Registers Position Offset Auto Increment Addressing (local)
SyncManager
FMMU
Address Offset Fixed Addressing (local)
Diagnosis
Distributed Clocks
Application Layer Logical Address Logical Addressing (global)
State Machine
Mailbox
Mailbox Interface • 32 Bit address space
EoE Ethernet
CoE CANopen
FoE File Access
- used for 16 bit device addressing (65.535 devices
SoE Servo Drive possible)
Slave Information /IF
Device Profiles
and 16 bit for addressing local memory space of device
Modular Devices (max. 64kByte)
Drives
Device Description
or
Configuration Tool
EtherCAT Master
Standards&Implementation
- 32 bit logical addressing
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 34
16 Bit 16 Bit
Auto Increment Addressing Position Offset

EtherCAT Basics • Negative Auto Increment Address for every slave


Slave Structure
Device Model (ISO/OSI) depending on position (16 bit)
Physical Layer
Data Link Layer
Frame Structure
• Slave which reads address == 0x0000 is addressed
Addressing
Commands • Every slave increments address by 1
Memory/Registers
SyncManager
FMMU
• Offset addresses local memory space of device
Diagnosis
Distributed Clocks • Usually used during scan of hardware configuration
Application Layer

0xFFFB
0xFFFC
0xFFFD
0xFFFE
0xFFFF
State Machine
0x0000
Mailbox
Mailbox Interface
EoE Ethernet

0xFFFA
IPC

0xFFF8
0xFFF9
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
..
Modular Devices .. DVI

Drives
1 2 3 4
Device Description 5 6
Configuration Tool
EtherCAT Master
Standards&Implementation 7 8 9
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 35
16 Bit 16 Bit
Fixed Addressing Address Offset

EtherCAT Basics
Slave Structure • Every Slave has a fixed address (16 bit)
Device Model (ISO/OSI)
Physical Layer
Data Link Layer • Usually assigned during hardware configuration scan
Frame Structure
Addressing
Commands
• Independent from slave position
Memory/Registers
SyncManager • Fixed address lost after power loss
FMMU
Diagnosis
Distributed Clocks
Application Layer

0x3EA

0x3ED
0x3EB
0x3EC

0x3EE
State Machine
Mailbox
0x3E9
Mailbox Interface
EoE Ethernet IPC

0x3EF
0x3F0
0x3F1
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles ..
.. DVI
1 2 3 4
Modular Devices
Drives 5 6
Device Description
Configuration Tool
EtherCAT Master 7 8 9
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 36
32 Bit
Logical Addressing Logical Address

EtherCAT Basics
Slave Structure • Slave reads from/ writes its data into the 4 GByte great
Device Model (ISO/OSI)
Physical Layer Ethernet frame (fragmented)
Data Link Layer
Frame Structure
Addressing
IPC
Commands
Memory/Registers
SyncManager
FMMU ..
DVI
..

Diagnosis
232
Logical process image up to 4 GByte

Telegrammstruktur
Distributed Clocks
Application Layer Ethernet HDR HDR 1 PLC Data HDR 2 NC Data HDR n Data n CRC
State Machine
Mailbox
Mailbox Interface
Data n
EoE Ethernet
CoE CANopen PLC Data
FoE File Access
NC Data
SoE Servo Drive
Slave Information /IF
Sub- Sub- Sub-
Device Profiles
Telegramm 1 Telegramm 2 Telegramm n
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation 0
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 37
EtherCAT Commands
EtherCAT Basics
Slave Structure • Different commands to optimize reading and writing for all
Device Model (ISO/OSI)
Physical Layer access methods within a Fieldbus communication system
Data Link Layer
Frame Structure
Addressing
Commands Cmd Idx Address Offset Len R C R M IRQ
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Cmd Type Access Address Offset Comment
Application Layer
State Machine NOP No Operation
Mailbox
Mailbox Interface Auto R, W, RW, Position Local Memory Position value 0
EoE Ethernet Increment RMW (increments) Address (at entry) addressed
CoE CANopen
FoE File Access configured R, W, RW, Address Local Memory Match address value to
SoE Servo Drive Address RMW (configured) Address local address register
Slave Information /IF
Device Profiles
Broadcast R, W, RW (increments) Local Memory
Modular Devices
Drives
Address
Device Description Logical R, W, RW 32 Bit logical address
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 38
EtherCAT Commands
EtherCAT Basics
Slave Structure • Broadcast Read
Device Model (ISO/OSI)
Physical Layer – Individual Bits of a Byte will be added with a bitwise
Data Link Layer
Frame Structure OR operation between incoming data and local data
Addressing
Commands
Memory/Registers
SyncManager • Read Write Actions
FMMU
Diagnosis – Exchange of incoming data and local data
Distributed Clocks
Application Layer
(exception: Broadcast – see broadcast read)
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
• Read Multiple Write Actions (RMW)
CoE CANopen
FoE File Access
– Addressed Station will read the others will write
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 39
Local Address Space of ESC
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
0x0000
Data Link Layer Registers
Frame Structure
Addressing 0x0100 DL Control
Commands 0x0110 DL Status 4 kByte
Memory/Registers 0x0120 AL Control
SyncManager 0x0130 AL Status
FMMU
0x0FFF ……
Diagnosis
Distributed Clocks 0x1000
Application Layer User memory
State Machine
Mailbox
Mailbox Interface
process data in
EoE Ethernet process data out
CoE CANopen
FoE File Access mailbox data out
1..60 kByte
SoE Servo Drive
Slave Information /IF mailbox data in
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
0xFFFF ESC
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 40
Local Address Space of ESC
EtherCAT Basics
Slave Structure • 64 kByte address space
Device Model (ISO/OSI)
Physical Layer • Divided into registers and dual ported RAM (DPRAM)
Data Link Layer
Frame Structure • First 4 kByte are reserved for registers
Addressing
Commands • DPRAM starts at 1000h
Memory/Registers
SyncManager • DPRAM size depends on Slave Controller implementation
FMMU
Diagnosis (up to 60 kByte, 4kByte in actual FPGA implementation)
Distributed Clocks
Application Layer • Addressing of registers and DPRAM same
State Machine
Mailbox • Register Write is different –
Mailbox Interface
EoE Ethernet
shadow Register for all Registers integrated
CoE CANopen DPRAM write is not shadowed
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 41
Register of EtherCAT Slave Controller
EtherCAT Basics
Slave Structure • First 1000h bytes (4 kBytes) of local address space
Device Model (ISO/OSI)
Physical Layer • Read access for both sides (EtherCAT and application)
Data Link Layer • Write access from EtherCAT for most of the registers
Frame Structure
Addressing – Master has to configure the Slave Controller
Commands
Memory/Registers • No address settings needed
SyncManager • FMMU and Sync Manager configuration can be
FMMU
Diagnosis optimized for available bandwidth and cycle times
Distributed Clocks – Exceptions that are writable from the application side:
Application Layer
State Machine • AL Status Register, AL Status Code Register,
Mailbox
AL Event Mask Register, Sync Manager Disable
Mailbox Interface
EoE Ethernet Registers, AL Identification Registers
CoE CANopen
• Process Data Interface (PDI) register initialized from Slave
FoE File Access
SoE Servo Drive Information interface (Serial EEPROM)
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 42
Register
EtherCAT Basics
Slave Structure • Registers might be monitored via configuration tool
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 43
Register – ESC Data Sheet
EtherCAT Basics
Slave Structure • Register description for every ESC (FPGA/ ASIC)
Device Model (ISO/OSI)
Physical Layer – DL Information, DL Control, DL Status, DL Address
Data Link Layer
Frame Structure – AL Control, AL Status, AL Event
Addressing
Commands
– SyncManager + FMMU configuration
Memory/Registers
– Distributed Clocks
SyncManager
FMMU – Slave Information interface (Serial EEPROM )
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive Enable Disable Ports
Slave Information /IF
Device Profiles Control of the device state machine
Modular Devices
Drives Status of the device state machine
Device Description
Configuration Tool Error Code
EtherCAT Master
Standards&Implementation 32 Bit I/0, SPI, µC Interface
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 44
SyncManager Overview
EtherCAT Basics
Slave Structure • SyncManager protects a DPRAM section from simultaneous
Device Model (ISO/OSI)
access  data consistency
Physical Layer
Data Link Layer • Mailbox Type
Frame Structure
Addressing – 1 buffer SyncManager supports handshake
Commands
– Data overflow protection
Memory/Registers
SyncManager – Writing side must write before reading side can read
FMMU
Diagnosis – Reading side must read before writing side can write again
Distributed Clocks • Buffered Type
Application Layer
State Machine – 3 buffer SyncManager guarantees consistent data delivery
Mailbox
and access to the newest data any time
Mailbox Interface
EoE Ethernet – Always a free buffer to write
CoE CANopen
FoE File Access – Always a consistent buffer to read (except before the first
SoE Servo Drive writing)
Slave Information /IF
Device Profiles – Usually used for process data communication
Modular Devices
• Up to 16 independent SyncManger channels possible
Drives
Device Description • The SyncManager configuration registers start at address
Configuration Tool
EtherCAT Master
0x0800
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 45
Buffered Type (3 buffers) Write Example
EtherCAT Basics • Characteristic: Data always available for both sides
Slave Structure
• Requires 3 (consecutive) memory areas
Device Model (ISO/OSI)
Physical Layer
Data Link Layer EtherCAT ECAT NEXT USER PDI
Frame Structure a Write begin WRITE WRITE WRITE
Addressing WRITE WRITE WRITE
Commands WRITE WRITE WRITE Read latest
Memory/Registers
SyncManager
FMMU
Write end
1
WRITE WRITE WRITE
WRITE WRITE WRITE
2 3
READ READ READ
READ READ READ
READ READ READ
READ READ READ
READ READ READ
available data

Diagnosis
Distributed Clocks
Application Layer
State Machine
b WRITE WRITE WRITE
WRITE WRITE WRITE
Mailbox WRITE WRITE WRITE
Mailbox Interface
EoE Ethernet
CoE CANopen
2 1
WRITE WRITE WRITE
WRITE WRITE WRITE
3
READ READ
READ READ READ
….Go on Reading
Read end
READ READ READ
FoE File Access
SoE Servo Drive
Slave Information /IF c Write begin Read latest
Device Profiles
ECATECATECATECA WRITE WRITE WRITE available data
TECATECATECATEC WRITE WRITE WRITE
Modular Devices

2 3 1
ATECATECATECATE WRITE WRITE WRITE
Drives CATECATECAT WRITE WRITE WRITE
Device Description WRITE WRITE WRITE

Configuration Tool
EtherCAT Master
Standards&Implementation Cycle begins again  a
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 46
Mailbox Type (1 buffer) Read Example
EtherCAT Basics
Slave Structure • Allows handshake Communication
Device Model (ISO/OSI)
Physical Layer • Useful for non-Process Data
Data Link Layer
Frame Structure • Handshake mechanism – one side has control
Addressing
Commands
Memory/Registers
SyncManager
Master EtherCAT Slave
FMMU
Diagnosis
Distributed Clocks
Read 
Application Layer
MBX Empty
Failed  Read
State Machine
Mailbox WKC = 0
Mailbox Interface
EoE Ethernet  Write
CoE CANopen
FoE File Access
SoE Servo Drive MBX Full Write  Successfull
Slave Information /IF
Device Profiles
Modular Devices
Drives Read 
Device Description MBX Empty
Configuration Tool Successfull  Read
EtherCAT Master WKC = 1
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 47
SyncManager channel configuration registers
EtherCAT Basics
Slave Structure
16 Bit 16 Bit 8 Bit 8 Bit 16 Bit
Device Model (ISO/OSI)
Physical Layer
0
Start Address 16
Length 32
Ctrl 40
Status E 49R Res
49
E 49R Res
49
Data Link Layer 48 49 50 56 57 63

Frame Structure
Request Response
Addressing Master Slave
Commands
Memory/Registers
SyncManager 1/3
0
Buffer 2
R/W 4
IE 5
IP WD
6 7
R
FMMU
Diagnosis
Distributed Clocks 0
IW 1IR WD
2
1P
3
3P
4
Res.6
Application Layer
State Machine
Mailbox 00: Read Watchdog Channel
Repeat Reserved
Mailbox Interface
01: Write Enable 0
Enable 1
EoE Ethernet
CoE CANopen 0: read
FoE File Access 00: 3 Buffer Interrupt 1: written
SoE Servo Drive
10: 1 Buffer Enable
Slave Information /IF
Device Profiles to PDI Completely
read 00: Buffer 0
Modular Devices
Drives 01: Buffer 1
Device Description Completely 10: Buffer 2
Configuration Tool
written 11: locked (Start)
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 48
SyncManager assignment
EtherCAT Basics
Slave Structure • Standard assignment
Device Model (ISO/OSI)
Physical Layer
– With mailbox support
Data Link Layer • SM0: Mailbox output
Frame Structure
Addressing
• SM1: Mailbox input
Commands • SM2: Process data outputs
Memory/Registers
SyncManager
• SM3: Process data inputs
FMMU • Readable via CoE object 1C00h
Diagnosis
Distributed Clocks
– Without mailbox support
Application Layer • SM0: Process data outputs
State Machine (or inputs if no outputs available)
Mailbox
Mailbox Interface
• SM1: Process data inputs
EoE Ethernet • Extended assignment
CoE CANopen
FoE File Access
– SM0: Mailbox output
SoE Servo Drive – SM1: Mailbox input
Slave Information /IF
Device Profiles
– Rest is configurable via CoE object 1C00h
Modular Devices
Drives
Device Description
• One or more PDO always fit exactly in a SyncManager
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 49
Fieldbus Memory Management Unit (FMMU)
EtherCAT Basics
Slave Structure • Maps a section of the local address space into the global
Device Model (ISO/OSI)
Physical Layer address space and vice versa
Data Link Layer
Frame Structure • Read and write access distinguishable
Addressing
Commands • Bitwise configuration of the memory section possible
Memory/Registers
SyncManager • Up to 16 independent FMMU channels possible
FMMU
Diagnosis – FMMU configuration registers start at address
Distributed Clocks
Application Layer
0x0600
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
• Operation samples:
CoE CANopen
FoE File Access
• Mapping of process data into the global address space
SoE Servo Drive
Slave Information /IF
• Mapping of status bits from the register section
Device Profiles
Modular Devices
– Access to device specific status information with a
Drives minimum overhead – e.g. fill status of a sync
Device Description
Configuration Tool manager channel
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 50
FMMU Usage for Addressing
EtherCAT Basics
Slave Structure • Global address space
Device Model (ISO/OSI)
Physical Layer • 4 GByte address space
Data Link Layer
Frame Structure • Mapping to local addresses by
Addressing
Commands Fieldbus Memory Management Units (FMMU)
Memory/Registers
SyncManager • All EtherCAT devices can map data in a single EtherCAT
FMMU
Diagnosis
Datagram LRW – depending on the FMMU configuration
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool Ethernet HDR FH EH Data WKC FCS
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 51
FMMU entity configuration registers
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) 16 Bit 8 Bit 8 Bit 16 Bit 8 Bit 8 Bit 1 31 Bit
32 Bit
Physical Layer
Data Link Layer Glob. Start Addr.
0 32
Length GSB 56GEB 64Phy. Start 80LSB
48 88
Dir 96E 97
Res… 127
Frame Structure
Addressing
Commands
Memory/Registers 3 Bit 5 Bit 6 Bit
SyncManager
FMMU 0
0-7 Reserved 7
3 0
R 1W 2Reserved 7 Enable
Diagnosis
Distributed Clocks
Application Layer
State Machine Length of all Write Enable
Mailbox concerned
Mailbox Interface
Bytes Read Enable
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Global GSB: Global Start Bit Local
Slave Information /IF Start Address GEB: Global End Bit Start Address
Device Profiles (32 Bit) LSB: Local Start Bit (16 Bit)
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 52
FMMU Setup
EtherCAT Basics
Slave Structure 1. Master reads hardware configuration including input and
Device Model (ISO/OSI)
Physical Layer output data length of each slave
Data Link Layer
Frame Structure 2. Master organizes mapping of process data
Addressing
Commands 3. Master distributes information (start address etc.) for
Memory/Registers
SyncManager
every slave about where process data in logical process
FMMU image is provided
Diagnosis
Distributed Clocks 4. Process data communication starts
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 53
FMMU example
EtherCAT Basics
Slave Structure • Map 6 Bits form logical address 0x14711.3 to 0x14712.0 to
Device Model (ISO/OSI)
Physical Layer the physical register bits 0x0F01.1 to 0x0F01.6.
Data Link Layer
Frame Structure – The FMMU length is 2 Byte, since the mapped bits
Addressing
Commands
span 2 Bytes of the logical space.
Memory/Registers
SyncManager
FMMU FMMU config. register FMMU reg. offset Value
Diagnosis
Distributed Clocks
Logical Start Address 0x0:0x3 0x00014711
Application Layer Length (Byte) 0x4:0x5 0x0002
State Machine
Mailbox Logical Start Bit 0x6 0x03
Mailbox Interface
EoE Ethernet
Logical Stop Bit 0x7 0x00
CoE CANopen Physical Start Address 0x8:0x9 0x0F01
FoE File Access
SoE Servo Drive Physical Start Bit 0xA 0x01
Slave Information /IF
Device Profiles
Type 0xB Rand and/or Write
Modular Devices Activate 0xC 1 (enable)
Drives
Device Description
Note: FMMU configuration registers start at address 0x0600
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 54
EtherCAT Datagrams
EtherCAT Basics
Slave Structure
* add 1-32 padding bytes if Ethernet frame is less than 64
Device Model (ISO/OSI)
Physical Layer Ethernet H. Ethernet Data FCS
Data Link Layer
Frame Structure
Addressing 14 Byte 2 Byte 44*-1498 Byte 4 Byte
Commands
Ethernet H. Len 0 1 EtherCAT Datagrams FCS
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks 1st EtherCAT Datagram 2nd…. …. nth EtherCAT Datagram
Application Layer
State Machine
Mailbox
Mailbox Interface 10 Byte max. 1486 Byte 2 Byte
EoE Ethernet
CoE CANopen
Datag. Header Data WKC
FoE File Access WKC = Working Counter
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 55
Working Counter Details
EtherCAT Basics
Slave Structure • EtherCAT Datagram ends with a 16 Bit Working Counter
Device Model (ISO/OSI)
Physical Layer • Working Counter counts the number of interactions of
Data Link Layer
Frame Structure devices addressed by an EtherCAT Datagram
Addressing
Commands • EtherCAT Slave Controller increments the Working
Memory/Registers
SyncManager
Counter in hardware – if the controller is addressed and
FMMU the addressed memory is accessible (Sync Manager)
Diagnosis
Distributed Clocks • Each Datagram should have an expected Working counter
Application Layer
State Machine value – calculated by the configuration tool
Mailbox
Mailbox Interface • The Master checks the valid processing of EtherCAT
EoE Ethernet
CoE CANopen
Datagrams by comparing the Working Counter with the
FoE File Access expected value
SoE Servo Drive
Slave Information /IF • Special case: RW addressing methods will increment
Device Profiles
Modular Devices WKC by 2 for write access and by 1 for read access
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 56
Working Counter Example
EtherCAT Basics
Slave Structure • WKC valid: data of this datagram was written to and
Device Model (ISO/OSI)
Physical Layer read from all addressed devices
Data Link Layer
Frame Structure • WKC invalid: memory of one or more devices was not
Addressing
Commands
accessible
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
WC=0 WC=1 WC=3 WC=6
Application Layer node 1 node 2 node 3
State Machine PC DI = read DO=write DI/DO=
Mailbox WC+1=1 WC+2=3 read+write
LRW-
Mailbox Interface Command WC+3=6
EoE Ethernet
1xread+
CoE CANopen WC=6 WC=6 WC=6
1xwrite+
FoE File Access 1+read/ write
SoE Servo Drive =6
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 57
Working Counter Example
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands WC+1
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
WC+1
Application Layer
State Machine
Mailbox
Mailbox Interface WC+3
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
WC+1
Device Profiles
Modular Devices
Drives
Device Description
WC+1
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 58
Diagnosis at Data Link – Possible Errors
EtherCAT Basics
Slave Structure Error situation Detection
Device Model (ISO/OSI)
Physical Layer Wrong Station Check EEPROM, Vendor, Device, SerialNo
Data Link Layer
Frame Structure Transmission Check Transmission Error Counter of each station
Addressing
Commands
Errors
Memory/Registers
SyncManager
Change Check Link Status of last device (should have
FMMU between In and only a single port connected)
Diagnosis
Distributed Clocks
Out Cable
Application Layer
State Machine
Link loss/ Check working counter of a Broadcast read
Mailbox Station fault
Mailbox Interface
EoE Ethernet Frame loss Close loop in the middle
CoE CANopen
FoE File Access Check errors again
SoE Servo Drive
Slave Information /IF
If no frame loss repeat this in the 2nd half of
Device Profiles segment
Modular Devices
Drives Otherwise repeat this in the first half of segment
Device Description
Configuration Tool Repeat this until only a single station remains,
EtherCAT Master which should be the station with problems
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 59
Monitoring of EtherCAT Communication
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer Switch
Frame Structure
Addressing
Master
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer Network Monitor
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
• Masters sends an EtherCAT Frame (broadcast)
FoE File Access
SoE Servo Drive
 Monitor gets the first copy (unprocessed)
Slave Information /IF
Device Profiles
• Frame returns from EtherCAT Slave Devices
Modular Devices
Drives
 Monitor gets the second copy (processed)
Device Description
Configuration Tool
• DLL for readable format available on EtherCAT Web site
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 60
Monitoring of EtherCAT Communication
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer Network Monitor
Data Link Layer
Frame Structure
Addressing Master
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
• Masters sends an EtherCAT Frame (broadcast)
CoE CANopen
FoE File Access
 Monitor gets the first copy (unprocessed)
SoE Servo Drive
Slave Information /IF
• Frame returns from EtherCAT Slave Devices
Device Profiles
Modular Devices
 Monitor gets the second copy (processed)
Drives
Device Description
• DLL for readable format available on EtherCAT Web site
Configuration Tool Attention:
EtherCAT Master At low cycle times order of frames might be mixed because of timing restrictions within
Standards&Implementation NDIS protocol driver
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 61
Purpose of Distributed Clocks (DC)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Precise Synchronization (<< 1 µs!) by exact adjustment of
Physical Layer
Data Link Layer distributed clocks
Frame Structure
Addressing
S
Commands M
Memory/Registers ∆t
SyncManager IPC
FMMU
Diagnosis
Distributed Clocks
Application Layer S S
..
State Machine .. DVI

Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access S S S S S
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 62
External Clock Synchronization: IEEE 1588
EtherCAT Basics
Slave Structure IEEE 1588
Device Model (ISO/OSI) Switchport with integrated Grandmaster
Physical Layer
Data Link Layer
IEEE 1588 Boundary Clock Clock
Frame Structure
Addressing
S
Commands M
Memory/Registers
SyncManager IPC
FMMU
Diagnosis
Distributed Clocks
Application Layer S Boundary S
..
State Machine .. DVI Clock
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access S S S S S
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 63
Distributed Clocks – Features
EtherCAT Basics
Slave Structure • Synchronization of EtherCAT devices
Device Model (ISO/OSI)
Physical Layer • Definition of a System Time
Data Link Layer
Frame Structure – Beginning on January, 1st 2000 at 0:00h
Addressing
Commands
– Base unit is 1 ns
Memory/Registers
– 64 bit value (enough for more than 500 years)
SyncManager
FMMU – Lower 32 bits spans over 4.2 seconds
Diagnosis
Distributed Clocks • Normally enough for communication and time
Application Layer
State Machine
stamping
Mailbox • Definition of a Reference Clock
Mailbox Interface
EoE Ethernet – One EtherCAT Slave will be used as a Reference Clock
CoE CANopen
FoE File Access – Reference Clock distributes its Clock cyclically
SoE Servo Drive
Slave Information /IF – Reference Clock adjustable from a “global” Reference
Device Profiles Clock – IEEE 1588
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 64
Distributed Clocks Unit
EtherCAT Basics SPI / µC parallel IRQ Sync1 / Latch1
Slave Structure Digital I/O Sync0 / Latch0
Device Model (ISO/OSI)
Physical Layer
Data Link Layer Process Data Interface
EtherCAT Address Space
Frame Structure (PDI)
Addressing
Commands
FMMU n
Memory/Registers
SyncManager Sync / Latch Unit
FMMU
Diagnosis SyncMan
Distributed Clocks DC
Control Offset
Application Layer
State Machine
Mailbox EtherCAT Processing Unit System Time
Mailbox Interface and Auto-Forwarder with Loop Back
Delay
EoE Ethernet Distributed Clocks
CoE CANopen Port 0 Port 1 Port 2 Port 3
FoE File Access EtherCAT Slave Controller (ESC)
SoE Servo Drive
Trafo
Trafo

RJ45
RJ45

PHY PHY
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 65
Features of DC Unit within ESC
EtherCAT Basics
Slave Structure • Provider for local time signals
Device Model (ISO/OSI)
Physical Layer – Generation of synchronous local output signals
Data Link Layer
Frame Structure (SYNC0, SYNC1 Signals)
Addressing
Commands – Generation of synchronous Interrupts
Memory/Registers
SyncManager • Synchronous Digital Output updates and Input sampling
FMMU
Diagnosis • Precise time stamping of input events (Latch unit)
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 66
Features of DC Unit within ESC
EtherCAT Basics
Slave Structure • Propagation delay measurement support
Device Model (ISO/OSI)
Physical Layer – Each EtherCAT slave controller measures the delay
Data Link Layer
Frame Structure between the two directions of a frame
Addressing
Commands – Master calculates the propagation delays between all
Memory/Registers
SyncManager
slaves
FMMU
Diagnosis
• Offset compensation to Reference Clock
Distributed Clocks
Application Layer
– Offset between local clock and Reference Clock
State Machine
Mailbox
– Same absolute system time in all devices
Mailbox Interface
EoE Ethernet
– Simultaneousness (clear below 100ns difference) in
CoE CANopen all devices
FoE File Access
SoE Servo Drive • Drift compensation to Reference Clock
Slave Information /IF
Device Profiles – DC Control Unit
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 67
Register System Time
EtherCAT Basics
Slave Structure • Registers:
Device Model (ISO/OSI)
Physical Layer – System Time
Data Link Layer
Frame Structure
(0x0910:0x0917, small systems 0x0910:0x0913)
Addressing
Commands
Memory/Registers • System Time
SyncManager
FMMU – Read access from both sides (EtherCAT and µC)
Diagnosis
Distributed Clocks – Consistent access from µC
Application Layer
State Machine
(access to first byte saves an internal copy)
Mailbox – Consistent access from EtherCAT
Mailbox Interface
EoE Ethernet (within a single frame, internally latched with SOF)
CoE CANopen
FoE File Access
– Write access from EtherCAT starts the DC control
SoE Servo Drive
Slave Information /IF
– ARMW command (auto increment read – multiple
Device Profiles write) allows to read System Time of the reverence
Modular Devices
Drives
clock and write it to all slave clocks within a single
Device Description frame
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 68
DC – Propagation Delay Measurement (I)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) EtherCAT Node measures time difference between leaving and
Physical Layer
Data Link Layer
returning frame
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks EtherCAT Frame
vom Master
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 69
DC – Propagation Delay Measurement (II)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Propagation delays between any nodes can be computed
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager IPC
FMMU
Diagnosis
Distributed Clocks
Application Layer
..
State Machine .. DVI

Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 70
Propagation Delay Measurement
EtherCAT Basics
Slave Structure • Registers:
Device Model (ISO/OSI)
Physical Layer – Receive Time Port 0 (0x0900:0x0903)
Data Link Layer – Receive Time Port 1 (0x0904:0x0907)
Frame Structure
Addressing – Receive Time Port 2 (0x0908:0x090B)
Commands
Memory/Registers – Receive Time Port 3 (0x090C:0x090F)
SyncManager – System Time Delay (0x0928:0x092B)
FMMU
Diagnosis
Distributed Clocks
Application Layer
• Write access to Receive Time Port 0 activates latch
State Machine – Latch local time of SOF (Start of Frame)
Mailbox
Mailbox Interface – At EOF (End of Frame) SOF time is copied to Receive
EoE Ethernet Time Port X
CoE CANopen
FoE File Access • Receive Time Port X in local clock units (controlled)
SoE Servo Drive
Slave Information /IF
• SOF time of all frames are latched on all ports internally
Device Profiles • Master reads all time stamps and calculates the delay times with
Modular Devices
Drives respect to the topology.
Device Description • Individual delay time is written to register System Time Delay
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 71
Offset and Drift Compensation
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Same System Time in all devices
Physical Layer
Data Link Layer
Frame Structure Global System Time Individual
Addressing e.g. by RTC or IEEE1588 System Time Offset
Commands Reference: Jan 1st 2000 M
Memory/Registers S
SyncManager IPC
FMMU
Diagnosis
Distributed Clocks
Application Layer S S
..
State Machine .. DVI

Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access S S S S S
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 72
Offset Compensation
EtherCAT Basics
Slave Structure • Registers:
Device Model (ISO/OSI)
Physical Layer – System Time Offset
Data Link Layer
Frame Structure (0x0920:0x927, small systems 0x0920:0x0923)
Addressing
Commands
Memory/Registers
SyncManager • Difference between the Reference Clock and every slave
FMMU
Diagnosis
device's clock is calculated by the master.
Distributed Clocks
Application Layer
• The offset time is written to register System Time Offset
State Machine
Mailbox
• Each slave calculates its local copy of the System time
Mailbox Interface using its local time and the local offset value:
EoE Ethernet
CoE CANopen
FoE File Access • tLocal copy of System Time = tLocal time + tOffset
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 73
Drift Compensation – DC Control
EtherCAT Basics
Slave Structure • Registers:
Device Model (ISO/OSI)
Physical Layer – System Time
Data Link Layer (0x0910:0x0917, small systems 0x0910:0x0913)
Frame Structure
Addressing – System Time Offset
Commands (0x0920:0x927, small systems 0x0920:0x0923)
Memory/Registers
SyncManager
FMMU
Diagnosis
• ARMW command (auto increment read – multiple write) allows to
Distributed Clocks read System Time of the reverence clock and write it to all slave
Application Layer clocks within a single frame
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
• DC Control
CoE CANopen – Write access to System Time compares
FoE File Access
SoE Servo Drive
received Time with local time
Slave Information /IF
Device Profiles
• ∆t = (tLocal time + tOffset + tPropagationDelay) - tReceived Time
Modular Devices
Drives – If (∆t > 0) then decelerate local clock
Device Description else if (∆t < 0) accelerate local clock
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 74
Initialization of DCs
EtherCAT Basics
Slave Structure • Initialization with Propagation Delay compensation
Device Model (ISO/OSI) 1. Master reads the DL Status register of all slaves and calculates the network topology.
Physical Layer 2. Master sends a broadcast write to Receive Time Port 0 register (at least first byte). All slaves
Data Link Layer latch the local time of the first preamble bit of this frame at all ports and at the ECAT
Frame Structure Processing Unit. Some ESCs need the EtherCAT network to be free of frames before the
Addressing broadcast write is sent.
Commands
3. Master waits until the broadcast write frame has returned.
Memory/Registers
SyncManager
4. Master reads all Receive Time Port 0-3 registers (depending on the topology and the Receive
FMMU
Time ECAT Processing Unit register (0x0918:0x091F) which contains the upper 32 bits of the
Diagnosis
receive times.
Distributed Clocks 5. Master calculates individual propagation delays and writes them to System Time Delay
Application Layer registers of the slaves. Possible overruns of the 32 bit Receive Times have to be checked and
State Machine taken into account.
Mailbox 6. Master sets System Time Offset register of the Reference Clock so that the Reference Clock is
Mailbox Interface bound to the master time. The offset for the Reference Clock is master time minus Receive
EoE Ethernet Time ECAT Processing Unit (local time) of the Reference Clock.
CoE CANopen 7. Master calculates System Time offsets for all DC slaves and writes them to the System Time
FoE File Access Offset registers. The offset of each slave is Receive Time ECAT Processing Unit from
SoE Servo Drive Reference Clock minus Receive Time ECAT Processing Unit from each DC slave.
Slave Information /IF
8. For static drift compensation, the master sends many separate ARMW or FRMW drift
Device Profiles
compensation frames (e.g., 15,000 frames) to distribute the System Time of the Reverence
Modular Devices
Clock to all DC slaves.
Drives
Device Description
9. For dynamic drift compensation, the master sends ARMW or FRMW commands periodically to
Configuration Tool
distribute the System Time of the Reverence Clock to all DC slaves. The rate of the drift
EtherCAT Master
compensation commands depends on the acceptable maximum deviation.
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 75
SyncSignal Generation
PDI IRQ Latch0 / Latch1
EtherCAT Basics Sync0 / Sync1
Slave Structure • Output of the Sync unit can be used for
Device Model (ISO/OSI)
Physical Layer – Interrupt generation Sync Unit
Latch Unit
Data Link Layer – PDI Digital Output Update events DC
Frame Structure Offset
Control
Addressing • Can be mapped to
Commands System Time
Memory/Registers – AL Event Request Register for
Delay
SyncManager PDI IRQ Distributed Clocks
FMMU
Diagnosis – SYNC0 and SYNC1
Distributed Clocks • SyncSignals can be generated at a specific System Time
Application Layer
State Machine • Four Operation modes are supported:
Mailbox
Mailbox Interface – Cyclic generation
EoE Ethernet – Single shot
CoE CANopen
FoE File Access – Cyclic acknowledge
SoE Servo Drive
Slave Information /IF
– Single shot acknowledge
Device Profiles • The second SyncSignal (SYNC1) depends on SYNC0, it can be
Modular Devices
Drives generated with a predefined delay after SYNC0 pulses
Device Description • Initiated alternatively from the EtherCAT master or slave
Configuration Tool
EtherCAT Master application side
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 76
Registers for SyncSignal Generation
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer Register Address Name Description
Frame Structure 0x0140[11:10] PDI Control Enable/Disable DC Units (power saving)
Addressing
Commands
0x0151 Sync/Latch PDI Configuration Configuration of SYNC/LATCH[1:0] pins
Memory/Registers 0x0980.0 Cyclic Unit Control Assignment of cyclic function to EtherCAT or
SyncManager PDI
FMMU 0x0981 Activation Activation of cyclic function and SYNC pins
Diagnosis
0x0982:0x0983 Pulse Length of SYNC signals Length of SYNC impulse length
Distributed Clocks
Application Layer 0x098E SYNC0 Status Status of SYNC0 signal
State Machine 0x098F SYNC1Status Status of SYNC1 signal
Mailbox 0x0990:0y0997 SYNC0 Start Time Start Time of cyclic operation
Mailbox Interface
0x0998:0x099F NEXT SYNC1 Pulse Next Sync1 Pulse
EoE Ethernet
CoE CANopen 0x09A:0x09A3 SYNC0 Cycle Time Cycle Time of SYNC0
FoE File Access 0x09A4:0x09A7 SYNC1 Cycle Time Cycle Time of SYNC1
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 77
SYNC0 Signal Generation modes
EtherCAT Basics Start Time
Slave Structure
Activation SYNC0 Cycle Time
Device Model (ISO/OSI)
Physical Layer Cyclic generation
Data Link Layer SYNC0
Frame Structure
Addressing Single shot
Commands
SYNC0
Memory/Registers
SyncManager
FMMU Acknowlege
Diagnosis Cyclic Acknowledge mode
Distributed Clocks
SYNC0
Application Layer
State Machine Acknowlege
Mailbox Single shot Acknowledge mode
Mailbox Interface
SYNC0
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Pulse Length SYNC0 Cycle Time
Slave Information /IF (0x09A0:0x09A3)
Device Profiles of SYNC Signals
Modular Devices (0x0982:0x0983) >0 =0
Drives
Device Description
>0 Cyclic generation Single Shot
Configuration Tool =0 Cyclic Acknowledge* Single Shot Acknowledge*
EtherCAT Master
Standards&Implementation * Acknowledge by reading SYNC status register (0x098E, 0x098F)
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 78
SYNC1 Signal Generation modes
Start Time
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) SYNC1 Cycle Time < SYNC0 Cycle Time SYNC0 Cycle Time

Physical Layer SYNC0


Data Link Layer
SYNC1 Cycle Time
Frame Structure
Addressing SYNC1
Commands
Memory/Registers SYNC0 Cycle Time
SYNC1 Cycle Time = SYNC0 Cycle Time
SyncManager
SYNC0
FMMU
SYNC1 Cycle Time SYNC1 Cycle Time
Diagnosis
Distributed Clocks SYNC1
Application Layer
State Machine
SYNC0 Cycle Time
Mailbox SYNC1 Cycle Time = 2*SYNC0 Cycle Time
Mailbox Interface SYNC0
EoE Ethernet SYNC1 Cycle Time SYNC 1 Cycle Time

CoE CANopen
SYNC1
FoE File Access
SoE Servo Drive
SYNC1 Cycle Time > SYNC0 Cycle Time
Slave Information /IF and SYNC0 Cycle Time
Device Profiles SYNC1 Cycle Time < 2*SYNC0 Cycle Time
Modular Devices SYNC0

Drives SYNC1 Cycle Time SYNC1 Cycle Time

Device Description
SYNC1
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 79
Latch Functionality
EtherCAT Basics
Slave Structure • The Latch Event unit supports time stamping of the system
Device Model (ISO/OSI)
Physical Layer time with two independent input signals
Data Link Layer
Frame Structure – LATCH0 and LATCH1 input signals are used
Addressing (can be the same pins as for SYNC0 and SYNC1, ESC dependents)
Commands
Memory/Registers – Time Stamping of SyncManager events is possible
SyncManager
FMMU • Latch on positive and/or negative edge
Diagnosis
Distributed Clocks • Single or continuous latch configurable
Application Layer
State Machine • The Latch Time register (0x09B0:0x09CF) contain the time
Mailbox
Mailbox Interface stamps
EoE Ethernet
CoE CANopen – Acknowledge by reading the Latch Time register.
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 80
Registers for Latch Input Events
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Register Address Name Description
Physical Layer
Data Link Layer 0x0140[11:10] PDI Control Enable/Disable DC Units (power saving)
Frame Structure 0x0151 Sync/Latch PDI Configuration Configuration of SYNC/LATCH[1:0] pins
Addressing 0x0980[5:4] Cyclic Unit Control Assignment of cyclic function to EtherCAT or
Commands PDI
Memory/Registers
0x09A8 Latch0 Control Latch unit configuration for Latch0
SyncManager
FMMU
0x09A9 Latch1 Control Latch unit configuration for Latch1
Diagnosis 0x09AE Latch0 Status Latch status of Latch0
Distributed Clocks 0x09AF Latch1 Status Latch status Latch1
Application Layer 0x09B0:0x09B7 Latch0 Time Positive Edge Time stamp positive edge Latch0
State Machine
0x09B8:0x09BF Latch0 Time Negative Edge Time stamp negative edge Latch0
Mailbox
Mailbox Interface 0x09C0:0x09C7 Latch1 Time Positive Edge Time stamp positive edge Latch1
EoE Ethernet 0x09C8:0x09CF Latch1 Time Negative Edge Time stamp negative edge Latch1
CoE CANopen EtherCAT Buffer Change Time stamp for ECAT SyncManager buffer
FoE File Access 0x09F0:0x09F3
Event Time change event
SoE Servo Drive
Time stamp for PDI SyncManager buffer start
Slave Information /IF 0x09F8:0x09FB PDI Buffer Start Event Time
event
Device Profiles
Modular Devices Time stamp for PDI SyncManager buffer
0x09FC:0x09FF PDI Buffer Change Event Time
Drives change event
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 81
Synchronization Modes
EtherCAT Basics
Slave Structure • Definition of a unique behavior of EtherCAT devices (Master and
Device Model (ISO/OSI)
Physical Layer
Slaves) for synchronized applications
Data Link Layer
Frame Structure
• Synchronization modes
Addressing – Free Run
Commands
Memory/Registers – Synchronization with SyncManager Event,
SyncManager
FMMU
i.e. receipt of the telegram
Diagnosis
Distributed Clocks
– Synchronization with Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 82
Synchronization Modes
EtherCAT Basics
Slave Structure 1. Free Run
Device Model (ISO/OSI)
Physical Layer 2. Synchronous to SM2/3 (with Shift)
Data Link Layer
Frame Structure 3. DC Mode 1 (Sync0 Event)
Addressing
Commands 4. DC Mode 1 (Sync0 Event with Shift)
Memory/Registers
SyncManager 5. DC Mode 2 (Sync0, Sync1, with Shift)
FMMU
Diagnosis 6. DC Mode 3 (SM2 Event, Sync0)
Distributed Clocks
Application Layer 7. DC Mode 4 (SM2 Event, Sync0, Sync1)
State Machine
Mailbox 8. DC Mode with subordinated cycles
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 83
Free Run
Local Timer

Local Timer Event Local Timer Event

0x1C32:02 (Cycle Time)

1C32:05 (Min Cycle Time)

Copy and prepare Get and Copy inputs


outputs
Outputs Valid Input Latch

24.02.2008 EtherCAT Communication 84


Synchronous with SM2/3
SM-Event

SM2/3 Event SM2/3 Event


Frame 0x1C32:02 (Cycle Time) Frame

1C32:05 (Min Cycle Time)

Copy and prepare Get and Copy inputs


outputs
Outputs Valid Input Latch

24.02.2008 EtherCAT Communication 85


Synchronous with SM2/3
SM Event (Shift of Input Latch)

SM2/3 Event SM2/3 Event


Frame 0x1C32:02 (Cycle Time) Frame

1C32:05 (Min Cycle Time)

1C33:03 (Shift Time)

Copy and Prepare


outputs
UserShiftTime
0x1C33:06 (Calc + Copy Time)

Outputs Valid Input Latch

24.02.2008 EtherCAT Communication 86


Timing Parameter for DC Mode

Output Calc+Copy Time (RO):


- Minimum time between trigger event (SM or SYNC0) and sync event (SYNC0 or SYNC1)

Output Delay Time (RO):


- Time between sync event (SYNC0 or SYNC1) and Outputs Valid

Output Shift Time (RO/RW):


- Time between SYNC0 event and Outputs Valid
- Outputs Valid could be delayed by writing this time

Input Delay Time (RO, if Input Latch is triggered by SYNC0 or SYNC1):


-Time between sync event (SYNC0 or SYNC1) and Input Latch

Input Calc+Copy Time (RO):


- Time between input latch and data availability for the master

Input Shift Time (RO/RW):


- Time between SYNC0 event and Input Latch
- Input Latch could be delayed by writing this time
24.02.2008 EtherCAT Communication 87
DC Mode 1
Sync0 Event

Sync0 Event Sync0 Event

Frame 1C32:02 (Cycle Time) Frame

1C32:05 (Min Cycle Time)

1C33:06 (Calc + Copy Time)


Outputs Valid Input Latch
1C32:09 (Delay Time)
(Hardware Delay)

- Frame has to be received before Sync0 Event is generated


- Sync0 Cycle Time has to be greater than the value of 0x1C32:05
- 0x1C32:01 = 0x1C33:01 = 2, 0x1C32:06 = 0, 0x1C33:09 = 0

24.02.2008 EtherCAT Communication 88


DC Mode 1
Sync0 Event (Shift of Outputs Valid and/or Input Latch)

Sync0 Event Sync0 Event

Frame 0x1C32:02 (Cycle Time) Frame

1C32:05 (Min Cycle Time)

0x1C33:03 (Shift Time)

0x1C32:03 (Shift Time)

UserShiftTime
1C33:06 (Calc+Copy Time)
1C32:09 Outputs Valid Input Latch
(Delay Time)
- Output Shift Time 0x1C32:03 has to be greater than the value of 0x1C32:06
- Input Shift Time 0x1C33:03 has to be greater than 0x1C32:05-0x1C33:06
- Input Shift Time 0x1C33:03 has to be smaller than Sync0 Cycle Time-UserShiftTime-0x1C33:06
24.02.2008 EtherCAT Communication 89
DC Mode 2
Sync0 Event, Sync1 Event

Sync0 Event Sync0 Event

Frame 1C32:02 (Cycle Time) Frame

1C32:05 (Min Cycle Time)

Sync1 Event

1C33:06 (Calc + Copy Time)


1C32:06 Outputs Valid Input Latch
(Calc+Copy Time)
1C32:09 (Delay Time)
(Hardware Delay)

- Frame has to be received before Sync0 Event is generated


- Sync0 Cycle Time has to be greater than the value of 0x1C32:05
- Shift between SYNC0 and SYNC1 event has to be at least the value of 0x1C32:06
- 0x1C32:01 = 0x1C33:01 = 3, 0x1C33:09 = 0
24.02.2008 EtherCAT Communication 90
DC Mode 3
SM-Event, Sync0 Event

SM2/3 Event Sync0 Event SM2/3 Event Sync0 Event

1C32:05 (Min Cycle Time)

Frame Frame

1C32:09 (Delay Time)


1C32:06 (Hardware Delay) 1C33:06 (Calc + Copy Time)
(Calc+Copy Time)
Outputs Valid Input Latch

- Frame has to received at least the value of 0x1C32:06 before Sync0 Event is generated
- Sync0 Cycle Time has to be greater than the value of 0x1C32:05
- 0x1C32:01 = 0x1C33:01 = 2, 0x1C33:09 = 0

24.02.2008 EtherCAT Communication 91


DC Mode 4
SM-Event, Sync0 Event, Sync1 Event

SM2/3 Event Sync0 Event SM2/3 Event Sync0 Event

1C32:05 (Min Cycle Time)

Sync1 Event
Frame Frame

1C32:09 (Delay Time)


1C32:06 (Hardware Delay) 1C33:06 (Calc + Copy Time)
(Calc+Copy Time) 1C33:09 (Delay Time)
(Hardware Delay)
Outputs Valid
Input Latch
- Frame has to received at least the value of 0x1C32:06 before Sync0 Event is generated
- Sync0 Cycle Time has to be greater than the value of 0x1C32:05
- Shift between SYNC0 and SYNC1 has to be at least 0x1C32:05-0x1C32:06-0x1C33:06-0x1C33:09
- 0x1C32:01 = 2, 0x1C33:01 = 3
24.02.2008 EtherCAT Communication 92
DC Mode subordinated cycles
Sync0 Event, Sync1 Event

Sync 0 Event Sync 0 Event


Sync 0 Cycle Time
Sync1 Event Sync 0 Event Sync 0 Event Sync 0 Event Sync 1 Event
(fixed time)

0x1C32:02 CycleTime

MinCycleTime MinCycleTime

0x1C33:03 (Shift Time)

0x1C32:03 (Shift Time)

0x1C33:06
(Calc+Copy Time)

Outputs Valid Input Latch


1C32:09 (Delay Time)

Possible Output Valid /


Input Latch

24.02.2008 EtherCAT Communication 93


Distributed Clocks in TwinCAT
Local Timer Local Timer

Application Application

User Shift Master


Includes the maximum jitter of the Master Shift
master and the maximum value of
the minimum delay times of all slaves
DC Base

Frame D U Frame D U

Fixed Shift (precalc.) Frame Delay Master

Sync0 Shift Slave

S0 S0

Sync0 Sync0
24.02.2008 EtherCAT Communication 94
Master Settings for use of DC

DC Base Master Cycle Time DC Base

Max Master Application Cycle Time


User Shift Master

Max. value of
0x1C33:06 U- Frame D U+

Fixed Shift
(precalc.)

Max. value of
0x1C32:06 + 0x1C32:09

Input Data available at SM 3


Outputs valid Input Latch

24.02.2008 EtherCAT Communication 95


Master Settings for use of DC –
Slave related settings
DC Base Master Cycle Time DC Base

Max Master Application Cycle Time


User Shift Master
Max. value of Max Value of
0x1C32:06 + 0x1C32:09 0x1C33:06 U- Frame D U+
Input Shift Time (0x1C33:03)
Fixed Shift
Sync0 DC 1 0x1C32:09 (precalc.)
Input Data available at SM 3
0x1C32:05

Sync0 DC 2 0x1C32:06 0x1C32:09 Fixed shift, input latch cannot be met


SYNC1
Cycle Time 0x1C32:05

0x1C32:06 Sync0 0x1C32:09 Fixed shift, input latch cannot be met


DC 3
SYNC1 Cycle Time
Sync0
0x1C32:06 0x1C32:09
Input Delay 0x1C33:09
DC4
Outputs valid Input Latch
24.02.2008 EtherCAT Communication 96
Purpose of Application Layer (AL)
EtherCAT Basics
Slave Structure • EtherCAT State Machine
Device Model (ISO/OSI)
Physical Layer – Boot-up of device and network
Data Link Layer
Frame Structure
Addressing
Commands
• Mailbox Interfaces and Protocols
Memory/Registers
– Access Parameter of a device
SyncManager
FMMU – Asynchronous transfer
Diagnosis
Distributed Clocks
Application Layer
State Machine • Protocols
Mailbox
Mailbox Interface
– Ethernet over EtherCAT
EoE Ethernet
CoE CANopen
– CANopen over EtherCAT
FoE File Access – Filetransfer over EtherCAT
SoE Servo Drive
Slave Information /IF – Servo Drive over EtherCAT
Device Profiles
Modular Devices
Drives
Device Description
• Slave Information Interface (SII)
Configuration Tool
EtherCAT Master
– Information about the device's features and configuration
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 97
Application
Appli- HTTP, Application
….
cation FTP, .. e.g. CiA402 Drive Profile

Object Dictionary Application


RD / WR TCP, UDP PDO Mapping Layer
File
... Access
IP SDO PDO (AL)
VoE FoE EoE CoE CoE
Mailbox DLL
Process Data Interface (µC, SSI, I/O )
SII
EEPROM Registers Mailbox Process Data

0x0000 0x1000
ESC Address Space (DPRAM)
SyncMan0 MbxOut SyncMan1 MbxIn SyncMan2 SyncMan3
Data
FMMU n FMMU n
FMMU Link
EtherCAT Slave Controller (ESC) FMMU
FMMU
Layer
EtherCAT Processing Unit (DL)
and Auto-Forwarder with Loop Back

PHY MII / EBUS MII / EBUS MII / EBUS MII / EBUS


Management Port 0 Port 3 Port 2 Port 1

Physical
Trafo

Trafo
RJ45
RJ45

PHY PHY

Con
LVDS Layer
(PL)
WKC

WKC

HDR
HDR

FCS More Datagrams..


24.02.2008
Mailbox
EtherCAT Data FPWR
Communication Process Data LRW ECAT HDR Ethernet
© Copyright byHDR
Beckhoff, 2007 98
Purpose of EtherCAT State Machine
EtherCAT Basics
Slave Structure • State Machine is build upon the Data Link Layer
Device Model (ISO/OSI)
Physical Layer • Defines general communication states of EtherCAT slave
Data Link Layer
Frame Structure devices
Addressing
Commands • Specifies the initialization and error handling of EtherCAT
Memory/Registers
SyncManager
slave devices  Boot-up of the network
FMMU
Diagnosis
• States correspond to the communication relationship
Distributed Clocks between master and slave
Application Layer
State Machine • Requested and current state of a slave device are
Mailbox
Mailbox Interface reflected in the AL Control and AL Status registers
EoE Ethernet
CoE CANopen • Five states are defined:
FoE File Access
SoE Servo Drive – ‘Init’, ‘Pre-Operational’, ‘Safe-Operational’,
Slave Information /IF
Device Profiles
‘Operational’
Modular Devices
Drives
– ‘Bootstrap’ optional state for firmware updates
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 99
EtherCAT State Machine
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Init
Frame Structure
Addressing
Commands (IP) (PI) (SI) (IB) (BI)
Memory/Registers
SyncManager
FMMU
Pre-Operational Bootstrap
Diagnosis
(optional)
Distributed Clocks
Application Layer
State Machine
Mailbox (OI) (OP) (PS) (SP)
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
Safe-Operational
SoE Servo Drive
Slave Information /IF
Device Profiles (SO) (OS)
Modular Devices
Drives
Device Description
Configuration Tool
Operational
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 100
State Machine / Init
EtherCAT Basics Init
Slave Structure • ‘Init’ State
Device Model (ISO/OSI)
Physical Layer • No communication on the Pre-Operational

Data Link Layer


Frame Structure Application Layer
Addressing Safe-Operational

Commands • Master has access to the


Memory/Registers
SyncManager
DL-Information registers Operational

FMMU
Diagnosis
Distributed Clocks
Application Layer
• Transition to ‘Pre-Operational’
State Machine
Mailbox
• Master configures register, at least:
Mailbox Interface
EoE Ethernet
– DL Address register
CoE CANopen
FoE File Access
– Sync Manager channels for Mailbox communication
SoE Servo Drive
Slave Information /IF
• Master requested ‘Pre-Operational’ state
Device Profiles
Modular Devices
– sets AL Control register
Drives
Device Description
– wait for AL Status register confirmation
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 101
State Machine / Pre-Operational
EtherCAT Basics Init
Slave Structure • ‘Pre-Operational’ State
Device Model (ISO/OSI)
Physical Layer • Mailbox communication on the Pre-Operational

Data Link Layer


Frame Structure Application Layer
Addressing Safe-Operational

Commands • No Process Data communication


Memory/Registers
Operational
SyncManager
FMMU
Diagnosis • Transition to ‘Safe-Operational’
Distributed Clocks
Application Layer • Master configures parameter using the Mailbox
State Machine
Mailbox – e.g.: Process Data Mapping
Mailbox Interface
EoE Ethernet • Master configures DL Register
CoE CANopen
FoE File Access – SyncManager channels for Process Data
SoE Servo Drive
Slave Information /IF
communication
Device Profiles
Modular Devices
– FMMU channels
Drives
Device Description
• Master requested ‘Safe-Operational’ state
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 102
State Machine / Safe-Operational
EtherCAT Basics Init
Slave Structure • ‘Safe-Operational’ State
Device Model (ISO/OSI)
Physical Layer • Mailbox communication on the Pre-Operational

Data Link Layer


Frame Structure Application Layer
Addressing Safe-Operational

Commands • Process Data communication,


Memory/Registers
SyncManager
but only Inputs are evaluated – Operational

FMMU Outputs in ‘Safe’ state


Diagnosis
Distributed Clocks
Application Layer
State Machine • Transition to ‘Operational’
Mailbox
Mailbox Interface • Master sends valid Outputs
EoE Ethernet
CoE CANopen • Master requested ‘Operational’ state
FoE File Access
SoE Servo Drive (AL Control/Status)
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 103
State Machine / Operational
EtherCAT Basics Init
Slave Structure • ‘Operational’ State
Device Model (ISO/OSI)
Physical Layer • Inputs and Outputs are valid Pre-Operational

Data Link Layer


Frame Structure
Addressing Safe-Operational

Commands
Memory/Registers
Operational
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 104
State Machine / Bootstrap
EtherCAT Basics Init
Slave Structure • ‘Bootstrap’ State
Device Model (ISO/OSI)
Physical Layer • ‘Bootstrap’ State is optional – Pre-Operational Bootstrap

Data Link Layer


Frame Structure but recommended if firmware
Addressing Safe-Operational

Commands
updates necessary
Memory/Registers
SyncManager
• State changes only from and to ‘Init’ Operational

FMMU
Diagnosis
• No Process Data communication
Distributed Clocks
Application Layer
• Communication via Mailbox on Application Layer
State Machine
Mailbox
• Special mailbox configuration possible,
Mailbox Interface e.g. larger mailbox size
EoE Ethernet
CoE CANopen • Only FoE protocol available (possibly limited “file” range)
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 105
State Machine / Control and Status
EtherCAT Basics
Slave Structure • Requested and current state of a slave device are
Device Model (ISO/OSI)
Physical Layer reflected in the AL Control and AL Status registers
Data Link Layer
Frame Structure – AL Control (0x0120)
Addressing
Commands
Initiate State Transition of Device State Machine
Memory/Registers
SyncManager
– AL Status (0x0130)
FMMU Actual State of Device State Machine
Diagnosis
Distributed Clocks – AL Status Code (0x0134)
Application Layer
State Machine Reason of error or other status code
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 106
Diagnosis at Application Layer
EtherCAT Basics
Slave Structure • AL Status Code (0x0134)
Device Model (ISO/OSI)
Physical Layer – Error Codes (extract)
Data Link Layer
Frame Structure Code Description
Addressing
Commands 0x0000 No Error
Memory/Registers 0x0011 Invalid requested state change
SyncManager
FMMU 0x0015 Invalid mailbox configuration
Diagnosis
Distributed Clocks
0x0018 No valid inputs available
Application Layer 0x0019 No valid outputs
State Machine
Mailbox 0x001A Synchronization error
Mailbox Interface
EoE Ethernet
0x001B Sync manager watchdog
CoE CANopen
FoE File Access – Further Status Codes (extract)
SoE Servo Drive
Slave Information /IF Code Description
Device Profiles
0x0021 Slave needs INIT
Modular Devices
Drives 0x0022 Slave need PREOP
Device Description
Configuration Tool 0x0030 Invalid DC Sync Configuration
EtherCAT Master
0x0031 Invalid DC Latch Configuration
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 107
Mailbox Transfer
EtherCAT Basics Device Parameter (example)
Slave Structure
Device Model (ISO/OSI) Index Value
Physical Layer 0x1600 RxPDO Mapping
Data Link Layer
Frame Structure 0x1A00 TxPDO Mapping
Addressing 0x2000 Current control
Commands
Memory/Registers 0x2010 Velocity control
SyncManager
Mailbox Transfer for Parameter Data
0x2040 Motor parameter
FMMU Full duplex capable
Diagnosis 0x2070 Actual values
Distributed Clocks 0x6040 Controlword
Application Layer
State Machine 0x6041 Statusword
IPC
Mailbox
Mailbox Interface
EoE Ethernet State "PreOperational"
CoE CANopen
FoE File Access ..
.. DVI
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Simple IO-Device
Configuration Tool No Parameter
EtherCAT Master
Standards&Implementation
 No Mailbox necessary
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 108
Purpose of Mailbox Transfer
EtherCAT Basics
Slave Structure • Standard way to exchange Parameter Data
Device Model (ISO/OSI)
Physical Layer • The Mailbox Interface is optional – but recommended
Data Link Layer
Frame Structure • Needed if Process Data configurable or any other non
Addressing
Commands cyclic services
Memory/Registers
SyncManager • Full duplex capable
FMMU
Diagnosis
(Slave can initiate a communication)
Distributed Clocks
Application Layer
• 2 Sync Manager channels reserved
State Machine
Mailbox
– Sync Manager 0 : Master to Slave
Mailbox Interface
EoE Ethernet
– Sync Manager 1 : Slave to Master
CoE CANopen
FoE File Access
• Available at early stage of communication
SoE Servo Drive (State Pre-Operational)
Slave Information /IF
Device Profiles • Multi protocol capable
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 109
Mailbox Protocol Types
EtherCAT Basics
Slave Structure • Ethernet over EtherCAT (EoE)
Device Model (ISO/OSI)
Physical Layer
– Tunnels standard Ethernet Frames over EtherCAT
Data Link Layer
Frame Structure
Addressing
• CANopen over EtherCAT (CoE)
Commands – Access of a CANopen object dictionary and its objects
Memory/Registers
SyncManager
– CANopen Emergency and optional event driven PDO
FMMU
messages
Diagnosis
Distributed Clocks
Application Layer
• File Access over EtherCAT (FoE)
State Machine – Download and upload firmware and other ‘files’
Mailbox
Mailbox Interface
EoE Ethernet • Servo Drive over EtherCAT (SoE)
CoE CANopen
FoE File Access
– Access the Servo Profile Identifier (IDN)
SoE Servo Drive
Slave Information /IF
Device Profiles
• Vendor specific Profile over EtherCAT (VoE)
Modular Devices – First DWORD contains the Vendor ID, the next WORD
Drives
contains a Vendor Type, the rest is vendor specific
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 110
Mailbox Interface
EtherCAT Basics
Slave Structure • Datagram within an EtherCAT Frame
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing Ethernet Header EC Header
Commands Type = 88A4h Type = 1
EtherCAT Data FCS
Memory/Registers
SyncManager
FMMU
Diagnosis 1st EtherCAT Datagram 2nd … … nth EtherCAT Datagram
Distributed Clocks
Application Layer
State Machine
Mailbox Datag. Header Data WKC
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Mailbox Protocol
Slave Information /IF
Device Profiles
Modular Devices
Drives Mbx Header Command Cmd specific data
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 111
Mailbox Header
48 Bit
EtherCAT Basics
Slave Structure Mbx Header Command Cmd specific data
Device Model (ISO/OSI)
Physical Layer
Data Link Layer 16 Bit 16 Bit 6 Bit 2 Bit 4 Bit 4 Bit
Frame Structure
0
Length Address
16
Channel
32
Prio
38 40
Type 44
Cntr
Addressing
Commands
Memory/Registers Length Length of following data
SyncManager
FMMU Address Station Address of originator
Diagnosis
Distributed Clocks Channel reserved for future use
Application Layer
State Machine Priority reserved for future use
Mailbox
Mailbox Interface Type Mailbox Type, Protocol identifier for following data
EoE Ethernet 0 Mailbox Error
CoE CANopen
2 EoE (Ethernet over EtherCAT)
FoE File Access
SoE Servo Drive 3 CoE (CANopen over EtherCAT)
Slave Information /IF 4 FoE (File Access over EtherCAT)
Device Profiles 5 SoE (Servo Drive over EtherCAT)
Modular Devices 15 VoE (Vendor specific profile over EtherCAT)
Drives
Device Description Counter Sequence number for duplicate detection
Configuration Tool
EtherCAT Master Increments with every new mailbox service
Standards&Implementation (only the values 1-7 will be used to be compatible with older versions).
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 112
Mailbox Error Handling Procedure
EtherCAT Basics
Slave Structure • Reliable way of mailbox data exchange
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
• Mailbox control procedure
Addressing
Commands
Memory/Registers • Recover from lost frames
SyncManager
FMMU
Diagnosis • No additional frames if no error
Distributed Clocks
Application Layer
State Machine
Mailbox
• Additional receive buffer required
Mailbox Interface
EoE Ethernet
CoE CANopen • Extra counter in mailbox header needed
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
• HW/SW solution
Modular Devices
Drives
– SyncManager configuration register with toggle flags
Device Description – SW-Mailbox-DL Layer for checking toggle bits
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 113
Mailbox Error Handling – Sync Manager
EtherCAT Basics
Slave Structure • Sync Manager channel configuration registers
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
16 Bit 16 Bit 8 Bit 8 Bit 1 1 6 Bit 1 1 6 Bit
Frame Structure
0
Start Address 16
Length 32
Ctrl 40
Status E 49WT 50Res. 56D 57RT Res.
48 58 63
Addressing
Commands
Memory/Registers
SyncManager WT – SM Write Toggle
FMMU
Diagnosis RT – SM Read Toggle
Distributed Clocks
Application Layer • Following:
State Machine
Mailbox – Mailbox Error Handling - Write Example
Mailbox Interface
EoE Ethernet – Mailbox Error Handling - Read Example
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 114
Mailbox Error Handling – Mailbox Write
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Master Slave
Physical Layer
Data Link Layer
Mailbox Write (Mbx Hdr Ctr=1)
Frame Structure
Addressing Slave receives Mailbox Write Event
Commands FPWR response got lost, and calls MBX_MailboxWrite Ind
Memory/Registers Master repeats the Mailbox to start the handling on the Mailbox
SyncManager Write without incrementing Write service
FMMU the Mbx Hdr Ctr
Diagnosis MBX_MailboxWriteInd
Distributed Clocks
Application Layer
State Machine Mailbox Write (Mbx Hdr Ctr=1)
Mailbox
Mailbox Interface Slave receives Mailbox Write Event,
EoE Ethernet detects an unchanged counter
CoE CANopen in the mailbox header and discard
FoE File Access the Mailbox Write Service
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 115
Mailbox Error Handling – Mailbox Read
EtherCAT Basics Master Slave
Slave Structure MBX_MailboxSendReq(pMbx)
Device Model (ISO/OSI)
Slave puts the Mailbox Read service
Physical Layer
in the send mailbox and stores
Data Link Layer
the actual sent buffer
Frame Structure
Addressing Master sends FPRD service, psReadMbx = pMbx
Commands to read the mailbox Mailbox Read
Memory/Registers
Mailbox Read (Mbx Hdr Ctr=1) Slave receives Mailbox Read Event
SyncManager
and stores the sent buffer for a
FMMU
possibly repeated service
Diagnosis
Distributed Clocks
psRepeatMbx = psReadMbx
Application Layer FPRD response got lost,
State Machine Master starts a repeating
Mailbox sequence and shall not Mailbox Repeat (toggles SM-Write-Toggle)
Mailbox Interface read the mailbox again
EoE Ethernet before the repeating
Slave detects the Mailbox Repeat
CoE CANopen sequence is finished
request by checking the SM-Write-
FoE File Access
Toggle, puts the psReceiveMbx
SoE Servo Drive
buffer in the Send mailbox and
Slave Information /IF Master reads cyclically Read SM-Read-Toggle toggles the SM-Read-Toggle
Device Profiles the SM-Read-Toggle to
Modular Devices check if the Slave has
Drives finished the repeat request psReadMbx = psRepeatMbx
Device Description
Configuration Tool When the SM-Read-Toggle Mailbox Read
EtherCAT Master has toggled the master reads
Standards&Implementation Mailbox Read (Mbx Hdr Ctr=1)
the send mailbox again
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 116
Ethernet over EtherCAT (EoE)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Web server
Data Link Layer virtual MAC Address
Frame Structure virtual
IP Address
Addressing Ethernet
Commands
Switch
Memory/Registers
SyncManager
Functionality Switchport-
FMMU Terminal
Diagnosis
Distributed Clocks Master
Application Layer
State Machine
Mailbox
Mailbox Interface
TCP/IP
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Even via
Slave Information /IF
Device Profiles
Internet
Modular Devices
Drives Label printer
Device Description
Web access on device with
Configuration Tool web server
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 117
Purpose of Ethernet over EtherCAT (EoE)
EtherCAT Basics
Slave Structure • Tunnels transparently Ethernet Frames over EtherCAT
Device Model (ISO/OSI)
Physical Layer • Tunneling reduces the cycle times without restrictions and
Data Link Layer
Frame Structure to optimized available bandwidth
Addressing
Commands • Used for devices with TCP/IP stacks (e.g. Web Server)
Memory/Registers
SyncManager
and for infrastructure devices like Switch Terminals
FMMU
Diagnosis
• Allows to access corresponding devices in the normal IP
Distributed Clocks network in combination with a ‘Virtual Ethernet Switch’
Application Layer
State Machine (Layer 2) on the master side
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 118
EoE – Switchport: Any Ethernet Protocol
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• Interface to any Ethernet Device or Network
Physical Layer
Data Link Layer
• Ethernet Frames are inserted in EtherCAT Protocol
Frame Structure
Addressing
Commands
Memory/Registers EtherCAT Switchport
SyncManager
FMMU
Diagnosis Ethernet MAC PHY
Distributed Clocks
Application Layer
State Machine
Mailbox RX1 RX2TX
RX RX3 RX4
Mailbox Interface
µC
EoE Ethernet Fragmentation
CoE CANopen
FoE File Access Mailbox Process Data
SoE Servo Drive
Slave Information /IF
PHY EtherCAT MAC / DLL PHY
Device Profiles
TX2
TX3
TX1 TX1
TX3
TX2
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 119
EoE – Frame Header
EtherCAT Basics 8 Byte 4 Byte Max. 1476 Byte
Slave Structure Mbx Header EoE Cmd Cmd specific data
Device Model (ISO/OSI) Type = 2 (EoE)
Physical Layer
Data Link Layer 4 Bit 4 Bit 1B 1B 1B 5B 6 Bit 6 Bit 4 Bit
Frame Structure
Frag. Frame
Addressing Type Port LF TA TR res Size
Commands No No
Memory/Registers
SyncManager
FMMU Type EoE Frame Type
Diagnosis 0x00 EoE Fragment Request
Distributed Clocks 0x01 Initiate EoE Request
Application Layer 0x02 IP Parameter Request
State Machine 0x03 IP Parameter Response
Mailbox 0x04 Set MAC Address Filter Request
Mailbox Interface 0x05 Set MAC Address Filter Response
EoE Ethernet
CoE CANopen
Port Selected Port
FoE File Access LF Last fragment
SoE Servo Drive
Slave Information /IF TA Time stamp appended (only if LF=1)
Device Profiles
Modular Devices
TR Time stamp request
Drives Fragment No Fragment Number of the Ethernet Frame fragment
Device Description
Configuration Tool Size Complete size of Ethernet Frame
EtherCAT Master
Standards&Implementation
Frame No Number of the Ethernet Frame
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 120
EoE Header

48 Bit 32 Bit

Mailbox Header (Type = 2) EoE Following Data

4 Bit 4 Bit 1 Bit 1 Bit 1 Bit 5 Bit 6 Bit 6 Bit 4 Bit


Type Port LF TA TR Res FragmentNo Offset/BufferSize FrameNo

Must be valid if LF=1 Result (IP and MAC Filter Response)


0 = unspecified
1 = Send/Received on Port 1 Timestamp requested
2 = Send/Received on Port 2
… Timestamp appended (only if LF=1)

0 = Frame Fragments follows FragmentNo = 0: Contains needed buffer size


1 = Time Stamp Response follows FragmentNo > 0: Offset of the fragment
2 = IP Settings Req follows (Multiplied with 32)
3 = IP Settings Res follows
4 = MAC Filter Settings Req follows FrameNo: Increments each new Ethernet Frame
5 = MAC Filter Settings Res follows
6-15 = Reserved Last Fragment: Indicates the last fragment (Type=0 only)

24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 121


EoE – Frames
EoE (Mbx Type = 2) n * 32 Byte
(except for the last fragment)
32 Bit

Mbx Header EoE Header (Type=0, TA=0) Fragment Data

Mbx Header EoE Header (Type=0,LF=1,TA=1) Fragment Data Time Stamp

Mbx Header EoE Header (Type = 1) Time Stamp

Mbx Header EoE Header (Type = 2) IP Settings

Mbx Header EoE Header (Type = 3) IP Settings Response

Mbx Header EoE Header (Type = 4) MAC Filter Settings

Mbx Header EoE Header (Type = 5) MAC Filter Settings Response

24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 122


EoE – IP Address & MAC
EtherCAT Basics
Slave Structure • Set MAC and IP address if EtherCAT device has IP stack
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure • MAC Filter Settings Data Structure:
Addressing Used if EtherCAT device acts as bridge (switch)
Commands
Memory/Registers
SyncManager
FMMU • Result Values (IP and MAC Filter Settings only):
Diagnosis
Distributed Clocks – 0x0000 No Error
Application Layer
State Machine
– 0x0001 Unspecified Error
Mailbox – 0x0002 Unsupported Type
Mailbox Interface
EoE Ethernet – 0x0201 No IP Support
CoE CANopen
FoE File Access – 0x0401 No MAC Filter Mask Support
SoE Servo Drive
Slave Information /IF – …
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 123
EoE – Time Stamp
EtherCAT Basics
Slave Structure • Time Stamp
Device Model (ISO/OSI)
Physical Layer
– 32 Bit Timing information with 1 ns resolution
Data Link Layer – DC System Time if available (Register 910h)
Frame Structure
Addressing
– Time stamp trigger is the beginning of Destination
Commands
Address (DA) in the Ethernet Frame
Memory/Registers
SyncManager
FMMU
• Time stamp appended (TA = 1)
Diagnosis – Slave to Master:
Distributed Clocks Time stamp contains exact receive time
Application Layer
State Machine – Master to Slave:
Mailbox Time Stamp contains desired send time
Mailbox Interface
EoE Ethernet
– Time stamp extends frame data by 32 Bit
CoE CANopen – TA is allowed in last fragment only (LF = 1).
FoE File Access If necessary, add additional fragment
SoE Servo Drive
Slave Information /IF • fill the “last” fragment with parts of the Time Stamp
Device Profiles (LF=0, TA=0) and send a very last fragment with the
Modular Devices rest of the Time Stamp (LF=1, TA=1)
Drives
Device Description
– Slave should always append a Time Stamp if it has this
Configuration Tool feature
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 124
EoE – Time Stamp
EtherCAT Basics
Slave Structure • Time Stamp requested (TR = 1)
Device Model (ISO/OSI)
Physical Layer – Response with the exact send time and the same
Data Link Layer
Frame Structure
FrameNo requested
Addressing – Response should be send as soon as possible
Commands
Memory/Registers – Can be used for segment to segment synchronization
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 125
EoE – Error Handling
EtherCAT Basics
Slave Structure • No special Error Handling required!
Device Model (ISO/OSI)
Physical Layer • EoE is a Layer 2 Protocol – logical like an Ethernet Switch
Data Link Layer
Frame Structure • If a fragment is missing, the whole frame will be discarded
Addressing
Commands • Frame loss is recognized at higher levels
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 126
Purpose of CANopen over EtherCAT (CoE)
EtherCAT Basics
Slave Structure • Recommended protocol for Service Data Access
Device Model (ISO/OSI)
Physical Layer – Configuration of communication parameter
Data Link Layer
Frame Structure – Configuration of device specific parameter
Addressing
Commands
Memory/Registers
• Easy migration path from CANopen Devices to EtherCAT CoE
SyncManager
FMMU Devices
Diagnosis
Distributed Clocks – Protocol Stacks can be re-used
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 127
CANopen over EtherCAT Device Architecture
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
EtherCAT Device
Data Link Layer
Frame Structure CANopen Application
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis Object Dictionary Process Data
Distributed Clocks
Application Layer
State Machine Service Data Objects PDO Mapping
Mailbox
Mailbox Interface
CoE CoE
EoE Ethernet
CoE CANopen
FoE File Access
Mailbox Process Data
SoE Servo Drive
Slave Information /IF
EtherCAT Slave Controller
Device Profiles
Modular Devices
Drives Ethernet Physical Layer
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 128
CoE –Frame Header
EtherCAT Basics 8 Byte 2 Byte Max. 1478 Byte
Slave Structure Mbx Header CoE Cmd Cmd specific data
Device Model (ISO/OSI) Type = 3 (CoE)
Physical Layer
Data Link Layer 9 Bit 3 Bit 4 Bit
Frame Structure
Addressing Number res Type
Commands
Memory/Registers
SyncManager
FMMU Number PDO Number (PDO transfer only)
Diagnosis
Distributed Clocks
Type Message Type
Application Layer 0 reserverd
State Machine 1 Emergency Message
Mailbox 2 SDO Request
Mailbox Interface 3 SDO Response
EoE Ethernet 4 TxPDO
CoE CANopen 5 RxPDO
6 Remote transmission request of TxPDO
FoE File Access
7 Remote transmission request of RxPDO
SoE Servo Drive
8 SDO information
Slave Information /IF
9-15 reserved for future use
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 129
CANopen over EtherCAT (CoE)
EtherCAT Basics
Slave Structure • SDO: Access to a CANopen object dictionary ✔
Device Model (ISO/OSI)
Physical Layer – Download and Upload of parameters
Data Link Layer
Frame Structure – Standard Process Data Mapping (PDO Mapping)
Addressing
Commands
– Full Access to CANopen Profiles
Memory/Registers
SyncManager
FMMU • PDO: Process Data Objects (over CoE!) ✔
Diagnosis
Distributed Clocks – Direct PDO transfer
Application Layer
State Machine – Remote Transmission Requests of PDOs
• Emergency Messages ✔ (not used)
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen Standard CANopen Features
FoE File Access
SoE Servo Drive
Slave Information /IF • + Object Dictionary Information (SDO Information)
Device Profiles
Modular Devices – Upload of object dictionary (identifier lists)
Drives
Device Description – Upload of object description
Configuration Tool
EtherCAT Master
– Upload of entry descriptions
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 130
CoE – Standard CANopen Frames
EtherCAT Basics 8 Byte 2 Byte Max. 1478 Byte
Slave Structure Mbx Header CoE Cmd Cmd specific data
Device Model (ISO/OSI) Type = 3 (CoE)
Physical Layer Typ = 2 or 3
Data Link Layer 8 Bit 16 Bit 8 Bit 32 Bit 1 .. 1470 Byte
Frame Structure
SDO Data
Addressing Index Subindex Data
Commands Control (optional)
Memory/Registers
SyncManager
FMMU Standard CANopen Frame
Diagnosis
Distributed Clocks
Application Layer SDO Control Standard CANopen SDO Services
State Machine
Mailbox Index Object Addressing by Index …
Mailbox Interface
EoE Ethernet
Subindex … and Subindex
CoE CANopen Data Data for the SDO-Service
FoE File Access
SoE Servo Drive Data (optional) Optionally more than 4 bytes of data can be sent
Slave Information /IF with one frame.
Device Profiles Full mailbox size usable
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 131
SDO Download Services differences
EtherCAT Basics
Slave Structure Expedited Normal Segmented
Device Model (ISO/OSI) Service Service Service
Physical Layer
Mbx Header Mbx Header Mbx Header
Data Link Layer

MBx Size
CoE CoE CoE
Frame Structure
Data<=4 Byte 4Byte<Data<Mbx size* Data > Mbx size*
Addressing Mailbox
Commands
Memory/Registers
SyncManager Mbx Header
CoE
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine Mbx Header
CoE
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access Mbx Header
SoE Servo Drive CoE

Slave Information /IF


Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation Mbx size* = Mbx size – Mbx-Header – CoE-cmd – SDO-Cntrl – Index - Subindex
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 132
Object Dictionary – Example CoE Drive
EtherCAT Basics Parameterliste
Slave Structure Name Index Typ Subindex (SI)
Device Model (ISO/OSI)
Physical Layer Controlword 0x6040 Variable No Subindex available
Data Link Layer Statusword 0x6041
Frame Structure Target position 0x607A
Addressing Target velocity 0x60FF
Commands
Position actual value 0x6064 Number of SIs 0x607B SI0
Memory/Registers
EtherCAT Position Range limit 0x607B Array Min Pos. Range limit 0x607B SI1
SyncManager
FMMU Modes of operation 0x6060 Max Pos. Range limit 0x607B SI2
Read: 0x1018,
"Modes of
0x6061 03operation display"
Diagnosis Modes of operation display 0x6061
Distributed Clocks Following error actual value 0x60F4
Application Layer Following error window 0x6065
State Machine
Gear Ratio 0x6091
Mailbox
Mailbox Interface Number of SIs 0x1018 SI0
EoE Ethernet Device Type 0x1000 Vendor ID 0x1018 SI1
CoE CANopen
Identity object 0x1018 Record Product Code 0x1018 SI2
FoE File Access
Revision Number 0x1018 SI3
SoE Servo Drive
Slave Information /IF Serial Number 0x1018 SI4
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 133
Object Dictionary – Example CoE Drive
EtherCAT Basics Parameterliste
Slave Structure Name Index
Device Model (ISO/OSI)
Physical Layer Controlword 0x6040
Data Link Layer Statusword 0x6041
Frame Structure Target position 0x607A
Addressing Target velocity 0x60FF
Commands
Position actual value 0x6064
Memory/Registers
EtherCAT Position Range limit 0x607B
SyncManager
FMMU Modes of operation 0x6060
Diagnosis Cyclic Outputs Modes of operation display 0x6061
Distributed Clocks Following error actual value 0x60F4
Application Layer Following error window 0x6065
State Machine
Gear Ratio 0x6091
Mailbox
Mailbox Interface
EoE Ethernet Device Type 0x1000
CoE CANopen
Identity object 0x1018
FoE File Access No of SI's = 3
SoE Servo Drive
Prozessdaten Info 1st RxPDO = 0x6040 00 10
Slave Information /IF
Output Mapping (RxPDO) 0x1600 Record 2nd RxPDO = 0x60FF 00 20
Device Profiles
Modular Devices
assembly of 3rd RxPDO = 0x6060 00 10
Drives
RxPDO
Device Description
Configuration Tool
Index Subindex Bitlength
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 134
Object Dictionary – Example CoE Drive
EtherCAT Basics Parameterliste
Slave Structure Name Index
Device Model (ISO/OSI)
Physical Layer Controlword 0x6040
Data Link Layer Statusword 0x6041
Frame Structure Target position 0x607A
Addressing Target velocity 0x60FF
Commands
Position actual value 0x6064
Memory/Registers
EtherCAT Position Range limit 0x607B
SyncManager
FMMU Modes of operation 0x6060
Diagnosis Cyclic Inputs Modes of operation display 0x6061
Distributed Clocks Following error actual value 0x60F4
Application Layer Following error window 0x6065
State Machine
Gear Ratio 0x6091
Mailbox
Mailbox Interface
EoE Ethernet Device Type 0x1000
CoE CANopen
Identity object 0x1018
FoE File Access
SoE Servo Drive
Prozessdaten Info No of SI's = 3
Slave Information /IF
Output Mapping (RxPDO) 0x1600 1st TxPDO = 0x6041 00 10
Device Profiles
Modular Devices Input Mapping (TxPDO) 0x1A00 Record 2nd RxPDO = 0x6064 00 20
assembly of
Drives 3rd RxPDO = 0x6061 00 10
TxPDO
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 135
Addressing through DL and AL (SDO Access)
EtherCAT Basics
Slave Structure Add = 1 Add = 2 Add = 3
IPC
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
CoE Object Dictionary
Frame Structure
Addressing
0x1018:01 Vendor ID
..
.. DVI …
Commands 0x607A:00 Target Position
Memory/Registers …
SyncManager
AL
FMMU
Diagnosis
Distributed Clocks
Application Layer Mailbox Process Data
State Machine
DL ESC Address Space (DPRAM)
Mailbox
0x1000
Mailbox Interface
EoE Ethernet SynMan0 SyncMan1 SyncMan2 SyncMan3
CoE CANopen
FMMU FMMU n
FoE File Access
SoE Servo Drive
Slave Information /IF
ECAT Add

WKC
Device Profiles Ethernet ECAT SDO Sub
HDR HDR
Add Mbx Hdr CoE Cmd
Control
Index
index
Data FCS
Modular Devices Cmd Offset
Drives
Device Description FPWR 3 1000 Type=3 1 Vendor
0x1018
Configuration Tool (CoE) Download Req ID
EtherCAT Master
Standards&Implementation
SDO Request
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 136
Addressing through DL and AL (PDO Access)
EtherCAT Basics
Slave Structure Add = 1 Add = 2 Add = 3
IPC
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
CoE Object Dictionary
Frame Structure
0x1018:01 Vendor ID
Addressing ..
.. DVI
Commands
0x607A:00 Target Position
Memory/Registers
SyncManager 0x1600 Mapping&Assign
FMMU
AL
Diagnosis
Distributed Clocks
Application Layer
State Machine Mailbox Process Data
Mailbox
Mailbox Interface
DL ESC Address Space (DPRAM)
0x1000 0x1800
EoE Ethernet
CoE CANopen SyncMan0 SyncMan1 SyncMan2 SyncMan3
FoE File Access
SoE Servo Drive FMMU FMMU n
Slave Information /IF Log Address = 10000
Device Profiles
Modular Devices
Drives
ECAT

WKC
Ethernet ECAT
Device Description Log Add Processdata FCS
HDR HDR Cmd
Configuration Tool
EtherCAT Master
LWR 10000 Raw data
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 137
Example: ‘Initiate SDO Download’ Request
EtherCAT Basics
Slave Structure Mailbox Size the original
Device Model (ISO/OSI)
Physical Layer
CANopen Protocol
6 Byte 2 Byte 8 Byte
Data Link Layer (CiA DS301)
Frame Structure Mailbox Header CoE SDO Data (optional)
Addressing
Length of Mbx Service Data
Commands
Memory/Registers
SyncManager 16 Bit 8 Bit 32 Bit
FMMU
Diagnosis 0-4 Bytes I E Size C Ccs Index Sub Data
0 1 2 4 5 8 24 32 63
Distributed Clocks
Application Layer
Expedited 1 1 4-n 0 1 = Initiate SDO Download Request

State Machine
Mailbox > 4 Bytes I E Size C Ccs Index Sub Complete Size Data 0-n
0 1 2 4 5 8 24 32 64

Mailbox Interface
EoE Ethernet
0 0 0 0 1
CoE CANopen Data > Mailbox: ‘Download SDO Segment’ follows
FoE File Access
SoE Servo Drive
> 7 Bytes L Size T Ccs Data 0-6 Data 7-n
Slave Information /IF 0 1 4 5 8 64
Device Profiles left
Modular Devices 0/1 0 0/1 0 = Download SDO Segment Request
Drives
<= 7 Bytes
Device Description L Size T Ccs Data 0-n
0 1 4 5 8 63
Configuration Tool
EtherCAT Master 0/1 7-n 0/1 0
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 138
Example: Expedited Download

Client Server

SDO Downl. Expedited Req:


Size Indic. = 1 SDO Download Res.
Transfer Type = 1 (Expedited), Size Indic. = 0
Data Set Size = 0..3 Transfer Type = 0,
Datablock
Mailbox

Cmd = 0x01 (Dwnl. Req.) Cmd = 0x03 (Dwnl. Res.)


Index, Subindex Index, Subindex
Data

24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 139


Example: Normal Download

Client Server

SDO Downl. Normal Req:


Mailbox
Datablock

Size Indic. = 1 SDO Download Res.


Data

Transfer Type = 0 (Normal) Size Indic. = 0


Data Set Size = 0 Transfer Type = 0,
Cmd = 0x01 (Dwnl. Req.) Cmd = 0x03 (Dwnl. Res.)
Index, Subindex Index, Subindex
Complete Size
Data

24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 140


Example: Segmented Download

Client Server

SDO Downl. Normal Req:


Mailbox

Size Indic. = 1 SDO Download Res.


Transfer Type = 0 (Normal), Size Indic. = 0
Data

Cmd = 0x01 (Dwnl. Req.) Transfer Type = 0 (Normal),


Index, Subindex Cmd = 0x03 (Dwnl. Res.)
Complete Size Index, Subindex
Data
Datablock

SDO Downl. Segment Req:


Mailbox

More Follows = 0 SDO Download Seg. Res.


Seg. Data Size = 0 Toggle
Toggle Cmd = 0x01 (Dwnl. Seg. Res.)
Cmd = 0x00 (Dwnl. Seg. Req.)
Data

SDO Downl. Segment Req:


More Follows = 1 (last) SDO Download Seg. Res.
Mailbox

Cmd = 0x00 (Dwnl. Seg. Req.) Toggle


Seg. Data Size = 0 Cmd = 0x01 (Dwnl. Seg. Res.)
Toggle
Data

24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 141


Optional SDO Extensions to CANopen DS 301
EtherCAT Basics
Slave Structure • Breaking of the 8 byte border
Device Model (ISO/OSI)
Physical Layer – Full mailbox size usable
Data Link Layer
Frame Structure
 Block transfer unnecessary
Addressing
Commands
– ‘Initiate SDO Download’ request /
Memory/Registers ‘SDO Upload’ response can contain data after SDO
SyncManager
FMMU
header
Diagnosis – ‘Download SDO Segment’ request /
Distributed Clocks
Application Layer ‘Upload SDO Segment’ response can contain more
State Machine than 7 bytes of data
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen • Downloading and Uploading all Subindices at once
FoE File Access
SoE Servo Drive – Bit 4 of the Initiate ‘SDO Download / Upload’ request
Slave Information /IF header indicates a ‘Complete Access’ to an Index
Device Profiles
Modular Devices – Sub Index field contains the start Subindex
Drives
Device Description • 0: Complete Index with all Subindices
Configuration Tool
EtherCAT Master • 1: Complete Index without Subindex 0
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 142
CoE: Optional SDO Information Protocol
EtherCAT Basics
Slave Structure • Access to object lists
Device Model (ISO/OSI)
Physical Layer – list of all supported object identifiers
Data Link Layer
Frame Structure – list of all object identifiers that can be mapped in
Addressing
Commands PDOs
Memory/Registers
SyncManager – list of all object identifiers that should be included in
FMMU
Diagnosis
a backup
Distributed Clocks
Application Layer
• Access to object descriptions
State Machine
Mailbox
– Descriptions of objects – as defined in DS 301
Mailbox Interface
EoE Ethernet
• Access to entry descriptions
CoE CANopen
FoE File Access
– Descriptions of object entries (sub index) – as
SoE Servo Drive defined in DS 301
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 143
CoE – Object Dictionary
EtherCAT Basics
Slave Structure • Devices with an EtherCAT-CoE and a CANopen interface
Device Model (ISO/OSI)
Physical Layer are possible with the same object dictionary
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
Index Range Meaning
SyncManager 0x0000 – 0x0FFF Data Type Description
FMMU
Diagnosis 0x1000 – 0x1FFF Communication objects
Distributed Clocks
• Device Type, Identity, PDO Mapping – like defined in DS 301
Application Layer
State Machine
• Objects defined in DS 301 not needed are reserved for EtherCAT
Mailbox • Additional objects (Sync Manager Communication Type, Sync
Mailbox Interface Manager PDO Assignment) located in unused areas of DS 301
EoE Ethernet
CoE CANopen
0x2000 – 0x5FFF Manufacturer specific
FoE File Access
0x6000 – 0x9FFF Profile specific
SoE Servo Drive
Slave Information /IF 0xA000 – 0xFFFF reserved
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 144
CoE – Online Object Dictionary
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 145
CoE – New objects for EtherCAT
EtherCAT Basics
Slave Structure
Index Meaning
Device Model (ISO/OSI) 0x1C00 SyncManager Communication Type
Physical Layer
Data Link Layer 0x1C10 – 0x1C2F SyncManager PDO Assign
Frame Structure
Addressing
0x1C30 – 0x1C4F SyncManager Parameter
Commands
Memory/Registers • SyncManager Communication Type
SyncManager – Subindex (1-32) defines communication type of the corresponding Sync
FMMU Manager channel
Diagnosis • Mailbox Out (= 1 buffer write)
Distributed Clocks
Application Layer
• Mailbox In (= 1 buffer read)
State Machine • Process Data Out (= 3 buffer write)
Mailbox • Process Data In (= 3 buffer read)
Mailbox Interface
• SyncManager PDO Assign
EoE Ethernet
CoE CANopen – Contains a list of assigned PDOs for each Sync Manager channel
FoE File Access (Index of PDO mapping objects)
SoE Servo Drive – Assigned PDO in Subindex 1 to n describe the process data parts of the Sync
Slave Information /IF Manager channel
Device Profiles
• SyncManager Parameter
Modular Devices
Drives – SubIdx 1: Synchronization type
Device Description (Freerun, synchron, DC Sync0, DC Sync1, SyncSm0 .. SyncSm1F)
Configuration Tool – SubIdx 2: Cycle time
EtherCAT Master – SubIdx 3: Shift time
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 146
CoE – Process Data Objects (via Mailbox)
EtherCAT Basics 6 Bytes 2 Bytes 1..8 Bytes 1..n Bytes
Slave Structure
CoE Header
Device Model (ISO/OSI) Mailbox Header Process Data Data
(Type = 4 or 5)
Physical Layer
Data Link Layer
Mandatory Header Standard CANopen PDO frame optional
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU • Standard CANopen PDO frames can be used
Diagnosis
Distributed Clocks • CANopen PDO mapping used for EtherCAT too
Application Layer
State Machine • PDOs usually are related to their „own“ Sync Manager
Mailbox
Mailbox Interface channels
EoE Ethernet
CoE CANopen – Cyclic data transmission
FoE File Access
SoE Servo Drive – No PDO communication parameters necessary
Slave Information /IF
Device Profiles • PDOs can be transmitted by the mailbox for acyclic
Modular Devices
Drives
communication
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 147
CoE – PDO Process Data mapping
EtherCAT Basics
Slave Structure • No mapping protocol implemented for very simple devices
Device Model (ISO/OSI)
Physical Layer – Fixed process data
Data Link Layer
Frame Structure – Readable via EEPROM – no SDO protocol necessary
Addressing
Commands • Readable PDO Mapping
Memory/Registers
SyncManager – Fixed process data mapping
FMMU
Diagnosis – Readable via SDO
Distributed Clocks
Application Layer • Selectable PDO Mapping
State Machine
Mailbox – Multiple fixed PDO – selectable via CoE object (1C1xh)
Mailbox Interface
EoE Ethernet – Selectable via SDO (required)
CoE CANopen
FoE File Access • Variable PDO Mapping
SoE Servo Drive
Slave Information /IF – Configurable via CoE or SoE required
Device Profiles
Modular Devices – Writable PDO content
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 148
CoE – PDO Configuration
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 149
CoE – Emergency Message
EtherCAT Basics 6 Bytes 2 Bytes 2 Bytes 1 Byte 5 Bytes 1..n Bytes
Slave Structure
Device Model (ISO/OSI) CoE Header
Mailbox Header ErrorCode Error Register Data Data
(Type = 1)
Physical Layer
Data Link Layer
Frame Structure Mandatory Header Standard CANopen Emergency frame optional
Addressing
Commands
Memory/Registers
• Standard CANopen Emergency frames can be used
SyncManager
FMMU
• More than 5 bytes of data can be send optionally with one
Diagnosis frame
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 150
File Access over EtherCAT (FoE)
EtherCAT Basics
Slave Structure • Similar to TFTP (Trivial File Transfer Protocol, RFC 1350)
Device Model (ISO/OSI)
Physical Layer
Data Link Layer • Simple to implement – suitable for bootstrap loaders
Frame Structure
Addressing
Commands • 6 Services are defined:
Memory/Registers
SyncManager
– WRQ: Write request with “file name”
FMMU – RRQ: Read request with “file name”
Diagnosis
Distributed Clocks
– DATA: Data block (full mailbox size used)
Application Layer – ACK: Acknowledgment of DATA and WRQ requests
State Machine
Mailbox
– ERR: Error notification with predefined error codes
Mailbox Interface – BUSY: Busy notification in case of longer procedures,
EoE Ethernet extension to TFTP (e.g. erasing of flash
CoE CANopen modules)
FoE File Access
SoE Servo Drive
Slave Information /IF • Special mailbox configuration for bootstrap mode possible
Device Profiles
Modular Devices – Fixed addresses and fixed size of the mailbox
Drives
– Configuration defined by device (EEPROM)
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 151
File Access over EtherCAT (WRQ, normal)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Master Slave
Physical Layer
Data Link Layer WRQ (with file name)
Frame Structure
Addressing
ACK (packet no 0)
Commands
Memory/Registers
SyncManager DATA (packet no 1, full mailbox)
FMMU
Diagnosis ACK (packet no 1)
Distributed Clocks
Application Layer
State Machine
DATA (packet no 2, full mailbox)
Mailbox
Mailbox Interface ACK (packet no 2)
EoE Ethernet
CoE CANopen DATA (packet no 3, less data or zero data)
FoE File Access
SoE Servo Drive
Slave Information /IF
ACK (packet no 3)
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 152
File Access over EtherCAT (WRQ, with busy)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Master Slave
Physical Layer
Data Link Layer WRQ (with file name)
Frame Structure
Addressing ACK (packet no 0)
Commands
Memory/Registers DATA (packet no 1, full mailbox)
SyncManager
FMMU ACK (packet no 1)
Diagnosis
Distributed Clocks DATA (packet no 2, less data or zero
Application Layer
data)
State Machine BUSY (X of N done)
Mailbox
Mailbox Interface
DATA (packet no 2, less data or zero data)
EoE Ethernet
CoE CANopen BUSY (Y of N done)
FoE File Access
SoE Servo Drive
Slave Information /IF
DATA (packet no 2, less data or zero data)
Device Profiles
Modular Devices
ACK (packet no 2)
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 153
File Access over EtherCAT (WRQ, with error)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer Master Slave
Data Link Layer
Frame Structure WRQ (with file name)
Addressing
Commands ERR (error code and optional error text)
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 154
File Access over EtherCAT (RRQ, normal)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) Master Slave
Physical Layer
Data Link Layer RRQ (with file name)
Frame Structure
Addressing DATA (packet no 1, full mailbox)
Commands
Memory/Registers
SyncManager
ACK (packet no 1)
FMMU
Diagnosis DATA (packet no 2, full mailbox)
Distributed Clocks
Application Layer ACK (packet no 2)
State Machine
Mailbox
Mailbox Interface
DATA (packet no 3, less data or zero data)
EoE Ethernet
CoE CANopen ACK (packet no 3)
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 155
Servo Drive over EtherCAT (SoE)
EtherCAT Basics
Slave Structure • Implements Service Channel
Device Model (ISO/OSI)
Physical Layer – Read / Write to several elements of an IDN (Ident number)
Data Link Layer
Frame Structure – Support of Procedure Commands
Addressing
Commands
– Slave Info
Memory/Registers
SyncManager
FMMU • The mapping of the IEC 61800-7-1 Annex D (SERCOS™) on
Diagnosis
Distributed Clocks EtherCAT is described in IEC 61800-7-3 Annex D
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 156
SoE – Frame Header
EtherCAT Basics 6 Byte 4 Byte Max. 1476 Byte
Slave Structure Mbx Header SoE Cmd Cmd specific data
Device Model (ISO/OSI) Type = 5 (SoE)
Physical Layer
Data Link Layer 3 Bit 1 Bit 1 Bit 3 Bit 8 Bit 16 Bit
Frame Structure
Addressing Cmd Incomp Err Drive Element IDN
Commands
Memory/Registers
SyncManager
FMMU Command Command Type
Diagnosis Read Request, Read Response, Write Request, Write Response, Notification, SlaveInfo
Distributed Clocks
Application Layer Incomplete Indicates if execution of another service is needed to complete
State Machine the operation
Mailbox
Mailbox Interface
Error Indicates if an Error has occurred
EoE Ethernet Drive Contains the address of the drive inside the slave device that is
CoE CANopen
FoE File Access addressed
SoE Servo Drive Element Contains the ElementFlags. There is a single Flag for each
Slave Information /IF
element of an IDN indicating which elements of the object
Device Profiles
Modular Devices addressed by the IDN are accessed
Drives IDN contains IDN according to IEC 61800-7-2 Annex D
Device Description
Configuration Tool or an indicator for fragments left in case of segmented service
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 157
SoE Communication phases
EtherCAT Basics IEC 61784
Slave Structure EtherCAT CPF 16
Device Model (ISO/OSI)
Physical Layer Init Phase 0 / 1
Data Link Layer
Frame Structure (IP) (PI)
Addressing
Commands
Pre-Operational (SI) Phase 2
Memory/Registers
SyncManager
FMMU (OI) (PS) (SP)
Diagnosis (S-0-0127)
Distributed Clocks (OP)
Safe-Operational Phase 3
Application Layer (with Inputs)
State Machine (SO) (OS)
Mailbox (S-0-0128)
Mailbox Interface
EoE Ethernet Operational Phase 4
CoE CANopen
FoE File Access
SoE Servo Drive
• SERCOS communication phases (CPs) comparable to EtherCAT state machine
Slave Information /IF • Phases 0 and 1 covered by the ‘Init’
Device Profiles • Phase 2 corresponds to ‘Pre-Operational’
Modular Devices • allows access to the IDNs via ‘service channel’ (SoE).
Drives • Phase 3 mapped to ‘Safe-Operational’
Device Description
• slave shall transmit valid inputs, ignore outputs from the master.
Configuration Tool
EtherCAT Master
• ‘Operational’ corresponds to phase 4
Standards&Implementation • all inputs and outputs are valid.
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 158
Obsolete IDN
EtherCAT Basics
Slave Structure IDN Description
Device Model (ISO/OSI)
Physical Layer S-0-0003 Minimum AT transmit starting time (T1min)
Data Link Layer
Frame Structure
S-0-0004 Transmit/receive transition time (TATMT)
Addressing
Commands
Memory/Registers S-0-0005 Minimum feedback acquisition time (T4min)
SyncManager
FMMU S-0-0009 Beginning address in master data telegram (MDT POS)
Diagnosis
Distributed Clocks
S-0-0010 Length of master data telegram (MDT LEN)
Application Layer
State Machine
Mailbox S-0-0088 Receive to receive recovery time (TMTSG)
Mailbox Interface
EoE Ethernet S-0-0090 Command value transmit time (TMTSG)
CoE CANopen
FoE File Access
S-0-0127 C100 Communication phase 3 transition check
SoE Servo Drive
Functionality done in EtherCAT transition from ‘Pre-Operational’ to ‘Safe-Operational’.
Slave Information /IF
If the transition fails, the reason for this failure can be evaluated via S-0-0021.
Device Profiles
Modular Devices
Drives S-0-0128 C200 Communication phase 4 transition check
Device Description Functionality done in EtherCAT transition from ‘Safe-Operational’ to ‘Operational’. If the
Configuration Tool transition fails, the reason for this failure can be evaluated via S-0-0022.
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 159
Changed IDN
EtherCAT Basics
Slave Structure IDN Meaning with SoE
Device Model (ISO/OSI)
Physical Layer S-0-0006 AT Transmission starting time (T1)
Data Link Layer T1 specifies the time offset from the EtherCAT sync signal to the time until the
Frame Structure application shall provide new AT data inside the EtherCAT slave controller memory.
Addressing
Commands S-0-0014 Interface status
Memory/Registers This parameter should reflect DL status, AL status and AL status code of EtherCAT
SyncManager
FMMU S-0-0028 MST error counter
Diagnosis MST error counter indicates missing Datagrams for cyclic data transfers
Distributed Clocks This parameter should reflect RX-error counter and Lost-link counter of EtherCAT
Application Layer
State Machine
S-0-0089 MDT Transmit starting time (T2)
Mailbox
T2 specifies the time offset from the EtherCAT sync signal to the time until new MDT
Mailbox Interface
data are available inside the EtherCAT slave controller memory.
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 160
Synchronisation Mapping
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• CPF16 Phase 0-2
Physical Layer
Data Link Layer
• No synchronisation between master and slave.
Frame Structure
Addressing
• Service channel communication via EtherCAT mailbox.
Commands
Memory/Registers
SyncManager
FMMU • CPF16 Phase 3-4
Diagnosis
Distributed Clocks • Synchronisation via ‘Distributed Clock’ (DC) or by Sync
Application Layer
State Machine
Manager event.
Mailbox
Mailbox Interface
• Master configures the DC unit to generate a sync event.
EoE Ethernet
CoE CANopen • The sync event is set typically at the end of communication
FoE File Access
SoE Servo Drive
(Sync Manager event operates in the same way).
Slave Information /IF
Device Profiles
• The sync signal compares to the end of MST telegram as
Modular Devices defined in SERCOS part of IEC 61158-6.
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 161
Process Data Mapping
EtherCAT Basics
Slave Structure • Sync Manager 2 for Output Data
Device Model (ISO/OSI)
Physical Layer buffered mode, contains MDT data
Data Link Layer
Frame Structure • Sync Manager 3 for Input Data
Addressing
Commands
mailbox mode, contains AT data
Memory/Registers
SyncManager
FMMU
Diagnosis
• MDT, AT configured via S-0-0015, S-0-0016 and S-0-0024.
Distributed Clocks
Application Layer
• Process data consists of drive control/status word followed
State Machine by S-0-0015, S-0-0016, S-0-0024 defined values.
Mailbox
Mailbox Interface • Service channel data not included in process data.
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 162
Service Channel
EtherCAT Basics
Slave Structure • SoE Service Channel (SSC) equivalent to SERCOS
Device Model (ISO/OSI)
Physical Layer Service Channel (SVC) for non-cyclic data exchange.
Data Link Layer
Frame Structure • Implemented as mailbox with the SoE protocol type
Addressing
Commands
allows to access IDNs and their elements.
Memory/Registers
SyncManager
• Transfer of multiple elements of an IDN is possible.
FMMU
Diagnosis
• SSC uses
Distributed Clocks
Application Layer
– confirmed services (Write, Read, Procedure
State Machine Command)
Mailbox
Mailbox Interface - initiated by the Master (Client),
EoE Ethernet
CoE CANopen – unconfirmed services (Abort SSC Command
FoE File Access
SoE Servo Drive
Execution, Write SSC Fragment
Slave Information /IF - initiated by the Master
Device Profiles
Modular Devices – unconfirmed services (Read SSC Fragment,
Drives
Device Description Notify SSC Command Execution, SSC Slave Info)
Configuration Tool
EtherCAT Master
- initiated by the Slave (server).
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 163
Slave Information Interface (SII)
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer EDS
Data Link Layer XML
Frame Structure .... DVI

Addressing
Commands
Slave
Memory/Registers
SyncManager Host
FMMU
CPU
Diagnosis ESC
Distributed Clocks
Application Layer
Configuration
State Machine EEPROM Data
Mailbox ESC
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access

Trafo
Trafo

RJ45
RJ45

SoE Servo Drive


PHY PHY
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 164
Application
Appli- HTTP, Application
….
cation FTP, .. e.g. CiA402 Drive Profile

Object Dictionary Application


RD / WR TCP, UDP PDO Mapping Layer
File
... Access
IP SDO PDO (AL)
VoE FoE EoE CoE CoE
Mailbox DLL
Process Data Interface (µC, SSI, I/O )
SII
EEPROM Registers Mailbox Process Data

0x0000 0x1000
ESC Address Space (DPRAM)
SyncMan0 MbxOut SyncMan1 MbxIn SyncMan2 SyncMan3
Data
FMMU n FMMU n
FMMU Link
EtherCAT Slave Controller (ESC) FMMU
FMMU
Layer
EtherCAT Processing Unit (DL)
and Auto-Forwarder with Loop Back

PHY MII / EBUS MII / EBUS MII / EBUS MII / EBUS


Management Port 0 Port 3 Port 2 Port 1

Physical
Trafo

Trafo
RJ45
RJ45

PHY PHY

Con
LVDS Layer
(PL)
WKC

WKC

HDR
HDR

FCS More Datagrams..


24.02.2008
Mailbox
EtherCAT Data FPWR
Communication Process Data LRW ECAT HDR Ethernet
© Copyright byHDR
Beckhoff, 2007 165
Purpose of Slave Information Interface
EtherCAT Basics
Slave Structure • The mandatory Slave Information Interface (SII) consists of
Device Model (ISO/OSI)
Physical Layer all objects that can be stored persistently.
Data Link Layer
Frame Structure • The information is stored in an EEPROM
Addressing
Commands • EtherCAT Slave Controller has SPI interface to EEPROM
Memory/Registers
SyncManager – 1 kBit … 4 MBit
FMMU
Diagnosis • The SII contains
Distributed Clocks
Application Layer – boot configuration data
State Machine
Mailbox – device identity (mandatory)
Mailbox Interface
EoE Ethernet • Vendor Id, Product Code, Revision No, Serial No
CoE CANopen
FoE File Access • Same information in CoE object 0x1018
SoE Servo Drive
Slave Information /IF – application information data
Device Profiles
Modular Devices • Contains additional information (optional)
Drives
Device Description – Subdivided in categories
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 166
SII – EEPROM content
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 167
SII – EEPROM Layout
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer Byte
Data Link Layer
0
EtherCAT Slave Controller Configuration Area
Frame Structure 16
Addressing VendorId ProductCode RevisionNo SerialNo
Commands
32
Hardware Delays Bootstrap Mailbox Config
Memory/Registers 48
SyncManager Mailbox Sync Man Config
FMMU
Diagnosis Reserved
Distributed Clocks
Application Layer 128
Additional Information (Subdivided in Categories)
State Machine
Mailbox

Mailbox Interface
Category Strings
EoE Ethernet
CoE CANopen Category Generals
FoE File Access
SoE Servo Drive Category FMMU
Slave Information /IF
Device Profiles Category SyncManager
Modular Devices
Drives Category Tx- / RxPDO for each PDO
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 168
EEPROM – Slave Configuration Area
EtherCAT Basics
EEPROM Parameter Description Corresp.
Slave Structure
Word Register
Device Model (ISO/OSI)
Address
Physical Layer
Data Link Layer 0 PDI Control Initialization value for PDI Control register 0x0140
Frame Structure (EEPROM ADR 0x0000.9 is also mapped to 0x0141
Addressing register 0x0110.2)
Commands
1 PDI configuration, Initialization value for PDI Configuration 0x0150
Memory/Registers
register 0x0151
SyncManager
Depends on the selected PDI,
FMMU
Configuration of Sync0 and Sync1 Pin
Diagnosis
Distributed Clocks 2 Pulse length of SYNC Initialization value for Pulse Length of SYNC 0x0982
Application Layer signals Signals register 0x0983
State Machine in Units of 10 ns
Mailbox
3 Extended PDI Initialization value for extended PDI 0x0152
Mailbox Interface
configuration Configuration register 0x0153
EoE Ethernet
CoE CANopen 4 Configured Station Alias Initialization value for Configured Station Alias 0x0012
FoE File Access Address register 0x0013
SoE Servo Drive
5, 6 Reserved
Slave Information /IF
Device Profiles 7 Checksum CRC of first 6 words
Modular Devices (x^8+x^2+x+1, initial value 0xFF)
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 169
SII – Categories
EtherCAT Basics
Slave Structure • Contains optional information
Device Model (ISO/OSI)
Physical Layer • Divided in categories
Data Link Layer
Frame Structure – Standard category(s)
Addressing
Commands – Vendor category(s)
Memory/Registers
SyncManager • Same header for all categories
FMMU 16 Bit 16 Bit
Diagnosis – Category Type Category Length Data…
Distributed Clocks
Application Layer – Word-Length of data
State Machine
Mailbox
Mailbox Interface
Category Meaning
EoE Ethernet
CoE CANopen STRINGS Text strings
FoE File Access
SoE Servo Drive General Device Information
Slave Information /IF
FMMU FMMU usage
Device Profiles
Modular Devices SyncManger Modes of operation, Enable
Drives
Device Description TxPDO Transmit PDO Entries
Configuration Tool
RxPDO Receive PDO Entries
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 170
Content of the Slave Information Interface
(E²PROM)
Device Types: No PD Fixed PD Fixed PD Fixed PD Variable PD
MBX No MBX No OD OD OD
Info Struct ESC Info M M M M M
(128 Byte)
Identity M M M M M
Bootstrap O O O O
Mbx Info
Standard M M M M
Mbx Info
Categories Strings O O O O O
(10)
General M M M M M
(30)
Sync Mng (41) O M M M M
FMMU (40) O O O O M
PDO (50, 51) M M O (same as OD)
OP Modes (60) O O O O
Discussion?
Timeouts (70) O O O O O
Object Dictionary O O O
Entries (80)

24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 171


Slave Information Interface
Category for CoE Object Dictionary Entries (80)
EtherCAT Basics
Slave Structure • Only used for slave devices without any Object Dictionary
Device Model (ISO/OSI)
Physical Layer • Content of a virtual Object Dictionary – comparable to the
Data Link Layer
Frame Structure virtual OD in the device description files (XML)
Addressing
Commands • Provides information for the master that are already
Memory/Registers
SyncManager
defined by existing profiles
FMMU
Diagnosis
• Examples are
Distributed Clocks
Application Layer
– Device type…
State Machine
Mailbox
– DC settings (Object 1C32h, 1C33h…)
Mailbox Interface
EoE Ethernet
– …
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 172
PDI access to SII (E²PROM)
EtherCAT Basics
Slave Structure • Standard: EEPROM assigned to EtherCAT Master
Device Model (ISO/OSI)
Physical Layer • Master can grant access to PDI
Data Link Layer
Frame Structure – Change from INIT to PREOP Master
Addressing
Commands • PDI can check SII content (e.g. Firmware
Memory/Registers
SyncManager Revision compatible to Hardware Revision)
FMMU
Diagnosis
(before ALCtrl=2 until ALStatus=2)
Distributed Clocks
Application Layer
– Change from INIT to BOOT and while in BOOT
State Machine
Mailbox
• After Firmware Update PDI can update SII
Mailbox Interface information
EoE Ethernet
CoE CANopen (before ALCtrl=3, ALCtrl=1 until ALStatus=1)
FoE File Access
SoE Servo Drive • Slave Sample Code V4.0 contains SII access from PDI
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 173
Device Profiles – Motivation
EtherCAT Basics
Slave Structure • The main issues of this device model are
Device Model (ISO/OSI)
Physical Layer – modeling of structures within a device
Data Link Layer
Frame Structure – usable for a large number of devices from very
Addressing
Commands simple one to complex sub-structured
Memory/Registers
SyncManager – easy way for master and configuration devices to
FMMU
Diagnosis
handle the device
Distributed Clocks
Application Layer
– use of similar channel profiles in all device types
State Machine shown below
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
 Profile for Modular Devices
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 174
Modular Device Profile
EtherCAT Basics
Slave Structure • EtherCAT supports complex slaves
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure • E.g. devices with physical modules to be connected (modular
Addressing device) or devices with different operation modes (complex
Commands
Memory/Registers device).
SyncManager
FMMU
Diagnosis
Distributed Clocks
• The Modular Device Profile defines
Application Layer – A modeling of structures within a device,
State Machine
Mailbox e.g. the Object dictionary
Mailbox Interface
EoE Ethernet
– An easy way for master and configuration devices to
CoE CANopen handle the device
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 175
Modular Device Profile
EtherCAT Basics
Slave Structure • Gateways from EtherCAT to legacy Fieldbusses like
Device Model (ISO/OSI)
Physical Layer - CANopen
Data Link Layer
Frame Structure - Profibus
Addressing
Commands
- DeviceNet
Memory/Registers
SyncManager
- …
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 176
Modular Device Profile
EtherCAT Basics
Slave Structure • Extendable Fieldbus coupler with internal backbone
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
internal backbone
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer • Multi Axis Servo Drive with different function groups
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
FG Position
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices FG Torque FG Velocity
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 177
Object Dictionary of Modular Device Profile
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• 0x0000 – 0x0FFF Data Type Area
Physical Layer
Data Link Layer
• 0x1000 – 0x1FFF: Communication Area
Frame Structure
Addressing
• 0x2000 – 0x5FFF: Manufacturer specific Area
Commands
Memory/Registers
• 0x6000 – 0x6FFF: Input Area
SyncManager
FMMU
• 0x7000 – 0x7FFF: Output Area
Diagnosis
Distributed Clocks
• 0x8000 – 0x8FFF: Configuration Area
Application Layer
State Machine
• 0x9000 – 0x9FFF: Information Area
Mailbox
Mailbox Interface
• 0xA000 – 0xAFFF: Diagnosis Area
EoE Ethernet
CoE CANopen
• 0xB000 – 0xBFFF: Service Transfer Area
FoE File Access
SoE Servo Drive
• 0xC000 – 0xEFFF: Reserved Area
Slave Information /IF
Device Profiles
• 0xF000h – 0xFFFF: Device Area
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation Different Ranges according to CANopen DS301!
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 178
Model of a modular device
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI) RxPDO (Outputs) 0x16xx 0x1600 0x1601 0x16nn
Physical Layer
Data Link Layer
Output Entries 0x7xxx 0x7000 – 0x700F 0x7010 – 0x701F 0x7nn0 – 0x7nnF
Frame Structure
Addressing
Commands TxPDO (Inputs) 0x1Axx 0x1A00 0x1A01 0x1Ann
Memory/Registers
SyncManager
FMMU Input Entries 0x6xxx 0x6000 – 0x600F 0x6010 – 0x601F 0x6nn0 – 0x6nnF
Diagnosis
Distributed Clocks
Application Layer Config. Parameter 0x8xxx 0x8000 – 0x800F 0x8010 – 0x801F 0x8nn0 – 0x8nnF
State Machine
Mailbox
Information 0x9xxx 0x9000 – 0x900F 0x9010 – 0x901F 0x9nn0 – 0x9nnF
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
Communication Area
SoE Servo Drive
0x1000 – 0x1FFF
Slave Information /IF
Device Profiles Device Parameter
Modular Devices 0xF000 – 0xFFFF
Modul 0 Modul 1 Modul nn
Drives
Device Description
Configuration Tool
Modular Device
EtherCAT Master
Standards&Implementation EtherCAT
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 179
Modular Device Profile
EtherCAT Basics
Slave Structure • The modular device profile can be applied for different
Device Model (ISO/OSI)
Physical Layer
device types
Data Link Layer
Frame Structure
– Fieldbus Gateways
Addressing Gateways to other fieldbusses
Commands
Memory/Registers – Modular Devices
SyncManager
FMMU
with physical connectable modules and/or several
Diagnosis functional modules
Distributed Clocks
Application Layer – Module Devices
State Machine which is connected directly to EtherCAT and consists
Mailbox
Mailbox Interface of several channels
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
• Standard configuration
Slave Information /IF – 16 objects per module in a specific area
Device Profiles
Modular Devices – Up to 255 modules available
Drives
Device Description – This standard can be adapted to the device
Configuration Tool
EtherCAT Master
requirements
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 180
Example for Dynamic Device Profile
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
BK1120 + DI 4 + DO 8 + AO 2
Physical Layer
Data Link Layer Device Slot 0 Slot 1 Slot 2
Frame Structure
Addressing RxPDO (Output) 0x1600 0x1601 0x1602
Commands
Memory/Registers Output Entries 0x7000 0x7010: 0x7020:
SyncManager SI0, 1-8 SI0, 1-2
FMMU
Diagnosis TxPDO (Input) 0x1A00 0x1A01 0x1A02
Distributed Clocks
Application Layer
State Machine Input Entries 0x6000: 0x6010 0x6020:
SI 0,1-4 SI 0, 1-2
Mailbox
Mailbox Interface
EoE Ethernet Dig. Input 4 Dig. Output 8 Anal. Output 2
CoE CANopen
FoE File Access
SoE Servo Drive EtherCAT Slave BK1120
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
SI…Subindex (SI0 = number of SIs of this object)
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 181
MDP – Profile Numbering
EtherCAT Basics
Slave Structure • MDP Profile Number is 5001 (= Object 0x1000, Bit 0-15)
Device Model (ISO/OSI)
Physical Layer • Module Profile Number (= Object 0x1000, Bit 16-31)
Data Link Layer
Frame Structure
Addressing Module Profile Number Description
Commands
Memory/Registers 1000 Ethernet gateway (EoE)
SyncManager 1100 EtherCAT Master (for Mailbox Gateway)
FMMU
Diagnosis 1110 EtherCAT Slave
Distributed Clocks 1120 KBus Master
Application Layer
State Machine 3100 PROFIBUS Master
Mailbox 3110 PROFIBUS Slave
Mailbox Interface
EoE Ethernet 4000 Interbus Master
CoE CANopen 4010 Interbus Slave
FoE File Access
SoE Servo Drive 5100 CANopen Master
Slave Information /IF 5110 CANopen Slave
Device Profiles
Modular Devices 5200 DeviceNet Master
Drives 5210 DeviceNet Slave
Device Description
Configuration Tool 6200 ASI-Master
EtherCAT Master 6220 IO Link-Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 182
CiA402 Drive Profile
EtherCAT Basics
Slave Structure • IEC 61800-7
Device Model (ISO/OSI) Generic interface and use of profiles for power drive systems
Physical Layer
Data Link Layer – Part 7-1: Interface definition
Frame Structure
Addressing
– Part 7-2: Profile specifications
Commands – Part 7-3: Mapping of profiles to network technologies
Memory/Registers
SyncManager • Mapping CiA402 to EtherCAT
FMMU
• Mapping SERCOS profile to EtherCAT
Diagnosis
Distributed Clocks
Application Layer
State Machine
• ETG Implementation Guideline for the CiA402 Drive Profile
Mailbox – Specify a common behavior of EtherCAT CiA402 servo drives
Mailbox Interface
EoE Ethernet
according to IEC 61800-7
CoE CANopen
FoE File Access
SoE Servo Drive • Scope
Slave Information /IF
– EtherCAT CiA402 Servo Drives
Device Profiles
Modular Devices – No frequency converter, no stepper
Drives
Device Description
– The mapping of the SERCOS profile to EtherCAT described in
Configuration Tool IEC 61800-7-304 is not part of this guideline
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 183
Drive Profile
EtherCAT Basics
Slave Structure
EtherCAT is Part of the drives standard in Annex A and D
Device Model (ISO/OSI)
Physical Layer IEC 61800 Parts 1 to 6
Adjustable speed electrical power drive systems IEC TR 62390
Data Link Layer Abstract Device profile guideline
Frame Structure models
Addressing
IEC 61800-7 Generic interface and use of profiles for power drive systems
Commands
Memory/Registers Generic IEC 61800-7-1 Interface definition
SyncManager PDS
FMMU interface
Annex A: Annex B: Annex C: Annex D:
Diagnosis
Mapping to Mapping to Mapping to Mapping to Mapping to
Distributed Clocks CiA402 CIP PROFIdrive SERCOS
solutions
Application Layer (profiles)
State Machine
Mailbox
IEC 61800-7-2 Profile specifications
Mailbox Interface Annex A: Annex B: Annex C: Annex D:
EoE Ethernet Profile Profile Profile Profile
CoE CANopen Drive CiA402 CIP PROFIdrive SERCOS
FoE File Access
profiles
SoE Servo Drive
Slave Information /IF IEC 61800-7-3 Mapping of profiles to network technologies
Mapping to
Device Profiles network
Modular Devices
Annex A Annex B Annex C Annex D
technologies
Mapping toMapping to
Drives Mapping toMapping toMapping to Mapping toMapping toMapping to Mapping toMapping to SERCOS SERCOS Mapping to
ETHERNET EtherCAT
CANopen EtherCAT Powerlink DeviceNet ControlNetEtherNet/IP PROFIBUSPROFINET
Device Description I + II III
Configuration Tool
EtherCAT Master SERCOS interface™ is a trade name of Interests Group SERCOS interface e.V. Compliance to this profile does not require use of the trade name SERCOS

Standards&Implementation interface. Use of the trade name SERCOS interface requires permission of the trade name holder.

24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 184


Drive Control - Modes of Operation
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer NC/ PC EtherCAT Drive
Data Link Layer
Pos. Pos. Velo. Torque
Frame Structure M
Addressing Gen. control control control
Commands t
Memory/Registers v
SyncManager s
FMMU
Diagnosis
Distributed Clocks NC/ PC EtherCAT Drive
Application Layer
State Machine Pos. Pos. Velo. Torque
M
Mailbox Gen. control control control
Mailbox Interface t
EoE Ethernet v
CoE CANopen s
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles NC/ PC EtherCAT Drive
Modular Devices Pos. Pos. Velo. Torque
Drives M
Device Description
Gen. control control control
Configuration Tool t
EtherCAT Master
v
s
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 185
CIA402 Implementation Guideline
EtherCAT Basics
Slave Structure • Contents
Device Model (ISO/OSI)
Physical Layer – Clarifications of the state machine
Data Link Layer
Frame Structure – Modes of operation
Addressing
Commands
– Function Groups (FG)
Memory/Registers
• FG Position, FG Velocity, FG Torque
SyncManager
FMMU • FG Torque Limiting, FG Homing, FG Touch Probe
Diagnosis
Distributed Clocks – Endless Positioning
Application Layer
State Machine – For PDO Mapping only recommendation
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 186
Device Description Overview
EtherCAT Basics
Slave Structure • Device Description File in XML format
Device Model (ISO/OSI)
Physical Layer • One file suitable for a set of devices (from one Vendor)
Data Link Layer
Frame Structure
Addressing • File contains information about:
Commands
Memory/Registers – Vendor
SyncManager • Vendor ID, Name, Logo, …
FMMU
Diagnosis – Device groups
Distributed Clocks
Application Layer
• Organization units to help configuration tools
State Machine – Device
Mailbox
Mailbox Interface • Device Identity, Name, PDI type
EoE Ethernet
CoE CANopen
– PDO Mapping
FoE File Access – FMMU / SyncManager
SoE Servo Drive
Slave Information /IF • number and usage
Device Profiles
Modular Devices
Drives • Schema is defined in “EtherCATInfo.xsd”
Device Description
Configuration Tool • Can be viewed with Browser, Text Editor or XML Editors
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 187
General Structure
EtherCAT Basics
ID
Slave Structure
Device Model (ISO/OSI) Name
Physical Layer
Data Link Layer
Vendor Comment Type
Frame Structure Image Name
Addressing
Commands Vendor Spec Group Type
Memory/Registers EtherCATInfo.xsd
SyncManager Profile
FMMU Fmmu
Diagnosis
Groups Sm
Distributed Clocks
Application Layer
Description Su
State Machine
Mailbox RxPdo
Mailbox Interface
EoE Ethernet
Devices TxPdo
CoE CANopen Mailbox
FoE File Access
SoE Servo Drive Dc
Slave Information /IF Modules
Device Profiles
Modular Devices ESC
Drives
Eeprom
Device Description mantadory
Configuration Tool Vendor Spec
EtherCAT Master optional
Standards&Implementation
….
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 188
Attributes Vendor, Groupes, Devices
EtherCAT Basics ID
Type
Slave Structure
Device Model (ISO/OSI)
• Vendor Vendor
Name
Comment
Name
Groupe Type
Image
Physical Layer
Data Link Layer
– vendor ID, vendor name EtherCATInfo.xsd Vendor Spec
Profile
Fmmu
Sm
Frame Structure
Addressing
– Bitmap image and information text Description
Groups Su
RxPdo
Devices TxPdo
Commands
Memory/Registers • Groups Mailbox
Dc
SyncManager Modules

FMMU – Device groups help configuration tool to sort the ESC


ESC
Diagnosis
Distributed Clocks
devices. Eeprom
Vendor Spec
….
Application Layer
State Machine
– Configuration tool may use three levels to sort
Mailbox devices: vendor, group and device.
Mailbox Interface
EoE Ethernet – At least one device group must be provided, each
CoE CANopen
FoE File Access device is assigned to one group
SoE Servo Drive
Slave Information /IF • Devices
Device Profiles
Modular Devices
– Device description shall contain Type, Name and Group
Drives Type
Device Description
Configuration Tool – FMMU, SM, PDO, Mailbox and Eeprom are
EtherCAT Master
Standards&Implementation
recommended
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 189
Attributes Profile
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer • Profile
Data Link Layer
Frame Structure
– Profile Information
Addressing
Commands
– Object Dictionary
Memory/Registers
SyncManager
– Same Structure for CoE and SoE Dictionaries
FMMU
Diagnosis
Distributed Clocks
Application Layer • Separation of Object and Data Type descriptions
State Machine
Mailbox – Flat list of Objects
Mailbox Interface
EoE Ethernet – All Objects derived from a Data Type
CoE CANopen
FoE File Access – ARRAY, RECORD (CoE) and Variable Data (SoE)
SoE Servo Drive
Slave Information /IF defined as Data Types
Device Profiles
Modular Devices – Data Type describes the complete data of an object
Drives
Device Description
exactly as for a “Complete Access” download or upload
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 190
Data Types and Objects
EtherCAT Basics
Element „Profile“
Slave Structure
Device Model (ISO/OSI)
Physical Layer Element „Data Type“
Data Link Layer
Frame Structure
Addressing
Commands
Data Type
Memory/Registers „STRING(20)“
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet Element „Object“
CoE CANopen
FoE File Access
SoE Servo Drive Object „Device Name“
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 191
Extended Device Description
EtherCAT Basics
Slave Structure • EtherCAT Device Description contains information about the vendor and
Device Model (ISO/OSI) the functionality of a device
Physical Layer
Data Link Layer – This XML-Description can be used by EtherCAT Configurators to
Frame Structure configure the device and the network
Addressing
Commands – Specification is fixed in an XSD-Schema
Memory/Registers
SyncManager
FMMU • Defined Extensions
Diagnosis
Distributed Clocks – Support of Modular Devices
Application Layer • Module-Descriptions are selectable in the EtherCAT
State Machine
Mailbox Configurator
Mailbox Interface • Slot-Descriptions for PDO Numbers and Object Indexes
EoE Ethernet
CoE CANopen
depend on module position
FoE File Access – OP-Modes
SoE Servo Drive
Slave Information /IF • Predefined Operation Modes
Device Profiles
Modular Devices
• How to configure the synchronization modes
Drives – Supporting Safety-Device-Description
Device Description
Configuration Tool – Multi language support
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 192
Extended Device Description
EtherCAT Basics
Slave Structure • Module definition
Device Model (ISO/OSI)
Physical Layer
– With RxPDO/TxPDO and profile information (Object dictionary)
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine • Slots describe the allowed combination of the modules
Mailbox
Mailbox Interface
– Adaption of PDO Numbers and Object Indexes depend on module
EoE Ethernet position
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 193
Modules

Element (Attribute) Description


(CRC32) Checksum of the Modules description

Type (ModuleIdent) (M): Identifies the module


- (O): can be downloaded as expected module ident list (objects 0xF03y)
- (O): can be uploaded as real module ident list (objects 0xF05y)

Type (ModuleClass) (O): used to group modules

Type (ModulePdoGroup) (O): used to define the PDO assign rule

Name (M): Name of the module

RxPDO (O): RxPDO(s) of the module


- PDO Number of the PDO might be adapted
- Index of the PDO entries might be adapted

TxPDO (O): TxPDO(s) of the module


- PDO Number of the PDO might be adapted
- Index of the PDO entries might be adapted

SafetyParaMapping (O): used only for FSoE modules

Mailbox (O): used to define init commands


- Index of the entries might be adapted

Profile (O): used to define the object dictionary


- Index of the entries might be adapted

Image (O): Images of the module

24.02.2008 EtherCAT Communication 194


Slots and Slot Groups

• The connectable modules are described as Slots


• One Module is related to one Slot
• One Slot Group contains several Slots
• Adapting of Index and PDO-Number
– Unchanged
– With every slot (module)
– With every slot group

24.02.2008 EtherCAT Communication 195


Slots

Element (Attribute) Description


(MaxSlotCount) maximum number of modules (slots) connectable

(SlotPdoIncrement) defines the increment (multiplied with the slot‘s (module‘s)


position) of the PDO number
(SlotIndexincrement) defines the increment (multiplied with the slot‘s (module‘s)
position) of the Index
(MaxSlotGroupCount) maximum number of slot groups connectable

(SlotGroupPdoIncrement) defines the increment (multiplied with the slot group‘s


position) of the PDO number
(SlotGroupIndexincrement) defines the increment (multiplied with the slot group‘s
position) of the Index
Slot List of slots (Definition of the slot see next slide)

ModulePdoGroup One element for each Module PDO Group

ModulePdoGroup Defines the alignment after the Module PDO Group


(Alignment)
ModulePdoGroup (PdoNo) Defines the PDO Number containing the mapping information
of the align

24.02.2008 EtherCAT Communication 196


Slot

- The Slot Definition contains a list of modules connectable to this slot


- The allowed order of the modules is described with the order of the slot
definitions
- Mandatory modules to be connected can be described with
MinInstances=MaxInstances=1

Element (Attribute) Description


(SlotGroup) Slot Group of the module

(MinInstances) Minimum number of instances of the slot

(MaxInstances) Maximum number of instances of the slot

(SlotGroupIndexIncrement) defines the increment (multiplied with the slot group‘s


position) of the Index.
If defined, it overwrites SlotGroupIndexIncrement of the Slots
definition.
ModuleIdent List of modules (identified by ModuleIdent) which is
connectable to the slot
ModuleClass List of modules (identified by ModuleClass) which is
connectable to the slot

24.02.2008 EtherCAT Communication 197


XML and EEPROM
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Configuration Tool generates binary file from device
Physical Layer description to update EEPROM on slave
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
XML
SyncManager
FMMU Config
Diagnosis
Distributed Clocks Tool
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles 0110010001010… (*.bin)
Modular Devices EEPROM
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 198
EtherCAT Configuration Tool
EtherCAT Basics
Slave Structure • Configure EtherCAT Slave devices
Device Model (ISO/OSI)
Physical Layer – Evaluate XML device description
Data Link Layer
Frame Structure – Evaluate EEPROM information – if online
Addressing
Commands • Generate network initialization commands
Memory/Registers
SyncManager – Information for the EtherCAT driver
FMMU
Diagnosis – Initialization commands correspond to State Machine
Distributed Clocks
Application Layer transitions
State Machine
Mailbox • Generates cyclic commands
Mailbox Interface
EoE Ethernet – Information for the EtherCAT driver
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 199
Network Configuration
EtherCAT Basics Device Descriptions
Slave Structure (XML)
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing EtherCAT
Commands
Memory/Registers
Configuration Tool
SyncManager (Offline)
FMMU
Diagnosis
Distributed Clocks
Application Layer Configuration Configuration
State Machine
Information (XML) XML Information (binary)
Mailbox Vendor specific
General Exchange File
Mailbox Interface
Format Format
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive EtherCAT
Slave Information /IF
Master Driver E2PROM
Device Profiles
Information
Modular Devices (Online)
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 200
EtherCAT Configuration Exchange Format
EtherCAT Basics
Slave Structure • Vendor and Driver independent format
Device Model (ISO/OSI)
Physical Layer • Master Vendor must not imperatively develop an own
Data Link Layer
Frame Structure Configuration Tool
Addressing
Commands • Contains
Memory/Registers
SyncManager – initialization commands – per slave device
FMMU
Diagnosis – cyclic process data commands
Distributed Clocks
Application Layer – information about the mailboxes
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 201
EtherCAT Master
EtherCAT Basics
Slave Structure • Configuration with help of an EtherCAT configuration XML
Device Model (ISO/OSI)
Physical Layer file
Data Link Layer
Frame Structure • Send and receive raw Ethernet frames from a network
Addressing
Commands
adapter
Memory/Registers
SyncManager
• Management of the EtherCAT slaves
FMMU
Diagnosis
– Sending init commands defined in the XML file
Distributed Clocks
Application Layer
• Mailbox Communication
State Machine
Mailbox
– CANopen over EtherCAT protocol (CoE)
Mailbox Interface
EoE Ethernet
– Servo-Profile over EtherCAT protocol (SoE)
CoE CANopen
FoE File Access
– Ethernet over EtherCAT protocol (EoE)
SoE Servo Drive
Slave Information /IF
– Filetransfer over EtherCAT protocol (FoE)
Device Profiles
Modular Devices
• Software-integrated switch functionality
Drives
Device Description
• Cyclic process data communication
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 202
What does an EtherCAT Master do?
EtherCAT Basics
Slave Structure • Parse XML Hardware configuration file (initialization, state
Device Model (ISO/OSI)
Physical Layer machine, and process data mapping)
Data Link Layer
Frame Structure • Initialization of Fieldbus
Addressing
Commands • Runs State Machine
Memory/Registers
SyncManager • Interface to application
FMMU
Diagnosis • Interface to network driver
Distributed Clocks
Application Layer • Sends cyclic process data commands
State Machine
Mailbox • Sends mailbox commands
Mailbox Interface
EoE Ethernet • Handles various protocols
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 203
EtherCAT Master Block Diagram
EtherCAT Basics
Slave Structure
Control Task
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing Process Image
Commands (XML)

Memory/Registers
SyncManager Network Description
System
FMMU Initialization Commands
Configuration
Diagnosis
Tool
Process Image XML Parser
Distributed Clocks XML
Application Layer
State Machine
HDR Process Data
Mailbox HW Config
Mailbox Interface Init Cmds
Device Description
EoE Ethernet
CoE CANopen XML
Online functions
FoE File Access
SoE Servo Drive EtherCAT Master Driver
Slave Information /IF
Device Profiles
Modular Devices EtherCAT Master
Drives
Device Description
Configuration Tool Standard Ethernet MAC
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 204
Prerequisites for EtherCAT Master (Real Time)
EtherCAT Basics
Slave Structure • Hardware
Device Model (ISO/OSI)
Physical Layer – Standard network controller using DMA
Data Link Layer
Frame Structure • NO special plug in card needed
Addressing
Commands • Speed and Quality important
Memory/Registers
SyncManager – No switches or hubs required
FMMU
Diagnosis – Cache design, CPU
Distributed Clocks
Application Layer – Low jitter, x86 Dual Xeon < 2 µs
State Machine
Mailbox
Mailbox Interface
EoE Ethernet • Software
CoE CANopen
FoE File Access – Realtime kernel
SoE Servo Drive
Slave Information /IF – Configuration tool
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 205
EtherCAT Master Development (Real Time)
EtherCAT Basics
Slave Structure 1. XML Parser functionality
Device Model (ISO/OSI)
Physical Layer 2. EtherCAT Master driver
Data Link Layer
Frame Structure – Interface to configuration tool
Addressing
Commands – State machine
Memory/Registers necessary
SyncManager – Interface to application
FMMU
Diagnosis – Interface to network card
Distributed Clocks
Application Layer – NIC Timing Interface
State Machine
Mailbox 3. Real Time Kernel
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access 4. Hardware Configuration Tool
SoE Servo Drive
Slave Information /IF – 3.rd party configuration tools can be used optional
Device Profiles
Modular Devices as the configuration is provided to
Drives
Device Description
EtherCAT master in a common format
Configuration Tool (XML)
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 206
Master Sample Code Structure
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
XML
Frame Structure EtherCAT File Parser Appl.
Addressing
Configuration
Commands
Memory/Registers Tool
Process Image
SyncManager
FMMU EtherCAT
Diagnosis Online Functions Master Driver (Sample)
Distributed Clocks
Application Layer
State Machine Ethernet Frames
Mailbox
Mailbox Interface
EoE Ethernet
TCP/IP NPF (based)
CoE CANopen
FoE File Access Protocol Driver Protocol Driver
SoE Servo Drive
Slave Information /IF
Device Profiles NDIS
Modular Devices
Drives
Device Description
Miniport
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 207
Master Sample Code Overview
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
• Sample EtherCAT Master Communication Software
Physical Layer (including Source Code)
Data Link Layer
Frame Structure – Non Real Time
Addressing
Commands – Realized as Windows Application Program
Memory/Registers
SyncManager (MS Windows XP/2000)
FMMU
Diagnosis – Source Code MS C++
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 208
Standards and References
EtherCAT Basics
Slave Structure • Specification of EtherCAT has been done in the EtherCAT
Device Model (ISO/OSI)
Physical Layer Technology Group (ETG)
Data Link Layer
Frame Structure
Addressing
Commands • Specifications available at www.EtherCAT.org
Memory/Registers
SyncManager – XML File Style sheet
FMMU
Diagnosis – Datasheets of ESC, ...
Distributed Clocks
Application Layer – Modular Device Profile
State Machine
Mailbox – Reports of ETG TC meetings
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access • International standardization
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 209
Standards and References
EtherCAT Basics
Slave Structure •EtherCAT is part of different international
Device Model (ISO/OSI)
Physical Layer standardization efforts
Data Link Layer
Frame Structure Standard Title Status Remarks
Addressing
Commands IEC/PAS Real Time Ethernet control automation PAS Replaced by IEC 61158
Memory/Registers 62407 technology (ETHERCAT)
SyncManager IEC 61158 Digital data communication for measurement IS Type 12:
FMMU and control – Fieldbus for use in industrial EtherCAT Specification
Diagnosis control systems
Distributed Clocks
Application Layer Part 1: Overview and guidance
State Machine Part 2: Physical Layer service definition and
Mailbox protocol specification
Mailbox Interface
EoE Ethernet Part 3: Data Link Layer service definition
CoE CANopen Part 4: Data Link Layer protocol specification
FoE File Access
SoE Servo Drive Part 5: Application Layer service definition
Slave Information /IF Part 6: Application Layer protocol
Device Profiles specification
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master PAS : Public available standard
IS : International Standard
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 210
Standards and References
EtherCAT Basics
Slave Structure Standard Title Status Remarks
Device Model (ISO/OSI)
IEC 61784 Digital data communication for measurement
Physical Layer
and control
Data Link Layer
Frame Structure Part 1: Profile sets for continuous and discrete IS
Addressing manufacturing relative to fieldbus use in
Commands industrial control systems
Memory/Registers
Part 2: Additional profiles for ISO/IEC 8802-3 IS CPF12: EtherCAT
SyncManager
based communication networks in real-time
FMMU
applications
Diagnosis
Distributed Clocks IEC 61800 Adjustable speed electrical power drive
Application Layer systems
State Machine
Part 7-1: Generic interface and use of profiles IS Part 7:
Mailbox
for power drive systems – Interface definition Drive Profiles
Mailbox Interface
EoE Ethernet Part 7-2: Generic interface and use of profiles IS
CoE CANopen for power drive systems – Profile specifications
FoE File Access
Part 7-3: Generic interface and use of profiles IS Mapping
SoE Servo Drive
for power drive systems – Mapping of profiles EtherCAT to
Slave Information /IF
to network technologies CANopen DS402
Device Profiles
and SERCOS
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 211
Standards and References
EtherCAT Basics
Slave Structure Standard Title Status Remarks
Device Model (ISO/OSI)
ISO 15745 Industrial automation systems and integration - Ed 1 CANopen
Physical Layer
- Open systems application integration
Data Link Layer
framework
Frame Structure
Addressing Part 4 Amd 2: Profiles for Modbus TCP, PRF Amd Mapping
Commands EtherCAT and ETHERNET Powerlink EtherCAT to
Memory/Registers CANopen DS301
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
PRF Amd:
Amd: : Proof of a new International Standard, Amendment
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 212
IEC 61158
EtherCAT Basics
Slave Structure • Digital data communication for measurement and control –
Device Model (ISO/OSI)
Physical Layer Fieldbus for use in industrial control systems
Data Link Layer
Frame Structure
Addressing
Commands • The communication standard
Memory/Registers
SyncManager
FMMU
Diagnosis • EtherCAT is named Type 12 in IEC 61158
Distributed Clocks
Application Layer
(no brand names allowed)
State Machine
Mailbox
• Transformation of the communication protocol to a
Mailbox Interface common model
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 213
IEC 61158 – DL/AL services and protocols
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Users Implementers
Data Link Layer
Frame Structure
Addressing AL Services AL Protocol
Commands
Part 5 in IEC 61158 Part 6 in IEC 61158
Memory/Registers
SyncManager • Syntax definition and Coding
• Model and Concepts
FMMU • Data type definitions • Application Relationship
Diagnosis • Application Objects Procedures
• Service description • State Machines
Distributed Clocks
Application Layer • Communication Management
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
DL Services DL Protocol
FoE File Access Part 3 in IEC 61158 Part 4 in IEC 61158
SoE Servo Drive
• Model and Concepts • Coding
Slave Information /IF
• Service description • Medium Access
Device Profiles • Register Description • State Machines
Modular Devices (DL objects)
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 214
IEC 61800-7
EtherCAT Basics
Slave Structure
EtherCAT is Part of the drives standard in Annex A and D
Device Model (ISO/OSI)
Physical Layer IEC 61800 Parts 1 to 6
Adjustable speed electrical power drive systems IEC TR 62390
Data Link Layer Abstract Device profile guideline
Frame Structure models
Addressing
IEC 61800-7 Generic interface and use of profiles for power drive systems
Commands
Memory/Registers Generic IEC 61800-7-1 Interface definition
SyncManager PDS
FMMU interface
Annex A: Annex B: Annex C: Annex D:
Diagnosis
Mapping to Mapping to Mapping to Mapping to Mapping to
Distributed Clocks CiA402 CIP PROFIdrive SERCOS
solutions
Application Layer (profiles)
State Machine
Mailbox
IEC 61800-7-2 Profile specifications
Mailbox Interface Annex A: Annex B: Annex C: Annex D:
EoE Ethernet Profile Profile Profile Profile
CoE CANopen Drive CiA402 CIP PROFIdriv SERCOS
FoE File Access
profiles e
SoE Servo Drive
Slave Information /IF IEC 61800-7-3 Mapping of profiles to network technologies
Mapping to
Device Profiles network
Modular Devices
Annex A Annex B Annex C Annex D
technologies
Mapping toMapping to
Drives Mapping toMapping toMapping to Mapping toMapping toMapping to Mapping toMapping to SERCOS SERCOS Mapping to
ETHERNET EtherCAT
CANopen EtherCAT Powerlink DeviceNet ControlNetEtherNet/IP PROFIBUSPROFINET
Device Description I + II III
Configuration Tool
EtherCAT Master SERCOS interface™ is a trade name of Interests Group SERCOS interface e.V. Compliance to this profile does not require use of the trade name SERCOS

Standards&Implementation interface. Use of the trade name SERCOS interface requires permission of the trade name holder.

24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 215


ESC Overview
EtherCAT Basics
Slave Structure • Available ESCs:
Device Model (ISO/OSI)
Physical Layer – FPGA
Data Link Layer
Frame Structure – IP Core
Addressing
Commands – ASIC
Memory/Registers
SyncManager • Criteria:
FMMU
Diagnosis – Features:
Distributed Clocks
Application Layer • Number/Type of Ports (MII, EBUS)
State Machine
Mailbox • PDI Type (functionality, speed)
Mailbox Interface
EoE Ethernet • RAM
CoE CANopen
FoE File Access • DCs, Number of SyncManager, FMMUs
SoE Servo Drive
Slave Information /IF • …
Device Profiles
Modular Devices • Needed Quantity, Flexibility in relation to price
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 216
Step by Step Implementation
EtherCAT Basics
Slave Structure • Step 1:
Device Model (ISO/OSI)
Physical Layer • Slave Evaluation Kit Workshop
Data Link Layer
Frame Structure
Addressing Step 2:
Commands
Memory/Registers Setup of a small EtherCAT System
SyncManager
FMMU
with Master, I/O and Evaluation
Diagnosis Board.
Distributed Clocks
Application Layer
State Machine Step 3:
Mailbox
Mailbox Interface
Build Lab wiring between Evaluation
EoE Ethernet Kit and Standard-Hardware (e.g.)
CoE CANopen
FoE File Access
with 16Bit Microcontroller
SoE Servo Drive
Slave Information /IF
Device Profiles Step 4:
Modular Devices
Drives Start SW-Project with Slave Sample
Device Description µC Code
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 217
Step by Step Implementation
EtherCAT Basics
Slave Structure • Step 5:
Device Model (ISO/OSI)
Physical Layer EtherCAT Slave • Download Slave Sample Code in
Data Link Layer
Frame Structure
Application Software Target Hardware and set System
Addressing into Operation

ecatcoe coeappl
ecatappl

foeappl
Commands Slave Sample Code
Memory/Registers
SyncManager
Step 6:

emcy
FMMU
Diagnosis
Test implementation for PDO- und

ecatfoe
Distributed Clocks
Application Layer Mailbox-Transfer
State Machine
Mailbox EtherCAT Hardware-Design
Mailbox Interface
ecatslv mailbox
EoE Ethernet
CoE CANopen
FoE File Access mcihw Step 7:
SoE Servo Drive
Slave Information /IF
EtherCAT
Software-Design with EtherCAT
Device Profiles
Modular Devices Slave Slave Sample Code for existing
Controller
Drives Fieldbus SW-Architecture
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
24.02.2008 EtherCAT Communication © Copyright by Beckhoff, 2008 218

You might also like