Professional Documents
Culture Documents
Section 1: History
Section 1: History
History
1980-1983:
CAN developed on the initiative of the German equipment manufacturer BOSCH in
response to a need in the automotive industry.
CAN defines only part of layers 1 and 2 of the ISO model.
1983-1987:
Price of drivers and micro-controllers with integral CAN very attractive
because of the high volume used by the automotive industry
1991:
Launch of CiA = CAN in Automation: http://www.can-cia.de/ to promote
industrial applications
History
1993:
Publication by CiA of CAL = CAN Application Layer specifications
describing transmission mechanisms without defining when and how to use
them.
1995:
Publication by CiA of the DS-301 communication profile: CANopen
2001:
Publication by CiA of DS-304, enabling level 4 safety components to be
integrated onto a standard CANopen bus (CANsafe).
Reference specifications
• CANopen (CiA):
Defines which CAL tools to use and how.
Ensures interoperability of products by profile descriptions.
6 PRESENTATION EMPTY
5 SESSION EMPTY
4 TRANSPORT EMPTY
3 NETWORK EMPTY
specifications
2 LINK = LLC + MAC CAN 2.0 A and B + ISO 11898
CAN
CAN 2.0 A and B = ISO 11898
1 PHYSICAL
ISO 11898 + DS-102
6 PRESENTATION EMPTY
5 SESSION EMPTY
4 TRANSPORT EMPTY
3 NETWORK EMPTY
Recommended connections
General use
9-pin SUB D connector DIN 41652, multi-pole connector (ribbon cable to 9-pin SUB-D),
RJ10 and RJ45
Industrial use
5-pin Mini Style, 5-pin Micro Style, Open Style
Special use
7-pin round connector, 8-pin round connector, 9-pin round connector, 12-pin round
connector, Hand Brid Harting.
RJ45 connector
Recommended suppliers
Cables
- U.I.LAPP GmbH
Schultze-Delitsch-Str. 25
D-70565 Stuttgart Germany
http://www.lappcable.com
Connectors
- ERNI Elektroapparate GmbH
Seestrasse 9 D-73099 Adelberg Germany
- ERNI Connectique S.a.r.l, France
27 bis, avenue des Sources/CP 638 F-69258 LYON Cedex 09,
http://connect.erni.com/
The CAN V2.0 specification consists of 2 parts: CAN 2.0.A and CAN
2.0.B.
Arbitration
field Frame size without bit stuffing: 47 to 111 bits
1 11 1 6 0 to 64 15 111 7
Identifier
SOF
RTR
Control
10 9 8 7 6 5 4 3 2 1 0 field
S1 S2 S3
Station 1 D Station 1
loses arbitration
Station 2
Station 2
loses arbitration
Station 3
Bus
Error counters
Depending on the value of these counters, the node will be in one of the
following 3 states:
Active errors
Passive errors
Bus OFF (sending driver disconnected from the bus).
Active
errors
128 occurrences of
Passive 11 consecutive
errors recessive bits (end
of frames without
errors)
TEC > 255
Bus OFF
Error Frame: these frames are transmitted when a station detects the
presence of errors on the bus.
Overload Frame: these frames are sent to ask for an additional time
lapse between successive frames (data or request).
Error Frame
Error detected
Overload Frame
EOF or ERROR DELIMITER
Protection mechanisms
ACK slot: this window enables the sender to know that his message
has been received correctly by at least one station (dominant bit).
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 27/61
10/2004
CANopen
Section 4: Application layer
6 PRESENTATION EMPTY
5 SESSION EMPTY
4 TRANSPORT EMPTY
3 NETWORK EMPTY
Application layer
CANopen defines:
how data is transmitted:
DS-301 communication profile common to all products
Amongst other things this defines the allocation of COB-ID identifiers for each type
of message.
Object Dictionary = OD
This description takes the form of an EDS file (Electronic Data Sheet)
in ASCII format. This has a strict syntax and can be used by the bus
configurators (Sycon etc.)
0x0001 – 0x009F Data Types Area Defines the various types of variables
used: bytes, words, double words,
signed, unsigned, etc.
0x1000 – 0x1FFF Communication Profile Area Describes the objects associated with
communication.
0x2000 – 0x5FFF Manufacturer Specific Profile Area Describes the "application" objects
specific to the manufacturer.
0x6000 – 0x9FFF Standardised Device Profile Area Describes the "application" objects
standardised by CiA.
CANopen profiles
Some objects are mandatory, others are optional. They can be accessed in
read-only mode or in read/write mode.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 33/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts
Allocation of identifiers
Identifiers can be allocated in 3 different ways:
This allocation occurs in the "Pre operational" state just after the initialization
phase.
Function code is used to code 2 PDOs in receive mode, 2 PDOs in transmit mode, 1 SDO,
1 EMCY object, 1 Node Guarding Identifier, 1 SYNC object, 1 Time Stamp object and 1
node guarding.
Node ID corresponds to the product address coded by DIP switches, for example.
maximum reserved
Receive PDO 1 0100 0x201 to 0x27F 513 to 639
1024 identifiers
Transmit PDO 2 0101 0x281 to 0x2FF 641 to 767
for PDOs.
Receive PDO 2 0110 0x301 to 0x37F 769 to 895
Transmit PDO 3 0111 0x381 to 0x3FF 897 to 1023
Receive PDO 3 1000 0x401 to 0x47F 1025 to 1151
Transmit PDO 4 1001 0x481 to 0x4FF 1153 to 1279
Receive PDO 4 1010 0x501 to 0x57F 1281 to 1407
SDO server 1011 0x581 to 0x5FF 1409 to 1535
SDO client 1100 0x601 to 0x67F 1537 to 1663
NODE GUARD 1110 0x701 to 0x77F 1793 to 1919
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 39/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services
RxPDO_1_SL2
RxPDO_2_SL2 Slave 2
TxPDO_1_SL2 All the nodes
RxPDO_1_SL3 (slaves)
RxPDO_2_SL3 TxPDO_2_SL2 communicate with
a central station
RxPDO_1_SL2 (master)
TxPDO_1_SL1 RxPDO_2_SL2
TxPDO_2_SL1
Output
TxPDO_1_SL2
Slave 3
s
TxPDO_2_SL2
TxPDO_1_SL3 TxPDO_1_SL3
TxPDO_2_SL3 TxPDO_2_SL3
RxPDO_1_SL3
RxPDO_2_SL3
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 40/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services
Product Y Product Z
TxPDO_1_PY TxPDO_1_PZ
TxPDO_2_PY TxPDO_2_PZ
RxPDO_1_PY RxPDO_1_PZ
RxPDO_2_PY RxPDO_2_PZ
RxPDO_3_PY RxPDO_3_PZ
They enable a producer device to make a variable with a maximum size of 64 bits
without overhead available to one or more consumers.
Description of PDOs
Each transmit or receive PDO is described by 2 objects in the object
dictionary:
Sub- Default
Index Name Format Description
Index value
Number of
0 elements
Byte 3 Number of elements following
Sub- Default
Index Name Format Description
Index value
Number of
0 elements
Byte 2 Number of elements following
Sub- Default
Index Name Format Description
Index value
Depends
Number of
0 elements
Byte on Number of objects mapped
product
Byte 3 and 2 (most significant bits)=Index
st Depends
1 object Double Byte 1 = Sub-index
1 mapped
on
word Byte 0 = Length in bits
0x1600 product
Example: 0x62000108
to Byte 3 and 2 (most significant bits)=Index
0x17FF Depends
2nd object Double Byte 1 = Sub-index
2 mapped
on
word Byte 0 = Length in bits
product
Exemple : 0x62000208
… … … … …
8th object Double
8 mapped 0 As above
word
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 47/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services
Asynchronous:
- transmission is triggered by a "Remote Transmission request"
- transmission is pre-triggered by the occurrence of a "Specific event"
object in the device profile
These services are used for the point to point transmission of parameter
setting data which is not time critical.
They enable a client device (bus manager) to access the object dictionary
of a server device (stations 1 to 127) in write or read mode, by addressing it by
its Index and Sub-index.
The size of the data may exceed 8 bytes, in which case a data segmentation
system is activated.
These objects are used to synchronize the acquisition of inputs or updating of outputs
(axis control for example).
The "SYNC master" sends the SYNC message at a an interval (communication cycle
period) fixed at the time of configuration.
EMCY Object:
EMCY objects are triggered when an internal fault occurs in the device (current,
voltage, temperature, communication, etc).
There are 2 mechanisms for monitoring the status of stations on the bus.
Node guarding
This operates on the basis of the master-slave concept (polling), allowing the bus
manager to request (remote request) the status of each station at a configurable time
interval.
Heartbeat
This operates on the basis of the producer-consumer concept.
The status of the station is generated cyclically at a configurable interval.
The NMT master monitors the status of slaves connected to the network by periodically sending a Node
guard object remote frame to each slave.
Each slave answers immediately on reception.
Slaves have the option of monitoring the NMT master: Life guarding.
Life Time = Guard Time x Life Time Factor
If a slave receives no polling for a period equal to the Life Time, it generates a "Life guarding" event,
goes into communication fault mode and sends an EMCY object.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 53/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services
The NMT master periodically monitors the status of each slave by sending a
remote frame and comparing it with the values previously recorded in a
table.
Heartbeat:
The heartbeat producer transmits the heartbeat message at an interval defined in the
“Heartbeat producer time” object.
The heartbeat consumer verifies that it has received the heartbeat message within
the time window defined in the “Heartbeat consumer time” object.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 55/61
10/2004
CANopen
Physical Layer
Link layer
The priority of a message is given by the value of the identifier called COB-
ID (Communication Object Identifier) located at the beginning of the frame.
The COB-ID with the lowest value has the highest priority.
Link layer
The identifier value informs receivers as to the type of data contained in each
message.
Each receiver decides whether or not to consume the data according to his
configuration.
Security of transmission:
Among the best on industrial local area networks.
Numerous signalling and error detection devices ensure excellent security of
transmission.
Application layer
CANopen defines:
how data is transmitted:
DS-301 communication profile common to all products
Amongst other things this defines the allocation of COB-ID identifiers for each type of
message.
These functions are described by means of a Device Object Dictionary (OD) in the
form of an EDS file.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 60/61
10/2004
Section 5 : Main characteristics resume
Application layer