You are on page 1of 27

CAN

Holger Zeltwanger

CAN protocol
FD

and its impacts


on CANopen
© CiA
CAN
CAN with flexible data-rate
In-bit-time detection “Free” transmission In-bit-time detection

Arbitration phase Data transmission phase ACK phase

50 kbit/s to 1 Mbit/s up to 15 Mbit/s (1) 50 kbit/s to 1 Mbit/s

(1)  using generic ISO 11898-2 compliant transceiver chips

Improvements:
•  Higher throughput
•  Payload increase (up to 64 byte)

© CiA
CAN
OSI reference model

Application, device or interface profile(s)

All 7: Application layer


People 6: Presentation layer
Seem 5: Session layer
To 4: Transport layer
Need 3: Network layer
Data 2: Data link layer
Processing 1: Physical layer

© CiA
CAN
HLPs are like languages

© CiA
CAN
CAN-based HLPs
!!1991: CAN Kingdom
!!1992: CAN Application Layer (CAL)
!!1994: Smart Distributed System (SDS)
!!1994: IEC 62026-3 (DeviceNet)
!!1994: SAE J1939 series
!!1995: EN 50325-4 (CANopen)
!!1999: ISO 11992 series
!!2000: IEC 61162-3 (NMEA 2000)
!!2002: ISO 11783 (ISOBUS)
!!2004: ISO 14229/15765 (Diagnostic)
!!2007: Arinc 825
© CiA
CAN
Common HLP concepts
u  More complex communication services:
u  Confirmed peer-to-peer communication
u  Segmented data transfer (transport protocols)
u  other services such as synchronized communication

u  Pre-defined CAN-IDs (plug-and-play)


u  Network and node (device) configuration
u  Network and node (device) error handling
u  Network boot-up procedure
u  Definition of data-content (profiles)

© CiA
CAN
Standardized HLP benefits
u  Interoperability between ECUs/devices
u  (Partly) interchangeability of ECUs/devices
u  Off-the-shelf plug-and-play capability
u  Off-the-shelf protocol stack
u  Off-the-shelf configuration and analysis tools
u  Independent conformance testing and certification

© CiA
CAN
Standardized HLP restrictions
u  Configuration or design tools required
u  Additional hardware resources for configuration
u  Restrictions regarding:
u  CAN-ID assignment and usage
u  Number of nodes in one single network segment
u  Kind and function of communication services

© CiA
CAN
General HLP design rules

!  No double-use of CAN-IDs
!  (Correct use of CAN remote frames)
!  Detecting of missing nodes or messages
!  Average bus-load control mechanism
!  No transmission of relative data

© CiA
CAN
Additional HLP functionality
!  Overcoming the CAN-ID limitation
!  Transport protocol for longer data
!  Automatic distribution of priorities
!  Network/node management
!  Configuration of the bit-timing via the network
!  Assignment of node-names via the network
!  Message confirmation
!  Program download via the network
!  Configuration of message scheduling
!  etc.

© CiA
CAN
History of CANopen
1993
ESPRIT project ASPIC (CAL-based communication profile)
1994
CAL-based communication profile version 1.0
1995
CAL-based communication profile version 1.1
1995
CiA 301 CANopen application layer version 2.0
1996
CiA 301 CANopen application layer version 3.0
1999
CiA 301 CANopen application layer version 4.0
2007
CiA 301 CANopen application layer version 4.2
201X
CiA 301 CANopen application layer version 5.0

© CiA
CAN
CANopen specifications
CiA301 CiA302 CiA303 CiA304 CiA305 CiA306 CiA307
CiA308 CiA309 CiA310 CiA311 CiA312 CiA313 CiA401
CiA402 CiA404 CiA405 CiA406 CiA408 CiA410 CiA412
CiA413 CiA414 CiA415 CiA416 CiA417 CiA418 CiA419
CiA420 CiA421 CiA422 CiA423 CiA424 CiA425 CiA426
CiA427 CiA428 CiA429 CiA430 CiA431 CiA432 CiA433
CiA434 CiA435 CiA436 CiA438 CiA439 CiA440
CiA441 CiA442 CiA443 CiA444 CiA445 CiA446
CiA447 CiA448 CiA449 CiA450 CiA451 CiA452

1995: 60 DIN A4 pages 2012: 10000+ DIN A4 pages

© CiA
CAN
Communication protocols
! Network management
! NMT Message protocol
! Boot-up/Heartbeat protocol
! Error control
! Heartbeat protocol!
! Service Data Object (SDO)
! Standard SDO protocols
! SDO block protocols!
! Process Data Object (PDO)
! Special COBs
! Synchronization (SYNC) protocol
! Time Stamp (TIME) protocol
! Emergency (EMCY) protocol

© CiA
CAN
NMT protocol
NMT master NMT slaves(s)

indication(s)

request DLC = 2
CS Node-ID
CAN-ID = 000h

Command specifier (CS) values:


1 = Enter NMT operational (Start remote node)
2 = Enter NMT stopped (Stop remote node)
128 = Enter NMT pre-operational
129 = Enter NMT initialization at Reset application sub state (Reset node)
130 = Enter NMT initialization at Reset communication sub state (Reset communication)
Node-ID:
0 = Command is valid for all CANopen devices
1 to 127 = Command is only valid for CANopen device with that node-ID

© CiA
CAN
Boot-up protocol
NMT slave NMT master

DLC = 1

0
request indication
CAN-ID = 700h + node-ID

© CiA
CAN
Heartbeat protocol
Heartbeat producer Heartbeat consumer(s)

DLC = 1

Node state
request indication(s)
CAN-ID = 700h + node-ID
Heartbeat
producer
time (1017h)
in ms
Node state
request indication(s)

Heartbeat
consumer
time (1016h) Heartbeat
in ms event

Node state values: indication


4 = Stopped
5 = Operational
127 = Pre-operational
© CiA
CAN
Normal SDO protocol
Client initiate SDO download Server
CS MUX (Length)

initiate SDO download response


CS MUX Not used
download SDO segment 1
CS DATA
download segment 1 response
CS Not used
download segment 2 to n-1
CS DATA
download segment 2 to n-1 response
CS Not used
download segment n
CS DATA
download segment n response
CS Not used

© CiA
CAN
PDO protocol
Producer Consumer(s)
Asynchronous or synchronous PDO

indication(s)
Application object(s)
CAN-ID = pre-defined or user-specific

Index Sub Object contents


1600 h 01h
request 2000 01h 08h
1600h 02h 2003 03h 08h
1600h 03h 2003 01h 08h

1600h 3Fh 2101 00h 08h


1600h 40h 2102 00h 08h
© CiA
CAN
Emergency protocol
Emergency Emergency
producer consumer(s)

2 byte 1 byte 5 to 61 byte


request indication(s)
EEC ER SEF
Default CAN-ID = 080h + Node-ID
DLC = 8

EEC = Emergency Error Code


ER = Error Register (1001h)
SEF = (Profile or device)-Specific Error Field

EMCY producer COB-ID (1014h) EMCY consumer COB-IDs (1028h)


EMCY Inhibit time (1015h) 01h Consumer time 01
02h Consumer time 02
...
7Fh Consumer time 127

© CiA
CAN
CANopen application domains
Transportation: Passenger cars, trucks and buses, e-vehicles,
trains, ships and vessels, helicopters and
aircrafts
Manufacturing: Robot and embedded machine control
Healthcare: Medical devices and laboratory automation
Construction: Lift and door control; commercial vehicles
Agriculture and forestry: Harvesting machines, cow-sheds
Retail and finance: Vending machines
Science: Telescopes, high-energy physics
Entertainment: Studio equipment, moving cameras, gambling
Communication: Embedded control in satellites
Domestic appliances: Coffee machine, service robots

© CiA
CAN
Embedded networks
•  The end user is not the system designer
•  Software updates are made by trained technicians
•  The network is highly optimized and vendor-specific
•  System design is based on CANopen device profiles
•  In some embedded system higher throughput is required
•  In complex applications larger payloads are needed

© CiA
CAN
Open network
•  The end-user could be the system designer
•  Automatic software downloads require more bandwidth
•  The highly standardized network provides off-the-shelf plug-and-play capability
•  System design based on CANopen application profiles
•  Throughput is not an issue
•  Higher payload is required

© CiA
CAN
Truck body applications
CAN-based J1939
or proprietary network
CiA 422
J1939
CiA 413 Device 1
ECU 1
Gateway
J1939
Device n
ECU n

Truck chassis

CiA 422 CANopen application profile for refuse collecting vehicles


© CiA
CAN
Container handling systems
Crane Straddle
control carrier
system system
CANopen CANopen

Spreader CiA 444-2 Spreader


CiA 444-3
control control
unit unit
CANopen

I/O I/O

© CiA
CAN
Special-purpose car

CAN-based network for add-on modules


Taximeter Printer Card reader User IF
CANopen
CiA 447

Diagnostic Gateway Blue light etc.


gateway to IVN
Scanner
tool

Speed
ECU GPS
sensor

© CiA
CAN
Light electric vehicles
EnergyBus
controller
(LSS master)
CANopen

10 x instances (1)
CiA 454

1 x instances (3)
2 x instances (2)
4 x instances
16 x instances
8 x instances

4 x instances

8 x instances
Voltage Battery Motor Load HMI Sensor Gateway Security
converter pack control monitor unit unit unit unit
unit

Active virtual devices Passive virtual devices


(1) e.g.: (3) e.g.:
(2) e.g.:
2 x accelerator 1 x security lock
2 x Bluetooth devices
2 x torque 1 x key
6 x biometric 1 x main switch

HMI: human machine interface


LSS: Layer setting services

© CiA
CAN
CAN-FD impacts on CANopen
!  SDO services: New protocols with payloads up to 63 byte
(accelerates software downloads)
!  SDO services: New protocols for down/up-loading structured data
(avoids configuration inconsistencies)
!  PDO services: Improved mapping with up to 64 byte
(in particular for more complex devices such as electrical drives)
!  EMCY services: Longer payload for diagnostic information
(overcomes todays functional limitations)
!  NMT services: No change necessary
!  Heartbeat services: No change necessary
!  TIME service: No change necessary
!  SYNC service: No change necessary

© CiA

You might also like