Beckhof f EtherCAT EtherCAT Training Training
EtherCAT EtherCAT Traini Training ng Content
Hardware
Function principle
Topology
Advantages and and efficiency
In praxis: Driver Driver installat installation ion in System System Manager EtherCAT data exchange Protocol
Performance
The Fieldbus EtherCAT
Configuration in System Manager
In praxis: Parameterization and commissio ning in System Manage Manager r
Sync Units
In praxis: Hot Connect
Diagnosis
In praxis: Cable redundancy
XFC – eXtreme Fast Fast Control Technology
In praxis: Timestamp terminal In praxis: Oversampling Oversampling terminal 15.03.2012
Et h er CAT Tr ai n i n g
2
Hardware EtherCAT Fieldb Fieldb us master
IPC / Con Contr trol ol Panel 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 (online:http://infosys.beckhoff.com/c ontent/1033/tcsystemmanager/refer ence/ethercat/html/ethercat_supnet workcontroller.htm?id=10257)) workcontroller.htm?id=10257
Embedded PC / Cont Cont rol Panel Panel
CX90xx
CX10xx
CX50xx
etc.
15.03.2012
Et h er CAT Tr ai n i n g
3
Hardware Overvi Overvi ew standard st andard com ponents pon ents EL (IP2 (IP20) 0)
Bus Coupler EK1100
/ EK1101
1 1 0 9 L E : p a c d n e s u B
EL or ES terminal with E-bus 15.03.2012
Et h er CAT Tr ai n i n g
4
Hardware Overview standard components KL (IP20)
Bus Coupler BK1120
0 1 0 9 L K : l a n i m r e t d n E
KL or KS Terminal with K-bus (BK1250: EtherCATK-bus) 15.03.2012
Et h er CAT Tr ai n i n g
5
Hardware Overvi Overvi ew st andard comp co mponent onents s EP (IP (IP67 67)) EP1111 EtherCAT Box EP1122 EtherCAT 2-port junction
The EtherCAT connection connection is done via screwable, shielded M8 M8 plug. The plug shows the link and activity state. 15.03.2012
Et h er CAT Tr ai n i n g
6
Hardware Further EtherCAT EtherCAT components comp onents EK1501
EK1521
EK1122
EK1110
15.03.2012
EK 1132
EL6692
EtherCAT Training
7
Functional Functional princ iple EtherCAT EtherCAT – Ultra high-speed high-speed for Automation
15.03.2012
EtherCAT Training
8
Functional princi ple Highlights Ethernet
up to the terminal – complete continuity continuity
Ethernet
process interface scalable from 1 bit to 64 kbyte
First
true Ethernet solution for the field f ield 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 small delays (e.g. (e.g. K-bus)
15.03.2012
EtherCAT Training
9
EtherCAT Ethernet dow n to the th e I/O I/O termi nals!
Direct access of EtherCAT EtherCAT slave controller controller (ESC) to process 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 [ ns]] by passing passing through through the the EtherCAT slaves.
The last node in the segment returns the frame to EtherCAT-master. EtherCAT-master.
15.03.2012
EtherCAT Training
10
EtherCAT ESC
EtherCAT Slave Controller (ESC) (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 sl ave 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 m ore complex tasks such as drive control.
15.03.2012
Et h er CAT Tr ai n i n g
11
EtherCAT Scheme of EtherCAT slave
15.03.2012
Et h er CAT Tr ai n i n g
12
EtherCAT typical typi cal embedding embedding of ESC 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 f or 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
Et h er CAT Tr ai n i n g
13
Topology EtherCAT EtherCAT – Ultra high-speed 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 cost-effecitve cabling: Industrial-E Industrial-Ethernetthernet- patch cable (CAT5) (CAT5)
twisted pair physical layer
Ethernet 100BASE-TX, up to 100 m between 2 devices
alternative: fibre-optic 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 no des lined up
IPC
.. ..
DVI
up 65,535 nodes Cable: standard CAT5 cable without „crossover“ 15.03.2012
Et h er CAT Tr ai n i n g
16
Topology variant “ Daisy Chain“ hain“
IPC
.. ..
DVI
Up to 65,535 nodes Cable: standard CAT5 cable without „crossover“ 15.03.2012
Et h er CAT Tr ai n i n g
17
Topology variant “ Daisy Cha Chain“ in“ + drop line lines s
IPC
.. ..
DVI
Up to 65,535 nodes Cable: standard CAT5 cable, without „crossover“ 15.03.2012
Et h er CAT Tr ai n i n g
18
Topology variant mixed structur es
IPC
.. ..
DVI
Up to 65,535 nodes Cable: standard CAT5 cable without „crossover“ 15.03.2012
Et h er CAT Tr ai n i n g
19
Ad v ant age ag e and eff i ci enc y EtherCAT EtherCAT – Ultra high-speed high-speed for Automation
15.03.2012
EtherCAT Training
20
Ad v ant an t age ag e and an d eff ef f i c ien c y
no more network tuning: lower engineering costs
Hard real-time with software master: m aster: 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 t he highly integrated EtherCAT Slave Controller
EtherCAT as alone fieldbus
integration „fieldbus „fieldbus in fieldbus“ to connect further 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
Ad v ant an t ages ag es and an d eff ef f i c i enc en c y EtherCAT ins tead tead of o f PCI
Seamless integration of exisiting fieldbus devices
Process image update-time via EtherCAT (1500 bytes input and output data): 150µs
Until now:
Process image update-time via PCI ( 500 byte input and output data): 400µs
15.03.2012
Et h er CAT Tr ai n i n g
22
Ad v ant an t age ag e and an d eff ef f i c ien c y Topology with wi th Ethernet over EtherCAT 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
Et h er CAT Tr ai n i n g
23
Ad v ant an t age ag e and an d eff ef f i c ien c y Topology with vertical vertical int egration ...via 2. Ethernet Port
IPC
.. ..
DVI
+ any any Eth Ether erne nett prot protoc ocol ol can can be be used used + Ethe EtherC rCAT AT perf perfor orma manc nce e is not limi ted + No swi switc tchp hpor ortt termi termina nall nece necess ssar ary y 15.03.2012
Requir Requires es second second Ethern Ethernet et port port (at (at IPC/co IPC/cont ntroll roller) er) Et h er CAT Tr ai n i n g
24
In practis practise e
Driver inst allation allation in System Manage Manager r EtherCAT EtherCAT – Ultra high-speed high-speed for Automation
15.03.2012
EtherCAT Training
25
RealReal-tim tim e Ethern Ethernet et driver dri ver
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 f ree 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 EtherCAT frames frames have always always th e hightest p riori ty!
It is recommended to use a separate network card for highperformance data communication from the operating system!
15.03.2012
EtherCAT Training
26
RealReal-tim tim e Ethern Ethernet et driver dri ver embedded embedded to o perating perating system sys tem
1 Netwo Ne two rk card operating syst em 15.03.2012
EtherCAT Training
2 Other fieldbus 27
In praxis RealReal-tim tim e Ethern Ethernet et driver dri ver
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 exch ange EtherCAT EtherCAT – Ultra high-speed high-speed for Automation
15.03.2012
EtherCAT Training
29
EtherCAT data data exchange exch ange
A range of components components are available available for implementing direct direct synchonous data exchange between two EtherCAT syste s ystems. ms.
Depending on the application requirements, the appropriate method can be selected based on the t he following criteria.
The characteristic characteristic features are:
Synchronous data exchange with predefined data that are specifiedin the configuration
Asynchronous 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 data exchange exch ange Overview EL 6692
Pu b l i s h er / Subscriber
EL 6601
FC1100
Maximum synchronous Data quantity
480 bytes, bidirectional
vari able
1024 bytes, bidirectional (publisher/ subscriber method)
1024 bytes, bidirectional
Maximum asynchronous data quantity
-
-
Optional
-
AoE support
Yes
Yes
-
Yes
Yes
DC support
Ye Y es
-
-
-
-
notice
- recommend recommended ed for synchronization of EtherCAT systems - TwinCAT TwinCAT 2.11 2.11 required
- use of an an Ethernet port in both systems as real-time device - recommen recommended ded for synchronous data exchange
- transfer transfer of RT RT devices into EtherCAT terminal - recommen recommended ded for synchronous data exchange
- Requires Requires free free PCI slot in the IPC - TwinCAT TwinCAT 2.11 2.11 R2 required
- CX5000 CX5000 as subordinate autonomous controller with its own IO is integrated in the higher level system as an EtherCAT slave - option B110 required - TwinCAT TwinCAT 2.11 2.11 R2 required
15.03.2012
EtherCAT Training
CX50x 0B110
31
EtherCAT data data exchange exch ange Topologiy
TwinCAT Ec Master
15.03.2012
TwinCAT Ec Master
EtherCAT Training
TwinCAT Ec Master
Ec Slave (CX/IPC)
32
Protocol EtherCAT EtherCAT – Ultra high-speed 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 synchronisation
Time stamp data types for resolution in nanosecond range
Oversampling data types for hight-resolution hight-resolution measurements
15.03.2012
EtherCAT Training
34
Protocol Protoco l in detail 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 1514 byte. EtherCAT datagramms 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 Protoco l in detail detail Structu re 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, Unit , in computer network the maximum non fragmented transferable data volume.
MTU: max. 1514 Byte
48 Bit
48 Bit
16 Bit
Destination
Source
EtherType
16 Bit
Header …
Embedded in Standard Ethernet Frame,, EtherType 0x88A4 Frame 160 Bi t
Ethernet H.
IP Header
32 Bit
CRC
TCP /IP
CRC
UDP /IP
1..n EtherCAT telegrams 64 Bi t
UDP H.
Header …
Or: via UDP/IP UDP Port 0x88A4 11 Bit
Length 0
15.03.2012
Et h er CAT Tr ai n i n g
1 Bi t
4 Bit
Res. 11
Type 12
15
36
Protocol Protoco l in detail detail Continuity for technologies
fully transparent for TCP/IP available: HTTP, FTP, F TP, … all internet technologies available: 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
Et h er CAT Tr ai n i n g
Ethernet PHY
37
Performance EtherCAT EtherCAT – Ultra high-speed 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 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 lon ger the bottle neck neck of the control!
15.03.2012
EtherCAT Training
µs,
that is equivalent to 20 kHz
39
Performance Function pr inci ple „ Ethernet on the Fly“ Fly“
Wagen 27
Example ICE: „Train“ „Train“
(Ethernet (Ethernet Frame) Frame) doesn´t doesn´t stop
Somebody
who sees the „train“ through a narrow narrow window, sees sees the whole train
„railway
car“ (Sub telegramms) telegramms) have have variable length
Single Single
„people“ „people“ (bits) (bits) or „tour group groups“ s“ (x kbyte) kbyte) can be „removed „removed““ and/or inserted.
15.03.2012
Et h er CAT Tr ai n i n g
40
Performance Processing “ on the fly“
Data is modified and/or added while telegram passes through From vom Master Master
15.03.2012
Without buffering, storing the telegram
minimal telegram delay per node
Optimal performance
Et h er CAT Tr ai n i n g
to Master
41
Performance processing ti mes mes
Runtimes by the cable length are nearly irrelavant,
100 m Etherne Ethernett cable cable need need appro approx. x. 550 550 ns.
Processing time of one or more Ethernet frame through all real slaves on the foreward path and return path. p ath. As order of magnitute magnitute for each slave can be taken:
For an Ethernet device:
approx.1 µs
For an Ebus device: device:
approx. approx. 300 ns
Processi ng time t ime delayed hub and swit sw itches ches (ISO (ISO Layer Layer 2) are not part of an EtherCAT EtherCAT network. A segementation segementation by rout er (ISO (ISO layer layer 3) does not take place pl ace..
15.03.2012
EtherCAT Training
42
Der Der Feld Feldbu bus s EtherCAT EtherCAT EtherCAT – Ultra high-speed high-speed for Automation
15.03.2012
EtherCAT Training
43
The fieldb us EtherCAT Mappin Mapping g of several several proc ess image im ages s
Traditional fieldbus systemes generate physical process image
This has to be mapped to logical process image(s)
Control, e.g. IPC s e g a Data n m i s PLC Data s e c o NC Data r p l a c i g o L
Fieldbus Scanner/ Master DPRAM
node 1
node 1 node 2
node 2
node 3 node 4
node 3
Mapping node 4
15.03.2012
Et h er CAT Tr ai n i n g
44
Der Der Feldb Feldb us EtherCAT Mappin Mapping g of pr ocess image im age bisher bish er
The same applies to control systems with just one process image
Resorting of process data („mapping“) is required, too.
Control e.g. PLC s e g a m i s s e Process c o Data r p l a c i g o L
Fieldbus Scanner/ Master DPRAM
node 1
node 1 node 2
node 2
node 3 node 4
node 3
Mapping node 4 15.03.2012
Et h er CAT Tr ai n i n g
45
The fieldb us EtherCAT Mappin Mapping g moved m oved into the slave devices devices IPC
.. ..
DVI
232 e t y B G 4 o Data n t p u e PLC Data g a NC Data m i s s e c o r p l a c i g o L
Telegram Telegram structu re Ethernet HDR
HDR 1
PLC Data
Sub Telegram 1
H DR DR 2
NC Da Da ta ta
Sub Telegram 2
HDR n
Data n
CRC
Sub Telegram n
Control system in unburdened, master becomes very simple
0
Data is transmitted according to the application requirements: extremely fast, flexible and efficient
15.03.2012
Et h er CAT Tr ai n i n g
46
Der Der Feldbus Feldbu s EtherCAT Direct Direct Memor Memor y Acc ess saves saves time ti me Fieldbus 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 More
15.03.2012
PC Control with EtherCAT CPU
NIC card, DMA transfer
relieved
PCI
performance
bus
Et h er CAT Tr ai n i n g
CPU
memcopy
PC RAM Control task
DMA
47
The fieldb us EtherCAT Rea Reacti on ti me with legacy fieldbus I PLC Task 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
Et h er CAT Tr ai n i n g
48
The fieldb us EtherCAT EtherCAT System
I PLC PLC task 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
Et h er CAT Tr ai n i n g
49
The fieldb us EtherCAT Processing between between two contr ol cycl es
I PLC PLC task task O I PLC task O I PLC task O I PLC task O I PLC task
T
DMA (NIC)
TDMA (Time for data transfer from/to Ethernet controller via direct memory access):
neglectible
T
15.03.2012
EtherCAT Cycle
Et h er CAT Tr ai n i n g
50
The fieldb us EtherCAT Rea Reacti on time tim e with EtherCAT EtherCAT
I PLC PLC task task O I PLC task O I PLC task O I PLC task O I PLC task
worst case Reaction Time Input (Worst case)
15.03.2012
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 d elays any more
due to the very simple protocol no dedicated master systems (e.g. plug in cards) required Et h er CAT Tr ai n i n g
51