S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 2
CANopen
Agenda
5
6
7
8
9
10
1
2
3
4
User and system overview CANopen
CANopen: The physics
CANopen: Connection XC100-XI/ON
CAN-protocol
CiA-Device object
CANopen: Network management (NMT)
CANopen: Parametrizing data transmission
CANopen: Parametrize with SDOs
Connection of XC600 with XION
CANopen: XION-Diagnostics
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 3
CANopen
Agenda
15
16
17
18
19
20
11
12
13
14
CANopen: Connecting 3rd party devices to XSystem
CANopen: Process data objects (PDO)
CANopen: Connection XC100-XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 4
CANopen
Agenda
25
26
27
28
29
30
21
22
23
24
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 5
CANopen
User and system overview CANopen
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 6
CANopen
Scope of applications
CAN
(Fa. Bernstein [CAL])
(Selectron)
(Fa. Moog, Servoantriebe)
(Gelma [CAL] Lageregler,
[L2] RAOs)
(Textil)
(Selectron [CAL])
(Gelma, Bernstein [CAL] Wöhrle [1,2,7])
(B&R [CAL], Klaschka [L1], AB [Device Net],
Sigmatec)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 7
CANopen
System overview and technology
XC200
XC100
XC600
HPG
XI/ON
CAN
Stn 1
Max Stn 127
Transmission rate: 10, 20, 50, 125 (default), 250, 500, 800, 1000 kbit/s
EASY
MI4 und MV4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 8
CANopen
CANopen: The physics
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 9
CANopen
What is contained in a CAN node ?
CAN-Controller
µC
CAN-Tranceiver
CAN
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 10
CANopen
Practical values for the trunk length
kbit/s
Trunk length in m
30 50 100 250 500 1000 2500 /../ 5000
10
20
62,5
125
250
800
500
1000
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 11
CANopen
CANopen specifications according to CiA
trunk
length [m]
Cable resistance
[mOhm/m]
wire cross-section
[mm²]
terminating
resistance
[Ohm]
Baudrate [kBit/s]
0 .. 40
70
0,25 .. 0,34
124
1000 at 40m
40 .. 300
<60
0,34 .. 0,6
150 .. 300
>500 at 100m
300 .. 600
<40
0,5 .. 0,6
150 .. 300
>100 at 500m
600 .. 1000
<26
0,75 .. 0,8
150 .. 300
>50 at 1km
DC parameters for CANopen networks for less than 64 nodes
wire cross-section
[mm²]
n = 32
n = 64
n = 100
n = 32
n = 64
n = 100
0,25
200
170
150
230
200
170
0,5
360
310
270
420
360
320
0,75
550
470
410
640
550
480
Cable type
Maximum trunk length [m] (1)
Maximum truk length [m] (2)
(1) Safety margin factor of 0.2
(2) Safety margin factor of 0.1
Maximum trunk length for different cable types and node numbers
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 12
CANopen
Our cable recommendation
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 13
CANopen
Caution: Please regard the polarity when connecting!
node 1 . . . . . . . . node n
CAN Bus Line
1
2
0
CAN_H
CAN_L
1
2
0
ISO 11898-2 Network Set-up
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 14
CANopen
Hardeware installation of a CAN - XION Gateway
• Bit Rate (10kbit/s - 1Mbit/s)
8
8
0
7
9
1
F
4
C
2
3
5
6
A
B
D
E
0
7
9
1
F
4
C
2
3
5
6
A
B
D
E
High
Low
<=> 12 Hex => Station address 18 (Dez)
• Address switches (0-127)
Caution: Address „0“ must not be used!
1
2
3
4
„0“,Of „1“,On
• Accept configuration
press for 2 secs!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 15
CANopen
Baud rates DIP switch
Switch (position)
reserved
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 16
CANopen
DIN 41652
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-p in Sub Connector
Quelle: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 17
CANopen
5-pin Mini Style Connector
male
1
2
3
4
5
female
1
2
3
4
5
If 5-pin Mini Style Connectors are used the following pinning applies:
Pin
Signal
Description
1
(CAN_SHLD) Optional CAN Shield
2
(CAN_V+)
Optional CAN external positive supply (dedicated for supply of
transceiver and optocouplers, if galvanic isolation of the bus
node applies)
3
CAN_GND
Ground / 0V / V-
4
CAN_H
CAN_H bus line (dominant high)
5
CAN_L
CAN_L bus line (dominant low)
: ANSI/B93.55M-1981
Mini-style Connector
Quelle: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 18
CANopen
Open Style Connector
1 2 3 4 5
1 2
3 4
5
female
male
If Open Style Connectors are used the following pinning is recommended:
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 (dedicated for supply of
transceiver and optocouplers, if galvanic isolation of the bus
node applies)
Open-style Connector
Quelle: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 19
CANopen
CANopen: Connection XC100-XI/ON
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 22
CANopen
Schedule for configuring a CAN network 3
XI/ON
IB7.0
QB0.0
XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 23
CANopen
Schedule for configuring a CAN network 4
XI/ON
IB7.0
QB0.0
XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 24
CANopen
XI/ON
IB7.0
QB0.0
XC100
Schedule for configuring a CAN network 5
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 25
CANopen
XI/ON
IB7.0
QB0.0
XC100
Schedule for configuring a CAN network 6
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 26
CANopen
Schedule for configuring a CAN network 7
XI/ON
IB7.0
QB0.0
XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 27
CANopen
Schedule for configuring a CAN network 8
XI/ON
IB7.0
QB0.0
XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 28
CANopen
Exercise: Configuration of a CAN network
XI/ON
I0.0
Q0.0
Qx.x
Ix.x
XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 29
CANopen
CAN-protocol
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 30
CANopen
CAN
Station 1
(Consumer)
CAN
Station 2
(Producer)
CAN
Station 3
(Consumer)
CAN
Station 4
(Consumer)
Frame I
Local
Intelligence
Local
Intelligence
Local
Intelligence
Local
Intelligence
bus lines
Filter
Filter
Filter
Filter
Broadcast Communication
SOurce: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 31
CANopen
CAN
Station 1
(Consumer)
CAN
Station 2
(Producer)
CAN
Station 3
(Consumer)
CAN
Station 4
(Consumer)
Local
Intelligence
Local
Intelligence
Local
Intelligence
Local
Intelligence
bus lines
Filter
Filter
Filter
Filter
RTR I
Frame I
Remote Request
Source: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 32
CANopen
CAN
Station 1
(Consumer)
CAN
Station 2
(Producer)
CAN
Station 3
(Consumer)
CAN
Station 4
(Consumer)
Local
Intelligence
Local
Intelligence
Local
Intelligence
Local
Intelligence
bus lines
Filter
Filter
Filter
Filter
Frame I
Frame 3
Frame 2
Multiple Bus Access
Source: CIA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 33
CANopen
Identifier
Daten
Pro
ce
ss
Da
taO
bje
ct
17
4
197
6
19
1044
6, 7, 99
Receive-Filter list
Broadcast
4, 8
4, 16
11, 17
Station 1
Station 2
Station 3
Station 4
All stations monitor the line for
messages with identifiers
contained
in their receive list
CSMA/CA: Object orientated addressing
=PDO
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 34
CANopen
SOF Identifier
Control DATA
CRC
HCK
EOF
RTR
8 Byte
HD 6
10 9 8 7 6 5 4 3 2 1 0
Station
1
Station
2
Station
3
Station 2 wants to set HIGH, other still pull to LOW -> good-bye Station 2 !
Station 1 wants to remain on HIGH signal, Station
3 pulls signal to LOW -> Station 1 is out of the
game !
..and the winner is: Station 3
1 1 0 1 0 0 1 1 1 1 1 (1695 dez.)
1 1 0 1 0 1 1 1 1 1 1 (1727 dez.)
1 1 0 1 0 0 1 0 1 1 0 (1686 dez.)
The lowest Identifier wins...
All Stations send and listen
simultaneously...
Bus access with CSMA/CA (Dominant / Recessive)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 35
CANopen
CiA-Device object
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 36
CANopen
Germany Honeywell Allen Bradley France
CANopen
SDS
Device Net
Sub MMS
CMS similar MMS
NMT
DBT
L7
L2
L1
ISO / DIS 11519-1
ISO / DIS 11898, 9141
4 diferent, incompatible Layer 7 specifications
Application layer
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 38
CANopen
CAN and CANopen: Process data objects (PDO)
CAN
CANopen
CAN
CANopen
Producer
Consumer
PDO
CAN
PDO
CANopen
PDO
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 39
CANopen
Identifier
Data
Pro
ce
ss
Da
taO
bje
ct
17
4
197
6
19
1044
6, 7, 99
Receive-Filter list
Broadcast
4, 8
4, 16
11, 17
Station 1
Station 2
Station 3
Station 4
All stations monitor the line for
messages with identifiers
contained
in their receive list
CSMA/CA: Object orientated addressing
=PDO
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 40
CANopen
SOF Identifier
Control DATA
CRC
HCK
EOF
RTR
8 Byte
HD 6
10 9 8 7 6 5 4 3 2 1 0
Station
1
Station
2
Station
3
Station 2 wants to set HIGH, other still pull to LOW -> good-bye Station 2 !
Station 1 wants to remain on HIGH signal, Station
3 pulls signal to LOW -> Station 1 is out of the
game !
..and the winner is: Station 3
1 1 0 1 0 0 1 1 1 1 1 (1695 dez.)
1 1 0 1 0 1 1 1 1 1 1 (1727 dez.)
1 1 0 1 0 0 1 0 1 1 0 (1686 dez.)
The lowest Identifier wins...
All Stations send and listen
simultaneously...
Bus access with CSMA/CA (Dominant / Recessive)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 41
CANopen
CANopen: Network management (NMT)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 42
CANopen
Network management
NMT-Master (1)
Slave(2)
Switches Node On/Of
Node control
Error supervision
1 error!
Slave(127)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 44
CANopen
Node Monitoring
Still alive?
Status
Cyclic Monitoring (Node Guarding)
Acyclic Monitoring (Heartbeat)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 45
CANopen
Cyclic monitoring with Node guarding
Slave1
NMT-Master
Still alive?
Status
Still
aliv
e?
Sta
tus
Slave2
Slave127
S
till
a
liv
e?
S
ta
tu
s
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 46
CANopen
Slave out of order!
Cyclic monitoring with Node guarding
Still alive?
Example:
Master out of order!
=> e.g. after 300ms the slave puts
the outputs to ZERO!
100 ms
100
3
Still alive?
No status reply
request: „Alive ?“ missing
100 ms
=> After 300 ms the master reports
the
slave missing at the control centre!
request: „Alive ?“ missing
100 ms
request: „Alive ?“ missing
100 ms
No status reply
Still alive?
No status reply
100 ms
100 ms
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 47
CANopen
Exercise: Nodeguarding
1000
3
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 48
CANopen
Monitoring with Heartbeat
He
art
be
at t
ele
gra
m
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 49
CANopen
Configuration of the Heartbeat
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 50
CANopen
Exercise: Synchronization and Heartbeat
monitoring
XI/ON
XC600
I0.0
Q0.0
Qx.x
Ix.x
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 51
CANopen
Emergency Telegram
24V
Emergency (Error Register and properitary information)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 52
CANopen
CANopen: Parametrizing data transmission
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 53
CANopen
What is a PDO ?
Temperature sensor
COB-ID
Data
1-2047
0
8
COB-ID
ProcessData
Up to max.
1234
25
1234
25°C
PressureTime
Speed
etc.
ProcessDataObject
Transmit-PDO
Data
Receive-PDO
COB= CommunicationOBject
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 54
CANopen
The COB-ID
(Communication Object Identifier)
Node ID + Default Ofset
COB-ID serves the purpose of addressing and prioritizing the
PDOs
Default-COB-ID
8 Byte PDO
Caution: Please take care that the COB-ID is not already assigned otherwise
TPDO
Node 1
181
281
381
481
RPDO
201
301
401
501
Filter
TPDO
Node 2
182
282
382
482
RPDO
202
302
402
502
Filter
=> the smaller the node address the higher the priority of the Default PDO!
TPDO
Node 127
26F
36F
46F
56F
RPDO
327
427
527
627
Filter
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 55
CANopen
Parametrizing of the PDOs
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 56
CANopen
Internal
event
1. Event- or Timer-
driven
producer
consumer(s)
Remote Frame
2. Remote
request
producer
consumer(s)
Sync
3. Synchronous
transmission
(cyclic, acyclic)
producer
consumer(s)
PDO transmission methods 1
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 57
CANopen
PDO transmission methods 2
Asynchronous:
Event riggered
PDO
Synchronous:
Sync
PDO
Sync
PDO
cyclic
Sync
Sync
PDO
Sync
Sync
Acyclic
Sync
Request
PDO
Request triggered
Request triggered
Request
PDO
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 58
CANopen
time
Sync Sync Sync Sync Sync Sync
Synchronous PDO
asynchronous PDO
Synchronous and asynchronous transmission of
PDOs
Sync-window
{
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 59
CANopen
time
Sync Sync Sync Sync Sync Sync
Synchronous cyclic transmission of a PDO
Synchronous acyclic transmission of a PDO
Synchronous cyclic/acyclic transmission of PDOs
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 60
CANopen
Configuration of the PDO Synchronization
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 61
CANopen
Configuration of the PDO synchronization
Sync-Producer
Sync-Consumer
Sync-Consumer
1. Sync Signal
2. Start signal
Axis 1
3. Start signal
Axis 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 62
CANopen
Configuration of the PDO synchronization
Sync-Producer
Sync-Consumer
Sync-Consumer
1. Sync-Signal
2. Start signal
Axis 1
3. Start signal
Axis 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 63
CANopen
Configuration of the PDO synchronization
Sync-Producer
Sync-Consumer
Sync-Consumer
1. Sync-Signal
2. Start signal
Axis 1
3. Start signal
Axis 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 64
CANopen
Configuration of the PDO synchronization
Sync-Producer
Sync-Consumer
Sync-Consumer
1. Sync-Signal
2. Start signal
Axis 1
3. Start signal
Axis 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 65
CANopen
Inhibit Time - Minimum time between two
transmission requests
Inhibit Time
PDO x
PDO y
I7.3
I9.2
PDO y
I7.3
I9.2
PDO x
...
...
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 66
CANopen
Event Time
Hours later.....
?
Wire broken, device out of order?
Temp
Time
E.g.:
EventTime=10s
after 10 s:
After another 10 s:
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 67
CANopen
PDO Parameters: Event Time
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 68
CANopen
CANopen: Parametrize with SDOs
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 69
CANopen
Addressing of an SDO in the object directory
CANopen device
Object directory of
the device parameters
1-9Fh
Data types
A0h-
FFFh
Reserved
1000h- Communications
1FFFh
parameters
2000h-
Manufacturer spe
5FFFh cific parameters
6000h-
Standard device
9FFFF profile parameters
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 70
CANopen
How to define a reaction for an analog sensor ?
Max
Min
Limits
negative
positive
Delta
Delta or limit value ?
• Analog Input Interrupt Trigger Selection
(6421H)
1.
Values for delta or limits?
• Analog Input Interrupt Delta unsigned
(6426H)
or
• Analog Input Interrupt negative Delta unsigned
(6427H)
or
• Analog Input Interrupt positive Delta unsigned
(6428H)
or
•Analog Input Interrupt Upper Limit Integer
(6424H)
•Analog Input Interrupt Lower Limit Integer
(6425H)
2.
Create interrupt upon occasion of the
event!
•Analog Input Global Interrupt Enable
(
6423H)
3.
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 71
CANopen
Parametrizing an Analog Input
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 72
CANopen
Configuring a device with SDOs (Service Data
Object)
0-10V
0-20mA
4-20mA
Operating mode ?
• Analog Input Mode
(5420H)
Sample:
Analoginput 1: 0-20mA
Analoginput 2: 4-20mA
=> 5420 Sub1= 0
=> 5420 Sub2= 1
With the Subindex the input/output to be parametrized is selected!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 73
CANopen
Substitute values at bus failure
Generate substitute value on error ?
• Error Mode Output 8-bit
(6206 H)
• Error Mode Output 16-bit (6306 H)
• Error Mode Output 32-bit (6326 H)
• Analog Output Error Mode (6443 H)
1.
Substitute value on error !
• Error Value Output 8-Bit
(6207 H)
• Error Value Output 16-Bit
(6307 H)
• Error Value Output 32-Bit
(6327 H)
• Analog Output Error Value Integer
(
6444 H)
2.
=1 Send substitute value
=0 Keep latest value
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 74
CANopen
Exercise: Parametrizing of the analog I/Os via SDOs
The analog input shall send a
value on a delta of 10
increments !
0-10V
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 75
CANopen
Connection of XC600 with XION
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 76
CANopen
Setup of a CAN network 1
XI/ON
IB7.0
QB0.0
XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 77
CANopen
Setup of a CAN network 2
XI/ON
IB7.0
QB0.0
XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 78
CANopen
Setup of a CAN network 3
XI/ON
IB7.0
QB0.0
XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 79
CANopen
Aufbau eines CAN-Netzwerkes
XI/ON
IB7.0
QB0.0
XC600
Setup of a CAN network 4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 80
CANopen
Setup of a CAN network 5
XI/ON
IB7.0
QB0.0
XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 81
CANopen
Setup of a CAN network 6
XI/ON
IB7.0
QB0.0
XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 82
CANopen
Exercise
XI/ON
XC600
I0.0
Q0.0
Qx.x
Ix.x
: Creation of a CAN-network
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 83
CANopen
CANopen: XION-Diagnostics
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 84
CANopen
CAN-Diagnosis via device LEDs
GW: Green
Operational. Power supply OK.
IOs: Green
Configured IOs existing; XI/ON communication running.
Err: OFF
Error free communication between CAN-Gateway and
other CAN stations
Bus: Green
Status of the device is operational.
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 85
CANopen
Diagnostics CAN-Gateway-LEDs 1
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 86
CANopen
Diagnostics CAN-Gateway-LEDs 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 87
CANopen
Diagnostic information of a CAN station
CAN
XC200
XC100
XC600
XV-...-T..
XI/ON
2 Byte
Emergency
Errorcode
1Byte
Error
Register
Manufacturer specific
error register
Emergency telegram
MI4-MV4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 88
CANopen
Data content of the error register
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 89
CANopen
Diagnosis XC600
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 90
CANopen
Diagnosis of the bus communication
Start address for the module‘s
diagnosis data
TYPE GETBUSSTATE:
STRUCT
BOLDENABLE : BOOL;
ENABLE: BOOL;
DRIVERNAME:POINTER TO STRING;
DEVICENUMBER:INT;
READY:BYTE;
STATE:INT;
EXTENDEDINFO:ARRAY[0..129] OF BYTE;
END_STRUCT
END_TYPE
CAN_line
AT
%MB284
: GETBUSSTATE;
Global Variable list
Bit
7 6 5 4 3 2 1 0 Station
Byte 0
X X X A
Byte 1
X X X B
Byte 2
X X X C
Byte 3
X X X D
Byte 128
X X X Z
Byte 129 X X X X X X X X
Each Byte contains the diagnosis data of one station.
They are stored in 3 Bits.
Bit 0: 1 = Station existing
Bit 1: 1 = Data exchange ok
Bit 2: 1 = Diagnosis data available
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 91
CANopen
Exercise : CAN-diagnostics
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 92
CANopen
Diagnosis of the bus communication
ENABLE:
1 = activate
0 = deactivate
DRIVERNAME:
For the respective drivers the
following names are used:
Local XION:
XcXion
PROFIBUS DP:
XcNetIo
CANopen:
XcNetIo
DEVICENUMBER: (0,1,2) number assigned to the
PROFIBUS-DP- or CANopen-
Module address.
For local XION generally has to
be assigned “0”.
(For an additional PROFIBUS-
DP-/CANopen- Module with the
address CE000 you also have to
enter „0“. Local XION and
PROFIBUS-DP/CANopen are
then distinguished by the name
of the driver)
BUSMEMBERID: (Node-) Number/Address of the station.
For local XION it is generally “0”.
In a PROFIBUS-DP-line the first slave normally is
assigned the address 2.
For CANopen the addressing (Node ID) of the stations
can start with 1. In the attached sample the module XC-
NET-CAN gets the Node ID 1. Please regard, that with
CANopen the lowest addresses have the highest priority.
READY:
0 = Block inactive
1 = Block active
STATE:
for the values –1, 0, 1, 2, 3 the following constants are
defined:
-1: NDSTATE_INVALID_INPUTPARAM
0: NDSTATE_NOTENABLED
1: NDSTATE_GETDIAG_INFO
2: NDSTATE_DIAGINFO_AVAILABLE
3: NDSTATE_DIAGINFO_ NOTAVAILABLE
EXTENDEDINFO: In these 100 Bytes extended diagnostic info is available
(ARRAY [0..99] OF BYTE)
Byte 16 and 17 of the ExtendedInfo contain the Error code of the Emergency Telegrams!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 93
CANopen
EDS and DCF files
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 94
CANopen
EDS file
information
: generation
date,
Version,
etc.
General
device info:
Name,serial
number,
Hardware
revision,
etc.
Object
inventory
with
predefine
d values
The EDS file (Electronic Data Sheet)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 95
CANopen
EDS Form
for
diferent
Configurations
of one
device type
EDS Form
for
diferent
Configurations
of one
device type
EDS
250 Kbit/s
ID = 18
250 Kbit/s
ID = 18
1 Mbit/s
ID = 2
1 Mbit/s
ID = 2
20 Kbit/s
ID = 63
20 Kbit/s
ID = 63
DCF
Module 63
Module 63
Module 18
Module 18
Module 2
Module 2
Device
EDS and DCF
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 96
CANopen
CANopen: Connecting 3rd party devices to
XSystem
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 97
CANopen
How to connect 3rd party devices to XControl?
e.g.
Pressure sensor by the company Trafag
p
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 98
CANopen
Copying the EDS file into the XSoft directory
CO
P
ED
S-
Da
te
i
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 99
CANopen
Path for project specific configurations
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 100
CANopen
XSoft PLC configuration
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 101
CANopen
CANopen: Process data objects (PDO)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 102
CANopen
COB-ID
ProcessData
ProcessDataObject
What is a PDO?
Temperature sensor
COB-ID
Data
1-2047
0
8
Up to max.
1234
25
1234
25°C
Press-
ure
Time
Velocity
etc.
Transmit-PDO
Data
Receive-PDO
COB= CommunicationOBject Identifier
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 103
CANopen
The COB-ID (Communication Objekt Identifier)
The COB-ID serves the addressing and prioritizing of the
PDOs !
0
10
313029
2047 diferent COB-IDs
=0 means 11-Bit-ID
=1 means 29-Bit-ID
=0 RTR is possible with this PDO
=1 RTR is not possible with this PDO
=0 PDO exists / is valid
=1 PDO does not exist / is invalid
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 104
CANopen
Default-PDOs of a CANopen device according to CiA
DS-401
CAN
TPDO4
TPDO3
TPDO2
TPDO1
RPDO4
RPDO3
RPDO2
RPDO1
Digital
Bit:
0-63
Analog
channels:
0-3
4-7 8-11
Hardware-Input
Hardware-Output
Digital
Bit:
0-63
Analog
channels:
0-3
4-7 8-11
0-10 0/ 4-20 mA
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 105
CANopen
Predefined COB-IDs
Device ID + DefaultOfset
Default-COB-ID:
8 Byte PDO
... Up to device 127
181 281 381 481 201 301 401 501
Send-PDOs
Receive-PDOs
Device 1
182 282 382 482 202 302 402 502
Send-PDOs
Receive-PDOs
Device 2
All COB-IDs in Hex!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 106
CANopen
Exercise
Send-PDOs
Receive-PDOs
Device-ID 64
?
: What are the COB-IDs of the default PDOs?
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 107
CANopen
Automatic connection of CAN devices with XControl
181
Send-
PDOs
Receive-
PDOs
201
...
...
PDOs do not own a
COB-ID yet !
181 281 381 481 201 301 401 501
Send-PDOs
Receive-PDOs
Device 1
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 108
CANopen
Exercise: CAN-XION-Station with 14 analog outputs
Configure a XION-Station to address 2 with 7
„XN-2AO“ modules!
• How does XSystem solve the problem, that a
maximum of 12 analog outputs can be placed in the
default PDOs ?
• What do you have to change, so that the data
exchange will work with all analog ouput signals?
14 * 0-10V
...
2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 109
CANopen
XI/ON specific Default-PDOs
PDO5
2. Group of digital I/Os
Bits 64 thru 127
COB-ID TPDO
800001C0h+Node-ID
Meaning
COB-ID RPDO
80000240h+Node-ID
PDO13
4. Group of analog I/Os
Channels 12-15
800001A0h+Node-ID 80000220h+Node-ID
PDO16
7. Group of analog I/Os
Channels 24-27
800004A0h+Node-ID 80000520h+Node-ID
Bit 31=1 => PDOs are blocked!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 110
CANopen
Enabling the specific XI/ON-PDOs
1
0
COB-ID:
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 111
CANopen
Exercise: CAN-XION-Station with 14 analog outputs
(Part 2)
14 * 0-10V
...
2
34
Create another XI/ON station with the address 34
and one module „XN-2DO“.
• What do you notice ?
• What do you have to do ?
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 112
CANopen
Each COB-ID must be unique !
13. Analog Input
PDO13 - COB-ID:
01A0 hex + 2 = 01A2 hex
1. Digital Input
PDO1 - COB-ID
0180 hex + 22 hex = 01A2 hex
Node-ID 2
Node-ID 34 (=22 hex)
XI/ON-specific default-PDOs could appear once more at higher
node-IDs ! In that case the PDO has to be modified !
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 113
CANopen
Which COB IDs must NOT be assigned ?
All numbers in Hex !
Free 128dez COB-IDs
0x80:
Sync-Signal
0x81-0x100:
Emergency
Free 128dez COB_IDs
0x181-0x580:
Default-PDOs
0x581-0x600:
SDO-Response (580+Node-ID)
0x601-0x680:
SDO-Request (600+Node-ID)
Free 128dez COB_IDs
0x701-0x780:
Nodeguard
Free 128dez COB_IDs
0x7FF
(End - 2047 Decimal)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 114
CANopen
CANopen: PDO-Mapping
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 115
CANopen
PDO-Mapping
RPDO 0x182
At PDO you define the mapping the COB-ID of the receive-PDO to
the COB-ID of the send-PDO !
Attention ! Please keep track of your actions !
TPDO 0x182
RPDO 0x182
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 118
CANopen
Communication XC100-MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 119
CANopen
254 Byte
254
Byte
12345
12345
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 120
CANopen
The Communication function block XC100-MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 121
CANopen
Most important parameters of MI4netCANopenARR
usi:NodeID
usi_ADRNewDataRea
dy
ui_ADRIndex
usi_ADRSubindex
x_WriteINT32
usi_WriteOffset
usi_WriteNr
T_TimeOutTransSDO
2
%IB3
%IW
4
%B6
TRUE
1
254
T#2s
dw_arr_INT32
dw_arr_FLOAT32
ARRAY [1..254] OF DWORD
ARRAY [1..254] OF DWORD
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 122
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 123
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 124
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 125
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 126
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 127
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 128
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 129
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 130
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 131
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 132
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 133
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 134
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 135
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 136
CANopen
Schedule Communication between XC100 and MI4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 137
CANopen
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 138
CANopen
CANopen Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 139
CANopen
Communication between PLCs
Master 1
Device 2
Device 127
...
RPDO1
RPDO2
RPDO3
RPDO4
TPDO1
TPDO2
TPDO3
TPDO4
RPDO1
RPDO2
RPDO3
RPDO4
TPDO1
TPDO2
TPDO3
TPDO4
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 140
CANopen
How to transfer variables from the PLC program to
CAN?
PLC_PRG
VAR
A: UINT;
B: UINT;
Y: UINT;
END_VAR
1 Declare
My_Parameter_list
Name Index Subindex Accessright Variable
Cycles_A 2000 1 read only
PLC_PRG.A
Cycles_B 2000 2 read only
PLC_PRG.B
Value_Y 2001 1 write only
PLC_PRG.Y
2Create Object Directory
Receive PDOs
PDO 16#1400
Index 16#2001, Sub1
3 PDO-Mapping
Send PDOs
PDO 16#1800
Index 16#2000, Sub1
Index 16#2000, Sub2
ED
S-
fil
e
4
Generate EDS
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 141
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 142
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 143
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 144
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 145
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 146
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 147
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 148
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 149
CANopen
Information: Fahrplan XC100 als CANopen-Device
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 150
CANopen
CANopen: Connection XC100-XC100
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 161
CANopen
Caution with XC100-XC100 connection via CAN. Part
1
XC100_1
XC100_2
e.g. COB-ID 203
1
2
3
Default-COB-IDs:
Global Variable List
XC100_1
Cyclic Write
Identifier: 203
Careful with default-PDOs. Avoid already used COB-IDs!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 162
CANopen
XC100_1
XC100_2
Global Variable List XC100_1
VAR_GLOBAL
XC1_1:USINT;
...
XC1_8:USINT;
END_VAR
For each variable a PDO will be created !
XC1_1
Identifier1
Network variable list
XC1_2
Identifier2
Caution with XC100-XC100 connection via CAN. Part
2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 163
CANopen
Several XControls address the same station
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 164
CANopen
Several XControls receive messages from the same
station
XI/ON-Node-ID 2
Node-ID 1
Node-ID 3
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 165
CANopen
There can only be one !
XI/ON-Node-ID 2
Node-ID 1
Node-ID 3
• starts,
• initialises,
• monitors
The stations
The Start-Init-Monitoring Master
• starts,
• initialises,
• monitors
The stations
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 166
CANopen
Several XControls transmit to the same station
XI/ON-Node-ID 2
Node-ID 1
Node-ID 3
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 167
CANopen
Information: Settings for multiple access
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 168
CANopen
Exercise
XI/ON-Node-ID 2
Node-ID 1
Node-ID 3
XI/ON-Node-ID 4
XION4_Q:=XION2_I;
XION2_Q:=XION4_I;
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 169
CANopen
Solution
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 170
CANopen
Information
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 171
CANopen
CANopen Routing
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 172
CANopen
How to program XControl via CAN
Master 1
Device 2
Device 127
...
RS232
XSOFT
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 173
CANopen
Routing in two different cases
RPDO
Without data exchange via CAN With data exchange via CAN
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 174
CANopen
Information: Schedule for routing
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 175
CANopen
Information: Schedule for routing
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 176
CANopen
Information: Schedule for routing
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 177
CANopen
Exercise: Routing
Node-ID 1
Node-ID 22
Cooperate with your table neighbour.
Create a project for your XC100 with one of the a.m. node IDs and load
this into the PLC via the programming connection. Connect both
XControls via CAN.
Take turns with the following step:
Access the pther XControl from your XControl and upload its program
into your XSoft.
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 178
CANopen
CAN-Direct Access
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 179
CANopen
What to do when there is no EDS file?
CO
P
ED
S-
Da
te
i
?
EDS file missing!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 180
CANopen
Direct access to the CAN bus
Node-ID:1
0x183
8 Byte Data
Start node
0x183
Configure/inquire input filter
3
4
5
Node sending
Node-ID:3
0
Preparation:
- Importing the CanUser.lib and the
CanUserMaster.lib
- Inserting a CAN master module in the PLC
configuration
- Setting the node ID of the CAN master
2
1
Node Reset
Configure (e.g. NodeGuarding)
6
NodeGuarding
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 181
CANopen
CAN direct access: Just two libraries for all PLC
types (I)
CANUser.lib
0x183
On
Of
Parametrize input filter
TPDO
Start node
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 182
CANopen
CAN direct access: Just two libraries for all PLC
types (II)
CanUserMaster.lib
Configure node
Diagnosis (only with EDS and node in the
PLC configuration)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 183
CANopen
Node Reset
Always = 0!
0 for NMT!
2 Bytes
No remote request
Standard Prio = 0!
Node reset
Node address 3
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 184
CANopen
Start node
For the starting of a node use the function „CanUser_Write“!
Always = 0!
0 for NMT!
2 Bytes
No remote request
Standard Prio = 0!
Start node = 1 !
Node address 3
Return value
Blocks
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 185
CANopen
Read PDOs
For each PDO another instance of the function block
„CanUser_ReadImage“ has to be created !
Always 0!
Desired COB-ID in Hex
Blocks
16#183
3
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 186
CANopen
The main program for „Start Node“ and „Read
PDO“!
VAR
CANImage_0x183: CanUser_ReadImage;
State: INT;
PressureValue: WORD;
END_VAR
(*StartNode*)
PLC_PRG.Akt_StartNode;
(*Read PDO 0x183*)
PLC_PRG.Akt_ReadImage_PDO0x183;
IF CANImage_0x183.xReady THEN
IF CANImage_0x183.iStatus = 1 THEN
PressureValue :=
WORD_TO_INT(SHL(BYTE_TO_WORD(CANImage_0x183.bByte1),8)
OR BYTE_TO_WORD(CANImage_0x183.bByte0));
END_IF;
END_IF;
Refer to slide:
„Start node“
Refer to slide:
Read PDOs with the function block
„CanUser_ReadImage“
Blocks
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 187
CANopen
Diagnosis via Emergency Telegram
Blocks
Always 0 !
Identifier for emergency telegram:
80hex + Node-ID=0x82
=1 then new data has arrived
Number of emergency bytes
Low byte of the CAN error code
High byte of the CAN error code
Error register
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 188
CANopen
The main program for emergency
VAR
...
ErrorCode_Node2: WORD;
Errorregister_Node2: BYTE;
END_VAR
(*StartNode*)
...
(*Read PDO 0x182*)
...
(*Emergency*)
PLC_PRG.Akt_Emergency
IF CANImage_Emergency_Node2.xReady THEN
IF CANImage_Emergency_Node2.iStatus = 1 THEN
ErrorCode_Node2:=SHL(BYTE_TO_WORD(CANImage_Emergency_Node2.bBy
te1),8)
OR
BYTE_TO_WORD(CANImage_Emergency_Node2.bByte0);
Errorregister_Node2:=CANImage_Emergency_Node2.bByte2
END_IF;
END_IF;
Blocks
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 189
CANopen
Profibus DP – CAN comparison
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 190
CANopen
CAN-DP-comparison: Baudrate
Minimum Baudrate
Default Baudrate
Maximum Baudrate
1500 kbit/s
12 Mbit/s
CAN DP
1 Mbit/s
10 kbit/s
9,5 kbit/s
125 Kbit/s
Factor
1/1
1/12
1/12
1,5 Mbit/s
DP transmit telegrams with a baud rate up to 12 times higher than CAN;
important, however is only the efective data transfer rate !
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 191
CANopen
CAN-DP-comparison: How do the devices
communicate?
DP-Master
Slave1Slave2 Slave3SlaveN
Temp.
5
Temperature
Sensor
5
Temperature
control
5
Temperature
recorder
3
time
3
clock
Sensor
control
Te
m
p
Te
m
p
event
cycle
Multimaster
Master/Slave
CAN is safer than DP! Starting from 12 participants CAN is faster than DP !
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 192
CANopen
CAN-DP-comparison: Extension
Minimum
Extension
Average
Extension
Maximum
Extension
5000 m at 10kbit/s
CAN DP
500 m at 125 kbit/s
Factor
1 / 2,5
2,5 / 1
4 / 1
DP has a higher maximum extension than CAN at maximum
Baudrate.
CAN has a better maximum extension with minimum and default
Baudrate.
1200m at 93,75 kbit/s bis 9,5kbit/s
200 m at 1,5 Mbit/s
40 m at 1 Mbit/s
100m at 12 Mbit/s
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 193
CANopen
CAN-DP-comparison: Topology -> Line
1
2
4
3
6
5
7
8
125
9
127
126
R
R
0
31
32
63
64
95
95
127
R
R
CAN: This way..
or that:
1
2
4
3
6
5
7
8
125
9
127
126
R
R
50 m
50 m
DP:
From 32 stations on it is: CAN can be expanded with or without repeaters. DP needs them!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 194
CANopen
CANopen specifications according to CiA
trunk
length [m]
Cable resistance
[mOhm/m]
wire cross-section
[mm²]
terminating
resistance
[Ohm]
Baudrate [kBit/s]
0 .. 40
70
0,25 .. 0,34
124
1000 at 40m
40 .. 300
<60
0,34 .. 0,6
150 .. 300
>500 at 100m
300 .. 600
<40
0,5 .. 0,6
150 .. 300
>100 at 500m
600 .. 1000
<26
0,75 .. 0,8
150 .. 300
>50 at 1km
DC parameters for CANopen networks for less than 64 nodes
wire cross-section
[mm²]
n = 32
n = 64
n = 100
n = 32
n = 64
n = 100
0,25
200
170
150
230
200
170
0,5
360
310
270
420
360
320
0,75
550
470
410
640
550
480
Cable type
Maximum trunk length [m] (1)
Maximum truk length [m] (2)
(1) Safety margin factor of 0.2
(2) Safety margin factor of 0.1
Maximum trunk length for different cable types and node numbers
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 195
CANopen
CAN-DP-comparison: Deterministics
5
5
value
3
value
5
3
Collisions
DP-Master
Slave1Slave2 Slave3SlaveN
Sensor
control
Te
m
p
Te
m
p
Cycle
DP is deterministic, if there is no telegram repetitions due to transmission errors.
CAN is not deterministic!
Higher priority wins!
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 196
CANopen
Profibus
DP
Access method
Master/Slave, Token Passing possible
deterministic
Topology
Line, with repeater: Tree, Star
Media
Twisted Pair shielded, fibre optics
station number
126 (31 without Repeater)
distance
2 400 m; with Repeater up to 9600 m
transmission rate
9,6 kbit/s / 19,2 / 93,75 / 187,5 / 500 /
1 500 / 12 Mbit/s
Daten size per telegram
244 Byte
data traffic
cyclic (and acyclic with DP V1)
Standards
EN 50170, DIN 19245 T3
Lobby
Profibus User organisation (PNO)
with more than 170 members a.o. Bosch,
Siemens, MOELLER, ABB
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 197
CANopen
CAN Controller Area
Network
Access method
CSMA/CA event/message orientated
Topology
Line with short stubs
Media
Twisted Pair, fibre options
Number of stations
128, Multimaster
Distance
e.g. 40 m at 1 Mbit/s
up to 1 km at 50 kbit/s
max. trunk length not specified
transmission rate
10 kbit/s to 1Mbit/s
Data size per telegram
1 ... 8 Byte
data traffic
acyclic
Standards
ISO 11898
Lobby
CiA (CAN in automation), Intel, Philips, Bosch
Semiconductors, Motorola, NEC, Siemens
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 198
CANopen
CANopen URLs and Books
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 199
CANopen
Useful URLs
CAN cables
www.LAPPKABEL.de
Tool suppliers
Organisations
www.can-cia.org/
www.IXXAT.de
www.vector-cantech.com
(CAN in automation)
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 200
CANopen
Book tips 1
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 201
CANopen
Book tips 2
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 202
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 203
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 204
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 205
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 206
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 207
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 208
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 209
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 210
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 211
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 212
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 213
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 214
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 215
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 216
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 217
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 218
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 219
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 220
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 221
CANopen
Notice
S
ch
u
tz
v
e
rm
e
rk
n
a
ch
D
IN
3
4
b
e
a
ch
te
n
19. Mai 2021 Seite 222
CANopen
Notice