You are on page 1of 61

CANopen

Section 1: History

Section 2: Physical layer

Section 3: Link layer

Section 4: Application layer

Section 4: Main characteristics resume

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 1/61
10/2004
CANopen

Section 1: History

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 2/61
10/2004
Section
Section 11 :: History
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

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 3/61
10/2004
Section
Section 11 :: History
History

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).

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 4/61
10/2004
Section 1 : History

Reference specifications

CANopen was built chronologically on the basis of several specifications:

• CAN 2.0 A and B (originating from Robert BOSCH)


Defines precisely the link layer and part of the physical layer

• CAL = CAN Application Layer (CiA):


Provides tools for developing an application using CAN without instructions
for use + further details on the physical layer

• CANopen (CiA):
Defines which CAL tools to use and how.
Ensures interoperability of products by profile descriptions.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 5/61
10/2004
Section 1 : History

CANopen Device Profile Device Profile Device Profile Device Profile


CiA DSP-401 CiA DSP-402 CiA DSP-404 CiA DSP-4xx
and the ISO model I/O modules Drives Measuring devices

CiA DS-301 = Communication profile


7 APPLICATION
CAL= CAN Application Layer

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

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 6/61
10/2004
CANopen
Section 2: Physical layer

Part 1: Network characteristics

Part 2: Recommended connections

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 7/61
10/2004
Section 2: Physical layer - Part 1: Network characteristics

CANopen Device Profile Device Profile Device Profile Device Profile


CiA DSP-401 CiA DSP-402 CiA DSP-404 CiA DSP-4xx
physical layer I/O modules Drives Measuring devices

CiA DS-301 = Communication profile


7 APPLICATION
CAL= CAN Application Layer

6 PRESENTATION EMPTY

5 SESSION EMPTY

4 TRANSPORT EMPTY

3 NETWORK EMPTY

2 LINK = LLC + MAC CAN 2.0 A and B + ISO 11898

CAN 2.0 A and B + ISO 11898


1 PHYSICAL
ISO 11898 + DS-102 + DRP-301-1

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 8/61
10/2004
Section 2: Physical layer - Part 1: Network characteristics

Description of the network

Twisted differential pair: 1 pair if CAN-H/CAN-L


2 pairs if CAN-H/CAN-L + p. supply

Characteristic line impedance: 120 ohms nominal

Line terminators: 120 ohms at each end

Wire resistance: 70 milli-ohms/metre nominal

Propogation time: 5 ns/metre nominal

Topology: Bus type with the shortest


possible tap links
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 9/61
10/2004
Section 2: Physical layer - Part 1: Network characteristics

Data rate - bus length - cable cross-section for 32 slaves maximum

Data rate Bus length Cable x-section


1 Mbps 25 m 0.25 mm2 AWG 23
800 Kbps 50 m 0.34 mm2 AWG 22
500 Kbps 100 m 0.34 mm2 AWG 22
250 Kbps 250 m 0.34 mm2 AWG 22
125 Kbps 500 m 0.5 mm2 AWG 20
50 Kbps 1000 m 0.75 mm2 AWG 18
20 Kbps 1000 m 0.75 mm2 AWG 18
10 Kbps 1000 m 0.75 mm2 AWG 18

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 10/61
10/2004
Section 2: Physical layer - Part 1: Network characteristics

Data rate - bus length - cable cross-section for 100 slaves


maximum

Data rate Bus length Cable x-section


1 Mbps 25 m 0.34 mm2 AWG 22
800 Kbps 50 m 0.6 mm2 AWG 20
500 Kbps 100 m 0.6 mm2 AWG 20
250 Kbps 250 m 0.6 mm2 AWG 20
125 Kbps 500 m 0.75 mm2 AWG 18
50 Kbps 1000 m 1 mm2 AWG 17
20 Kbps 1000 m 1 mm2 AWG 17
10 Kbps 1000 m 1 mm2 AWG 17

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 11/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

Recommended connections

In its recommendation DR-303-1, the CiA provides a list of suitable


connectors classified into 3 categories.

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.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 12/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

9-pin SUB D connector DIN 41652

Male product end

Pin Signal Description:


1: Reserved
2: CAN_L = CAN_L bus line dominant low
3: CAN_GND = CAN Ground
4: Reserved
5: (CAN_SHLD) Optional CAN Shield
6: (GND) Optional Ground
7: CAN_H = CAN_H bus line dominant high
8: Reserved
9: (CAN_V+) Optional CAN external positive supply

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 13/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

RJ45 connector

Pin Signal Description


1: CAN_H = CAN_H bus line (dominant high)
2: CAN_L = CAN_L bus line (dominant low)
3: CAN_GND = Ground/0 V/V-
4: Reserved
5: Reserved
6: (CAN_SHLD) = Optional CAN Shield
7: CAN_GND = Ground/0 V/V-
8 (CAN_V+) = Optional CAN external positive supply

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 14/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

5-pin Mini Style connector: ANSI/B93.55M-1981

Male product end

Pin Signal Description:


1: (CAN_SHLD) = Optional CAN Shield
2: (CAN_V+) = Optional CAN external positive supply
3: CAN_GND = Ground/0V/V-
4: CAN_H = CAN_H bus line (dominant high)
5: CAN_L = CAN_L bus line (dominant low)

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 15/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

Open Style connector

Male product end

Pin Signal Description:


1: CAN_GND = Ground/0 V/V-
2: CAN_L = CAN_L bus line (dominant low)
3: (CAN_SHLD) = Optional CAN Shield
4: CAN_H = CAN_H bus line (dominant high)
5: (CAN_V+) = Optional CAN external positive supply

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 16/61
10/2004
Section 2: Physical layer - Part 2: Recommended connections

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/

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 17/61
10/2004
CANopen
Section 3: Link layer

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 18/61
10/2004
Section 3: Link layer

CAN 2.0.A and CAN 2.0.B

The CAN V2.0 specification consists of 2 parts: CAN 2.0.A and CAN
2.0.B.

CAN 2.0.A corresponds to the standard frame format with an identifier


coded on 11 bits. It is used by CANopen and most of the application
layers.

CAN 2.0.B corresponds to the extended frame format with an identifier


coded on 29 bits. It is very rarely used.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 19/61
10/2004
Section 3: Link layer

Structure of the CAN 2.0.A frame

Arbitration
field Frame size without bit stuffing: 47 to 111 bits

1 11 1 6 0 to 64 15 111 7

RTR Remote Data field CRC ACK


Start of frame Transmission delimit. delimit.
Request bit
(SOF)

Identifier Control field: CRC sequence ACK End of


compatibility slot frame
and length (EOF)

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 20/61
10/2004
Section 3: Link layer

Dominant and recessive bits

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

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 21/61
10/2004
Section 3: Link layer

Error counters

Each node must always contain two counters:


TEC Transmit Error Counter and REC Receive Error Counter.

These counters are incremented and decremented using a


sophisticated weighting mechanism etched in the silicon.

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).

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 22/61
10/2004
Section 3: Link layer

Counter value/node status


Reset and
configuration

Active
errors

REC < 128 REC > 127


and TEC < 128 or TEC > 127

128 occurrences of
Passive 11 consecutive
errors recessive bits (end
of frames without
errors)
TEC > 255

Bus OFF

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 23/61
10/2004
Section 3: Link layer

The 4 types of CAN frame

Data Frame: these frames transport data from a producer to consumers


without any guarantee that it will be processed.

Remote Frame: these request frames are sent by a client to a server to


request transmission of a data frame (the identifier will have the same
value as that of the request).

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).

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 24/61
10/2004
Section 3: Link layer

CAN V2.0 A Data Frame


Data frame
SOF IDENT RTR CTR DATA CRC ACK EOF Interframe

1D 11X 1D 6X 0 to 64X 5X+1R 1X+1R 7R 3R

CAN V2.0 A Remote Frame


Request frame
SOF IDENT RTR CTR DATA CRC ACK EOF Interframe

1D 11X 1R 6X 0 to 64X 5X+1R 1X+1R 7R 3R

If a request frame is repeated, the response to this request takes


priority.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 25/61
10/2004
Section 3: Link layer

Error Frame
Error detected

Frame being broadcast ERROR FLAG ERROR DELIMITER


ACTIVE ERROR FLAG: 6D 8R
PASSIVE ERROR FLAG: 6R

Overload Frame
EOF or ERROR DELIMITER

Previous frame OVERLOAD FLAG OVERLOAD DELIMITER


6D 8R

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 26/61
10/2004
Section 3: Link layer

Protection mechanisms

At bit level: when 5 identical bits are transmitted, an additional


"stuffing" bit with the opposite value is introduced intentionally. This bit
is tested and eliminated by the receiver.

At frame structure level, the delimiters CRC Delimiter, ACK Delimiter,


End of Frame, Error Delimiter, Overload Delimiter are integrated to
enable the structure to be checked.

At content validity level: a CRC sequence enables receivers to check


the consistency of the data received.

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

Part 1: CANopen basic concepts

Part 2: CANopen objects and services

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 28/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

CANopen Device Profile Device Profile Device Profile Device Profile


CiA DSP-401 CiA DSP-402 CiA DSP-404 CiA DSP-4xx
is based on CAL I/O modules Drives Measuring devices

CiA DS-301 = Communication profile


7 APPLICATION
CAL= CAN Application Layer

6 PRESENTATION EMPTY

5 SESSION EMPTY

4 TRANSPORT EMPTY

3 NETWORK EMPTY

2 LINK = LLC + MAC CAN 2.0 A and B + ISO 11898

CAN 2.0 A and B = ISO 11898-1 and 2


1 PHYSICAL
ISO 11898 + DS-102

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 29/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

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.

what data is transmitted:


DS-4xx product profiles specific to each product family
(discrete I/O, analogue I/O, variable speed drives, encoders, etc.)

These functions are described by means of a Device Object Dictionary (OD).


P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 30/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

Object Dictionary = OD

The object dictionary OD is a sequenced group of objects that can be


accessed by means of:
 a 16-bit index
 and in some cases an 8-bit sub-index

It describes all the functions of the product.

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.)

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 31/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

Structure of the “Object Dictionary”

Index Objects Description


0x0000 Reserved

0x0001 – 0x009F Data Types Area Defines the various types of variables
used: bytes, words, double words,
signed, unsigned, etc.

0x00A0 – 0x0FFF Reserved

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.

0xA000 – 0xFFFF Reserved

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 32/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

CANopen profiles

The DS-301 communication profile:


Describes the general structure of the OD and the objects located in the
communication profile area: index 1000 to 1FFF.
It applies to all CANopen products.

DS-4xx equipment profiles:


Describe associated objects for the various types of product (discrete I/O
modules, analogue I/O, variable speed drives, measuring instruments).
Standardised objects: index 6000 to 9FFF
Specific objects: index 2000 to 5FFF

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

CANopen ATV58 EDS file extract


[FileInfo] [Comments]
FileName=A58_F.eds Lines=6
FileVersion=1 Line1=Used profile: 402
FileRevision=2 Line2=Manufacturer device name: VW3A58306
Description=Carte Option ATV58 Line3=Hardware version: 1.0
CreationTime=00:00AM Line4=Software version: 1.0
CreationDate=12-05-2000 Line6= This is the EDS file for the CANopen Schneider
CreatedBy=Marie-Annick Menanteau, Schneider Electric ATV58 drive module CAN Communication Adapter
Electric
[MandatoryObjects]
[DeviceInfo] SupportedObjects=12
VendorName=Schneider Electric 1=0x1000
ProductName=ATV58_F 2=0x1001
ProductVersion=1 3=0x6040
ProductRevision=1 4=0x6041
BaudRate_10=0 5=0x6042
BaudRate_20=0 6=0x6043
BaudRate_50=0 7=0x6044
BaudRate_100=0 8=0x6046
BaudRate_125=1 9=0x6048
BaudRate_250=1 10=0x6049
BaudRate_500=1 11=0x6060
BaudRate_800=0 12=0x6061
BaudRate_1000=1
Granularity=0x8 [1000]
VendorNumber=0x0200005a ParameterName=Device Type
ProductNumber=0 ObjectType=7
SimpleBootUpMaster=0 DataType=0x0007
ExtendedBootUpMaster=0 AccessType=RO
SimpleBootUpSlave=1 DefaultValue=0x10192
ExtendedBootupSlave=0…. PDOMapping=0
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 34/61
10/2004
Section 4: Application layer - Part 1: CANopen basic concepts

CANopen communication profile DS-301

The CANopen communication profile defines 4 standardised functions:

1 . Network administration: starting the bus, assigning identifiers, parameter setting


and NMT (Network ManagemenT) monitoring (master-slave model)

2 . High-speed transmission of process data (<= 8 bytes):


PDO = Process Data Object (producer-consumer model)

3 . - Transmission of parameter setting data (with segmentation can be > 8 bytes)


(not time-critical):
SDO = Service Data Object (client-server model)

4 . Predefined messages for managing synchronisation, time references, fatal


errors: SFO = Special Function Object
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 35/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Network management: NMT

Starting the bus

Status chart corresponding to


“CANopen minimum boot-up”*
(mandatory service)

Transitions performed by the NMT master : Types of communication objects authorised:


1: Start_Remote_Node a. NMT
2: Stop_Remote_Node b. Node Guard
3: Enter_Pre-Operational_State c. SDO
4: Reset_Node d. EMCY
5: Reset_Communication e. PDO.
6: Node initialisation stopped

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 36/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Allocation of identifiers
Identifiers can be allocated in 3 different ways:

 Using the default allocation: CANopen Predefined Set


This default allocation is compulsory and is available in the Pre-Operational state.
It reduces the network configuration phase
Process data is exchanged between the bus manager and the slaves
Defined only for the first 4 PDOs : PDO1 to PDO4

 By the user in the configuration tool :


Mandatory for PDOs superior to PDO4, or PDO linking (direct exchanges between
slaves)

By application Pre-Operational state:


Written into the objects in accordance with the dictionary by the SDO service

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 37/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Allocation of default identifiers

With the aim of reducing the network configuration phase a compulsory


system for allocating default identifiers has been defined.

This allocation occurs in the "Pre operational" state just after the initialization
phase.

It is based on dividing the COB-ID identifier into 2 parts:


10 9 8 7 6 5 4 3 2 1 0

Function Code Node ID

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.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 38/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Allocation of default identifiers


Allocation of default
General broadcast objects
identifiers can be
Object Function Code Bin COB-ID Hex COB-ID Dec used on products
NMT 0000 0x000 0 which support
SYNC 0001 0x080 128 the first 4 PDOs.
(The fifth PDO
TIME STAMP 0010 0x100 256 overlaps the area
reserved for SDO)
Point to point broadcast objects
Object Function Code Bin COB-ID Hex COB-ID Dec
Emergency 0001 0x081to 0x0FF 129 to 255
Transmit PDO 1 0011 0x181 to 0x1FF 385 to 511

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

Allocation of default identifiers Slave 1


TxPDO_1_SL1
TxPDO_2_SL1
Master
RxPDO_1_SL1 RxPDO_1_SL1
RxPDO_2_SL1 RxPDO_2_SL1
Inputs

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

Modification of the default identifier allocation

Allows data to be exchanged Product X


directly without passing TxPDO_1_PX
through the master TxPDO_2_PX
(PDO linking).
RxPDO_1_PX
The producer-consumer
concept is used.
RxPDO_2_PX

Example: Axis control

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

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 41/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Process Data Objects = PDO

These services are used to transmit small amounts of process data


(<= 8 bytes) in real time.

They enable a producer device to make a variable with a maximum size of 64 bits
without overhead available to one or more consumers.

This service is not confirmed

PDO configuration is managed at the level of each slave

There are 2 types of PDOs :


Receive PDO : PDO received on slave side, output data for the master
Transmit PDO : PDO sent by the slave, input data for the master

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 42/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Description of PDOs
Each transmit or receive PDO is described by 2 objects in the object
dictionary:

The PDO Communication Parameter indicates how the PDO is transmitted


or received:
 The COB-ID used
 The transmit/receive mode used
 For transmit PDOs, the minimum time between 2 messages
(inhibit time)
Receive PDO : Index 1400 to 15FF - Transmit PDO : Index 1800 to 19FF
The PDO Mapping Parameter indicates what data is transmitted:
 The list of objects in the object dictionary OD
 The size of each object
Receive PDO : Index 1600 to 17FF - Transmit PDO : Index 1A00 to 1BFF

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 43/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

TxPDO communication parameter objects

Transmit PDO: Index 0x1800 to 0x19FF

Sub- Default
Index Name Format Description
Index value

Number of
0 elements
Byte 3 Number of elements following

11 least significant bits = COB-ID


Depends on
Bit 31 = indicates whether the PDO is active
Double the PDO
0x1800 1 COB-ID
number and
or not
word Bit 30 = indicates whether remote frame
to the node ID
access is supported or not.
0x19FF
Depends Describes how the PDO is transmitted:
Transmission
2 type
Byte on the synchronously or asynchronously, on
product change of state, cyclically, on polling, etc.
Minimum time between 2 transmissions of
3 Inhibit time Word 0 the same PDO (pass band occupation)

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 44/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

TxPDO mapping parameter objects

Transmit PDO: Index 0x1A00 to 0x1BFF


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
Depends
st
1 object Double Byte 1 = Sub-index
1 mapped
on
word Byte 0 = Length in bits
0x1A00 product
Example: 0x64010110
to Byte 3 and 2 (most significant bits)=Index
0x1BFF Depends
2nd object Double Byte 1 = Sub-index
2 mapped
on
word Byte 0 = Length in bits
product
Example: 0x64010210
… … … … …
8th object Double
8 mapped
0 As above
word

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 45/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

RxPDO communication parameter objects

Receive PDO: Index 0x1400 to 0x15FF

Sub- Default
Index Name Format Description
Index value

Number of
0 elements
Byte 2 Number of elements following

11 least significant bits = COB-ID


Depends on
0x1400 Bit 31 = indicates whether the PDO is active
Double the PDO
to 1 COB-ID
number and
or not
word Bit 30 = indicates whether remote frame
0x15FF the node ID
access is supported or not.
Depends
Transmission
2 type
Byte on the Describes how the PDO received is treated.
product

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 46/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

RxPDO mapping parameter objects

Receive PDO: Index 0x1600 to 0x17FF

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

PDO transmission modes

Synchronous: by receiving a SYNC object

Acyclic: - transmission is pre-triggered by a "Remote Transmission request"


- transmission is pre-triggered by the occurrence of a "Specific event"
object in the device profile
Cyclic: - transmission is triggered periodically after
each 1, 2 or up to 240 SYNC objects

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

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 48/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Service Data Objects = SDO

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.

The result of a write or read operation is confirmed by a response.


An SDO exchange requires 2 COB-IDs: one for the request, the other for the
response.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 49/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Special Function Objects = SFO

SYNC = Synchronization Object:

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.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 50/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Special Function Objects = SFO

EMCY Object:

EMCY objects are triggered when an internal fault occurs in the device (current,
voltage, temperature, communication, etc).

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 51/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Special Function Objects = SFO

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.

This recently-specified mechanism replaces node guarding on new products (better


utilisation of the pass band).

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 52/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Special Function Objects = SFO

Node guard object:

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

Special Function Objects = SFO

Node guard object:

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.

If a difference is detected, the information is returned to the application by


means of a “network event”.
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 54/61
10/2004
Section 4: Application layer - Part 2: CANopen objects and services

Special Function Objects = SFO

Heartbeat:

The recently-specified heartbeat function saves on pass band utilisation as


compared with node guarding.

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

Section 5: Main characteristics resume

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 56/61
10/2004
Section 5 : Main characteristics resume

Physical Layer

Medium: Shielded twisted pair


2 or 4-wire (if power supply)

Topology: Bus type


With short tap links and end-of-line resistor

Maximum distance: 1000 m

Data rate: 9 possible data rates from 10 Kbps to 1 Mbps


Depends on the length of the bus and the type of
cable: 1000 m for 10Kbps, 25 m for 1 Mbps

Max. no. of devices: 127


1 master and 126 slaves
P&T - GPS - Training
PhW - CANopen_lev2_en Section 2 - Slide 57/61
10/2004
Section 5 : Main characteristics resume

Link layer

Network access method: CSMA/CA


Each device can send data as soon as the bus is free.

In the event of a collision, a principle of dominant or recessive bits can


arbitrate bit by bit in a non-destructive manner.

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 is coded on 11 bits: values are between 0 and 2047.

The COB-ID with the lowest value has the highest priority.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 58/61
10/2004
Section 5 : Main characteristics resume

Link layer

Communication model: Producer/Consumer


Each message contains an identifier located at the start of the message.

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.

Max. useful data size: 8 bytes per frame

Security of transmission:
Among the best on industrial local area networks.
Numerous signalling and error detection devices ensure excellent security of
transmission.

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 59/61
10/2004
Section 5 : Main characteristics resume

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.

what data is transmitted:


DS-4xx product profiles specific to each product family
(discrete I/O, analogue I/O, variable speed drives, encoders, etc.)

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

4 types of service have been standardised:

1 . Network administration: parameter setting, starting, monitoring (master-


slaves)

2 . High-speed transmission of process data (<= 8 bytes):


PDO = Process Data Object (producer-consumer model)

3 . - Transmission of parameter setting data (with segmentation can be


> 8 bytes) (not time-critical):
SDO = Service Data Object (client-server model)

4 . Predefined messages for managing synchronisation, time references, fatal


errors: SFO = Special Function Object

P&T - GPS - Training


PhW - CANopen_lev2_en Section 2 - Slide 61/61
10/2004

You might also like