You are on page 1of 21

Fieldbuses in Cars and Industry

Prof. Dr. Egon Sommer

1
MUAS

Table of Content

. What is a Fieldbus ? . Some Basics of Fieldbuses . CAN Bus . Application in Cars


Prof. Dr. Egon Sommer

. EtherCat

MUAS

Seite 1

. Where does the word Field come from ?

Prof. Dr. Egon Sommer

The outside area of such a plant is called the Field The first buses should connect sensors and actors in such applications

MUAS

. Development of control systems


Yesterday Today

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

Market share Europe (

2,5 3,5 3,8 6,1


Prof. Dr. Egon Sommer

5,8

8,1 8,4 10,3

53,6

Profibus FF Interbus Modbus ASI Devicenet CAN Ethernet others

MUAS

Seite 3

-> . Basics

. What is a fieldbus ? . Basics of Fieldbuses . CAN Bus . Application in Cars


Prof. Dr. Egon Sommer

. 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

Low-priced connecting components Easy adaptation to topology of plant

MUAS

Seite 4

Media for Serial Buses

serial buses

with media

wireless

power line
Prof. Dr. Egon Sommer

radio infrared

twisted pair coax cable fiber optic

MUAS

Electro Magnetic Interference


Twisted pair and differential evaluation of the signal is insensitive to electromagnetic interference (RS485) If EMI hits the bus, both bus lines are affected in the same way, which leaves the differential signal unaffected Shielding the bus presents further improvement Node A Node B
BUS_H U diff
Prof. Dr. Egon Sommer

Node C

BUS_L
t

BUS_H Bus BUS_L

EMI

MUAS

Seite 5

Classification using Media Access


serial buses

time multiplex

frequency multiplex

synchronous transmission with central Controller

asynchronous transmission

one member per channel

several members per channel

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

-> . CAN Bus

. What is a fieldbus ? . Basics of Fieldbuses . CAN Bus . Application in Cars


Prof. Dr. Egon Sommer

. Example EtherCat

MUAS

Media access (MAC) und Addressing

CAN Bus

Access

Address

Master/Slave
Prof. Dr. Egon Sommer

Destination Address

Token-passing

Source Address

CSMA/CA = collision avoidance


TDMA

MUAS

Seite 7

CAN-BUS: Addressing

Source Addressing
ID = Identifier = Message Number Station Number

ID (11 bit)

Information (64bit)
  

Prof. Dr. Egon Sommer

broadcast

broadcast

MUAS

CAN-BUS: Media Access (Arbitration)

A B
Prof. Dr. Egon Sommer

C
Bus

bitwise, lowest message-ID wins

zero is dominant

CSMA/CA = collision avoidance ! Identifiers must be unique !


MUAS

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

1000 500 200


Prof. Dr. Egon Sommer

Figure valid for wire

Bit Rate [kbps]

100 50 20 10 5 0 10 40 100 200 1000 10,000

CAN Bus length [m]


MUAS

Cables (equivalent circuit diagram)

L
R = resistance /m C = capacity pF/m

L = inductance nH/m G = conductance between wires mS/m

Characteristic impedance

Velocity of propagation

Z=

R + jL G + jC

L C

v=

1 L C

with R, G = 0; Prof. Dr. Egon Sommer

Time constant

T = C l ( Ri + R l )|| Rl
Ri resistance of source (transmitter) Rl resistance of load (receiver)

! Cable constants R ,C and length limit speed of CAN !


MUAS

Seite 9

CAN data transfer


Transmitting Device Application Layer CAN Data Link Layer CAN Physical Layer
Prof. Dr. Egon Sommer

Receiving Device Data Objects Application Layer CAN Data Link Layer CAN Physical Layer

ID + Data

...

ID + data

recessive

CAN_H dominant CAN_L

recessive

Without a higher layer protocol, CAN only provides a reliable way to share short data (8 Byte) with all connected nodes

MUAS

CAN Protocol format

Prof. Dr. Egon Sommer

Version 2.0A 11Bit ID

- Version 2.0B

29 Bit ID

MUAS

Seite 10

Basic CAN Implementation


Only basic functions regarding the filtering and managing of CAN messages are implemented in hardware which can result in a high CPU load Should only be used in CANs with very low baud rates and/or very few messages
Host CPU

Bus Interface

Prof. Dr. Egon Sommer

CAN Bus

CAN Protocol Controller

Status/Control Registers

low

high

Transmit Buffer(s) Receive Buffer(s)

Host Interface

CPU load Tx Rx

Acceptance Filtering

MUAS

Full CAN Implementation


Extensive filtering possibilities, more time before CPU needs to react: leads to lower CPU load Message Objects store all message information (e.g. identifier / data bytes)

Bus Interface

CAN Bus

CAN Protocol Controller

Status/Control Registers

Message Object 1 Message Object 2

Host Interface

low high CPU load

Prof. Dr. Egon Sommer

Acceptance Filtering

...

Host CPU

Message Object n Receive Buffer(s)

MUAS

Seite 11

CAN Applications CAN in industrial automation


Excellent way of connecting all kinds of automation equipment (control units, sensors and actuators) Used for initialization, program and parameter up-/download, exchange of rated values / actual values, diagnosis etc. Machine control (printing machines, paper- and textile machines etc.): Connection of the different intelligent subsystems

CAN in medical equipment


Computer tomographs, X-ray machines, dentist & wheel chairs
Prof. Dr. Egon Sommer

CAN in building automation


Heating, air conditioning, lighting, surveillance etc. Elevator and escalator control

MUAS

-> . Application in Cars

. What is a fieldbus ? . Basics of fieldbuses . CAN Bus . Application in Cars


Prof. Dr. Egon Sommer

. EtherCat

MUAS

Seite 12

Example BMW Series

Prof. Dr. Egon Sommer

4 different buses with about 70 microcomputers !

MUAS

Features BMW

Steering Wheel Rear Mirrors safety system with 10 airbags


Prof. Dr. Egon Sommer

DSC

MUAS

Seite 13

CAN Buses in the VW Phaeton

CAN 1 - Drive System 500 kBit/s CAN 2 - Comfort System 100 kBit/s
Prof. Dr. Egon Sommer

CAN 3 - Infotainment 100 kBit/s

MUAS

Can-Bus Drive

MUAS

Prof. Dr. Egon Sommer

Seite 14

Can-Bus Comfort

MUAS

Prof. Dr. Egon Sommer

Can-Bus Infotainment

Can-Bus Comfort
Prof. Dr. Egon Sommer MUAS

Seite 15

Can-Bus - Total network

Can-Bus Comfort
Prof. Dr. Egon Sommer

3 buses with about 45 microcomputers !


MUAS

-> .EtherCat

. What is a fieldbus ? . Basics of fieldbuses . CAN Bus . Application in Cars


Prof. Dr. Egon Sommer

. 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

Prof. Dr. Egon Sommer

Topology: flexible tree structures

MUAS

Prof. Dr. Egon Sommer

network topology almost arbitrary minimal cable length cost-effective and flexible extendable anywhere

Seite 17

Protocol supports topology recognition

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

coupler detects and reports branch

K6 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

61

59

60

MUAS

EtherCAT Distributed Clocks

M
t

Prof. Dr. Egon Sommer

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

Synchronisation in the nanosecond range!

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)

EtherCAT/UDP: with Routing and for Socket Interface Implementation


Prof. Dr. Egon Sommer

UDP Port: 34980 = 0x88A4, registered with IANA

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

Prof. Dr. Egon Sommer

Seite 19

EtherCAT: random Address-Mapping via FMMU

logical process image: up to 4 GByte

23

Telegram structure
Ethernet HDR HDR 1 Data 1 HDR 2 Data 2 HDR n Data n CRC

Prof. Dr. Egon Sommer

Sub Telegram 1

SubTelegram 2

SubTelegram n

FMMU: Fieldbus Memory Management Unit


Process data of Ethernet Terminals can be assigned to Sub-telegrams randomly

Data of Sub/telegrams can be assigned to logical process image randomly

MUAS

EtherCat-Highlights

Network process image: 4 Gigabyte Node process image: 2 Bit to 64 Kbytes

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

Prof. Dr. Egon Sommer

Seite 20

MUAS

Prof. Dr. Egon Sommer

The End

Thank you for your attention ! Muchas gracias !


Questions ?
Prof. Dr. Egon Sommer

Preguntas ?

MUAS

Seite 21

You might also like