EtherCAT Communication
-
Upload
aniltejas61 -
Category
Documents
-
view
254 -
download
5
Transcript of EtherCAT Communication
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 1/218
24.02.2008 EtherCAT Communication 1© Copyright by Beckhoff, 2008
EtherCAT Technology Group
EtherCAT Communication
Communication Principles
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 2/218
24.02.2008 EtherCAT Communication 2
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 DriveSlave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Agenda
• EtherCAT Basics
• Slave Structure
• Device Model
• Physical Layer • Data Link Layer
– Frame Structure
– Addressing, Commands
– Memory, SyncManager, FMMUs
– Diagnosis• Distributed Clocks
• Application Layer
– State Machine
– Mailbox (Mailbox Protocols)
– Slave Information Interface (EEPROM)• Device Profiles
• Device Description
• Tools (Configuration Tool, Monitor, …)
• EtherCAT Master
• Standard & References
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 3/218
24.02.2008 EtherCAT Communication 3
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 DriveSlave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Functional Principle: Ethernet „on the Fly“
Car
27
Analogy Fast Train:
• „Train“ (Ethernet Frame) does not stop
• Even when watching „train“ through narrow window one
sees the entire train
• „Car“ (Sub-Telegram) has variable length
• One can „extract“ or „insert“ single „persons“ (Bits) or
entire „groups“ – even multiple groups per train
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 4/218
24.02.2008 EtherCAT Communication 4
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 DriveSlave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Functional Principle: Ethernet „on the Fly“
Slave Device
EtherCAT SlaveController
Slave Device
EtherCAT SlaveController
• Process data is extracted and inserted on the fly• Process data size per slave almost unlimited
(1 Bit…60 Kbyte, if needed using several frames)
• Compilation of process data can change in each cycle,
e.g. ultra short cycle time for axis, and longer cycles for I/Oupdate possible
• In addition asynchronous, event triggered communication
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 5/218
24.02.2008 EtherCAT Communication 5
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 DriveSlave Information /IF
Device Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Topology
• Flexible Topology
– Line
– Daisy chain
– Daisy chain with branches
– Tree Structure – Star
– Cable Redundancy
• Any number of physical layer changes possible
• Standard Ethernet 100m cable distance between 2 devices
• Up to 65.535 devices possible
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 6/218
24.02.2008 EtherCAT Communication 6
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
© Copyright by Beckhoff, 2008
Topology – Line topology
DVI
IPC
....
• Arbitrary number of devices in a line
• Up to 65535 devices
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 7/218
24.02.2008 EtherCAT Communication 7
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
© Copyright by Beckhoff, 2008
Topology – Daisy Chain
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 8/218
24.02.2008 EtherCAT Communication 8
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
© Copyright by Beckhoff, 2008
Topology – daisy chain with drop lines
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 9/218
24.02.2008 EtherCAT Communication 9
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
© Copyright by Beckhoff, 2008
Topology – Tree structure
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 10/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 11/218
24.02.2008 EtherCAT Communication 11
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Topology – Star topology and fibre optics
DVI
IPC
....
fibre optics
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 12/218
24.02.2008 EtherCAT Communication 12
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Cable Redundancy
• Only a second Ethernet Port is needed on the master –
possible with all EtherCAT Slave devices
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 13/218
24.02.2008 EtherCAT Communication 13
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
DVI
IPC
....
Frame Processing within one node
EtherCAT Segment (Slaves)Master
vom Master
zum Master
vom Master
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 14/218
24.02.2008 EtherCAT Communication 14
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Logical Process Data Image
l o g i s c h e s P r o z e s s a b b i l d
: b i s 4 G B y t e
0
232Telegrammstruktur
Ethernet HDR HDR 1 PLC Data HDR 2 NC Data HDR n Data n CRC
PLC Data
Data n
NC Data
Sub-
Telegramm 1Sub-
Telegramm 2
Sub-
Telegramm n
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 15/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 16/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 17/218
24.02.2008 EtherCAT Communication 17
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
EtherCAT Slave Controller Board
EtherCAT
Slave
Controller (FPGA)
PHY
Trafo
RJ45
Status LED
* Post stamp design, not cost and space optimized
EEPROM
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 18/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 19/218
24.02.2008 EtherCAT Communication 19
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Device Model – ISO/OSI Reference
Physical Layer
EtherCAT Data Link Layer
SDO
Process DataMailbox
Object Dictionary
AL Control/ AL Status
Application
e.g. DS402 Drive Profile
PDO Mapping
IP
UDPTCP
HTTP,
FTP, …
SoE
Service
Channel
Servo
Application
According
IEC 61491
Data
Link
Layer
(DL)
Application
Layer
(AL)
DL
Address
DL
Info
Sync ManSettings
S
l a v e I n f o r m a t i o n
FMMUFMMU
FMMUFMMU n
DL Control/
DL Status
File
Access
Appli-
cation
Layer
Management
Ethernet
Physical
Layer (PHY)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 20/218
24.02.2008 EtherCAT Communication 20© Copyright by Beckhoff, 2007
Application
EtherCAT Slave Controller (ESC)
Application
e.g. CiA402 Drive Profile
HTTP,
FTP, ..Appli-
cation
PHY
T r af o
R J 4 5 PHY
T r a f o
R J 4 5
FMMU
SyncMan1 MbxIn
SII
EEPROM
MII / EBUSPort 3
MII / EBUSPort 1
EtherCAT Processing Unit
and Auto-Forwarder with Loop Back
LVDS C on
Process DataMailboxRegisters
Data
Link
Layer
(DL)
Physical
Layer
(PL)
FMMU
SyncMan2 SyncMan3
SDO
Object Dictionary
PDO...
Application
Layer
(AL)File
Access
TCP, UDP
ESC Address Space (DPRAM)
FMMUFMMU n
IP
PDO Mapping
CoECoEEoEFoEVoE
Process Data Interface (µC, SSI, I/O )
….
PHYManagement
FMMU n
SyncMan0 MbxOut
RD / WR
MII / EBUSPort 0
MII / EBUSPort 2
Ethernet HDRLRWProcess DataFPWRMailbox DataMore Datagrams..FCS ECAT HDR W K C
W K C
H D R
H D R
Mailbox DLL
0x0000 0x1000
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 21/218
24.02.2008 EtherCAT Communication 21
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Ethernet on LVDS physics(E-Bus):
for modular devices
EtherCAT Physical Layers
• On cables: 100BaseTX or 100BaseFx
• Device internal: E-Bus (LVDS)
Ethernet on
100BASE-TX;
up to 100 m, with
transformer coupling
any number of
physical layer
changes allowed
E-Bus
DVI
IPC
....
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 22/218
24.02.2008 EtherCAT Communication 22
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Physical Layer
• 100 BASE-TX
– Most popular physical layer for Fast Ethernet
– Shielded twisted pair (STP) with 2 pairs of wires
– Cable categories CAT5, 6, 7 can be used
– RJ45 connector standard, M12 connector for IP67
– PHY Support for auto negotiation and auto crossoverrecommended
• 100 BASE-FX
– All media options possible
– Simple solution for TX-to-FX converter
• E-BUS
– Interface for low cost backplane applications
– Widely used LVDS (Low Voltage Differential Signaling)adopted
– Use Manchester Bit Coding
– LVDS: Low Voltage Differential Signaling according to ANSI/TIA/EIA-644, also used in IEEE 802.3ae (10GigabitEthernet)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 23/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 24/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 25/218
24.02.2008 EtherCAT Communication 25© Copyright by Beckhoff, 2007
Application
EtherCAT Slave Controller (ESC)
Application
e.g. CiA402 Drive Profile
HTTP,
FTP, ..Appli-
cation
PHY
T r af o
R J 4 5 PHY
T r a f o
R J 4 5
FMMU
SyncMan1 MbxIn
SII
EEPROM
MII / EBUSPort 3
MII / EBUSPort 1
EtherCAT Processing Unit
and Auto-Forwarder with Loop Back
LVDS C on
Process DataMailboxRegisters
Data
Link
Layer
(DL)
Physical
Layer
(PL)
FMMU
SyncMan2 SyncMan3
SDO
Object Dictionary
PDO...
Application
Layer
(AL)File
Access
TCP, UDP
ESC Address Space (DPRAM)
FMMUFMMU n
IP
PDO Mapping
CoECoEEoEFoEVoE
Process Data Interface (µC, SSI, I/O )
….
PHYManagement
FMMU n
SyncMan0 MbxOut
RD / WR
MII / EBUSPort 0
MII / EBUSPort 2
Ethernet HDRLRWProcess DataFPWRMailbox DataMore Datagrams..FCS ECAT HDR W K C
W K C
H D R
H D R
Mailbox DLL
0x0000 0x1000
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 26/218
24.02.2008 EtherCAT Communication 26
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Purpose of Data Link Layer
• Data Link Layer links Physical and Application Layer
• Data Link Layer takes care of the underlying communicationinfrastructure
– Link Control – Access to Transceivers (PHY)
– Addressing
– Slave Controller configuration
– EEPROM access – SyncManager configuration and management
– FMMU configuration and management
– Process Data Interface configuration
– Distributed Clock – Set Up AL State Machine interactions
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 27/218
24.02.2008 EtherCAT Communication 27
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Data Link Layer – Overview
• Standard IEEE 802.3 Ethernet Frame
– No special requirements for the master
– Use of standard Ethernet infrastructure
• IEEE Registered EtherType: 88A4h – Optimized frame overhead
– IP stack not required
– Simple master implementation
• Additionally over UDP
(IANA registered Port 88A4h) – EtherCAT communication over the Internet possible
– Using of standard sockets
• Frame processing at Slave side
– EtherCAT Slave Controller processes the frame inhardware
• Communication Performance independent from processor power
– no time critical reaction at slave side in software
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 28/218
24.02.2008 EtherCAT Communication 28
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
Ethernet / EtherCAT Frame Structure
Ethernet Frame: max. 1514 Byte
Ethernet Header Ethernet Data FCS
Destination EtherType16 Bit48 Bit
48 Bit 32 Bit
Source EtherCAT Data FCS
EtherType 88A4h
Destination EtherTypeSource
16 Bit
Header Datagrams FCS
48 -1498 Byte
Simple EtherCAT Communication
1
1
UDP Destination Port 88A4h
16 Bit
Dest TypeEtherType 0800h
Src IP Header UDP H.
160 Bit 64 Bit
Header Datagrams FCS
48 -1470 Byte
2
EtherCAT communication over Internet2
TypeRes.Length
1 Bit 4 Bit11 Bit
Type of following data
Reserved
Length of following EtherCAT datagrams
(not checked by slave)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 29/218
24.02.2008 EtherCAT Communication 29
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
EtherCAT Frame Header
TypeRes.Length
4 Bit11 Bit 1 Bit
0 11 12 15
Type Meaning
-----------------------------------------------------------------------
0: Reserved
1: EtherCAT Datagram (s)the only type that is evaluated by the ESC
2,3: Reserved
4: Network Variables (used e.g. for Master-Master Communication)
5: Mailbox over IP (used e.g. for Master-Master Communication)
6-15: Reserved for future use
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 30/218
24.02.2008 EtherCAT Communication 30
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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
© Copyright by Beckhoff, 2008
EtherCAT Datagram Header Address
Ethernet H. Ethernet Data FCS
EtherCAT Datagrams FCS
14 Byte 4 Byte2 Byte 44*-1498 Byte
Ethernet H. 10Len
* add 1-32 padding bytes if Ethernet frame is less than 64
EtherCAT Datagrams
Datag. Header Data WKC
10 Byte 2 Bytemax. 1486 Byte
WKC = Working Counter
1st EtherCAT Datagram nth EtherCAT Datagram2nd…. ….
Cmd Idx Address Len R M IRQ
8 Bit 8 Bit 32 Bit 16 Bit11 Bit 2
More EtherCAT Datagrams?
C R
1 1 1
Circulating Datagram?
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 31/218
24.02.2008 EtherCAT Communication 31
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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© Copyright by Beckhoff, 2008
EtherCAT Datagram Header Address
Ethernet Frame Header Address
EtherCAT Addressing Overview
Segment Addressing
Device Addressing
Position Addressing
Logical Addressing
Node Addressing
MAC Address
Process Data
Address
Assigned Node
Address
Address by
physical Position
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 32/218
24.02.2008 EtherCAT Communication 32
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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© Copyright by Beckhoff, 2008
Segment Addressing by MAC Address
EtherCAT Segment = Ethernet Device
EtherCAT Segment = Ethernet Device
Master
Device Switch
Segment
AddressSlave
Device
Slave
Device
Slave
Device
Slave
Device
Slave
Device
Slave
Device
GenericEthernet Device
SlaveDevice
SlaveDevice
SlaveDevice
SlaveDevice
SlaveDeviceMaster
Device
Segment Address
SlaveDevice
• Direct mode (no switch): broadcast MAC Address
EtherCAT Segment = Ethernet Device
Slave
Device
Slave
Device
Slave
Device
Slave
Device
Slave
Device
Slave
Device
Master
Device
• Open mode: One MAC-Address for an EtherCAT Segment
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 33/218
24.02.2008 EtherCAT Communication 33
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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© Copyright by Beckhoff, 2008
EtherCAT Datagram Header Address
Ethernet H. Ethernet Data FCS
EtherCAT Datagrams FCS
14 Byte 4 Byte2 Byte 44*-1498 Byte
Ethernet H. 10Len
* add 1-32 padding bytes if Ethernet frame is less than 64
EtherCAT Datagrams
Datag. Header Data WKC
10 Byte 2 Bytemax. 1486 Byte
WKC = Working Counter
1st EtherCAT Datagram nth EtherCAT Datagram2nd…. ….
Cmd Idx Address Len R M IRQ
8 Bit 8 Bit 32 Bit 16 Bit11 Bit 2
More EtherCAT Datagrams?
C R
1 1 1
Circulating Datagram?
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 34/218
24.02.2008 EtherCAT Communication 34
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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© Copyright by Beckhoff, 2008
Address Field
Auto Increment Addressing (local)
Cmd Idx
Position Offset
Len R M IRQ
Logical Address
8 Bit 8 Bit
16 Bit 16 Bit
16 Bit11 Bit 2
Address Offset
Address
32 Bit
Fixed Addressing (local)
Logical Addressing (global)
• 32 Bit address space
- used for 16 bit device addressing (65.535 devices
possible)
and 16 bit for addressing local memory space of device
(max. 64kByte)
or
- 32 bit logical addressing
C R
1 1 1
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 35/218
24.02.2008 EtherCAT Communication 35
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
AddressingCommands
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© Copyright by Beckhoff, 2008
Auto Increment Addressing
• Negative Auto Increment Address for every slave
depending on position (16 bit)
• Slave which reads address == 0x0000 is addressed
• Every slave increments address by 1
• Offset addresses local memory space of device
• Usually used during scan of hardware configuration
DVI
IPC
....
0 x F F F E
0 x F F F F
0 x F F F D
0 x F F F C
0 x F F F B
0 x F F F 8
0 x F F F 9
1 2 3 4
5 6
7 8 9
0 x F F F A
0 x 0 0 0 0
Position Offset
16 Bit 16 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 36/218
24.02.2008 EtherCAT Communication 36
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Fixed Addressing
• Every Slave has a fixed address (16 bit)
• Usually assigned during hardware configuration scan
• Independent from slave position• Fixed address lost after power loss
DVI
IPC
....
0 x 3 E A
0 x 3 E 9
0 x 3 E B
0 x 3 E C
1 2 3 4
5 6
7 8 9
0 x 3 E D
0 x 3 E E
0 x 3 E F
0 x 3 F 0
0 x 3 F 1
Address Offset
16 Bit 16 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 37/218
24.02.2008 EtherCAT Communication 37
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Logical Addressing
• Slave reads from/ writes its data into the 4 GByte great
Ethernet frame (fragmented)
0
232Telegrammstruktur
Ethernet HDR HDR 1 PLC Data HDR 2 NC Data HDR n Data n CRC
PLC Data
Data n
NC Data
Sub-Telegramm 1 Sub-Telegramm 2 Sub-Telegramm n
DVI
IPC
..
..
L o g i c a l p r o c e s
s i m a g e u p t o 4 G
B y t e
Logical Address
32 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 38/218
24.02.2008 EtherCAT Communication 38
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
EtherCAT Commands
• Different commands to optimize reading and writing for all
access methods within a Fieldbus communication system
Cmd Idx Len R M IRQ
32 Bit logical addressR, W, RWLogical
CommentOffsetAddressAccessCmd Type
Local Memory
Address
(increments)R, W, RWBroadcast
Match address value to
local address register
Local Memory
Address
Address
(configured)
R, W, RW,
RMW
configured
Address
Position value 0
(at entry) addressed
Local Memory
Address
Position
(increments)
R, W, RW,
RMW
Auto
Increment
No OperationNOP
Address Offset C R
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 39/218
24.02.2008 EtherCAT Communication 39
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
EtherCAT Commands
• Broadcast Read
– Individual Bits of a Byte will be added with a bitwise
OR operation between incoming data and local data
• Read Write Actions
– Exchange of incoming data and local data
(exception: Broadcast – see broadcast read)
• Read Multiple Write Actions (RMW)
– Addressed Station will read the others will write
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 40/218
24.02.2008 EtherCAT Communication 40
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Local Address Space of ESC
Registers
User memoryprocess data in
process data out
mailbox data out
mailbox data in
0x0100 DL Control
0x0110 DL Status
0x0120 AL Control
0x0130 AL Status
……
4 kByte
1..60 kByte
ESC
0x1000
0xFFFF
0x0000
0x0FFF
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 41/218
24.02.2008 EtherCAT Communication 41
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Local Address Space of ESC
• 64 kByte address space
• Divided into registers and dual ported RAM (DPRAM)
• First 4 kByte are reserved for registers
• DPRAM starts at 1000h
• DPRAM size depends on Slave Controller implementation
(up to 60 kByte, 4kByte in actual FPGA implementation)
• Addressing of registers and DPRAM same
• Register Write is different –
shadow Register for all Registers integrated
DPRAM write is not shadowed
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 42/218
24.02.2008 EtherCAT Communication 42
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Register of EtherCAT Slave Controller
• First 1000h bytes (4 kBytes) of local address space
• Read access for both sides (EtherCAT and application)
• Write access from EtherCAT for most of the registers
– Master has to configure the Slave Controller
• No address settings needed
• FMMU and Sync Manager configuration can beoptimized for available bandwidth and cycle times
– Exceptions that are writable from the application side:
• AL Status Register, AL Status Code Register, AL Event Mask Register, Sync Manager DisableRegisters, AL Identification Registers
• Process Data Interface (PDI) register initialized from SlaveInformation interface (Serial EEPROM)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 43/218
24.02.2008 EtherCAT Communication 43
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Register
• Registers might be monitored via configuration tool
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 44/218
24.02.2008 EtherCAT Communication 44
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
Register – ESC Data Sheet
• Register description for every ESC (FPGA/ ASIC)
– DL Information, DL Control, DL Status, DL Address
– AL Control, AL Status, AL Event
– SyncManager + FMMU configuration – Distributed Clocks
– Slave Information interface (Serial EEPROM )
Enable Disable Ports
Status of the device state machine
Error Code
32 Bit I/0, SPI, µC Interface
Control of the device state machine
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 45/218
24.02.2008 EtherCAT Communication 45
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation© Copyright by Beckhoff, 2008
SyncManager Overview
• SyncManager protects a DPRAM section from simultaneousaccess data consistency
• Mailbox Type
– 1 buffer SyncManager supports handshake
– Data overflow protection
– Writing side must write before reading side can read
– Reading side must read before writing side can write again
• Buffered Type
– 3 buffer SyncManager guarantees consistent data deliveryand access to the newest data any time
– Always a free buffer to write
– Always a consistent buffer to read (except before the firstwriting)
– Usually used for process data communication
• Up to 16 independent SyncManger channels possible
• The SyncManager configuration registers start at address0x0800
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 46/218
24.02.2008 EtherCAT Communication 46
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Buffered Type (3 buffers) Write Example
• Characteristic: Data always available for both sides
• Requires 3 (consecutive) memory areas
ECAT NEXT USEREtherCAT PDI
Write end
Write begin WRITE WRITE WRITEWRITE WRITE WRITE
WRITE WRITE WRITE
WRITE WRITE WRITEWRITE WRITE WRITE1 2 3
Read end
2
3Read latestavailable data
Read latest
available dataREAD READ READREAD READ READ
READ READ READREAD READ READREAD READ READ
Write begin
2ECATECATECATECA
TECATECATECATEC ATECATECATECATE
CATECATECAT
1WRITE WRITE WRITEWRITE WRITE WRITE
WRITE WRITE WRITEWRITE WRITE WRITEWRITE WRITE WRITE
1WRITE WRITE WRITEWRITE WRITE WRITE
WRITE WRITE WRITEWRITE WRITE WRITE
WRITE WRITE WRITE
3READ READREAD READ READ
READ READ READ
….Go on Reading
a
b
c
Cycle begins again
a
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 47/218
24.02.2008 EtherCAT Communication 47
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Mailbox Type (1 buffer) Read Example
• Allows handshake Communication
• Useful for non-Process Data
• Handshake mechanism – one side has control
EtherCATMaster
Failed
MBX EmptyRead
ReadWKC = 0
Write
Write
MBX Full Successfull
Slave
MBX EmptyRead
Read
WKC = 1
Successfull
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 48/218
24.02.2008 EtherCAT Communication 48
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 /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
SyncManager channel configuration registers
Start Address Length Ctrl Status E
16 Bit 16 Bit 8 Bit 8 Bit 16 Bit
Channel
Enable
1/3 Buffer R/W IE IP WD R
00: 3 Buffer
10: 1 Buffer
00: Read
01: Write
Interrupt
Enable
to PDI
Watchdog
Enable
0 2 4 5 6 7
IW 1PWD Res.IR 3P
Completely
written
Completelyread
0: read
1: written
00: Buffer 0
01: Buffer 1
10: Buffer 2
11: locked (Start)
0 1 2 3 4 6
0 16 32 40 48 49
Repeat Reserved
R49 49
Res50
0 1
E49R
5649Res
57 63
Request
Master Response
Slave
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 49/218
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 50/218
24.02.2008 EtherCAT Communication 50
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Fieldbus Memory Management Unit (FMMU)
• Maps a section of the local address space into the global
address space and vice versa
• Read and write access distinguishable
• Bitwise configuration of the memory section possible• Up to 16 independent FMMU channels possible
– FMMU configuration registers start at address
0x0600
• Operation samples:
• Mapping of process data into the global address space
• Mapping of status bits from the register section
– Access to device specific status information with a
minimum overhead – e.g. fill status of a sync
manager channel
f
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 51/218
24.02.2008 EtherCAT Communication 51
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
FMMU Usage for Addressing
• Global address space
• 4 GByte address space
• Mapping to local addresses by
Fieldbus Memory Management Units (FMMU)• All EtherCAT devices can map data in a single EtherCAT
Datagram LRW – depending on the FMMU configuration
Ethernet HDR EH Data FCSFH WKC
FMMU tit fi ti i t
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 52/218
24.02.2008 EtherCAT Communication 52
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
FMMU entity configuration registers
Glob. Start Addr. Length GSB
32 Bit 16 Bit 8 Bit
Enable
GEB Phy. Start LSB Dir E Res…
8 Bit 16 Bit 8 Bit 8 Bit 1 31 Bit
0-7 Reserved W ReservedR
Global
Start Address(32 Bit)
Length of allconcerned
Bytes
GSB: Global Start Bit
GEB: Global End BitLSB: Local Start Bit
Read Enable
Write Enable
Local
Start Address(16 Bit)
3 Bit 5 Bit 6 Bit
0 32 48 56 64 80 88 96 97 127
0 3 7 7210
FMMU S t
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 53/218
24.02.2008 EtherCAT Communication 53
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
FMMU Setup
1. Master reads hardware configuration including input and
output data length of each slave
2. Master organizes mapping of process data
3. Master distributes information (start address etc.) forevery slave about where process data in logical process
image is provided
4. Process data communication starts
FMMU e ample
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 54/218
24.02.2008 EtherCAT Communication 54
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
FMMU example
• Map 6 Bits form logical address 0x14711.3 to 0x14712.0 to
the physical register bits 0x0F01.1 to 0x0F01.6.
– The FMMU length is 2 Byte, since the mapped bits
span 2 Bytes of the logical space.
1 (enable)0xC Activate
Rand and/or Write0xBType
0x01
0x0F01
0x00
0x03
0x0002
0x00014711
ValueFMMU reg. offsetFMMU config. register
0x0:0x3Logical Start Address
0x4:0x5Length (Byte)
0x6Logical Start Bit
0x7Logical Stop Bit
0xAPhysical Start Bit
0x8:0x9Physical Start Address
Note: FMMU configuration registers start at address 0x0600
EtherCAT Datagrams
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 55/218
24.02.2008 EtherCAT Communication 55
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT Datagrams
Ethernet H. Ethernet Data FCS
EtherCAT Datagrams FCS
14 Byte 4 Byte2 Byte 44*-1498 Byte
Ethernet H. 10Len
* add 1-32 padding bytes if Ethernet frame is less than 64
EtherCAT Datagrams
Datag. Header Data WKC
10 Byte 2 Bytemax. 1486 Byte
WKC = Working Counter
1st EtherCAT Datagram nth EtherCAT Datagram2nd…. ….
Working Counter Details
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 56/218
24.02.2008 EtherCAT Communication 56
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Working Counter Details
• EtherCAT Datagram ends with a 16 Bit Working Counter
• Working Counter counts the number of interactions of
devices addressed by an EtherCAT Datagram
• EtherCAT Slave Controller increments the WorkingCounter in hardware – if the controller is addressed and
the addressed memory is accessible (Sync Manager)
• Each Datagram should have an expected Working counter
value – calculated by the configuration tool• The Master checks the valid processing of EtherCAT
Datagrams by comparing the Working Counter with the
expected value
• Special case: RW addressing methods will incrementWKC by 2 for write access and by 1 for read access
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 57/218
Working Counter Example
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 58/218
24.02.2008 EtherCAT Communication 58
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Working Counter Example
WC+1
WC+1
WC+3
WC+1
WC+1
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 59/218
Monitoring of EtherCAT Communication
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 60/218
24.02.2008 EtherCAT Communication 60
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 MachineMailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IFDevice Profiles
Modular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Monitoring of EtherCAT Communication
Switch
Master
• Masters sends an EtherCAT Frame (broadcast)
Monitor gets the first copy (unprocessed)
• Frame returns from EtherCAT Slave Devices Monitor gets the second copy (processed)
• DLL for readable format available on EtherCAT Web site
Network Monitor
Monitoring of EtherCAT Communication
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 61/218
24.02.2008 EtherCAT Communication 61
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 MachineMailbox
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
© Copyright by Beckhoff, 2008
Monitoring of EtherCAT Communication
Master
• Masters sends an EtherCAT Frame (broadcast)
Monitor gets the first copy (unprocessed)
• Frame returns from EtherCAT Slave Devices
Monitor gets the second copy (processed)
• DLL for readable format available on EtherCAT Web site
Network Monitor
Attention:
At low cycle times order of frames might be mixed because of timing restrictions within
NDIS protocol driver
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 62/218
External Clock Synchronization: IEEE 1588
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 63/218
24.02.2008 EtherCAT Communication 63
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 MachineMailbox
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
© Copyright by Beckhoff, 2008
MS
S
S S S S S
S
y
Switchport with integrated
IEEE 1588 Boundary Clock
DVI
IPC
..
..
IEEE 1588
Grandmaster
Clock
Boundary
Clock
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 64/218
Distributed Clocks Unit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 65/218
24.02.2008 EtherCAT Communication 65
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
EtherCAT Slave Controller (ESC)
FMMU n
SyncMan
EtherCAT Address Space
EtherCAT Processing Unit
and Auto-Forwarder with Loop Back
Port 0 Port 1 Port 2 Port 3
PHY T r a f o
R J 4 5
PHY
T r af o
R J 4 5
Distributed Clocks
SPI / µC parallel
Digital I/O Sync0 / Latch0
Sync1 / Latch1IRQ
Process Data Interface
(PDI)
Sync / Latch Unit
DC
Control
System Time
Offset
Delay
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 66/218
Features of DC Unit within ESC
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 67/218
24.02.2008 EtherCAT Communication 67
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
• Propagation delay measurement support
– Each EtherCAT slave controller measures the delay
between the two directions of a frame
– Master calculates the propagation delays between allslaves
• Offset compensation to Reference Clock
– Offset between local clock and Reference Clock
– Same absolute system time in all devices – Simultaneousness (clear below 100ns difference) in
all devices
• Drift compensation to Reference Clock
– DC Control Unit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 68/218
DC – Propagation Delay Measurement (I)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 69/218
24.02.2008 EtherCAT Communication 69
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
EtherCAT Node measures time difference between leaving and
returning frame
vom Master EtherCAT Frame
DC – Propagation Delay Measurement (II)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 70/218
24.02.2008 EtherCAT Communication 70
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
Propagation delays between any nodes can be computed
DVI
IPC
....
Propagation Delay Measurement
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 71/218
24.02.2008 EtherCAT Communication 71
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
• Registers:
– Receive Time Port 0 (0x0900:0x0903)
– Receive Time Port 1 (0x0904:0x0907)
– Receive Time Port 2 (0x0908:0x090B)
– Receive Time Port 3 (0x090C:0x090F)
– System Time Delay (0x0928:0x092B)
• Write access to Receive Time Port 0 activates latch
– Latch local time of SOF (Start of Frame) – At EOF (End of Frame) SOF time is copied to Receive
Time Port X
• Receive Time Port X in local clock units (controlled)
• SOF time of all frames are latched on all ports internally
• Master reads all time stamps and calculates the delay times withrespect to the topology.
• Individual delay time is written to register System Time Delay
Offset and Drift Compensation
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 72/218
24.02.2008 EtherCAT Communication 72
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
M S
S
S S S S S
S
Same System Time in all devices
DVI
IPC
....
Global System Time
e.g. by RTC or IEEE1588
Reference: Jan 1st 2000
Individual
System Time Offset
Offset Compensation
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 73/218
24.02.2008 EtherCAT Communication 73
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
• Registers:
– System Time Offset
(0x0920:0x927, small systems 0x0920:0x0923)
• Difference between the Reference Clock and every slave
device's clock is calculated by the master.
• The offset time is written to register System Time Offset
• Each slave calculates its local copy of the System timeusing its local time and the local offset value:
• tLocal copy of System Time = tLocal time + tOffset
Drift Compensation – DC Control
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 74/218
24.02.2008 EtherCAT Communication 74
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State MachineMailbox
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
© Copyright by Beckhoff, 2008
• Registers:
– System Time(0x0910:0x0917, small systems 0x0910:0x0913)
– System Time Offset
(0x0920:0x927, small systems 0x0920:0x0923)
• ARMW command (auto increment read – multiple write) allows toread System Time of the reverence clock and write it to all slaveclocks within a single frame
• DC Control
– Write access to System Time comparesreceived Time with local time
• ∆t = (tLocal time + tOffset + tPropagationDelay) - tReceived Time
– If (∆t > 0) then decelerate local clockelse if (∆t < 0) accelerate local clock
Initialization of DCs
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 75/218
24.02.2008 EtherCAT Communication 75
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
• Initialization with Propagation Delay compensation1. Master reads the DL Status register of all slaves and calculates the network topology.
2. Master sends a broadcast write to Receive Time Port 0 register (at least first byte). All slaves
latch the local time of the first preamble bit of this frame at all ports and at the ECAT
Processing Unit. Some ESCs need the EtherCAT network to be free of frames before the
broadcast write is sent.
3. Master waits until the broadcast write frame has returned.
4. Master reads all Receive Time Port 0-3 registers (depending on the topology and the Receive
Time ECAT Processing Unit register (0x0918:0x091F) which contains the upper 32 bits of the
receive times.
5. Master calculates individual propagation delays and writes them to System Time Delay
registers of the slaves. Possible overruns of the 32 bit Receive Times have to be checked and
taken into account.
6. Master sets System Time Offset register of the Reference Clock so that the Reference Clock is
bound to the master time. The offset for the Reference Clock is master time minus Receive
Time ECAT Processing Unit (local time) of the Reference Clock.
7. Master calculates System Time offsets for all DC slaves and writes them to the System Time
Offset registers. The offset of each slave is Receive Time ECAT Processing Unit from
Reference Clock minus Receive Time ECAT Processing Unit from each DC slave.
8. For static drift compensation, the master sends many separate ARMW or FRMW driftcompensation frames (e.g., 15,000 frames) to distribute the System Time of the Reverence
Clock to all DC slaves.
9. For dynamic drift compensation, the master sends ARMW or FRMW commands periodically to
distribute the System Time of the Reverence Clock to all DC slaves. The rate of the drift
compensation commands depends on the acceptable maximum deviation.
SyncSignal Generation
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 76/218
24.02.2008 EtherCAT Communication 76
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
• Output of the Sync unit can be used for
– Interrupt generation
– PDI Digital Output Update events
• Can be mapped to
– AL Event Request Register for PDI IRQ
– SYNC0 and SYNC1
• SyncSignals can be generated at a specific System Time
• Four Operation modes are supported: – Cyclic generation
– Single shot
– Cyclic acknowledge
– Single shot acknowledge
• The second SyncSignal (SYNC1) depends on SYNC0, it can begenerated with a predefined delay after SYNC0 pulses
• Initiated alternatively from the EtherCAT master or slaveapplication side
Distributed Clocks
Sync0 / Sync1
Latch0 / Latch1PDI IRQ
Sync Unit
Latch Unit
DC
Control
System Time
Offset
Delay
Registers for SyncSignal Generation
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 77/218
24.02.2008 EtherCAT Communication 77
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
Register Address Name Description
0x0140[11:10] PDI Control Enable/Disable DC Units (power saving)
0x0151 Sync/Latch PDI Configuration Configuration of SYNC/LATCH[1:0] pins
0x0980.0 Cyclic Unit Control Assignment of cyclic function to EtherCAT orPDI
0x0981 Activation Activation of cyclic function and SYNC pins
0x0982:0x0983 Pulse Length of SYNC signals Length of SYNC impulse length
0x098E SYNC0 Status Status of SYNC0 signal
0x098F SYNC1Status Status of SYNC1 signal
0x0990:0y0997 SYNC0 Start Time Start Time of cyclic operation
0x0998:0x099F NEXT SYNC1 Pulse Next Sync1 Pulse
0x09A:0x09A3 SYNC0 Cycle Time Cycle Time of SYNC0
0x09A4:0x09A7 SYNC1 Cycle Time Cycle Time of SYNC1
SYNC0 Signal Generation modes
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 78/218
24.02.2008 EtherCAT Communication 78
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
SYNC0
Acknowlege
SYNC0
SYNC0
Single shot
Cyclic generation
Cyclic Acknowledge mode
Activation SYNC0 Cycle Time
Acknowlege
SYNC0
Single shot Acknowledge mode
Start Time
Single Shot Acknowledge*
Single Shot
= 0
Cyclic Acknowledge*= 0
Cyclic generation> 0
> 0
SYNC0 Cycle Time(0x09A0:0x09A3)
Pulse Length
of SYNC Signals(0x0982:0x0983)
* Acknowledge by reading SYNC status register (0x098E, 0x098F)
SYNC1 Signal Generation modes
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 79/218
24.02.2008 EtherCAT Communication 79
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
SYNC0
SYNC1
SYNC1 Cycle Time
SYNC0 Cycle Time
SYNC0
SYNC1
SYNC1 Cycle Time
SYNC0 Cycle Time
SYNC1 Cycle Time < SYNC0 Cycle Time
SYNC1 Cycle Time = SYNC0 Cycle Time
SYNC0
SYNC1
SYNC1 Cycle Time
SYNC0 Cycle TimeSYNC1 Cycle Time = 2*SYNC0 Cycle Time
SYNC1 Cycle Time
SYNC1 Cycle Time
SYNC0
SYNC1
SYNC1 Cycle Time
SYNC0 Cycle Time
SYNC1 Cycle Time > SYNC0 Cycle Time
and
SYNC1 Cycle Time < 2*SYNC0 Cycle Time
SYNC1 Cycle Time
Start Time
Latch Functionality
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 80/218
24.02.2008 EtherCAT Communication 80
EtherCAT BasicsSlave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
• The Latch Event unit supports time stamping of the system
time with two independent input signals
– LATCH0 and LATCH1 input signals are used(can be the same pins as for SYNC0 and SYNC1, ESC dependents)
– Time Stamping of SyncManager events is possible
• Latch on positive and/or negative edge
• Single or continuous latch configurable
• The Latch Time register (0x09B0:0x09CF) contain the timestamps
– Acknowledge by reading the Latch Time register.
Registers for Latch Input Events
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 81/218
24.02.2008 EtherCAT Communication 81
EtherCAT BasicsSlave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
Register Address Name Description
0x0140[11:10] PDI Control Enable/Disable DC Units (power saving)
0x0151 Sync/Latch PDI Configuration Configuration of SYNC/LATCH[1:0] pins
0x0980[5:4] Cyclic Unit Control Assignment of cyclic function to EtherCAT or
PDI0x09A8 Latch0 Control Latch unit configuration for Latch0
0x09A9 Latch1 Control Latch unit configuration for Latch1
0x09AE Latch0 Status Latch status of Latch0
0x09AF Latch1 Status Latch status Latch1
0x09B0:0x09B7 Latch0 Time Positive Edge Time stamp positive edge Latch0
0x09B8:0x09BF Latch0 Time Negative Edge Time stamp negative edge Latch00x09C0:0x09C7 Latch1 Time Positive Edge Time stamp positive edge Latch1
0x09C8:0x09CF Latch1 Time Negative Edge Time stamp negative edge Latch1
0x09F0:0x09F3EtherCAT Buffer ChangeEvent Time
Time stamp for ECAT SyncManager bufferchange event
0x09F8:0x09FB PDI Buffer Start Event TimeTime stamp for PDI SyncManager buffer start
event
0x09FC:0x09FF PDI Buffer Change Event TimeTime stamp for PDI SyncManager bufferchange event
Synchronization Modes
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 82/218
24.02.2008 EtherCAT Communication 82
EtherCAT BasicsSlave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
• Definition of a unique behavior of EtherCAT devices (Master and
Slaves) for synchronized applications
• Synchronization modes
– Free Run
– Synchronization with SyncManager Event,
i.e. receipt of the telegram
– Synchronization with Distributed Clocks
Synchronization Modes
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 83/218
24.02.2008 EtherCAT Communication 83
EtherCAT BasicsSlave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CommandsMemory/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
© Copyright by Beckhoff, 2008
1. Free Run
2. Synchronous to SM2/3 (with Shift)
3. DC Mode 1 (Sync0 Event)
4. DC Mode 1 (Sync0 Event with Shift)5. DC Mode 2 (Sync0, Sync1, with Shift)
6. DC Mode 3 (SM2 Event, Sync0)
7. DC Mode 4 (SM2 Event, Sync0, Sync1)
8. DC Mode with subordinated cycles
Free RunLocal Timer
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 84/218
24.02.2008 EtherCAT Communication 84
Local Timer Event
0x1C32:02 (Cycle Time)
Local Timer Event
Outputs Valid Input Latch
1C32:05 (Min Cycle Time)
Copy and prepare
outputs
Get and Copy inputs
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 85/218
Synchronous with SM2/3SM Event (Shift of Input Latch)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 86/218
24.02.2008 EtherCAT Communication 86
SM2/3 Event
0x1C32:02 (Cycle Time)
SM2/3 Event
Outputs ValidInput Latch
1C32:05 (Min Cycle Time)
Copy and Prepare
outputs
0x1C33:06 (Calc + Copy Time)
1C33:03 (Shift Time)
UserShiftTime
FrameFrame
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 87/218
DC Mode 1Sync0 Event
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 88/218
24.02.2008 EtherCAT Communication 88
Sync0 Event Sync0 Event
1C32:09 (Delay Time)
(Hardware Delay)
1C32:02 (Cycle Time) Frame
Outputs Valid Input Latch
Frame
1C32:05 (Min Cycle Time)
1C33:06 (Calc + Copy Time)
- 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
DC Mode 1Sync0 Event (Shift of Outputs Valid and/or Input Latch)
S 0 E t S nc0 E ent
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 89/218
24.02.2008 EtherCAT Communication 89
Sync0 Event Sync0 Event
0x1C32:02 (Cycle Time) Frame
Input Latch
Frame
1C32:05 (Min Cycle Time)
1C33:06 (Calc+Copy Time)
UserShiftTime
0x1C33:03 (Shift Time)
Outputs Valid1C32:09(Delay Time)
0x1C32:03 (Shift 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
DC Mode 2Sync0 Event, Sync1 Event
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 90/218
24.02.2008 EtherCAT Communication 90
Sync0 Event Sync0 Event
1C32:09 (Delay Time)(Hardware Delay)
1C32:02 (Cycle Time) Frame
Outputs Valid Input Latch
Frame
1C32:05 (Min Cycle Time)
1C33:06 (Calc + Copy Time)1C32:06
(Calc+Copy Time)
Sync1 Event
- 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
DC Mode 3SM-Event, Sync0 Event
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 91/218
24.02.2008 EtherCAT Communication 91
Sync0 Event Sync0 EventSM2/3 Event SM2/3 Event
Frame
Outputs Valid Input Latch
Frame
1C32:06
(Calc+Copy Time)
1C32:09 (Delay Time)(Hardware Delay) 1C33:06 (Calc + Copy Time)
1C32:05 (Min Cycle Time)
- 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
DC Mode 4SM-Event, Sync0 Event, Sync1 Event
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 92/218
24.02.2008 EtherCAT Communication 92
Sync0 Event Sync0 EventSM2/3 Event SM2/3 Event
Frame
Outputs Valid
Input Latch
Frame
1C32:06
(Calc+Copy Time)
1C32:09 (Delay Time)(Hardware Delay) 1C33:06 (Calc + Copy Time)
1C32:05 (Min Cycle Time)
- 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
Sync1 Event
1C33:09 (Delay Time)(Hardware Delay)
DC Mode subordinated cycles
Sync0 Event, Sync1 Event
Sync 0 Event Sync 0 Event
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 93/218
24.02.2008 EtherCAT Communication 93
Sync1 Event Sync 1 Event
0x1C32:02 CycleTime
Input Latch
MinCycleTime
0x1C33:06
(Calc+Copy Time)
Sync 0 Cycle Time
(fixed time)
MinCycleTime
0x1C33:03 (Shift Time)
Possible Output Valid /
Input Latch
Sync 0 Event Sync 0 Event Sync 0 Event
Sync 0 Event
Outputs Valid1C32:09 (Delay Time)
0x1C32:03 (Shift Time)
Sync 0 Event
Distributed Clocks in TwinCAT
Local Timer Local Timer
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 94/218
24.02.2008 EtherCAT Communication 94
Application
Frame D U Frame D U
S0
Sync0
S0
Sync0
Master
Slave
User Shift Master Includes the maximum jitter of themaster and the maximum value of
the minimum delay times of all slaves
Fixed Shift (precalc.) Frame Delay
Sync0 Shift
DC BaseMaster Shift
Application
Local Timer Local Timer
Master Settings for use of DC
DC Base DC BaseMaster Cycle Time
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 95/218
24.02.2008 EtherCAT Communication 95
DC Base DC BaseMaster Cycle Time
User Shift Master
Max. value of
0x1C33:06
Outputs validInput Latch
Input Data available at SM 3
Fixed Shift
(precalc.)
Frame D U+U-
Max. value of
0x1C32:06 + 0x1C32:09
Max Master Application Cycle Time
Master Settings for use of DC –
Slave related settings
DC Base DC BaseMaster Cycle Time
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 96/218
24.02.2008 EtherCAT Communication 96
y
Max Value of
0x1C33:06
Max. value of
0x1C32:06 + 0x1C32:09
Outputs valid Input Latch
Input Data available at SM 3
User Shift Master
Fixed Shift
(precalc.)
Frame D U+U-
Sync0 DC 1
Sync0
DC4
0x1C32:09
SYNC1 Cycle Time
Input Delay 0x1C33:09
Fixed shift, input latch cannot be met
Input Shift Time (0x1C33:03)
0x1C32:09
Sync0 DC 2 0x1C32:090x1C32:06
SYNC1
Cycle Time
0x1C32:05
Sync0
DC 3
0x1C32:090x1C32:06
0x1C32:05
0x1C32:06
Fixed shift, input latch cannot be met
Max Master Application Cycle Time
EtherCAT BasicsSlave Structure
Purpose of Application Layer (AL)
• EtherCAT State Machine
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 97/218
24.02.2008 EtherCAT Communication 97
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT State Machine
– Boot-up of device and network
• Mailbox Interfaces and Protocols
– Access Parameter of a device
– Asynchronous transfer
• Protocols
– Ethernet over EtherCAT
– CANopen over EtherCAT
– Filetransfer over EtherCAT
– Servo Drive over EtherCAT
• Slave Information Interface (SII)
– Information about the device's features and configuration
ApplicationApplication
e.g. CiA402 Drive Profile
HTTP,
FTP, ..Appli-
cation
Object Dictionary ApplicationLa erTCP UDP
PDO Mapping
….
/
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 98/218
24.02.2008 EtherCAT Communication 98© Copyright by Beckhoff, 2007
EtherCAT Slave Controller (ESC)
PHY
T r af o
R J 4 5 PHY
T r a f o
R J 4 5
FMMU
SyncMan1 MbxIn
SII
EEPROM
MII / EBUS
Port 3
MII / EBUS
Port 1
EtherCAT Processing Unit
and Auto-Forwarder with Loop Back
LVDS C on
Process DataMailboxRegisters
DataLink
Layer
(DL)
Physical
Layer
(PL)
FMMU
SyncMan2 SyncMan3
SDO PDO...
Layer
(AL)File
Access
TCP, UDP
ESC Address Space (DPRAM)
FMMUFMMU n
IP
PDO Mapping
CoECoEEoEFoEVoE
Process Data Interface (µC, SSI, I/O )
PHY
Management
FMMU n
SyncMan0 MbxOut
RD / WR
MII / EBUS
Port 0
MII / EBUS
Port 2
Ethernet HDRLRWProcess DataFPWRMailbox DataMore Datagrams..FCS ECAT HDR
W
K C
W
K C
H
D R
H
D R
Mailbox DLL
0x0000 0x1000
EtherCAT BasicsSlave Structure
Purpose of EtherCAT State Machine
• State Machine is build upon the Data Link Layer
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 99/218
24.02.2008 EtherCAT Communication 99
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
State Machine is build upon the Data Link Layer
• Defines general communication states of EtherCAT slave
devices
• Specifies the initialization and error handling of EtherCAT
slave devices Boot-up of the network
• States correspond to the communication relationship
between master and slave
• Requested and current state of a slave device are
reflected in the AL Control and AL Status registers
• Five states are defined:
– ‘Init’, ‘Pre-Operational’, ‘Safe-Operational’,
‘Operational’ – ‘Bootstrap’ optional state for firmware updates
EtherCAT BasicsSlave Structure
EtherCAT State Machine
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 100/218
24.02.2008 EtherCAT Communication 100
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Init
(IP)
Pre-Operational
Operational
Safe-Operational
(OP)
(PI)
(PS) (SP)
(OS)(SO)
(SI)
(OI)
Bootstrap(optional)
(IB) (BI)
EtherCAT BasicsSlave Structure
State Machine / Init
• ‘Init’ StateInit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 101/218
24.02.2008 EtherCAT Communication 101
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• No communication on the
Application Layer
• Master has access to the
DL-Information registers
• Transition to ‘Pre-Operational’
• Master configures register, at least: – DL Address register
– Sync Manager channels for Mailbox communication
• Master requested ‘Pre-Operational’ state
– sets AL Control register
– wait for AL Status register confirmation
Pre-Operational
Operational
Safe-Operational
EtherCAT BasicsSlave Structure
State Machine / Pre-Operational
• ‘Pre-Operational’ StateInit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 102/218
24.02.2008 EtherCAT Communication 102
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
p
• Mailbox communication on the
Application Layer
• No Process Data communication
• Transition to ‘Safe-Operational’
• Master configures parameter using the Mailbox
– e.g.: Process Data Mapping• Master configures DL Register
– SyncManager channels for Process Data
communication
– FMMU channels
• Master requested ‘Safe-Operational’ state
Pre-Operational
Operational
Safe-Operational
EtherCAT BasicsSlave Structure
D i M d l (ISO/OSI)
State Machine / Safe-Operational
• ‘Safe-Operational’ StateInit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 103/218
24.02.2008 EtherCAT Communication 103
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Mailbox communication on the
Application Layer
• Process Data communication,
but only Inputs are evaluated –
Outputs in ‘Safe’ state
• Transition to ‘Operational’
• Master sends valid Outputs
• Master requested ‘Operational’ state
(AL Control/Status)
Pre-Operational
Operational
Safe-Operational
EtherCAT BasicsSlave Structure
Device Model (ISO/OSI)
State Machine / Operational
• ‘Operational’ StateInit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 104/218
24.02.2008 EtherCAT Communication 104
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 ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Inputs and Outputs are valid Pre-Operational
Operational
Safe-Operational
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
State Machine / Bootstrap
• ‘Bootstrap’ StateInit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 105/218
24.02.2008 EtherCAT Communication 105
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• ‘Bootstrap’ State is optional –
but recommended if firmware
updates necessary
• State changes only from and to ‘Init’
• No Process Data communication
• Communication via Mailbox on Application Layer
• Special mailbox configuration possible,e.g. larger mailbox size
• Only FoE protocol available (possibly limited “file” range)
Pre-Operational
Operational
Safe-Operational
Bootstrap
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
State Machine / Control and Status
• Requested and current state of a slave device are
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 106/218
24.02.2008 EtherCAT Communication 106
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
reflected in the AL Control and AL Status registers
– AL Control (0x0120)
Initiate State Transition of Device State Machine
– AL Status (0x0130)
Actual State of Device State Machine
– AL Status Code (0x0134)
Reason of error or other status code
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Diagnosis at Application Layer
• AL Status Code (0x0134)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 107/218
24.02.2008 EtherCAT Communication 107
( SO/OS )
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
– Error Codes (extract)
– Further Status Codes (extract)
Sync manager watchdog0x001B
Synchronization error 0x001A
No valid outputs0x0019
No valid inputs available0x0018
Invalid mailbox configuration0x0015
Invalid requested state change0x0011
No Error 0x0000
DescriptionCode
Invalid DC Latch Configuration0x0031
Invalid DC Sync Configuration0x0030
Slave need PREOP0x0022
Slave needs INIT0x0021
DescriptionCode
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Mailbox Transfer
ValueIndex
Device Parameter (example)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 108/218
24.02.2008 EtherCAT Communication 108
( )
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Full duplex capable
Mailbox Transfer for Parameter Data
DVI
IPC
....
Statusword0x6041
Controlword0x6040
Actual values0x2070
Motor parameter 0x2040
Velocity control0x2010
Current control0x2000
TxPDO Mapping0x1A00
RxPDO Mapping0x1600
Simple IO-Device
No Parameter
No Mailbox necessary
State "PreOperational"
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 109/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Mailbox Protocol Types
• Ethernet over EtherCAT (EoE)– Tunnels standard Ethernet Frames over EtherCAT
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 110/218
24.02.2008 EtherCAT Communication 110
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Tunnels standard Ethernet Frames over EtherCAT
• CANopen over EtherCAT (CoE)
– Access of a CANopen object dictionary and its objects
– CANopen Emergency and optional event driven PDOmessages
• File Access over EtherCAT (FoE)
– Download and upload firmware and other ‘files’
• Servo Drive over EtherCAT (SoE)
– Access the Servo Profile Identifier (IDN)
• Vendor specific Profile over EtherCAT (VoE)
– First DWORD contains the Vendor ID, the next WORDcontains a Vendor Type, the rest is vendor specific
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Mailbox Interface
• Datagram within an EtherCAT Frame
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 111/218
24.02.2008 EtherCAT Communication 111
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EC Header Type = 1
EtherCAT Data
1st EtherCAT Datagram nth EtherCAT Datagram…
Ethernet Header Type = 88A4h
FCS
2nd …
Datag. Header Data WKC
Mailbox Protocol
Mbx Header Command Cmd specific data
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Ph i l L
Mailbox Header
Mbx Header Command Cmd specific data
48 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 112/218
24.02.2008EtherCAT Communication 112
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Length0
Address Channel Prio Type Cntr
16 Bit 16 Bit 6 Bit 2 Bit 4 Bit 4 Bit
16 32 38 40 44
Length of following dataLength
Station Address of originator Address
reserved for future useChannel
reserved for future usePriority
Sequence number for duplicate detection
Increments with every new mailbox service(only the values 1-7 will be used to be compatible with older versions).
Counter
Mailbox Type, Protocol identifier for following data0 Mailbox Error
2 EoE (Ethernet over EtherCAT)
3 CoE (CANopen over EtherCAT)
4 FoE (File Access over EtherCAT)
5 SoE (Servo Drive over EtherCAT)15 VoE (Vendor specific profile over EtherCAT)
Type
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Ph i l L
Mailbox Error Handling Procedure
• Reliable way of mailbox data exchange
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 113/218
24.02.2008EtherCAT Communication 113
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Mailbox control procedure
• Recover from lost frames
• No additional frames if no error
• Additional receive buffer required
• Extra counter in mailbox header needed
• HW/SW solution
– SyncManager configuration register with toggle flags
– SW-Mailbox-DL Layer for checking toggle bits
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Mailbox Error Handling – Sync Manager
• Sync Manager channel configuration registers
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 114/218
24.02.2008EtherCAT Communication 114
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device ProfilesModular Devices
Drives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
WTStart Address Length Ctrl Status
16 Bit 16 Bit 8 Bit 8 Bit
0 16 32 40E Res.
6 Bit1
48 49 63D Res.
6 Bit1
56 5850RT
57
1 1
WT – SM Write Toggle
RT – SM Read Toggle
• Following:
– Mailbox Error Handling - Write Example – Mailbox Error Handling - Read Example
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Mailbox Error Handling – Mailbox Write
Master Slave
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 115/218
24.02.2008EtherCAT Communication 115
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
MBX_MailboxWriteInd
FPWR response got lost,
Master repeats the MailboxWrite without incrementing
the Mbx Hdr Ctr
Slave receives Mailbox Write Event
and calls MBX_MailboxWrite Ind
to start the handling on the MailboxWrite service
Mailbox Write (Mbx Hdr Ctr=1)
Mailbox Write (Mbx Hdr Ctr=1)
Slave receives Mailbox Write Event,
detects an unchanged counter
in the mailbox header and discard
the Mailbox Write Service
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Mailbox Error Handling – Mailbox Read
Master
Slave
Slave puts the Mailbox Read service
MBX_MailboxSendReq(pMbx)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 116/218
24.02.2008EtherCAT Communication 116
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
FPRD response got lost,
Master starts a repeating
sequence and shall notread the mailbox again
before the repeating
sequence is finished
in the send mailbox and stores
the actual sent buffer
Slave receives Mailbox Read Event
and stores the sent buffer for a
possibly repeated service
psReadMbx = pMbxMaster sends FPRD service,
to read the mailbox
psRepeatMbx = psReadMbx
Slave detects the Mailbox Repeat
request by checking the SM-Write-
Toggle, puts the psReceiveMbx
buffer in the Send mailbox and
toggles the SM-Read-ToggleMaster reads cyclically
the SM-Read-Toggle tocheck if the Slave has
finished the repeat request
When the SM-Read-Toggle
has toggled the master reads
the send mailbox again
Mailbox Read
Mailbox Repeat (toggles SM-Write-Toggle)
Read SM-Read-Toggle
Mailbox Read (Mbx Hdr Ctr=1)
Mailbox Read
Mailbox Read (Mbx Hdr Ctr=1)
psReadMbx = psRepeatMbx
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Ethernet over EtherCAT (EoE)
Web server
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 117/218
24.02.2008EtherCAT Communication 117
y y
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
virtual
Ethernet
Switch
Functionality
virtual MAC Address
IP Address
Label printer Web access on device with
web server
Even via
Internet
Switchport-
Terminal
Master
TCP/IP
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Purpose of Ethernet over EtherCAT (EoE)
• Tunnels transparently Ethernet Frames over EtherCAT
• Tunneling reduces the cycle times without restrictions and
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 118/218
24.02.2008 EtherCAT Communication 118
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
Tunneling reduces the cycle times without restrictions and
to optimized available bandwidth
• Used for devices with TCP/IP stacks (e.g. Web Server)
and for infrastructure devices like Switch Terminals
• Allows to access corresponding devices in the normal IP
network in combination with a ‘Virtual Ethernet Switch’
(Layer 2) on the master side
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
EoE – Switchport: Any Ethernet Protocol
• Interface to any Ethernet Device or Network
• Ethernet Frames are inserted in EtherCAT Protocol
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 119/218
24.02.2008 EtherCAT Communication 119
Data Link Layer
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
Ethernet Frames are inserted in EtherCAT Protocol
EtherCAT Switchport
EtherCAT MAC / DLL PHYPHY
Process DataMailbox
µC
Ethernet MAC PHY
Fragmentation
TX1TX2TX3
TX
TX2TX3TX1
RX RX4RX1 RX2 RX3
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
EoE – Frame Header
Mbx Header Type = 2 (EoE)
EoE Cmd Cmd specific data
4 Byte8 Byte Max. 1476 Byte
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 120/218
24.02.2008 EtherCAT Communication 120
Data Link Layer
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
Type
4 Bit
Port
4 Bit
LF
1B
TA TR
1B 1B
res
5B
Frag.
NoSize
Frame
No
6 Bit 6 Bit 4 Bit
Number of the Ethernet FrameFrame No
Complete size of Ethernet FrameSize
Fragment Number of the Ethernet Frame fragmentFragment No
Time stamp requestTR
Time stamp appended (only if LF=1)TA
Last fragmentLF
Selected PortPort
EoE Frame Type0x00 EoE Fragment Request
0x01 Initiate EoE Request
0x02 IP Parameter Request
0x03 IP Parameter Response
0x04 Set MAC Address Filter Request0x05 Set MAC Address Filter Response
Type
EoE Header
Mailbox Header (Type = 2) EoE Following Data
32 Bit48 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 121/218
24.02.2008 EtherCAT Communication 121© Copyright by Beckhoff, 2008
Mailbox Header (Type = 2) EoE Following Data
LF FrameNoOffset/BufferSizeFragmentNo
6 Bit 4 Bit4 Bit
Last Fragment: Indicates the last fragment (Type=0 only)
FragmentNo = 0: Contains needed buffer size
FragmentNo > 0: Offset of the fragment
(Multiplied with 32)FrameNo: Increments each new Ethernet Frame
Type Port TA TR Res
4 Bit 1 Bit 6 Bit1 Bit 1 Bit 5 Bit
0 = Frame Fragments follows
1 = Time Stamp Response follows
2 = IP Settings Req follows
3 = IP Settings Res follows
4 = MAC Filter Settings Req follows
5 = MAC Filter Settings Res follows
6-15 = Reserved
Must be valid if LF=1
0 = unspecified
1 = Send/Received on Port 12 = Send/Received on Port 2
… Timestamp appended (only if LF=1)
Timestamp requested
Result (IP and MAC Filter Response)
EoE – Frames
EoE (Mbx Type = 2) n * 32 Byte(except for the last fragment)
32 Bit
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 122/218
24.02.2008 EtherCAT Communication 122© Copyright by Beckhoff, 2008
Mbx Header Fragment DataEoE Header (Type=0, TA=0)
Mbx Header Fragment DataEoE Header (Type=0,LF=1,TA=1) Time Stamp
Mbx Header IP Settings
Mbx Header MAC Filter Settings
Mbx Header
EoE Header (Type = 2)
EoE Header (Type = 4)
EoE Header (Type = 1) Time Stamp
Mbx Header EoE Header (Type = 3)
Mbx Header EoE Header (Type = 5)
IP Settings Response
MAC Filter Settings Response
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 123/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
EoE – Time Stamp
• Time Stamp – 32 Bit Timing information with 1 ns resolution
– DC System Time if available (Register 910h)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 124/218
24.02.2008 EtherCAT Communication 124
Data Link Layer
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
DC System Time if available (Register 910h)
– Time stamp trigger is the beginning of Destination Address (DA) in the Ethernet Frame
• Time stamp appended (TA = 1)
– Slave to Master:Time stamp contains exact receive time
– Master to Slave:
Time Stamp contains desired send time – Time stamp extends frame data by 32 Bit
– TA is allowed in last fragment only (LF = 1).If necessary, add additional fragment
• fill the “last” fragment with parts of the Time Stamp(LF=0, TA=0) and send a very last fragment with therest of the Time Stamp (LF=1, TA=1)
– Slave should always append a Time Stamp if it has thisfeature
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 125/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
EoE – Error Handling
• No special Error Handling required!
• EoE is a Layer 2 Protocol – logical like an Ethernet Switch
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 126/218
24.02.2008 EtherCAT Communication 126
Data Link Layer
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
• If a fragment is missing, the whole frame will be discarded
• Frame loss is recognized at higher levels
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 127/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
EtherCAT Device
CANopen over EtherCAT Device Architecture
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 128/218
24.02.2008 EtherCAT Communication 128
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
EtherCAT Slave Controller
Process DataMailbox
Ethernet Physical Layer
Service Data Objects
Object Dictionary
PDO Mapping
CoE CoE
CANopen Application
Process Data
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
CoE –Frame Header
Mbx Header Type = 3 (CoE)
CoE Cmd Cmd specific data
9 Bit 3 Bit 4 Bit
2 Byte8 Byte Max. 1478 Byte
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 129/218
24.02.2008 EtherCAT Communication 129
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
MailboxMailbox 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
© Copyright by Beckhoff, 2008
Number
9 Bit
res
3 Bit
Type
4 Bit
PDO Number (PDO transfer only)Number
Message Type0 reserverd
1 Emergency Message
2 SDO Request
3 SDO Response
4 TxPDO
5 RxPDO
6 Remote transmission request of TxPDO
7 Remote transmission request of RxPDO
8 SDO information
9-15 reserved for future use
Type
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
CANopen over EtherCAT (CoE)
• SDO: Access to a CANopen object dictionary ✔✔✔✔ – Download and Upload of parameters
Standard Process Data Mapping (PDO Mapping)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 130/218
24.02.2008 EtherCAT Communication 130
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
Standard CANopen Features
– Standard Process Data Mapping (PDO Mapping)
– Full Access to CANopen Profiles
• PDO: Process Data Objects (over CoE!) ✔
– Direct PDO transfer
– Remote Transmission Requests of PDOs
• Emergency Messages ✔ (not used)
• + Object Dictionary Information (SDO Information)
– Upload of object dictionary (identifier lists) – Upload of object description
– Upload of entry descriptions
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
F S
CoE – Standard CANopen Frames
Mbx Header Type = 3 (CoE)
CoE Cmd Cmd specific data
8 Bit8 Bit 16 Bit
2 Byte8 Byte Max. 1478 Byte
32 Bit 1 .. 1470 Byte
Typ = 2 or 3
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 131/218
24.02.2008 EtherCAT Communication 131
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
SDO
ControlIndex Subindex
Optionally more than 4 bytes of data can be sent
with one frame.
Full mailbox size usable
Data (optional)
Data for the SDO-ServiceData
… and SubindexSubindex
Standard CANopen SDO ServicesSDO Control
Object Addressing by Index …Index
DataData
(optional)
Standard CANopen Frame
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
F St t
SDO Download Services differences
Mbx Header
CoE
ExpeditedService
NormalService
SegmentedService
z e
Mbx Header
CoE
Mbx Header
CoE
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 132/218
24.02.2008 EtherCAT Communication 132
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
Data<=4 ByteMailbox
Mbx size* = Mbx size – Mbx-Header – CoE-cmd – SDO-Cntrl – Index - Subindex
M B x S i z
4Byte<Data<Mbx size* Data > Mbx size*
Mbx Header
CoE
Mbx Header
CoE
Mbx Header
CoE
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Object Dictionary – Example CoE Drive
0x6040
0x6041
0x607A
Index Typ
Variable
Subindex (SI)
No Subindex available
Parameterliste
Controlword
Statusword
Target position
Name
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 133/218
24.02.2008 EtherCAT Communication 133
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
EtherCAT
0x607A
0x60FF
0x6064
0x6060
0x6061
0x60F4
0x6065
0x1000
0x6091
0x1018
0x607B Array
Record
Min Pos. Range limit 0x607B SI1
Number of SIs 0x607B SI0
Max Pos. Range limit 0x607B SI2
Vendor ID 0x1018 SI1
Number of SIs 0x1018 SI0
Product Code 0x1018 SI2
Revision Number 0x1018 SI3
Serial Number 0x1018 SI4
Target position
Target velocity
Position actual value
Modes of operation
Modes of operation display
Following error actual value
Following error window
Device Type
Gear Ratio
Identity object
Position Range limit
Read: "Modes of operation display"Read: 0x6061Read: 0x1018, 03
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Object Dictionary – Example CoE Drive
0x6040
0x6041
0x607A
Index
Parameterliste
Controlword
Statusword
Target position
Name
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 134/218
24.02.2008 EtherCAT Communication 134
Frame Structure
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
EtherCAT
0x607A
0x60FF
0x6064
0x6060
0x6061
0x60F4
0x6065
0x1000
0x6091
0x1018
0x607B
Target position
Target velocity
Position actual value
Modes of operation
Modes of operation display
Following error actual value
Following error window
Device Type
Gear Ratio
Identity object
Position Range limit
Prozessdaten Info
0x1600Output Mapping (RxPDO)
Cyclic Outputs
Record
No of SI's = 3
1st RxPDO = 0x6040 00 10
2nd RxPDO = 0x60FF 00 20
3rd RxPDO = 0x6060 00 10
Index Subindex Bitlength
assembly ofRxPDO
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 135/218
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing through DL and AL (SDO Access)
IPC Add = 1 Add = 2 Add = 3
CoE Object Dictionary
0x1018:01 Vendor ID
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 136/218
24.02.2008 EtherCAT Communication 136
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
DVI....
FCS W
K C
SyncMan1
Process DataMailbox
SyncMan2 SyncMan3
ESC Address Space (DPRAM)
FMMU
SynMan00x1000
FMMU n
Ethernet
HDR
ECAT
Cmd
ECAT
HDR Add
Add
Offset
0x1018 13 1000FPWR Type=3
(CoE) Download Req
DL
AL
Mbx Hdr CoE Cmd
SDO
Control Index
Sub
index Data
SDO Request
Vendor
ID
0x1018:01 Vendor ID…
0x607A:00 Target Position
…
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing through DL and AL (PDO Access)
IPC Add = 1 Add = 2 Add = 3
CoE Object Dictionary
0x1018:01 Vendor ID
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 137/218
24.02.2008 EtherCAT Communication 137
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
DVI....
FCS W K C
ProcessdataEthernet
HDR
ECAT
CmdECAT
HDRLog Add
10000LWR
AL
0x1018:01 Vendor ID
0x1600 Mapping&Assign
Process Data
SyncMan2 SyncMan3
ESC Address Space (DPRAM)
FMMU
0x1000
FMMU n
DL
Log Address = 10000
0x1800
Mailbox
SyncMan0 SyncMan1
Raw data
0x607A:00 Target Position
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Example: ‘Initiate SDO Download’ Request
Mailbox Header CoE SDO
6 Byte 2 Byte
Data (optional)
8 Byte
Mailbox Size
the originalCANopen Protocol
(CiA DS301)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 138/218
24.02.2008 EtherCAT Communication 138
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
DataIndexI
8 Bit 32 Bit16 Bit
0 32 630-4 Bytes E Size C Ccs Sub
1 2 4 5 8 24
Complete SizeIndexI0 32
E Size C Ccs Sub1 2 4 5 8 24
1 1 4-n 0 1
Data 7-n64
0 0 0 0 1
Data > Mailbox: ‘Download SDO Segment’ follows
L0
Size T Ccs1 4 5
Data 0-68
0/1 0 0/1 0<= 7 Bytes
L0
Size T Ccs1 4 5
Data 0-n8
0/1 7-n 0/1 0
63
Data 0-n64
Expedited
> 4 Bytes
> 7 Bytes
left
= Initiate SDO Download Request
= Download SDO Segment Request
Length of Mbx Service Data
Example: Expedited Download
SDO Downl. Expedited Req:Size Indic. = 1
Transfer Type = 1 (Expedited)
Client Server
SDO Download Res.Size Indic = 0
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 139/218
24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 139
M a i
l b o x
Transfer Type = 1 (Expedited),
Data Set Size = 0..3
Cmd = 0x01 (Dwnl. Req.)
Index, Subindex
Data
Size Indic. = 0
Transfer Type = 0,Cmd = 0x03 (Dwnl. Res.)
Index, Subindex
Datablock
Example: Normal Download
SDO Downl. Normal Req:Size Indic. = 1
Transfer Type = 0 (Normal)
Client Server
SDO Download Res.Size Indic = 0l b
o x
al o c k
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 140/218
24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 140
Transfer Type 0 (Normal)
Data Set Size = 0
Cmd = 0x01 (Dwnl. Req.)
Index, Subindex
Complete SizeData
Size Indic. = 0
Transfer Type = 0,Cmd = 0x03 (Dwnl. Res.)
Index, Subindex M a i
D a t
D
a t a b l
Example: Segmented Download
i l b o x SDO Downl. Normal Req:
Size Indic. = 1Transfer Type = 0 (Normal),
a
Client Server
SDO Download Res.Size Indic. = 0
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 141/218
24.02.2008 EtherCAT CommunicationEtherCAT TC Meeting (Fußzeile) 141
M a i
D a t a b l o c k
yp ( )
Cmd = 0x01 (Dwnl. Req.)
Index, Subindex
Complete Size
Data
D a t a
Size Indic. 0
Transfer Type = 0 (Normal),Cmd = 0x03 (Dwnl. Res.)
Index, Subindex
M a i l b o x
M a i l b o x
SDO Downl. Segment Req:More Follows = 0
Seg. Data Size = 0Toggle
Cmd = 0x00 (Dwnl. Seg. Req.)
Data
SDO Download Seg. Res.Toggle
Cmd = 0x01 (Dwnl. Seg. Res.)
SDO Downl. Segment Req:More Follows = 1 (last)
Cmd = 0x00 (Dwnl. Seg. Req.)
Seg. Data Size = 0
Toggle
Data
SDO Download Seg. Res.Toggle
Cmd = 0x01 (Dwnl. Seg. Res.)
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Optional SDO Extensions to CANopen DS 301
• Breaking of the 8 byte border – Full mailbox size usable Block transfer unnecessary
‘Initiate SDO Download’ request /
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 142/218
24.02.2008 EtherCAT Communication 142
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
– Initiate SDO Download request /
‘SDO Upload’ response can contain data after SDOheader
– ‘Download SDO Segment’ request /‘Upload SDO Segment’ response can contain morethan 7 bytes of data
• Downloading and Uploading all Subindices at once
– Bit 4 of the Initiate ‘SDO Download / Upload’ requestheader indicates a ‘Complete Access’ to an Index
– Sub Index field contains the start Subindex• 0: Complete Index with all Subindices
• 1: Complete Index without Subindex 0
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE: Optional SDO Information Protocol
• Access to object lists – list of all supported object identifiers
– list of all object identifiers that can be mapped in
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 143/218
24.02.2008 EtherCAT Communication 143
Addressing
Commands
Memory/RegistersSyncManager
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
© Copyright by Beckhoff, 2008
PDOs
– list of all object identifiers that should be included ina backup
• Access to object descriptions
– Descriptions of objects – as defined in DS 301
• Access to entry descriptions
– Descriptions of object entries (sub index) – as
defined in DS 301
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE – Object Dictionary
• Devices with an EtherCAT-CoE and a CANopen interfaceare possible with the same object dictionary
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 144/218
24.02.2008 EtherCAT Communication 144
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
© Copyright by Beckhoff, 2008
MeaningIndex Range
reserved0xA000 – 0xFFFF
Profile specific0x6000 – 0x9FFF
Manufacturer specific0x2000 – 0x5FFF
Communication objects• Device Type, Identity, PDO Mapping – like defined in DS 301
• Objects defined in DS 301 not needed are reserved for EtherCAT
• Additional objects (Sync Manager Communication Type, Sync
Manager PDO Assignment) located in unused areas of DS 301
0x1000 – 0x1FFF
Data Type Description0x0000 – 0x0FFF
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 145/218
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE – New objects for EtherCAT
MeaningIndex
SyncManager Parameter0x1C30 – 0x1C4F
SyncManager PDO Assign0x1C10 – 0x1C2F
SyncManager Communication Type0x1C00
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 146/218
24.02.2008 EtherCAT Communication 146
g
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• SyncManager Communication Type
– Subindex (1-32) defines communication type of the corresponding SyncManager channel
• Mailbox Out (= 1 buffer write)
• Mailbox In (= 1 buffer read)
• Process Data Out (= 3 buffer write)
• Process Data In (= 3 buffer read)
• SyncManager PDO Assign
– Contains a list of assigned PDOs for each Sync Manager channel(Index of PDO mapping objects)
– Assigned PDO in Subindex 1 to n describe the process data parts of the SyncManager channel
• SyncManager Parameter
– SubIdx 1: Synchronization type(Freerun, synchron, DC Sync0, DC Sync1, SyncSm0 .. SyncSm1F)
– SubIdx 2: Cycle time
– SubIdx 3: Shift time
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE – Process Data Objects (via Mailbox)
Process DataCoE Header
(Type = 4 or 5)Mailbox Header
2 Bytes6 Bytes 1..8 Bytes
Data
1..n Bytes
Standard CANopen PDO frame optionalMandatory Header
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 147/218
24.02.2008 EtherCAT Communication 147
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Standard CANopen PDO frames can be used
• CANopen PDO mapping used for EtherCAT too
• PDOs usually are related to their „own“ Sync Manager
channels – Cyclic data transmission
– No PDO communication parameters necessary
• PDOs can be transmitted by the mailbox for acyclic
communication
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE – PDO Process Data mapping
• No mapping protocol implemented for very simple devices – Fixed process data
– Readable via EEPROM – no SDO protocol necessary
R d bl PDO M i
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 148/218
24.02.2008 EtherCAT Communication 148
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Readable PDO Mapping
– Fixed process data mapping
– Readable via SDO
• Selectable PDO Mapping
– Multiple fixed PDO – selectable via CoE object (1C1xh) – Selectable via SDO (required)
• Variable PDO Mapping
– Configurable via CoE or SoE required
– Writable PDO content
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
CoE – PDO Configuration
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 149/218
24.02.2008 EtherCAT Communication 149
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 150/218
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
C d
File Access over EtherCAT (FoE)
• Similar to TFTP (Trivial File Transfer Protocol, RFC 1350)
• Simple to implement – suitable for bootstrap loaders
• 6 Services are defined:
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 151/218
24.02.2008 EtherCAT Communication 151
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• 6 Services are defined:
– WRQ: Write request with “file name” – RRQ: Read request with “file name”
– DATA: Data block (full mailbox size used)
– ACK: Acknowledgment of DATA and WRQ requests
– ERR: Error notification with predefined error codes
– BUSY: Busy notification in case of longer procedures,extension to TFTP (e.g. erasing of flashmodules)
• Special mailbox configuration for bootstrap mode possible
– Fixed addresses and fixed size of the mailbox – Configuration defined by device (EEPROM)
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
File Access over EtherCAT (WRQ, normal)
Master Slave
WRQ (with file name)
ACK (packet no 0)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 152/218
24.02.2008 EtherCAT Communication 152
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
DATA (packet no 1, full mailbox)
ACK (packet no 1)
DATA (packet no 2, full mailbox)
ACK (packet no 2)
DATA (packet no 3, less data or zero data)
ACK (packet no 3)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 153/218
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
File Access over EtherCAT (WRQ, with error)
Master Slave
WRQ (with file name)
ERR (error code and optional error text)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 154/218
24.02.2008 EtherCAT Communication 154
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
ERR (error code and optional error text)
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
File Access over EtherCAT (RRQ, normal)
Master Slave
RRQ (with file name)
DATA (packet no 1, full mailbox)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 155/218
24.02.2008 EtherCAT Communication 155
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
ACK (packet no 1)
DATA (packet no 2, full mailbox)
ACK (packet no 2)
DATA (packet no 3, less data or zero data)
ACK (packet no 3)
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Servo Drive over EtherCAT (SoE)
• Implements Service Channel – Read / Write to several elements of an IDN (Ident number)
– Support of Procedure Commands
– Slave Info
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 156/218
24.02.2008 EtherCAT Communication 156
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• The mapping of the IEC 61800-7-1 Annex D (SERCOS™) on
EtherCAT is described in IEC 61800-7-3 Annex D
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
SoE – Frame Header
Mbx Header Type = 5 (SoE) SoE Cmd Cmd specific data
4 Byte
Cmd
3 Bit
Incomp
1 Bit
Drive
3 Bit
Err
1 Bit
Element
8 Bit
IDN
16 Bit
6 Byte Max. 1476 Byte
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 157/218
24.02.2008 EtherCAT Communication 157
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
contains IDN according to IEC 61800-7-2 Annex D
or an indicator for fragments left in case of segmented service
IDN
Contains the ElementFlags. There is a single Flag for each
element of an IDN indicating which elements of the object
addressed by the IDN are accessed
Element
Indicates if an Error has occurredError Contains the address of the drive inside the slave device that is
addressed
Drive
Indicates if execution of another service is needed to complete
the operation
Incomplete
Command TypeRead Request, Read Response, Write Request, Write Response, Notification, SlaveInfo
Command
EtherCAT Basics
Slave StructureDevice Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
SoE Communication phases
Init
(IP)
Pre Operational
(PI)
(SI)
Phase 0 / 1
Phase 2
EtherCATIEC 61784
CPF 16
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 158/218
24.02.2008 EtherCAT Communication 158
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 DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Pre-Operational
Operational
Safe-Operational(OP)
(PS) (SP)
(OS)(SO)
(SI)
(OI)
Phase 2
Phase 3(with Inputs)
Phase 4
(S-0-0128)
(S-0-0127)
• SERCOS communication phases (CPs) comparable to EtherCAT state machine
• Phases 0 and 1 covered by the ‘Init’
• Phase 2 corresponds to ‘Pre-Operational’
• allows access to the IDNs via ‘service channel’ (SoE).• Phase 3 mapped to ‘Safe-Operational’
• slave shall transmit valid inputs, ignore outputs from the master.
• ‘Operational’ corresponds to phase 4
• all inputs and outputs are valid.
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Obsolete IDN
Minimum feedback acquisition time (T4min)S 0 0005
Transmit/receive transition time (TATMT)S-0-0004
Minimum AT transmit starting time (T1min)S-0-0003
DescriptionIDN
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 159/218
24.02.2008 EtherCAT Communication 159
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
C200 Communication phase 4 transition check
Functionality done in EtherCAT transition from ‘Safe-Operational’ to ‘Operational’. If thetransition fails, the reason for this failure can be evaluated via S-0-0022.
S-0-0128
C100 Communication phase 3 transition check
Functionality done in EtherCAT transition from ‘Pre-Operational’ to ‘Safe-Operational’.
If the transition fails, the reason for this failure can be evaluated via S-0-0021.
S-0-0127
Command value transmit time (TMTSG)S-0-0090
Receive to receive recovery time (TMTSG)S-0-0088
Length of master data telegram (MDT LEN)S-0-0010
Beginning address in master data telegram (MDT POS)S-0-0009
Minimum feedback acquisition time (T4min)S-0-0005
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
M /R i t
Changed IDN
Interface status
This parameter should reflect DL status AL status and AL status code of EtherCAT
S-0-0014
AT Transmission starting time (T1)
T1 specifies the time offset from the EtherCAT sync signal to the time until theapplication shall provide new AT data inside the EtherCAT slave controller memory.
S-0-0006
Meaning with SoEIDN
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 160/218
24.02.2008 EtherCAT Communication 160
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
MDT Transmit starting time (T2)
T2 specifies the time offset from the EtherCAT sync signal to the time until new MDTdata are available inside the EtherCAT slave controller memory.
S-0-0089
MST error counter
MST error counter indicates missing Datagrams for cyclic data transfers
This parameter should reflect RX-error counter and Lost-link counter of EtherCAT
S-0-0028
This parameter should reflect DL status, AL status and AL status code of EtherCAT
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
Synchronisation Mapping
• CPF16 Phase 0-2• No synchronisation between master and slave.
• Service channel communication via EtherCAT mailbox.
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 161/218
24.02.2008 EtherCAT Communication 161
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• CPF16 Phase 3-4
• Synchronisation via ‘Distributed Clock’ (DC) or by Sync
Manager event.
• Master configures the DC unit to generate a sync event.• The sync event is set typically at the end of communication
(Sync Manager event operates in the same way).
• The sync signal compares to the end of MST telegram as
defined in SERCOS part of IEC 61158-6.
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
Process Data Mapping
• Sync Manager 2 for Output Databuffered mode, contains MDT data
• Sync Manager 3 for Input Data
mailbox mode, contains AT data
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 162/218
24.02.2008 EtherCAT Communication 162
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• MDT, AT configured via S-0-0015, S-0-0016 and S-0-0024.
• Process data consists of drive control/status word followed
by S-0-0015, S-0-0016, S-0-0024 defined values.
• Service channel data not included in process data.
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 163/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
Slave Information Interface (SII)
DVI....
EDS
XML
Slave
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 164/218
24.02.2008 EtherCAT Communication 164
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
PHY PHY T r a f o
T r af o
R J 4 5
R J 4 5
ESC
HostCPU
EEPROM
ESC
Configuration
Data
Application Application
e.g. CiA402 Drive Profile
HTTP,
FTP, ..Appli-
cation
SDO
Object Dictionary
PDO...
Application
Layer(AL)
File Access
TCP, UDP
IP
PDO Mapping
CoECoEEoEFoEVoE
Process Data Interface (µC, SSI, I/O )
….
RD / WR
Mailbox DLL
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 165/218
24.02.2008 EtherCAT Communication 165© Copyright by Beckhoff, 2007
EtherCAT Slave Controller (ESC)
PHY
T r af o
R J 4 5 PHY
T r a f o
R J 4 5
FMMU
SyncMan1 MbxIn
SII
EEPROM
MII / EBUS
Port 3
MII / EBUS
Port 1
EtherCAT Processing Unit
and Auto-Forwarder with Loop Back
LVDS C on
Process DataMailboxRegisters
Data
LinkLayer
(DL)
Physical
Layer
(PL)
FMMU
SyncMan2 SyncMan3
ESC Address Space (DPRAM)
FMMUFMMU n
(µ , , )
PHY
Management
FMMU n
SyncMan0 MbxOut
MII / EBUS
Port 0
MII / EBUS
Port 2
Ethernet HDRLRWProcess DataFPWRMailbox DataMore Datagrams..FCS ECAT HDR W K C
W K C
H D R
H D R
0x0000 0x1000
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
Purpose of Slave Information Interface
• The mandatory Slave Information Interface (SII) consists ofall objects that can be stored persistently.
• The information is stored in an EEPROM
• EtherCAT Slave Controller has SPI interface to EEPROM
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 166/218
24.02.2008 EtherCAT Communication 166
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
– 1 kBit … 4 MBit• The SII contains
– boot configuration data
– device identity (mandatory)
• Vendor Id, Product Code, Revision No, Serial No
• Same information in CoE object 0x1018
– application information data
• Contains additional information (optional) – Subdivided in categories
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SII – EEPROM content
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 167/218
24.02.2008 EtherCAT Communication 167
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SII – EEPROM Layout
EtherCAT Slave Controller Configuration Area
VendorId ProductCode RevisionNo SerialNo
0
16
32
Byte
Hardware Delays Bootstrap Mailbox Config48
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 168/218
24.02.2008 EtherCAT Communication 168
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Additional Information (Subdivided in Categories)
…
128
Reserved
Mailbox Sync Man Config
Category FMMU
Category Strings
Category Generals
Category SyncManager
Category Tx- / RxPDO for each PDO
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
EEPROM – Slave Configuration Area
Initialization value for PDI Configuration
Initialization value for PDI Control register
(EEPROM ADR 0x0000.9 is also mapped to
register 0x0110.2)
Description
0x0150
0x0140
0x0141
Corresp.
Register
PDI configuration,1
PDI Control0
Parameter EEPROM
WordAddress
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 169/218
24.02.2008 EtherCAT Communication 169
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular DevicesDrives
Device Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
CRC of first 6 words
(x^8+x^2+x+1, initial value 0xFF)
Initialization value for Configured Station Alias
Address register
Initialization value for extended PDI
Configuration register
Initialization value for Pulse Length of SYNC
Signals register
in Units of 10 ns
registerDepends on the selected PDI,
Configuration of Sync0 and Sync1 Pin
Checksum7
Reserved5, 6
0x0012
0x0013
Configured Station Alias4
0x0152
0x0153
Extended PDI
configuration
3
0x0982
0x0983
0x0151
Pulse length of SYNC
signals
2
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SII – Categories
• Contains optional information• Divided in categories
– Standard category(s)
– Vendor category(s)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 170/218
24.02.2008 EtherCAT Communication 170
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
• Same header for all categories – Category Type
– Word-Length of data
Category Length
16 Bit 16 Bit
Data…
Receive PDO EntriesRxPDO
Transmit PDO EntriesTxPDOModes of operation, EnableSyncManger
Device InformationGeneral
FMMU usageFMMU
Text stringsSTRINGS
MeaningCategory
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 171/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Slave Information Interface
Category for CoE Object Dictionary Entries (80)
• Only used for slave devices without any Object Dictionary• Content of a virtual Object Dictionary – comparable to the
virtual OD in the device description files (XML)
• Provides information for the master that are already
d fi d b i ti fil
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 172/218
24.02.2008 EtherCAT Communication 172
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
defined by existing profiles• Examples are
– Device type…
– DC settings (Object 1C32h, 1C33h…)
– …
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
PDI access to SII (E²PROM)
• Standard: EEPROM assigned to EtherCAT Master • Master can grant access to PDI
– Change from INIT to PREOP Master
• PDI can check SII content (e.g. Firmware
R i i tibl t H d R i i )
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 173/218
24.02.2008 EtherCAT Communication 173
SyncManager
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
Revision compatible to Hardware Revision)(before ALCtrl=2 until ALStatus=2)
– Change from INIT to BOOT and while in BOOT
• After Firmware Update PDI can update SII
information(before ALCtrl=3, ALCtrl=1 until ALStatus=1)
• Slave Sample Code V4.0 contains SII access from PDI
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Device Profiles – Motivation
• The main issues of this device model are – modeling of structures within a device
– usable for a large number of devices from very
simple one to complex sub-structured
easy way for master and configuration devices to
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 174/218
24.02.2008 EtherCAT Communication 174
SyncManager FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
– easy way for master and configuration devices tohandle the device
– use of similar channel profiles in all device types
shown below
Profile for Modular Devices
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Modular Device Profile
• EtherCAT supports complex slaves
• E.g. devices with physical modules to be connected (modular
device) or devices with different operation modes (complex
device).
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 175/218
24.02.2008 EtherCAT Communication 175
SyncManager FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
• The Modular Device Profile defines
– A modeling of structures within a device,
e.g. the Object dictionary
– An easy way for master and configuration devices tohandle the device
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Modular Device Profile
• Gateways from EtherCAT to legacy Fieldbusses like
- CANopen
- Profibus
- DeviceNet
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 176/218
24.02.2008 EtherCAT Communication 176
SyncManager FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
- …
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Modular Device Profile
• Extendable Fieldbus coupler with internal backboneinternal backbone
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 177/218
24.02.2008 EtherCAT Communication 177
y gFMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
• Multi Axis Servo Drive with different function groups
FG Position
FG VelocityFG Torque
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
Object Dictionary of Modular Device Profile
• 0x0000 – 0x0FFF Data Type Area• 0x1000 – 0x1FFF: Communication Area
• 0x2000 – 0x5FFF: Manufacturer specific Area
• 0x6000 – 0x6FFF: Input Area
• 0x7000 – 0x7FFF: Output Area
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 178/218
24.02.2008 EtherCAT Communication 178
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
• 0x7000 – 0x7FFF: Output Area• 0x8000 – 0x8FFF: Configuration Area
• 0x9000 – 0x9FFF: Information Area
• 0xA000 – 0xAFFF: Diagnosis Area
• 0xB000 – 0xBFFF: Service Transfer Area
• 0xC000 – 0xEFFF: Reserved Area
• 0xF000h – 0xFFFF: Device Area
Different Ranges according to CANopen DS301!
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Model of a modular device
RxPDO (Outputs) 0x16xx
Output Entries 0x7xxx
TxPDO (Inputs) 0x1Axx
I t E t i 0 6
0x1600
0x7000 – 0x700F
0x1A00
0 6000 0 600F
0x1601
0x7010 – 0x701F
0x1A01
0 6010 0 601F
0x16nn
0x7nn0 – 0x7nnF
0x1Ann
0 6 0 0 6 F
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 179/218
24.02.2008 EtherCAT Communication 179
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
EtherCAT
Modular Device
Input Entries 0x6xxx
Config. Parameter 0x8xxx
Information 0x9xxx
Communication Area
0x1000 – 0x1FFF
Device Parameter
0xF000 – 0xFFFFModul 0
0x6000 – 0x600F
0x8000 – 0x800F
0x9000 – 0x900F
Modul 1
0x6010 – 0x601F
0x8010 – 0x801F
0x9010 – 0x901F
Modul nn
0x6nn0 – 0x6nnF
0x8nn0 – 0x8nnF
0x9nn0 – 0x9nnF
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Modular Device Profile
• The modular device profile can be applied for differentdevice types
– Fieldbus GatewaysGateways to other fieldbusses
– Modular Devices
with physical connectable modules and/or several
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 180/218
24.02.2008 EtherCAT Communication 180
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
with physical connectable modules and/or severalfunctional modules
– Module Deviceswhich is connected directly to EtherCAT and consistsof several channels
• Standard configuration
– 16 objects per module in a specific area
– Up to 255 modules available
– This standard can be adapted to the devicerequirements
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Example for Dynamic Device Profile
BK1120 + DI 4 + DO 8 + AO 2BK1120 + DI 4 + DO 8 + AO 2
RxPDO (Output)
Output Entries 0x7010:
SI0, 1-8
0x1601
0x7020:
SI0, 1-2
0x16020x1600
0x7000
Slot 0 Slot 1 Slot 2Device
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 181/218
24.02.2008 EtherCAT Communication 181
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
SI…Subindex (SI0 = number of SIs of this object)
EtherCAT Slave BK1120
Dig. Input 4 Dig. Output 8
Input Entries
Anal. Output 2
TxPDO (Input) 0x1A01
0x6010
0x1A02
0x6020:
SI 0, 1-2
0x6000:
SI 0,1-4
0x1A00
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
MDP – Profile Numbering
• MDP Profile Number is 5001 (= Object 0x1000, Bit 0-15)
• Module Profile Number (= Object 0x1000, Bit 16-31)
EtherCAT Master (for Mailbox Gateway)1100
Ethernet gateway (EoE)1000
DescriptionModule Profile Number
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 182/218
24.02.2008 EtherCAT Communication 182
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
KBus Master 1120
IO Link-Master 6220
ASI-Master 6200
DeviceNet Slave5210
DeviceNet Master 5200
CANopen Slave5110
CANopen Master 5100
Interbus Slave4010
Interbus Master 4000
PROFIBUS Slave3110
PROFIBUS Master 3100
EtherCAT Slave1110
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
CiA402 Drive Profile
• IEC 61800-7
Generic interface and use of profiles for power drive systems
– Part 7-1: Interface definition
– Part 7-2: Profile specifications
– Part 7-3: Mapping of profiles to network technologies
• Mapping CiA402 to EtherCAT• Mapping SERCOS profile to EtherCAT
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 183/218
24.02.2008 EtherCAT Communication 183
FMMU
Diagnosis
Distributed Clocks
Application Layer
State Machine
Mailbox
Mailbox InterfaceEoE 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
© Copyright by Beckhoff, 2008
• Mapping SERCOS profile to EtherCAT
• ETG Implementation Guideline for the CiA402 Drive Profile
– Specify a common behavior of EtherCAT CiA402 servo drives
according to IEC 61800-7
• Scope
– EtherCAT CiA402 Servo Drives
– No frequency converter, no stepper
– The mapping of the SERCOS profile to EtherCAT described in
IEC 61800-7-304 is not part of this guideline
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Drive Profile
IEC 61800-7-1 Interface definition
A A A B A C
IEC TR 62390Device profile guideline
IEC 61800 Parts 1 to 6 Adjustable speed electrical power drive systems
A D
Abstractmodels
Generic
PDSinterface
IEC 61800-7 Generic interface and use of profiles for power drive systems
EtherCAT is Part of the drives standard in Annex A and D
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 184/218
24.02.2008 EtherCAT Communication 184
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
© Copyright by Beckhoff, 2008
Annex A:Mapping to
CiA402
Annex B:Mapping to
CIP
Annex C:Mapping toPROFIdrive
Annex D:Mapping toSERCOS
Mapping tosolutions(profiles)
Driveprofiles
Annex D:ProfileSERCOS
Annex C:ProfilePROFIdrive
Annex B:ProfileCIP
Annex A:ProfileCiA402
IEC 61800-7-2 Profile specifications
Mapping toCANopen
Mapping toEtherCAT
Mapping toPROFIBUS
Mapping toPROFINET
Mapping tonetwork
technologies Mapping toDeviceNet
Mapping toEtherNet/IP
Mapping toSERCOS
I + II
Mapping toSERCOS
III
Mapping toETHERNETPowerlink
Mapping toEtherCAT
Mapping toControlNet
IEC 61800-7-3 Mapping of profiles to network technologies
Annex A Annex B Annex C Annex D
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
interface. Use of the trade name SERCOS interface requires permission of the trade name holder.
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Drive Control - Modes of Operation
Torque
controlM
Velo.
control
Pos.
control
Pos.
Gen.
NC/ PC Drive
s
vt
EtherCAT
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 185/218
24.02.2008 EtherCAT Communication 185
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
© Copyright by Beckhoff, 2008
Torque
controlM
Velo.
control
Pos.
control
Pos.
Gen.
NC/ PC Drive
sv t
EtherCAT
Torque
control MVelo.
control
Pos.
control
Pos.
Gen.
NC/ PC Drive
sv
t
EtherCAT
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
CIA402 Implementation Guideline
• Contents
– Clarifications of the state machine
– Modes of operation
– Function Groups (FG)
• FG Position, FG Velocity, FG Torque
• FG Torque Limiting, FG Homing, FG Touch Probe
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 186/218
24.02.2008 EtherCAT Communication 186
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
© Copyright by Beckhoff, 2008
q g, g,
– Endless Positioning
– For PDO Mapping only recommendation
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Device Description Overview
• Device Description File in XML format
• One file suitable for a set of devices (from one Vendor)
• File contains information about:
– Vendor
• Vendor ID, Name, Logo, …Device groups
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 187/218
24.02.2008 EtherCAT Communication 187
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
© Copyright by Beckhoff, 2008
– Device groups
• Organization units to help configuration tools
– Device
• Device Identity, Name, PDI type – PDO Mapping
– FMMU / SyncManager
• number and usage
• Schema is defined in “EtherCATInfo.xsd”
• Can be viewed with Browser, Text Editor or XML Editors
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)
Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
General Structure
EtherCATInfo.xsd
Vendor Type
Name
Group Type
Profile
Fmmu
ID
Name
Comment
Image
Vendor Spec
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 188/218
24.02.2008 EtherCAT Communication 188
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
© Copyright by Beckhoff, 2008
Description
Groups
Devices
Sm
Su
RxPdo
TxPdo
Mailbox
Dc
Modules
ESC
Eeprom
Vendor Spec
….optional
mantadory
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 189/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Diagnosis
Attributes Profile
• Profile
– Profile Information
– Object Dictionary
– Same Structure for CoE and SoE Dictionaries
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 190/218
24.02.2008 EtherCAT Communication 190
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
© Copyright by Beckhoff, 2008
• Separation of Object and Data Type descriptions
– Flat list of Objects
– All Objects derived from a Data Type
– ARRAY, RECORD (CoE) and Variable Data (SoE)
defined as Data Types
– Data Type describes the complete data of an object
exactly as for a “Complete Access” download or upload
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Diagnosis
Data Types and Objects
Element „Profile“
Element „Data Type“
Data Type
„STRING(20)“
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 191/218
24.02.2008 EtherCAT Communication 191
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
© Copyright by Beckhoff, 2008
Element „Object“
Object „Device Name“
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager FMMU
Diagnosis
Extended Device Description
• EtherCAT Device Description contains information about the vendor and
the functionality of a device
– This XML-Description can be used by EtherCAT Configurators to
configure the device and the network
– Specification is fixed in an XSD-Schema
• Defined Extensions
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 192/218
24.02.2008 EtherCAT Communication 192
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
© Copyright by Beckhoff, 2008
– Support of Modular Devices
• Module-Descriptions are selectable in the EtherCAT
Configurator
• Slot-Descriptions for PDO Numbers and Object Indexesdepend on module position
– OP-Modes
• Predefined Operation Modes
• How to configure the synchronization modes
– Supporting Safety-Device-Description – Multi language support
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 193/218
Modules
Checksum of the Modules description(CRC32)
(O): used to define the PDO assign ruleType (ModulePdoGroup)
(O): used to group modulesType (ModuleClass)
(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 (ModuleIdent)
DescriptionElement (Attribute)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 194/218
24.02.2008 EtherCAT Communication 194
(O): Images of the moduleImage
(O): used to define the object dictionary
- Index of the entries might be adapted
Profile
(O): used to define init commands
- Index of the entries might be adapted
Mailbox
(O): used only for FSoE modulesSafetyParaMapping
(O): TxPDO(s) of the module
- PDO Number of the PDO might be adapted
- Index of the PDO entries might be adapted
TxPDO
(O): RxPDO(s) of the module
- PDO Number of the PDO might be adapted
- Index of the PDO entries might be adapted
RxPDO
(M): Name of the moduleName
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 l t
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 195/218
24.02.2008 EtherCAT Communication 195
– With every slot group
Slots
maximum number of slot groups connectable(MaxSlotGroupCount)
defines the increment (multiplied with the slot‘s (module‘s)
position) of the Index
(SlotIndexincrement)
defines the increment (multiplied with the slot‘s (module‘s)
position) of the PDO number (SlotPdoIncrement)
maximum number of modules (slots) connectable(MaxSlotCount)DescriptionElement (Attribute)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 196/218
24.02.2008 EtherCAT Communication 196
defines the increment (multiplied with the slot group‘s
position) of the PDO number (SlotGroupPdoIncrement)
defines the increment (multiplied with the slot group‘s
position) of the Index(SlotGroupIndexincrement)
Defines the PDO Number containing the mapping informationof the align
ModulePdoGroup (PdoNo)
Defines the alignment after the Module PDO GroupModulePdoGroup
(Alignment)
One element for each Module PDO GroupModulePdoGroup
List of slots (Definition of the slot see next slide)Slot
Slot
DescriptionElement (Attribute)
- 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 slotdefinitions
- Mandatory modules to be connected can be described withMinInstances=MaxInstances=1
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 197/218
24.02.2008 EtherCAT Communication 197
Maximum number of instances of the slot(MaxInstances)
List of modules (identified by ModuleIdent) which is
connectable to the slot
ModuleIdent
List of modules (identified by ModuleClass) which is
connectable to the slotModuleClass
defines the increment (multiplied with the slot group‘s
position) of the Index.
If defined, it overwrites SlotGroupIndexIncrement of the Slots
definition.
(SlotGroupIndexIncrement)
Minimum number of instances of the slot(MinInstances)
Slot Group of the module(SlotGroup)
DescriptionElement (Attribute)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 198/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
EtherCAT Configuration Tool
• Configure EtherCAT Slave devices
– Evaluate XML device description
– Evaluate EEPROM information – if online
• Generate network initialization commands
– Information for the EtherCAT driver – Initialization commands correspond to State Machine
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 199/218
24.02.2008 EtherCAT Communication 199
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
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
transitions
• Generates cyclic commands
– Information for the EtherCAT driver
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
Network Configuration
EtherCAT
Configuration Tool
(Offline)
Device Descriptions
(XML)
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 200/218
24.02.2008 EtherCAT Communication 200
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
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT
Master Driver
(Online)
XML
File
Configuration
Information (XML)
General Exchange
Format
Configuration
Information (binary)
Vendor specific
Format
E2PROM
Information
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
EtherCAT Configuration Exchange Format
• Vendor and Driver independent format
• Master Vendor must not imperatively develop an own
Configuration Tool
• Contains
– initialization commands – per slave device – cyclic process data commands
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 201/218
24.02.2008 EtherCAT Communication 201
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
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
– information about the mailboxes
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
EtherCAT Master
• Configuration with help of an EtherCAT configuration XML
file
• Send and receive raw Ethernet frames from a network
adapter
• Management of the EtherCAT slaves
– Sending init commands defined in the XML file
• Mailbox Communication
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 202/218
24.02.2008 EtherCAT Communication 202
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
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Mailbox Communication
– CANopen over EtherCAT protocol (CoE)
– Servo-Profile over EtherCAT protocol (SoE) – Ethernet over EtherCAT protocol (EoE)
– Filetransfer over EtherCAT protocol (FoE)
• Software-integrated switch functionality
• Cyclic process data communication
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
What does an EtherCAT Master do?
• Parse XML Hardware configuration file (initialization, state
machine, and process data mapping)
• Initialization of Fieldbus
• Runs State Machine
• Interface to application• Interface to network driver
S d li d t d
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 203/218
24.02.2008 EtherCAT Communication 203
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
• Sends cyclic process data commands
• Sends mailbox commands
• Handles various protocols
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
EtherCAT Master Block Diagram
SystemConfiguration
Tool
Control Task
XML Parser
Process Image
(XML)
XML
Network Description
Initialization Commands
Process Image
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 204/218
24.02.2008 EtherCAT Communication 204
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT Master Driver
Standard Ethernet MAC
HDR Process DataHW Config
Init Cmds
XML
Device Description
Online functions
EtherCAT Master
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 205/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
EtherCAT Master Development (Real Time)
1. XML Parser functionality
2. EtherCAT Master driver
– Interface to configuration tool
– State machine
– Interface to application – Interface to network card
NIC Ti i I t f
necessary
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 206/218
24.02.2008 EtherCAT Communication 206
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
– NIC Timing Interface
3. Real Time Kernel
4. Hardware Configuration Tool
– 3.rd party configuration tools can be used
as the configuration is provided to
EtherCAT master in a common format(XML)
optional
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 207/218
EtherCAT Basics
Slave Structure
Device Model (ISO/OSI)Physical Layer
Data Link Layer
Frame Structure
Addressing
Commands
Memory/Registers
SyncManager
FMMU
Diagnosis
Distributed Clocks
A li ti L
Master Sample Code Overview
• Sample EtherCAT Master Communication Software
(including Source Code)
– Non Real Time
– Realized as Windows Application Program
(MS Windows XP/2000)
– Source Code MS C++
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 208/218
24.02.2008 EtherCAT Communication 208
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
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
Standards and References
• Specification of EtherCAT has been done in the EtherCAT
Technology Group (ETG)
• Specifications available at www.EtherCAT.org
– XML File Style sheet
– Datasheets of ESC, ...
– Modular Device Profile
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 209/218
24.02.2008 EtherCAT Communication 209
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Modular Device Profile
– Reports of ETG TC meetings
• International standardization
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
Standards and References
•EtherCAT is part of different international
standardization efforts
Type 12:EtherCAT Specification
Replaced by IEC 61158
Remarks
IS
PAS
StatusTitleStandard
Part 1: Overview and guidance
Digital data communication for measurementand control – Fieldbus for use in industrial
control systems
IEC 61158
Real Time Ethernet control automation
technology (ETHERCAT)
IEC/PAS
62407
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 210/218
24.02.2008 EtherCAT Communication 210
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Part 6: Application Layer protocol
specification
Part 5: Application Layer service definition
Part 4: Data Link Layer protocol specification
Part 3: Data Link Layer service definition
Part 2: Physical Layer service definition and
protocol specification
g
PASPAS : Public available standard: Public available standard
ISIS : International Standard: International Standard
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
Standards and References
CPF12: EtherCAT
Remarks
Adjustable speed electrical power drive
systems
IEC 61800
ISPart 2: Additional profiles for ISO/IEC 8802-3
based communication networks in real-timeapplications
ISPart 1: Profile sets for continuous and discrete
manufacturing relative to fieldbus use in
industrial control systems
Digital data communication for measurementand control
IEC 61784
StatusTitleStandard
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 211/218
24.02.2008 EtherCAT Communication 211
Application Layer
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
Mapping
EtherCAT to
CANopen DS402
and SERCOS
Part 7:
Drive Profiles
ISPart 7-3: Generic interface and use of profiles
for power drive systems – Mapping of profiles
to network technologies
ISPart 7-2: Generic interface and use of profilesfor power drive systems – Profile specifications
ISPart 7-1: Generic interface and use of profiles
for power drive systems – Interface definition
systems
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
Standards and References
Mapping
EtherCAT to
CANopen DS301
PRF AmdPart 4 Amd 2: Profiles for Modbus TCP,
EtherCAT and ETHERNET Powerlink
CANopenEd 1Industrial automation systems and integration -- Open systems application integration
framework
ISO 15745
RemarksStatusTitleStandard
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 212/218
24.02.2008 EtherCAT Communication 212
pp cat o aye
State Machine
Mailbox
Mailbox Interface
EoE Ethernet
CoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
PRFPRF Amd Amd:: : Proof of a new International Standard, Amendment: Proof of a new International Standard, Amendment
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 213/218
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
IEC 61158 – DL/AL services and protocols
AL Services
Part 5 in IEC 61158
• Model and Concepts• Data type definitions
• Application Objects
• Service description
• Communication Management
AL Protocol
Part 6 in IEC 61158
• Syntax definition and Coding
• Application Relationship
Procedures
• State Machines
Users Implementers
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 214/218
24.02.2008 EtherCAT Communication 214
State Machine
Mailbox
Mailbox Interface
EoE EthernetCoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
DL Services
Part 3 in IEC 61158
• Model and Concepts
• Service description
• Register Description
(DL objects)
DL Protocol
Part 4 in IEC 61158
• Coding
• Medium Access
• State Machines
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
IEC 61800-7
IEC 61800-7-1 Interface definition
Annex A:Mapping to
CiA402
Annex B:Mapping to
CIP
Annex C:Mapping toPROFIdrive
IEC TR 62390Device profile guideline
IEC 61800 Parts 1 to 6 Adjustable speed electrical power drive systems
Annex D:Mapping toSERCOS
Abstractmodels
GenericPDS
interface
Mapping tosolutions(profiles)
IEC 61800-7 Generic interface and use of profiles for power drive systems
EtherCAT is Part of the drives standard in Annex A and D
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 215/218
24.02.2008 EtherCAT Communication 215
State Machine
Mailbox
Mailbox Interface
EoE EthernetCoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
(p )
Driveprofiles
Annex D:
ProfileSERCOS
Annex C:
ProfilePROFIdriv
e
Annex B:
ProfileCIP
Annex A:
ProfileCiA402
IEC 61800-7-2 Profile specifications
Mapping toCANopen
Mapping toEtherCAT
Mapping toPROFIBUS
Mapping toPROFINET
Mapping tonetworktechnologies
Mapping toDeviceNet
Mapping toEtherNet/IP
Mapping toSERCOS
I + II
Mapping toSERCOS
III
Mapping toETHERNETPowerlink
Mapping toEtherCATMapping toControlNet
IEC 61800-7-3 Mapping of profiles to network technologies
Annex A Annex B Annex C Annex D
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
interface. Use of the trade name SERCOS interface requires permission of the trade name holder.
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 216/218
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
St t M hi
Step by Step Implementation
• Step 1:
• Slave Evaluation Kit Workshop
Step 3:
Step 2:
Setup of a small EtherCAT System
with Master, I/O and EvaluationBoard.
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 217/218
24.02.2008 EtherCAT Communication 217
State Machine
Mailbox
Mailbox Interface
EoE EthernetCoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
µC
Step 3:
Build Lab wiring between Evaluation
Kit and Standard-Hardware (e.g.)with 16Bit Microcontroller
Step 4:
Start SW-Project with Slave SampleCode
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
Step by Step Implementation
• Step 5:
• Download Slave Sample Code inTarget Hardware and set System
into Operation
Step 6:Test implementation for PDO- und
Mailbox-Transfer
ecatappl
e m c y
c a t c o e c o e a p p l
c a t f o e f o
e a p p l
EtherCAT Slave
Application Software
S a m p l e C
o d e
8/20/2019 EtherCAT Communication
http://slidepdf.com/reader/full/ethercat-communication 218/218
24.02.2008 EtherCAT Communication 218
State Machine
Mailbox
Mailbox Interface
EoE EthernetCoE CANopen
FoE File Access
SoE Servo Drive
Slave Information /IF
Device Profiles
Modular Devices
DrivesDevice Description
Configuration Tool
EtherCAT Master
Standards&Implementation
© Copyright by Beckhoff, 2008
EtherCAT Hardware-Design
Step 7:
Software-Design with EtherCAT
Slave Sample Code for existing
Fieldbus SW-Architecture
mcihw
ecatslv mailbox
e c e
c
EtherCAT
Slave
Controller
S l a v e