field bus

21
Seite 1 Prof. Dr. Egon Sommer MUAS 1 Fieldbuses in Cars and Industry Prof. Dr. Egon Sommer MUAS Table of Content 1. What is a Fieldbus ? 2. Some Basics of Fieldbuses 3. CAN Bus 4. Application in Cars 5. EtherCat

Upload: jose-brito

Post on 25-Oct-2014

38 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Field Bus

Seite 1

Prof. Dr. Egon Sommer

MUAS

1

Fieldbuses in Cars and IndustryProf. Dr. Egon Sommer

MUAS

Table of Content

1. What is a Fieldbus ?

2. Some Basics of Fieldbuses

3. CAN Bus

4. Application in Cars

5. EtherCat

Page 2: Field Bus

Seite 2

Prof. Dr. Egon Sommer

MUAS

1. Where does the word „Field“ come from ?

The outside area of such a plant is called the „Field“

The first buses should connect sensors and actors in such applications

Prof. Dr. Egon Sommer

MUAS

1. Development of control systems

Computer

Bus

MCs

Today

Central-Computer

Process I/O

Yesterday

Field

Substitute many cables with only one (or two) wires !

Transport Information in a serial way = serial bus

Process I/O

Page 3: Field Bus

Seite 3

Prof. Dr. Egon Sommer

MUAS

1. Definition of Fieldbus

A Fieldbusis a serial bus that is optimized for

real-time data transfer between field devices*

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

Prof. Dr. Egon Sommer

MUAS

Market share Europe (2001)

53,6

10,38,4

8,1

6,1

3,8

3,5

2,5

5,8

Profibus

FF

Interbus

Modbus

ASI

Devicenet

CAN

Ethernet

others

Page 4: Field Bus

Seite 4

Prof. Dr. Egon Sommer

MUAS

-> 2. Basics

1. What is a fieldbus ?

2. Basics of Fieldbuses

3. CAN Bus

4. Application in Cars

5. EtherCat

Prof. Dr. Egon Sommer

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

Low-priced connecting components

Easy adaptation to topology of plant

Page 5: Field Bus

Seite 5

Prof. Dr. Egon Sommer

MUAS

serial buses

with media wireless

radio

infrared

power line

twisted pair

coax cable

fiber optic

Media for Serial BusesProf. Dr. Egon Sommer

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

BusBUS_L

BUS_H

EMI

Node CNode A Node BV

t

U diff

BUS_H

BUS_L

Shielding the bus presents further improvement

Page 6: Field Bus

Seite 6

Prof. Dr. Egon Sommer

MUAS

Classification using Media Access

serial buses

time multiplex frequency multiplex

several membersper channel

one memberper channel

asynchronoustransmission

synchronoustransmissionwith centralController

controlledaccess

randomaccess

central allocation decentral allocation carrier sensewith collision-detection

carrier sensewith collision-avoidance

Prof. Dr. Egon Sommer

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

Token Passing

Carrier Sense Multiple Access / Collision Detection

Time Distributed Multiple Access

Page 7: Field Bus

Seite 7

Prof. Dr. Egon Sommer

MUAS

-> 3. CAN Bus

1. What is a fieldbus ?

2. Basics of Fieldbuses

3. CAN Bus

4. Application in Cars

5. Example EtherCat

Prof. Dr. Egon Sommer

MUAS

Media access (MAC) und Addressing

CAN Bus

Access

Master/Slave

Token-passing

CSMA/CA = collision avoidance

TDMA

Address

Destination Address

Source Address

Page 8: Field Bus

Seite 8

Prof. Dr. Egon Sommer

MUAS

CAN-BUS: Addressing

Source Addressing

ID = Identifier = Message Number Station Number

ID (11 bit) Information (64bit) broadcast broadcast

Prof. Dr. Egon Sommer

MUAS

CAN-BUS: Media Access (Arbitration)

• bitwise, lowest message-ID wins

CSMA/CA = collision avoidance

Bus

C

B

A

Sampling

time

• zero is dominant

! Identifiers must be unique !

Page 9: Field Bus

Seite 9

Prof. Dr. Egon Sommer

MUAS

CAN Baud Rate vs. Bus Length

max 1Mbit/s for 40m length

max 1000m length with 50 kBit/s

Figure valid for

wire

40 100 1000 10,000

CAN Bus length [m]

0 10 200

1000

500

10

5

Bit Rate

[kbps]20

50

200

100

Each Bit must be stable at all stations before sampling !

=> Speed is slow for big distance

Prof. Dr. Egon Sommer

MUAS

Cables (equivalent circuit diagram)

∆R ∆L

∆G ∆C

∆∆∆∆R = resistance ΩΩΩΩ/m

∆∆∆∆C = capacity pF/m

∆∆∆∆L = inductance nH/m

∆∆∆∆G = conductance between wires mS/m

ZR j L

G j C

L

C=

+

+≈

∆ ∆

∆ ∆

ω

ω

with ∆∆∆∆R, ∆∆∆∆G = 0;

vL C r

=∗

≈1 1

∆ ∆ ε

( )[ ]T C l R R l Ri l= ∗ ∗ + ∗∆ ∆ ||

Ri resistance of source (transmitter)

Rl resistance of load (receiver)

Characteristic impedance Velocity of propagation

Time constant

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

Page 10: Field Bus

Seite 10

Prof. Dr. Egon Sommer

MUAS

CAN data transfer

Receiving

Device

CAN Data Link

LayerID + DataCAN Data Link

LayerID + data...

Transmitting

Device

CAN Physical

Layer

CAN Physical

LayerCAN_L

CAN_Hrecessive recessive

dominant

Application

LayerApplication

LayerData Objects

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

Prof. Dr. Egon Sommer

MUAS

CAN Protocol format

Version 2.0A 11Bit ID - Version 2.0B 29 Bit ID

Page 11: Field Bus

Seite 11

Prof. Dr. Egon Sommer

MUAS

Basic CAN Implementation

Only basic functions regarding the filtering and managing of CANmessages 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

CPU load

low high

RxTx

Status/Control

Registers

Receive

Buffer(s)

CAN

Protocol

Controller

AcceptanceFiltering

Bus Inte

rfaceCAN

Bus HostInter-

face

Transmit

Buffer(s)

Prof. Dr. Egon Sommer

MUAS

Full CAN Implementation

Host CPU

CPU load

low high

Status/ControlRegisters

MessageObject 1

CAN

Protocol

Controller

AcceptanceFiltering

HostInter-

face

Message

Object 2

MessageObject n

...

ReceiveBuffer(s)

CAN

Bus

Bus Inte

rface

Extensive filtering possibilities, more time before CPU needs toreact: leads to lower CPU load

Message Objects store all message information (e.g. identifier /data bytes)

Page 12: Field Bus

Seite 12

Prof. Dr. Egon Sommer

MUAS

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 equipmentComputer tomographs, X-ray machines, dentist & wheel chairs

CAN in building automationHeating, air conditioning, lighting, surveillance etc.

Elevator and escalator control

Prof. Dr. Egon Sommer

MUAS

-> 4. Application in Cars

1. What is a fieldbus ?

2. Basics of fieldbuses

3. CAN Bus

4. Application in Cars

5. EtherCat

Page 13: Field Bus

Seite 13

Prof. Dr. Egon Sommer

MUAS

Example BMW Series 7

4 different buses with about 70 microcomputers !

Prof. Dr. Egon Sommer

MUAS

Features BMW

Rear Mirrors

Steering Wheel

safety system with 10 airbags

DSC

Page 14: Field Bus

Seite 14

Prof. Dr. Egon Sommer

MUAS

CAN Buses in the VW Phaeton

CAN 1 - Drive System

500 kBit/s

CAN 2 - Comfort System

100 kBit/s

CAN 3 - Infotainment

100 kBit/s

Prof. Dr. Egon Sommer

MUAS

Can-Bus Drive

Page 15: Field Bus

Seite 15

Prof. Dr. Egon Sommer

MUAS

Can-Bus ComfortProf. Dr. Egon Sommer

MUAS

Can-Bus Infotainment

Can-Bus Comfort

Page 16: Field Bus

Seite 16

Prof. Dr. Egon Sommer

MUAS

Can-Bus - Total network

Can-Bus Comfort

3 buses with about 45 microcomputers !

Prof. Dr. Egon Sommer

MUAS

-> 5.EtherCat

1. What is a fieldbus ?

2. Basics of fieldbuses

3. CAN Bus

4. Application in Cars

5. EtherCat

Page 17: Field Bus

Seite 17

Prof. Dr. Egon Sommer

MUAS

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

Prof. Dr. Egon Sommer

MUAS

Topology: flexible tree structures

network topology almost

arbitrary

minimal cable length

cost-effective and flexible

extendable anywhere

Page 18: Field Bus

Seite 18

Prof. Dr. Egon Sommer

MUAS

Protocol supports topology recognition

Simplified setup

User guidance at errors

topology recognition is pre-requisite for propagation delay measurement

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

39

40K5 41 42 43

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

59 60

61

62 63 64 65 66

coupler detects and

reports branch

Prof. Dr. Egon Sommer

MUAS

EtherCAT Distributed Clocks

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!

M S

S

S S S S S

S

∆t

Page 19: Field Bus

Seite 19

Prof. Dr. Egon Sommer

MUAS

Frame Format

Standard ISO/IEC 8802.3 Frame Format

Ether-Type: 88A4, publicly assigned by IEEE

EtherCAT/UDP: with Routing and for Socket Interface Implementation

UDP Port: 34980 = 0x88A4, registered with IANA

DA SA TypePreFrame HDR FCS

Ethernet Header ECAT Enet

(6) (6) (2)(8) (2) (4)

HDR

IP

(20)

HDR

UDP

(8)

EtherCAT HDR Data

EtherCAT HDR Data

EtherCAT Telegram EtherCAT Telegram

(10) (34….1488) (10) (34….1444)(2) (2)

CT

R

CT

R

DA SA TypePreFrame HDR FCS

Ethernet Header ECAT Enet

(6) (6) (2)(8) (2) (4)

EtherCAT HDR Data

EtherCAT HDR Data

EtherCAT Telegram EtherCAT Telegram

(10) (34….1488) (10) (34….1444)(2) (2)

CT

R

CT

R

Prof. Dr. Egon Sommer

MUAS

Pass-through telegram access saves time

Data is modified and/or added whiletelegram passes through

vomMaster

fromMasterto Master

Page 20: Field Bus

Seite 20

Prof. Dr. Egon Sommer

MUAS

EtherCAT: random Address-Mapping via FMMU

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

logic

al pro

cess im

age:

up t

o

4 G

Byte

0

23

2Telegram structure

Ethernet HDR HDR 1 Data 1 HDR 2 Data 2 HDR n Data n CRC

SubTelegram 1

Sub-Telegram 2

Sub-Telegram n

Prof. Dr. Egon Sommer

MUAS

EtherCat-Highlights

Network process image: 4 Gigabyte

Node process image: 2 Bit to 64 Kbytes

Address assignment: freely configurable

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

0

23

2

Page 21: Field Bus

Seite 21

Prof. Dr. Egon Sommer

MUAS

Prof. Dr. Egon Sommer

MUAS

The End

Thank you for your attention !

Muchas gracias !

Questions ?

Preguntas ?