What Is A Fieldbus ? 2. Some Basics of Fieldbuses 3. Can Bus 4. Application in Cars 5. Ethercat
What Is A Fieldbus ? 2. Some Basics of Fieldbuses 3. Can Bus 4. Application in Cars 5. Ethercat
1
MUAS
Table of Content
. EtherCat
MUAS
Seite 1
The outside area of such a plant is called the Field The first buses should connect sensors and actors in such applications
MUAS
CentralComputer
Computer
Bus
MCs
Prof. Dr. Egon Sommer
Process I/O
Process I/O
Field
Substitute many cables with only one (or two) wires ! Transport Information in a serial way = serial bus
MUAS
Seite 2
. Definition of Fieldbus
A Fieldbus is a serial bus that is optimized for real-time data transfer between field devices*
Prof. Dr. Egon Sommer
serial bus: information is time multiplexed real-time: cycle times from 100us to about 50ms data transfer: packets from 1 to 250 Byte *field device: sensors, actors, microcomputers
MUAS
5,8
53,6
MUAS
Seite 3
-> . Basics
. EtherCat
MUAS
Requirements for Fieldbuses length 100m to few km -> long distance short latency -> real-time Data rates from 0,1 to 100 MBit/s Low error rates (10 9) -> low disturbance
Prof. Dr. Egon Sommer
MUAS
Seite 4
serial buses
with media
wireless
power line
Prof. Dr. Egon Sommer
radio infrared
MUAS
Node C
BUS_L
t
EMI
MUAS
Seite 5
time multiplex
frequency multiplex
asynchronous transmission
controlled access
Prof. Dr. Egon Sommer
random access carrier sense with collisiondetection carrier sense with collisionavoidance
central allocation
decentral allocation
MUAS
Media access (MAC) - Methods How can several devices share a common medium ? Only one station is allowed to transmit at a time !
Master/Slave
Prof. Dr. Egon Sommer
Token Passing Carrier Sense Multiple Access / Collision Detection Time Distributed Multiple Access
MUAS
Seite 6
. Example EtherCat
MUAS
CAN Bus
Access
Address
Master/Slave
Prof. Dr. Egon Sommer
Destination Address
Token-passing
Source Address
MUAS
Seite 7
CAN-BUS: Addressing
Source Addressing
ID = Identifier = Message Number Station Number
ID (11 bit)
Information (64bit)
broadcast
broadcast
MUAS
A B
Prof. Dr. Egon Sommer
C
Bus
zero is dominant
Seite 8
Sampling time
CAN Baud Rate vs. Bus Length Each Bit must be stable at all stations before sampling ! => Speed is slow for big distance
max 1Mbit/s for 40m length max 1000m length with 50 kBit/s
L
R = resistance /m C = capacity pF/m
Characteristic impedance
Velocity of propagation
Z=
R + jL G + jC
L C
v=
1 L C
Time constant
T = C l ( Ri + R l )|| Rl
Ri resistance of source (transmitter) Rl resistance of load (receiver)
Seite 9
Receiving Device Data Objects Application Layer CAN Data Link Layer CAN Physical Layer
ID + Data
...
ID + data
recessive
recessive
Without a higher layer protocol, CAN only provides a reliable way to share short data (8 Byte) with all connected nodes
MUAS
- Version 2.0B
29 Bit ID
MUAS
Seite 10
Bus Interface
CAN Bus
Status/Control Registers
low
high
Host Interface
CPU load Tx Rx
Acceptance Filtering
MUAS
Bus Interface
CAN Bus
Status/Control Registers
Host Interface
Acceptance Filtering
...
Host CPU
MUAS
Seite 11
MUAS
. EtherCat
MUAS
Seite 12
MUAS
Features BMW
DSC
MUAS
Seite 13
CAN 1 - Drive System 500 kBit/s CAN 2 - Comfort System 100 kBit/s
Prof. Dr. Egon Sommer
MUAS
Can-Bus Drive
MUAS
Seite 14
Can-Bus Comfort
MUAS
Can-Bus Infotainment
Can-Bus Comfort
Prof. Dr. Egon Sommer MUAS
Seite 15
Can-Bus Comfort
Prof. Dr. Egon Sommer
-> .EtherCat
. EtherCat
MUAS
Seite 16
What is Ethercat?
Master/Slave network with real-time features Ethernet physical layer Ethernet-(or UDP-)frame with own protocol Standard network adapter for master slaves need special hardware Virtual shared memory Distributed clocks with precise synchronization
MUAS
MUAS
network topology almost arbitrary minimal cable length cost-effective and flexible extendable anywhere
Seite 17
K1 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17
K2 18 19 20 21 22
K3 23 24 25 26 27 28 29 30 31 32 33
K4 34 35 36 37 38
Simplified setup User guidance at errors topology recognition is pre-requisite for propagation delay measurement
Prof. Dr. Egon Sommer
62
63
64
65
66
39
K5 41 42 43
40
K6 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
61
59
60
MUAS
M
t
EtherCAT Clock Master generates system time Time value is distributed by broadcast mechanism Local time is latched at reception of system time Slave clocks are adjusted accordingly
MUAS
Seite 18
Frame Format
Standard ISO/IEC 8802.3 Frame Format Ether-Type: 88A4, publicly assigned by IEEE
Ethernet Header
ECAT
Frame HDR
(2) (2)
EtherCAT Telegram
EtherCAT HDR
(10)
EtherCAT Telegram
EtherCAT HDR
(10) CTR
Enet
CTR
Pre
(8)
DA
(6)
SA
(6)
Type
Data
(34.1488)
Data
(34.1444)
FCS
(4)
(2)
(2)
Ethernet Header
IP
HDR
(20) (2)
UDP
HDR
(8)
ECAT
Frame HDR
(2)
EtherCAT Telegram
EtherCAT HDR
(10) CTR
EtherCAT Telegram
EtherCAT HDR
(10)
Enet
CTR
Pre
(8)
DA
(6)
SA
(6)
Type
Data
(34.1488)
Data
(34.1444)
FCS
(4)
(2)
(2)
MUAS
Pass-through telegram access saves time Data is modified and/or added while telegram passes through
from vom Master to Master
MUAS
Seite 19
23
Telegram structure
Ethernet HDR HDR 1 Data 1 HDR 2 Data 2 HDR n Data n CRC
Sub Telegram 1
SubTelegram 2
SubTelegram n
MUAS
EtherCat-Highlights
2
3 2
Address assignment: freely configurable 0 Address selection for nodes: automatically via software Optimized protocol directly in Ethernet frame Protocol implemented completely in hardware For routing and socket interface: UDP datagram Telegram data exchange during pass-through at full speed Distributed Clock for precise synchronization Time Stamp Data Types for resolution in nanoseconds
MUAS
Seite 20
MUAS
The End
Preguntas ?
MUAS
Seite 21