You are on page 1of 51

Beckhoff EtherCAT Training

EtherCAT Training
Content

15.03.2012

Hardware
Function principle
Topology
Advantages and efficiency
In praxis: Driver installation in System
Manager
EtherCAT data exchange
Protocol
Performance
The Fieldbus EtherCAT
Configuration in System Manager
In praxis: Parameterization and
commissioning in System Manager
Sync Units
In praxis: Hot Connect
Diagnosis
In praxis: Cable redundancy
XFC eXtreme Fast Control Technology
In praxis: Timestamp terminal
In praxis: Oversampling terminal
EtherCAT Training

Hardware
EtherCAT Fieldbus master
IPC / Control Panel
Intel chipset based network card
with special TwinCAT real-time
Ethernet driver:
FC9001/9002/9004/9011
Supported network adapter in
Information System
(online:http://infosys.beckhoff.com/c
ontent/1033/tcsystemmanager/refer
ence/ethercat/html/ethercat_supnet
workcontroller.htm?id=10257)
Embedded PC / Control Panel
CX90xx
CX10xx
CX50xx
etc.
15.03.2012

EtherCAT Training

Hardware
Overview standard components EL (IP20)
Bus Coupler
/ EK1101

Bus end cap:EL9011

EK1100

EL or ES terminal with E-bus


15.03.2012

EtherCAT Training

Hardware
Overview standard components KL (IP20)
Bus Coupler

End terminal:KL9010

BK1120

KL or KS Terminal with K-bus


(BK1250: EtherCATK-bus)
15.03.2012

EtherCAT Training

Hardware
Overview standard components EP (IP67)
EP1111 EtherCAT Box
EP1122 EtherCAT 2-port junction

The EtherCAT connection is done via screwable, shielded M8 plug. The


plug shows the link and activity state.
15.03.2012

EtherCAT Training

Hardware
Further EtherCAT components
EK1501

EK1521

EK1122

EK1110

15.03.2012

EK 1132

EL6692

EtherCAT Training

Functional principle
EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

Functional principle
Highlights
Ethernet up to the terminal complete continuity
Ethernet process interface scalable from 1 bit to 64 kbyte
First true Ethernet solution for the field level
exact timing and adapted to synchronisation
Different approaches that try to provid real-time capability for classical
Ethernet:
Suspend collision detection (CSMA/CD)
Special switches that distribute Ethernet telegrams in a precisely
controlled timely manner
Problem
Even for very small data quantities a complete Ethernet frame has to
be sent
An underlying bus system adds small delays (e.g. K-bus)
15.03.2012

EtherCAT Training

EtherCAT
Ethernet down to the I/O terminals!
Direct access of EtherCAT slave controller (ESC) to process data in
EtherCAT frame
ESC differs by command header between process data and other
commands
Ring bus system with software based ending
Ethernet view: EtherCAT bus is one Ethernet node
Process data e.g. from the PLC are no longer received and
interpreted in devices. Process data is taken from the telegram by
the EtherCAT Slave Controller (ESC) or copied into it.
The EtherCAT frame is delayed [ns] by passing through the
EtherCAT slaves.
The last node in the segment returns the frame to EtherCAT-master.

15.03.2012

EtherCAT Training

10

EtherCAT
ESC
EtherCAT Slave Controller (ESC) handles the EtherCAT
communication in an EtherCAT slave.
Each EtherCAT slave has such an ESC to ensure that cyclical and
acyclical process data can be exchanged between mater and slave
via the EtherCAT fieldbus.
This ESC can handle simple functions such as digital inputs and
outputs directly, or it can be connected to a further processor in the
EtherCAT slave via serial/parallel interfaces for handling more
complex tasks such as drive control.

15.03.2012

EtherCAT Training

11

EtherCAT
Scheme of EtherCAT slave

15.03.2012

EtherCAT Training

12

EtherCAT
typical embedding of ESC
From the RJ45 socket electrical signals are transferred to the PHY
(PHYsical interface) via the transformer.
It extracts the user data from the coded Ethernet signal and
transfers them to the ESC for processing.
The EtherCAT telegram is then relayed with minimum delay (due to
dynamic processing) to the next EtherCAT slave via the PHY and
the socket.
The ESC automatically parameterises itself with configuration data
from an EEPROM.when the salve starts up. If a further CPU exists
in the slave, the slave can communicate with it via interfaces.

15.03.2012

EtherCAT Training

13

Topology
EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

14

Topology

line, tree or star topology


up to 65,535 devices
network size: almost unlimited (> 500 km)
operation with or without switches
cost-effecitve cabling: Industrial-Ethernet- patch cable (CAT5)
twisted pair physical layer
Ethernet 100BASE-TX, up to 100 m between 2 devices
alternative: fibre-optic variants 50 up to 2,000 m
hot connect/disconnect of bus segments
extension to GBit Ethernet possible

Transfer physics is converted in the coupler to the E-bus signal


LVDS (Low Voltage Differential Signaling)
If necessary reconversion of the signal at the end of the bus
segment for transfer to the next Anschaltgruppe resp. Coupler.
15.03.2012

EtherCAT Training

15

Topology variant
line: any number of nodes lined up

IPC

..
..

DVI

up
65,535
nodes
Cable: standard CAT5 cable
without crossover
15.03.2012

EtherCAT Training

16

Topology variant
Daisy Chain

IPC

..
..

DVI

Up to
65,535
nodes
Cable: standard CAT5 cable
without crossover
15.03.2012

EtherCAT Training

17

Topology variant
Daisy Chain + drop lines

IPC

..
..

DVI

Up to
65,535
nodes
Cable: standard CAT5 cable,
without crossover
15.03.2012

EtherCAT Training

18

Topology variant
mixed structures

IPC

..
..

DVI

Up to
65,535
nodes
Cable: standard CAT5 cable
without crossover
15.03.2012

EtherCAT Training

19

Advantage and efficiency


EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

20

Advantage and efficiency

no more network tuning: lower engineering costs


Hard real-time with software master: no plug-in card required
no active infrastructure components (switches, etc.) required
Ethernet cable and connector costs : lower than for traditional
fieldbus
EtherCAT right down to the I/O terminal: no complex Bus Couplers
required
Low interface costs due to the highly integrated EtherCAT Slave
Controller
EtherCAT as alone fieldbus
integration fieldbus in fieldbus to connect further fieldbusses like
CAN, PROFIBUS, ETHERNET, etc.
No further fieldbus master e.g. as PCI card in PC necessary!
15.03.2012

EtherCAT Training

21

Advantages and efficiency


EtherCAT instead of PCI

Seamless integration
of exisiting fieldbus devices
Process image update-time
via EtherCAT (1500
bytes input and output data):
150s
Until now:
Process image update-time
via PCI ( 500 byte input and
output data): 400s
15.03.2012

EtherCAT Training

22

Advantage and efficiency


Topology with Ethernet over EtherCAT
Ethernet over EtherCAT (EoE) enables direct connection of
Ethernet devices in EtherCAT fieldbus
Free patency of all Ethernet technologies!
Performance: > 5MBit/s outgoing
Performance: > 2MBit/s incoming
virtual Ethernet Switch
Functionality

EoE
Switchport

IPC

..
..

DVI

e.g.
connection of
Label
printer/Scann
er

15.03.2012

Programming/
Parameterization
directly in I/O
range

EtherCAT Training

23

Advantage and efficiency


Topology with vertical integration
...via 2. Ethernet Port

IPC

..
..

DVI

+ any Ethernet protocol can be used


+ EtherCAT performance
is not limited
+ No switchport terminal necessary
15.03.2012

Requires second Ethernet port (at IPC/controller)


EtherCAT Training

24

In practise

Driver installation in System Manager


EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

25

Real-time Ethernet driver


real-time communication via the network card requires a Y driver
transparent connection in the operating system (conform for the
operating system, at the same time TwinCAT fieldbus card driver)
On the control side an internal prioritization and buffer ensure that
real-time frames alwasy find a free transmission channel
Ethernet frames for the operation system are sent inside the
intervals
At the receiving end, all the Ethernet frames received are examined
by the TwinCAT I/O system, and those with real-time relevance are
filtered out.
all other frames are sent back to the operating system
EtherCAT frames have always the hightest priority!
It is recommended to use a separate network card for highperformance data communication from the operating system!

15.03.2012

EtherCAT Training

26

Real-time Ethernet driver


embedded to operating system

1
Network card operating system
15.03.2012

EtherCAT Training

2
Other
fieldbus
27

In praxis
Real-time Ethernet driver
The installation of the real-time Ethernet driver can be done easily
via the TwinCAT System Manager
To use the cable redundancy, the driver has to be istalled on two
network cards

15.03.2012

EtherCAT Training

28

EtherCAT data exchange


EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

29

EtherCAT data exchange


A range of components are available for implementing direct
synchonous data exchange between two EtherCAT systems.
Depending on the application requirements, the appropriate method
can be selected based on the following criteria.
The characteristic features are:
Synchronous data exchange with predefined data that are
specifiedin the configuration
Asynchronous data exchange
Support for ADS over EtherCAT (AoE)
Support for synchronization of the distributed clocks (DC) in the
two systems

15.03.2012

EtherCAT Training

30

EtherCAT data exchange


Overview
EL6692

Publisher/
Subscriber

EL6601

FC1100

Maximum
synchronous
Data quantity

480 bytes,
bidirectional

variable

1024 bytes,
bidirectional
(publisher/
subscriber
method)

1024 bytes,
bidirectional

Maximum
asynchronous
data quantity

Optional

AoE support

Yes

Yes

Yes

Yes

DC support

Yes

notice

- recommended for
synchronization of
EtherCAT systems
- TwinCAT 2.11
required

- use of an
Ethernet port in
both systems as
real-time device
- recommended
for synchronous
data exchange

- transfer of RT
devices into
EtherCAT
terminal
- recommended
for synchronous
data exchange

- Requires free
PCI slot in the
IPC
- TwinCAT 2.11
R2 required

- CX5000 as
subordinate
autonomous
controller with its
own IO is
integrated in the
higher level
system as an
EtherCAT slave
- option B110
required
- TwinCAT 2.11
R2 required

15.03.2012

EtherCAT Training

CX50x0B110

31

EtherCAT data exchange


Topologiy

TwinCAT
Ec Master

15.03.2012

TwinCAT
Ec Master

EtherCAT Training

TwinCAT
Ec Master

Ec Slave
(CX/IPC)

32

Protocol
EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

33

Protocol
optimised protocol directy within the Ethernet frame
fully hardware-implemented
for routing and socket interface: UDP datagram
processing while passing
distributed clock for accurate synchronisation
Time stamp data types for resolution in nanosecond range
Oversampling data types for hight-resolution measurements

15.03.2012

EtherCAT Training

34

Protocol in detail
description
The EtherCAT protocol is an Ethernet protocol optimized for process
data. It is sent consistently in one (ore further) Ehternet frames or
via UDP/IP.
The Ethernet frame has a size of 1514 byte. EtherCAT datagramms
(process data, etc.) with a user size of 1486 byte can be sent.
Larger process images are distributed over several Ethernet frames.
With the EtherCAT process data in the Ethernet frame a process
image up to 4 gigabytes can be served.
The data sequence is independent of the physical order of the
EtherCAT slaves in the network, addressing can be in any order.
Device profile according to CANopen (CoE) or Sercos (SoE)

15.03.2012

EtherCAT Training

35

Protocol in detail
Structure of frames
EtherCAT uses standard frames according to IEEE 802.3
no shortened frames
alternatively via UDP/IP (if IP routing is needed)
MTU=Maximum
Transmission Unit,
in computer
network the
maximum non
fragmented
transferable data
volume.

MTU: max. 1514 Byte

48 Bit

48 Bit

16 Bit

16 Bit

Destination

Source

EtherType

Header

Embedded in Standard Ethernet


Frame, EtherType 0x88A4
160 Bit

Ethernet H.

IP Header

32 Bit

CRC

TCP /IP

CRC

UDP /IP

1..n EtherCAT
telegrams
64 Bit

UDP H.

Header

Or: via UDP/IP


UDP Port 0x88A4
11 Bit

Length
0

15.03.2012

EtherCAT Training

1 Bit

4 Bit

Res.
11

Type
12

15

36

Protocol in detail
Continuity for technologies
fully transparent for TCP/IP
all internet technologies available: HTTP, FTP,
Without restricing the real-time capabilities of the bussystem!
EtherCAT Device
Ethernet
Application

Standard
TCP/IP
Stack

TCP

Real Time
Application

UDP
Acyclic
Data

IP
Mailbox

Process Data

EtherCAT MAC / DLL


Ethernet PHY

15.03.2012

EtherCAT Training

Ethernet PHY

37

Performance
EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

38

Performance
256 digital I/Os in 12 s
1,000 digital I/Os in 30 s
200 analog I/Os (16 Bit) in 50 s, that is equivalent to 20 kHz
sampling rate
100 servo axis each 100 s
12,000 digital I/Os in 350 s
The EtherCAT bus system is so fast that between two (PLC) control
cycles internal EhterCAT eradication can be done (compare XFC)
EtherCAT is not limited to 100MBaud
The bus system is no longer the bottle neck of the control!

15.03.2012

EtherCAT Training

39

Performance
Function principle Ethernet on the Fly

Wagen
27

Example ICE:
Train (Ethernet Frame) doesnt stop
Somebody who sees the train through a narrow window, sees
the whole train
railway car (Sub telegramms) have variable length
Single people (bits) or tour groups (x kbyte) can be removed
and/or inserted.
15.03.2012

EtherCAT Training

40

Performance
Processing on the fly
Data is modified
and/or added while
telegram passes
through
From
vomMaster
Master

Without buffering,
storing the telegram

to Master

minimal
telegram delay
per node
Optimal
performance

15.03.2012

EtherCAT Training

41

Performance
processing times
Runtimes by the cable length are nearly irrelavant,
100 m Ethernet cable need approx. 550 ns.
Processing time of one or more Ethernet frame through all real
slaves on the foreward path and return path. As order of magnitute
for each slave can be taken:
For an Ethernet device:

approx.1 s

For an Ebus device:

approx. 300 ns

Processing time delayed hub and switches (ISO Layer 2) are


not part of an EtherCAT network. A segementation by router
(ISO layer 3) does not take place.
15.03.2012

EtherCAT Training

42

Der Feldbus EtherCAT


EtherCAT Ultra high-speed for Automation

15.03.2012

EtherCAT Training

43

The fieldbus EtherCAT


Mapping of several process images
Traditional fieldbus systemes generate physical process image
This has to be mapped to logical process image(s)

Logical process images

Control, e.g. IPC


Fieldbus Scanner/
DPRAM Master

node 1

node 1
Data n
PLC Data

node 2

node 2

NC Data

node 3
node 4

node 3

Mapping
node 4
15.03.2012

EtherCAT Training

44

Der Feldbus EtherCAT


Mapping of process image bisher
The same applies to control systems with just one process image
Resorting of process data (mapping) is required, too.

Logical process images

Control e.g. PLC


Fieldbus Scanner/
DPRAM Master

node 1

node 1
node 2

node 2

Process
Data

node 3
node 4

node 3

Mapping
node 4
15.03.2012

EtherCAT Training

45

The fieldbus EtherCAT


Mapping moved into the slave devices
IPC

..
..

DVI

Logical process image up to 4 GByte

232

Telegram structure
Ethernet HDR

HDR 1

PLC Data

HDR 2

NC Data

HDR n

Data n

CRC

Data n
PLC Data
NC Data

Sub
Telegram 1

Sub
Telegram 2

Sub
Telegram n

Control system in unburdened, master becomes


very simple
Data is transmitted according to the application
requirements: extremely fast, flexible and efficient

15.03.2012

EtherCAT Training

46

Der Feldbus EtherCAT


Direct Memory Access saves time
Fieldbus cards: up to 30% of CPU
time data copying

PC Control with fieldbus cards


PC RAM
Scanner card, DP RAM

Control task
PCI
bus

EtherCAT: NIC is PCI bus master,


is provided by DMA,
directly to PC RAM:
CPU relieved
More performance

15.03.2012

EtherCAT Training

CPU

PC Control with EtherCAT


CPU

NIC card, DMA transfer

memcopy

PC RAM
Control task

PCI
bus

DMA

47

The fieldbus EtherCAT


Reaction time with legacy fieldbus
I PLC Task O I PLC Task O I PLC Task O I PLC Task O I PLC Task

Tmpd

Bus Cycle

TI/O

TI/O

Bus Cycle

TI/O

TI/O

Bus Cycle

TI/O

TI/O

Bus Cycle

TI/O

TI/O

TI/O

Bus Cycle

TI/O

TI/O

Bus Cycle

TI/O

TI/O

Bus Cycle

TI/O

TI/O

best case Reaction Time


worst case Reaction Time
Input
(Worst case)

Input
(best case)

Output
Tmpd: Master Processing Delay
TI/O: Local I/O Update Time
(local Extension Bus + Firmware)

15.03.2012

EtherCAT Training

48

The fieldbus EtherCAT


EtherCAT System

I PLC task O I PLC task O I PLC task O I PLC task O I PLC task
No dedicated master device any more
Tmpd

bus cycle

TI/O

TI/O

bus cycle

TI/O

TI/O

bus cycle

TI/O

TI/O

bus cycle

TI/O

TI/O

TI/O

bus cycle

TI/O

TI/O

bus cycle

TI/O

TI/O

bus cycle

TI/O

TI/O

No underlying extension bus any more

15.03.2012

EtherCAT Training

49

The fieldbus EtherCAT


Processing between two control cycles

I PLC task O I PLC task O I PLC task O I PLC task O I PLC task

TDMA (Time for data transfer


DMA (NIC)

from/to Ethernet controller via


direct memory access):

neglectible

15.03.2012

EtherCAT Cycle

EtherCAT Training

50

The fieldbus EtherCAT


Reaction time with EtherCAT

I PLC task O I PLC task O I PLC task O I PLC task O I PLC task

worst case
Reaction Time
Input
(Worst case)

best case

Input
(best case)

Output

reaction time reduced significantly with the same


controller performance
no underlying local I/O cycles and extension bus delays
any more
due to the very simple protocol no dedicated master
systems (e.g. plug in cards) required
15.03.2012

EtherCAT Training

51

You might also like