section 2 - slide 1/61 p&t - gps - training phw - canopen_lev2_en 10/2004 canopen canopen...
TRANSCRIPT
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 1/61
CANopenCANopen Section 1: History
Section 2: Physical layer
Section 3: Link layer
Section 4: Application layer
Section 4: Main characteristics resume
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 2/61
CANopenCANopen
Section 1: History
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 3/61
Section 1 : HistorySection 1 : History
HistoryHistory
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 4/61
Section 1 : HistorySection 1 : History
HistoryHistory
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).
1993:
Publication by CiA of CAL = CAN Application Layer specifications describing transmission mechanisms without defining when and how to use them.
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 5/61
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.
Reference specificationsReference specifications
Section 1 : History
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 6/61
Section 1 : History
CiA DS-301 = Communication profile
EMPTY
EMPTY
EMPTY
EMPTY
CAN 2.0 A and B + ISO 11898
CAN 2.0 A and B = ISO 11898
ISO 11898 + DS-102
Device ProfileCiA DSP-401I/O modules
Device ProfileCiA DSP-402
Drives
Device ProfileCiA DSP-404
Measuring devices
Device ProfileCiA DSP-4xx
CAL= CAN Application Layer APPLICATION
PRESENTATION
SESSION
TRANSPORT
NETWORK
LINK = LLC + MAC
PHYSICAL
7
6
5
4
3
2
1
CANopen and the ISO model
CANopen and the ISO model
CA
N
sp
ec
ific
ati
on
s
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 7/61
CANopenCANopen
Part 1: Network characteristics
Part 2: Recommended connections
Section 2: Physical layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 8/61
CiA DS-301 = Communication profile
EMPTY
EMPTY
EMPTY
EMPTY
CAN 2.0 A and B + ISO 11898
CAN 2.0 A and B + ISO 11898
ISO 11898 + DS-102 + DRP-301-1
Device ProfileCiA DSP-401I/O modules
Device ProfileCiA DSP-402
Drives
Device ProfileCiA DSP-404
Measuring devices
Device ProfileCiA DSP-4xx
CAL= CAN Application Layer APPLICATION
PRESENTATION
SESSION
TRANSPORT
NETWORK
LINK = LLC + MAC
PHYSICAL
7
6
5
4
3
2
1
Section 2: Physical layer - Part 1: Network characteristics
CANopenphysical layer
CANopenphysical layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 9/61
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
Description of the networkDescription of the network
Section 2: Physical layer - Part 1: Network characteristics
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 10/61
Data rate - bus length - cable cross-section for 32 slaves maximumData rate - bus length - cable cross-section for 32 slaves maximum
Section 2: Physical layer - Part 1: Network characteristics
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 11/61
Data rate - bus length - cable cross-section for 100 slaves maximum
Data rate - bus length - cable cross-section for 100 slaves maximum
Section 2: Physical layer - Part 1: Network characteristics
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 12/61
In its recommendation DR-303-1, the CiA provides a list of suitable connectors classified into 3 categories.
General use9-pin SUB D connector DIN 41652, multi-pole connector (ribbon cable to 9-pin SUB-D), RJ10 and RJ45
Industrial use5-pin Mini Style, 5-pin Micro Style, Open Style
Special use7-pin round connector, 8-pin round connector, 9-pin round connector, 12-pin round connector, Hand Brid Harting.
Recommended connections Recommended connections
Section 2: Physical layer - Part 2: Recommended connections
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 13/61
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
9-pin SUB D connector DIN 416529-pin SUB D connector DIN 41652
Section 2: Physical layer - Part 2: Recommended connections
Male product end
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 14/61
RJ45 connectorRJ45 connector
Section 2: Physical layer - Part 2: Recommended connections
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 15/61
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)
5-pin Mini Style connector: ANSI/B93.55M-19815-pin Mini Style connector: ANSI/B93.55M-1981
Section 2: Physical layer - Part 2: Recommended connections
Male product end
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 16/61
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
Open Style connectorOpen Style connector
Section 2: Physical layer - Part 2: Recommended connections
Male product end
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 17/61
Recommended suppliersRecommended suppliers
Section 2: Physical layer - Part 2: Recommended connections
Cables
- U.I.LAPP GmbHSchultze-Delitsch-Str. 25D-70565 Stuttgart Germany
http://www.lappcable.com
Connectors- ERNI Elektroapparate GmbH
Seestrasse 9 D-73099 Adelberg Germany
- ERNI Connectique S.a.r.l, France27 bis, avenue des Sources/CP 638 F-69258 LYON Cedex 09,
http://connect.erni.com/
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 18/61
CANopenCANopen
Section 3: Link layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 19/61
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.
CAN 2.0.A and CAN 2.0.BCAN 2.0.A and CAN 2.0.B
Section 3: Link layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 20/61
Section 3: Link layer
CRC sequence
Start of frame (SOF)
Identifier
RTR RemoteTransmissionRequest bit
Data field CRC delimit.
Structure of the CAN 2.0.A frameStructure of the CAN 2.0.A frameStructure of the CAN 2.0.A frameStructure of the CAN 2.0.A frame
ACKslot
1 11 6 0 to 64 15 71 111
ACK delimit.
End offrame(EOF)
Arbitrationfield
Control field:compatibilityand length
Frame size without bit stuffing: 47 to 111 bits
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 21/61
Section 3: Link layer
Dominant and recessive bitsDominant and recessive bits
10 9 8 7 6 5 4 3 2 1 0SO
FS
OF
RT
RR
TR ControlControl
fieldfield
IdentifierIdentifier
Station 1Station 1
Station 2Station 2
Station 3Station 3
DD
RR
S1S1 S2S2 S3S3
Station 2loses arbitration
Station 1loses arbitration
BusBus
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 22/61
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).
Error countersError counters
Section 3: Link layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 23/61
Counter value/node statusCounter value/node status
Section 3: Link layer
Active errors
Passiveerrors
Bus OFF
Reset and configuration
REC > 127or TEC > 127
REC < 128and TEC < 128
TEC > 255
128 occurrences of 11 consecutive
recessive bits (end of frames without
errors)
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 24/61
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).
The 4 types of CAN frameThe 4 types of CAN frame
Section 3: Link layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 25/61
Section 3: Link layer
SOF IDENT RTR CTR DATA CRC ACK EOF
1D
CAN V2.0 A Data FrameCAN V2.0 A Data FrameCAN V2.0 A Data FrameCAN V2.0 A Data Frame
0 to 64X 1X+1R5X+1R6X11X 1D 7R
SOF IDENT RTR CTR DATA CRC ACK EOF
1D
CAN V2.0 A Remote FrameCAN V2.0 A Remote FrameCAN V2.0 A Remote FrameCAN V2.0 A Remote Frame
0 to 64X 1X+1R5X+1R6X11X 7R1R
Data frame
Request frame
Interframe
3R
Interframe
3R
If a request frame is repeated, the response to this request takes priority.
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 26/61
Section 3: Link layer
ERROR FLAG ERROR DELIMITER
Error FrameError FrameError FrameError Frame
ACTIVE ERROR FLAG: 6D 8R
Frame being broadcast
Error detected
PASSIVE ERROR FLAG: 6R
OVERLOAD FLAG OVERLOAD DELIMITER
Overload FrameOverload FrameOverload FrameOverload Frame
6D 8R
Previous frame
EOF or ERROR DELIMITER
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 27/61
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).
Protection mechanismsProtection mechanisms
Section 3: Link layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 28/61
CANopenCANopen
Part 1: CANopen basic concepts
Part 2: CANopen objects and services
Section 4: Application layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 29/61
CiA DS-301 = Communication profile
EMPTY
EMPTY
EMPTY
EMPTY
CAN 2.0 A and B + ISO 11898
CAN 2.0 A and B = ISO 11898-1 and 2
ISO 11898 + DS-102
Device ProfileCiA DSP-401I/O modules
Device ProfileCiA DSP-402
Drives
Device ProfileCiA DSP-404
Measuring devices
Device ProfileCiA DSP-4xx
CAL= CAN Application Layer APPLICATION
PRESENTATION
SESSION
TRANSPORT
NETWORK
LINK = LLC + MAC
PHYSICAL
7
6
5
4
3
2
1
Section 4: Application layer - Part 1: CANopen basic concepts
CANopen is based on CAL
CANopen is based on CAL
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 30/61
Section 4: Application layer - Part 1: CANopen basic concepts
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).
Application layerApplication layer
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 31/61
Section 4: Application layer - Part 1: CANopen basic concepts
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.)
Object Dictionary = ODObject Dictionary = OD
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 32/61
Section 4: Application layer - Part 1: CANopen basic concepts
Structure of the “Object Dictionary”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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 33/61
Section 4: Application layer - Part 1: CANopen basic concepts
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.
CANopen profilesCANopen profiles
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 34/61
Section 4: Application layer - Part 1: CANopen basic concepts
CANopen ATV58 EDS file extractCANopen ATV58 EDS file extractCANopen ATV58 EDS file extractCANopen ATV58 EDS file extract
[FileInfo]
FileName=A58_F.eds
FileVersion=1
FileRevision=2
Description=Carte Option ATV58
CreationTime=00:00AM
CreationDate=12-05-2000
CreatedBy=Marie-Annick Menanteau, Schneider Electric
[DeviceInfo]
VendorName=Schneider Electric
ProductName=ATV58_F
ProductVersion=1
ProductRevision=1
BaudRate_10=0
BaudRate_20=0
BaudRate_50=0
BaudRate_100=0
BaudRate_125=1
BaudRate_250=1
BaudRate_500=1
BaudRate_800=0
BaudRate_1000=1
Granularity=0x8
VendorNumber=0x0200005a
ProductNumber=0
SimpleBootUpMaster=0
ExtendedBootUpMaster=0
SimpleBootUpSlave=1
ExtendedBootupSlave=0….
[Comments]
Lines=6
Line1=Used profile: 402
Line2=Manufacturer device name: VW3A58306
Line3=Hardware version: 1.0
Line4=Software version: 1.0
Line6= This is the EDS file for the CANopen Schneider Electric ATV58 drive module CAN Communication Adapter
[MandatoryObjects]
SupportedObjects=12
1=0x1000
2=0x1001
3=0x6040
4=0x6041
5=0x6042
6=0x6043
7=0x6044
8=0x6046
9=0x6048
10=0x6049
11=0x6060
12=0x6061
[1000]
ParameterName=Device Type
ObjectType=7
DataType=0x0007
AccessType=RO
DefaultValue=0x10192
PDOMapping=0
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 35/61
Section 4: Application layer - Part 1: CANopen basic concepts
CANopen communication profile DS-301CANopen 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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 36/61
Section 4: Application layer - Part 2: CANopen objects and services
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
Network management: NMTNetwork management: NMT
Status chart corresponding to “CANopen minimum boot-up”*
(mandatory service)
Starting the busStarting the bus
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 37/61
Section 4: Application layer - Part 2: CANopen objects and services
Allocation of identifiersAllocation 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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 38/61
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:
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.
Allocation of default identifiersAllocation of default identifiers
Section 4: Application layer - Part 2: CANopen objects and services
10 9 8 7 6 5 4 3 2 1 0
Function Code Node ID
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 39/61
Allocation of default identifiersAllocation of default identifiers
Section 4: Application layer - Part 2: CANopen objects and services
Allocation of default identifiers can be used on products
which support the first 4 PDOs.
(The fifth PDO overlaps the area reserved for SDO)
10
24
id
en
tifi
ers
ma
xim
um
re
se
rve
dfo
r P
DO
s.
General broadcast objects
Object Function Code Bin COB-ID Hex COB-ID Dec NMT 0000 0x000 0
SYNC 0001 0x080 128
TIME STAMP 0010 0x100 256
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
Receive PDO 1 0100 0x201 to 0x27F 513 to 639
Transmit PDO 2 0101 0x281 to 0x2FF 641 to 767
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 40/61
Section 4: Application layer - Part 2: CANopen objects and services
RxPDO_1_SL1RxPDO_2_SL1RxPDO_1_SL2RxPDO_2_SL2RxPDO_1_SL3RxPDO_2_SL3
TxPDO_1_SL1TxPDO_2_SL1TxPDO_1_SL2TxPDO_2_SL2TxPDO_1_SL3TxPDO_2_SL3
TxPDO_1_SL1TxPDO_2_SL1
RxPDO_1_SL1RxPDO_2_SL1
TxPDO_1_SL2TxPDO_2_SL2
RxPDO_1_SL2RxPDO_2_SL2
TxPDO_1_SL3TxPDO_2_SL3
RxPDO_1_SL3RxPDO_2_SL3
MasterMaster
Slave 1Slave 1
Slave 2Slave 2
Slave 3Slave 3
All the nodes (slaves)
communicate witha central station
(master)
Inp
uts
Inp
uts
Ou
tpu
ts
Ou
tpu
ts
Allocation of default identifiersAllocation of default identifiers
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 41/61
Section 4: Application layer - Part 2: CANopen objects and services
Modification of the default identifier allocationModification of the default identifier allocation
TxPDO_1_PXTxPDO_2_PX
RxPDO_1_PXRxPDO_2_PX
TxPDO_1_PYTxPDO_2_PY
RxPDO_1_PYRxPDO_2_PYRxPDO_3_PY
TxPDO_1_PZTxPDO_2_PZ
RxPDO_1_PZRxPDO_2_PZRxPDO_3_PZ
Product XProduct X
Product YProduct Y Product ZProduct Z
Allows data to be exchangeddirectly without passing
through the master(PDO linking).
The producer-consumerconcept is used.
Example: Axis control
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 42/61
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 masterTransmit PDO : PDO sent by the slave, input data for the master
Process Data Objects = PDOProcess Data Objects = PDOProcess Data Objects = PDOProcess Data Objects = PDO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 43/61
Section 4: Application layer - Part 2: CANopen objects and services
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
Description of PDOsPDOsDescription of PDOsPDOs
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 44/61
TxPDO communication parameter objectsTxPDO communication parameter objects
Section 4: Application layer - Part 2: CANopen objects and services
Transmit PDO: Index 0x1800 to 0x19FFTransmit PDO: Index 0x1800 to 0x19FF
Index Sub-Index
Name Format Default value
Description
0 Number of elements Byte 3 Number of elements following
1 COB-ID Double word
Depends on the PDO
number and the node ID
11 least significant bits = COB-ID Bit 31 = indicates whether the PDO is active or not Bit 30 = indicates whether remote frame access is supported or not.
2 Transmission
type Byte Depends
on the product
Describes how the PDO is transmitted: synchronously or asynchronously, on change of state, cyclically, on polling, etc.
0x1800 to
0x19FF
3 Inhibit time Word 0 Minimum time between 2 transmissions of the same PDO (pass band occupation)
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 45/61
TxPDO mapping parameter objectsTxPDO mapping parameter objects
Section 4: Application layer - Part 2: CANopen objects and services
Transmit PDO: Index 0x1A00 to 0x1BFFTransmit PDO: Index 0x1A00 to 0x1BFF
Index Sub-Index
Name Format Default value
Description
0 Number of elements Byte
Depends on
product Number of objects mapped
1 1st object mapped
Double word
Depends on
product
Byte 3 and 2 (most significant bits)=Index Byte 1 = Sub-index Byte 0 = Length in bits Example: 0x64010110
2 2nd object mapped
Double word
Depends on
product
Byte 3 and 2 (most significant bits)=Index Byte 1 = Sub-index Byte 0 = Length in bits Example: 0x64010210
… … … … …
0x1A00 to
0x1BFF
8 8th object mapped
Double word
0 As above
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 46/61
RxPDO communication parameter objectsRxPDO communication parameter objects
Section 4: Application layer - Part 2: CANopen objects and services
Receive PDO: Index 0x1400 to 0x15FFReceive PDO: Index 0x1400 to 0x15FF
Index Sub-Index
Name Format Default value
Description
0 Number of elements Byte 2 Number of elements following
1 COB-ID Double word
Depends on the PDO
number and the node ID
11 least significant bits = COB-ID Bit 31 = indicates whether the PDO is active or not Bit 30 = indicates whether remote frame access is supported or not.
0x1400 to
0x15FF
2 Transmission
type Byte Depends
on the product
Describes how the PDO received is treated.
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 47/61
RxPDO mapping parameter objectsRxPDO mapping parameter objects
Section 4: Application layer - Part 2: CANopen objects and services
Receive PDO: Index 0x1600 to 0x17FFReceive PDO: Index 0x1600 to 0x17FF
Index Sub-Index
Name Format Default value
Description
0 Number of elements Byte
Depends on
product Number of objects mapped
1 1st object mapped
Double word
Depends on
product
Byte 3 and 2 (most significant bits)=Index Byte 1 = Sub-index Byte 0 = Length in bits Example: 0x62000108
2 2nd object mapped
Double word
Depends on
product
Byte 3 and 2 (most significant bits)=Index Byte 1 = Sub-index Byte 0 = Length in bits Exemple : 0x62000208
… … … … …
0x1600 to
0x17FF
8 8th object mapped
Double word
0 As above
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 48/61
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 aftereach 1, 2 or up to 240 SYNC objects
PDO transmission modesPDO transmission modes
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
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 49/61
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.
Service Data Objects = SDOService Data Objects = SDOService Data Objects = SDOService Data Objects = SDO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 50/61
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.
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 51/61
EMCY Object:
EMCY objects are triggered when an internal fault occurs in the device (current, voltage, temperature, communication, etc).
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 52/61
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).
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 53/61
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.
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 54/61
Section 4: Application layer - Part 2: CANopen objects and services
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”.
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 55/61
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.
Special Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFOSpecial Function Objects = SFO
Section 4: Application layer - Part 2: CANopen objects and services
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 56/61
CANopenCANopen
Section 5: Main characteristics resume
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 57/61
Medium: Shielded twisted pair2 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: 1271 master and 126 slaves
Physical LayerPhysical Layer
Section 5 : Main characteristics resume
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 58/61
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.
Link layerLink layer
Section 5 : Main characteristics resume
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 59/61
Communication model: Producer/ConsumerEach 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.
Link layerLink layer
Section 5 : Main characteristics resume
P&T - GPS - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 60/61
Application layerApplication layer
Section 5 : Main characteristics resume
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 - TrainingPhW - CANopen_lev2_en 10/2004
Section 2 - Slide 61/61
Application layerApplication layer
Section 5 : Main characteristics resume
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