Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

CM CANopen

support

MANUAL TYPE
ENGLISH
HMS Technology Center Ravensburg GmbH
Helmut-Vetter-Straße 2
88213 Ravensburg
Germany

Tel.: +49 751 56146-0


Fax: +49 751 56146-29
Internet: www.hms-networks.de
E-Mail: info-ravensburg@hms-networks.de

Support
For problems or support with this product or other HMS products please
request support at www.ixxat.com/support.

Further international support contacts can be found on our webpage


www.ixxat.com

Copyright
Duplication (copying, printing, microfilm or other forms) and the electronic
distribution of this document is only allowed with explicit permission of HMS
Technology Center Ravensburg GmbH. HMS Technology Center Ravensburg
GmbH reserves the right to change technical data without prior announcement.
The general business conditions and the regulations of the license agreement
do apply. All rights are reserved.

Registered trademarks
All trademarks mentioned in this document and where applicable third party
registered are absolutely subject to the conditions of each valid label right and
the rights of particular registered proprietor. The absence of identification of a
trademark does not automatically mean that it is not protected by trademark
law.

Version: 1.0
Content

1 General Information .................................................................................. 5


2 Restrictions ................................................................................................ 6
2.1 29 bit CAN identifier .......................................................................... 6
2.2 CAN baudrate ..................................................................................... 6
3 LEDs ........................................................................................................... 7
3.1 Overview: LED pattern ....................................................................... 7
3.2 RUN and ERR LED: Off ........................................................................ 8
3.3 RUN LED: off, ERR LED: 1Hz ................................................................ 8
3.4 ERR LED: On ....................................................................................... 9
3.5 ERR LED: Blinking ............................................................................. 10
3.6 ERR LED: Double flash ...................................................................... 11
3.7 ERR LED: Triple flash ........................................................................ 14
4 CANopen Configuration Studio................................................................ 16
4.1 Hints ................................................................................................. 16
4.1.1 Import of an EDS of a slave ............................................................. 16
4.1.2 Network Management Configuration ............................................. 17
4.1.3 Error Control Configuration ............................................................ 20
4.1.4 Application Objects ........................................................................ 21
4.1.4.1 Introduction: Transmission type of a PDO ........................ 23
4.1.4.2 Transmission type of a PDO of a slave.............................. 25
4.1.4.3 Transmission type of the PDOs of the CM CANopen ........ 29
4.1.4.4 Transmission type: Synchronous ...................................... 30
4.1.4.5 Slave device is pre-configured by its own tool ................. 31
4.1.5 PDO Parameters ............................................................................. 32
4.1.5.1 Objects are mapped in several PDOs ............................... 33
4.1.5.2 Selected objects are not mapped..................................... 34
4.1.5.3 an object is mapped in an enabled PDOs although it has
not been selected 35
4.1.5.4 Manual change of the mapping of a PDO ......................... 35
4.1.5.5 Processing of the Process Image Output by the CM
CANopen 36
4.1.5.5.1 Processing of the Process Image Output .......36

3 CM CANopen Support Manual, V1.0


Content

4.1.5.5.2 CANopen devices that require a specific order


of the reception of RPDO data ......................39
4.1.6 Tab: Device -Parameters Node-ID ................................................... 40
4.2 Download errors .............................................................................. 42
5 TIA Portal ................................................................................................. 48
6 Operating mode: CANopen ..................................................................... 49
7 Operating mode: Transparent CAN ......................................................... 50
8 CAN bus load ........................................................................................... 51
8.1 Operating mode: CANopen Manager .............................................. 52

4 CM CANopen Support Manual, V1.0


General Information

1 General Information
This document shall provide a help that customers can help themselves.
It lists the known problems and their causes and shows how to fix it.

5 CM CANopen Support Manual, V1.0


Restrictions

2 Restrictions
2.1 29 bit CAN identifier
The CM CANopen tolerates 29 bit CAN identifier but it does not communicate with 29
bit CAN identifier.

2.2 CAN baudrate


The CM CANopen can lose received CAN frames if the CAN baudrate is 500kBaud or
higher.

6 CM CANopen Support Manual, V1.0


LEDs

3 LEDs
The RUN / ERR LEDs of the CM CANopen are one of the most important diagnostic
elements.
They provide a first advice for the possible reason of the problem.

3.1 Overview: LED pattern

7 CM CANopen Support Manual, V1.0


LEDs

3.2 RUN and ERR LED: Off


Possible reasons:
 The device configuration of the CM CANopen has not been downloaded from
TIA Portal to the PLC, yet:
 download the device configuration of the CM CANopen to the PLC
 The CM CANopen has not plugged correctly:
 unplug the CM CANopen and plug it again

3.3 RUN LED: off, ERR LED: 1Hz


Fatal error:
 Fatal error is only known with the use of SDO commands of the PLC
 The CM CANopen
 does not communicate with the PLC
 does not communicate with the CAN / CANopen network

Possible reasons:
 Several SDO commands that are running at the same time use the same SLOT:
 see description of SDO Read / Write in the manual of the CM CANopen
 parallel processed SDO commands must use different SLOT!
 a new SDO command is started before the requested SDO command has been
finished:
 output BUSY of ReadSDO FB / WriteSDO FB must have switched to FALSE
before a new command can be started
 the BUSY output must be checked!

Solution:
 correct the use of SDO commands in TIA Portal
 download the new software to the PLC
 power off / on the PLC

8 CM CANopen Support Manual, V1.0


LEDs

3.4 ERR LED: On


The CM CANopen is bus off.

Possible reasons:
 the CM CANopen does not run with the correct CAN baudrate
 check / change the selected Baudrate in the device configuration of the
CM CANopen in TIA Portal
 download the device configuration to the PLC
 power off / on the PLC
 another device is running with a wrong CAN baudrate:
 check if all devices are running with the same CAN baudrate
 the mounting of the CAN cable is not correct
 see chapter 4.1 Mounting of the manual of the CM CANopen
 the CAN bus is not terminated as specified
 see chapter 4.4 Line Termination of the manual of the CM CANopen
 cable break / short cut
 check the cable
 noise
 use a standard shielded CAN cable
 the shield is grounded at one side

CANopen: RUN LED: blinking / single flash / on


 the CM CANopen provides an automatical recovery from bus off
 alternatively:
 power off / on

transparent CAN: RUN LED: triple flash


 the CM CANopen must process a Reset CAN controller command
 see chapter 8.2.3 CAN_CTRL of the manual of the CM CANopen
 FCN 5
 alternatively:

9 CM CANopen Support Manual, V1.0


LEDs

 power off / on

3.5 ERR LED: Blinking


The CAN controller has reached the warning level.

Possible reasons:
 the CM CANopen is alone in the CAN / CANopen network
 check if the other CAN / CANopen devices are connected
 noise
 use a standard shielded CAN cable
 the shield is grounded at one side
 power on
 the CM CANopen was alone after power on
 and has entered warning level reached
 the only connected CAN / CANopen device is connected to the CAN bus
when the CM CANopen has reached the warning level
 the CM CANopen will not confirm the first message of the other device
 this device will also enter warning level
 note:
 this problem can be only analysed with a tool that can log the CAN
bus traffic in listen only mode
 note: CANopen Manager: RUN LED: blinking
 this is the most probable reason if the RUN LED stays blinking
 the RUN LED will switch to On (operational) when there is any
CAN communication

10 CM CANopen Support Manual, V1.0


LEDs

3.6 ERR LED: Double flash


Double flash is only supported by CANopen operating mode.

Operating mode: CANopen Slave


 A nodeguard event or a heartbeat event has occurred
 possible reasons:
 timeout of the guarding by the CANopen master
 heartbeat consumer timeout of another device that heartbeat shall be
monitored

Operating mode: CANopen Manager


Double flash indicates a network management error.
Possible reasons:
a) a CANopen device is configured
as a slave in the CM CANopen Configuration Studio
=> Bit 0 of NMT Slave is
setwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

11 CM CANopen Support Manual, V1.0


LEDs

wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

12 CM CANopen Support Manual, V1.0


LEDs

wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwww
 slave is missing / disconnected
 Get Node & Network Status provides this information
see 8.1.4 Get Node & Network Status
=> CANopen Device missing
 its boot slave process has failed
 Get Node & Network Status provides this information
see 8.1.4 Get Node & Network Status
=> Configuration error bit
 nodeguard event or a heartbeat event of a slave
 Get Node & Network Status provides this information
see 8.1.4 Get Node & Network Status
=> Node State changes
b) a CANopen device is not configured
as a slave in the CM CANopen Configuration Studio
=> Bit 0 of NMT Slave is not set
 device is present
 Get Node & Network Status provides this information
see 8.1.4 Get Node & Network Status
=> bit 7 is set

Note: boot slave process


 A configuration
is generated by the Configuration Studio for each CANopen slave
and downloaded to the CM CANopen
 Boot slave process of a slave:
the CM CANopen
 checks if the device is connected
 if not => failure => missing
 checks the identity of the device if requested
 if requested and different => failure => configuration error
 tries to configure the slave with the configuration that has been
generated for the slave

13 CM CANopen Support Manual, V1.0


LEDs

 if it fails => failure => configuration error


 this error is mainly caused by EDS files
that do not describe the real device correctly
 a failed boot slave process is only repeated
 if Bit 2 of its NMT Slave configuration is set
 Bit 2 must be set
otherwise
=> an exchanged device will not be booted automatically
=> later connected devices are not booted automatically
 hint:
 only a successfully booted slave can be set to operational!

Hint: configuration error


 this type of error can be only analysed and solved with a trace of the CAN bus
traffic
 this type of error is mainly caused by EDS files that do not describe the real
devices correctly

3.7 ERR LED: Triple flash


Triple flash is only supported by CANopen operating mode.

Condition:
 The CM CANopen is not configured as SYNC Producer
 Communication Cycle Period (ms) is not 0
 see tab: Application Objects of the CANopen Configuration Studio

14 CM CANopen Support Manual, V1.0


LEDs

possible reasons:
 the sync producer is disconnected

Hint: Operating mode: CANopen Manager


 it is highly recommended
that the CM CANopen is configured as Sync Producer
if synchronous PDOs are used

15 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4 CANopen Configuration Studio


Please install the latest version of the CM CANopen Configuration Studio from the
homepage:
https://www.ixxat.com/de/support/downloads-dateien-dokumente/canopen-sps-
erweiterungen/cm-canopen

This chapter refers to the latest version.

4.1 Hints
4.1.1 Import of an EDS of a slave

The error list must be checked when the EDS file has been imported!
 Each reported error except the version error must be checked and corrected
 a reliable configuration cannot be generated if these errors (except the
version error) are not corrected
 contact the manufacturer of the device

Hint: Slave is configured by its specific tool


 this method is should be only used if it is the only possibility to achieve a
reliable configuration
 the EDS file must be adjusted to this configuration
 the objects
that must not be changed by the generated configuration of the
CANopen Configuration Studio
must be set to read only
 Bit 7 of NMT Slave of this device must not be set
 otherwise
the generated configuration by the device specific tool will be
deleted
 set bit 7 forces the slave to restore its default configuration
 this method should be only used if it is the only possibility to achieve a reliable
configuration

16 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.2 Network Management Configuration

NMT Startup:
 Bit 1 should be set
 this bit has not any influence on the TIA project
 but it guarantees that the CM CANopen always receives the PDO data of
the slaves
 Bit 2 and 3 shall not be set
 Bit 4 and 6:
 these bits are only relevant if a slave is configured as mandatory
 the CM CANopen does not support mandatory slaves

Slave Assignment: NMT Slave


 Bit 2 of NMT Slave:
 This bit should be set
 otherwise a failed boot slave process of the slave will not be
repeated
 later connected device will not be booted automatically
 exchanged device will not be booted automatically
 only successfully booted slaves can be set to operational!

 Bit 7 of NMT Slave:


 Bit 7 should be set to guarantee a consist configuration of the slave
 The generated configuration for the slave only contains the
configuration that is different from the default configuration of
the EDS
 set bit 7 forces the slave to restore the default configuration of
the parameter area that is configured by Restore Configuration

 Exeption:
 The slave device is configured by its own tool
 the EDS must be adjusted to this configuration

17 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 the objects
that must not be changed by the generated
configuration of the
CANopen Configuration Studio
must be set to read only
 Bit 3 of NMT Slave: (if not hidden)
 must not be set
=> the CM CANopen does not support mandatory slaves

Slave Assignment: Restore Configuration


 it is highly recommended that a slave device restores its default configuration
before it will be configured:
 note that the generated configuration by the CANopen Configuration
Studio only covers the objects that configuration is different from the
default configuration in the EDS
 best solution:
 Bit 7 of NMT Slave: set
 Restore Configuration: 01 all parameter areas
 Exceptions:
 The slave device is configured by its own tool that shall not be
overwritten
 Bit 7 of NMT Slave: not set => disables the restore
 only a selected parameter area shall be restored
 Restore Configuration: 02 communication parameter area
index range: 1000h … 1FFFh
 Restore Configuration: 03 application parameter area
index range >= 6000h
 Restore Configuration: > 03 manufacturer specific

Boot Time (ms):


 its value is only relevant for a CANopen network with mandatory slaves:
=> the CM CANopen does not support mandatory slaves

NMT Inhibit Time (100µs):


 configures the inhibit time between two subsequent NMT messages
 is needed if a slave device runs into a receive queue overrun due to the
reception of a burst of NMT commands

18 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 this problem can by only analysed by a trace of the CAN bus traffic

19 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.3 Error Control Configuration

It is highly recommended that a CANopen slave is controlled by the CM CANopen


 either by consuming the heartbeat of the slave
 see screenshot below: slave with Node-ID: 2
 or by guarding
 see screenshot below: slave with Node-ID: 1
otherwise
 the CM CANopen does not detect, that the slave is disconnected
 except the slave is the only slave in the network
 the CM CANopen does not detect, that the slave has changed its CANopen
state
 a CANopen can change its CANopen state from operational to not
operational due to a serious error
 Get Node & Network Status
 can only display the actual CANopen state of a successfully booted slave
Bits 0 - 3: NMT State Operational 5h
NMT State Stopped 4h
NMT Pre-operational Fh
if the slave is controlled by guarding or heartbeat consuming
otherwise
Bits 0 - 3: NMT State Unknown 0h

20 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4 Application Objects

Allocated process Image Size


 IN:
effective byte size of data that are received by the process image input of
the CM CANopen / PLC
 Out:
effective byte size of data that are transmitted by the process image
output
of the CM CANopen / PLC

Process Image Size (OUT) (byte):


 limits the effective byte size of the process image input of the CM CANopen
=> exclusively in the CANopen Configuration Studio
 note:
 this limitation has no any effect on the real limitation
 the real limitation is set by the device configuration of the CM CANopen
in TIA Portal:
 CM CANopen / Module Parameters: CANopen input data size

21 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

Process Image Size (IN) (byte):


 limits the effective byte size of the process image output of the CM CANopen
=> exclusively in the CANopen Configuration Studio
 note:
 this limitation has no any effect on the real limitation
 the real limitation is set by the device configuration of the CM CANopen
in TIA Portal:
 CM CANopen / Module Parameters: CANopen output data size

Note: "Process Image Size (OUT) (byte)", "Process Image Size (IN) (byte)"
 the labels are swapped:

this confusion is caused by the definition of the process image by CANopen:


 output variables are received from the CAN bus (inputs from CAN bus)
but they are written to the periphery (outputs of a device)
 input variables are read from the periphery (inputs of a device) but they
are transmitted to the CAN bus (outputs to the CAN bus).

22 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4.1 Introduction: Transmission type of a PDO

Overview: Transmission Type

CANopen Configuration Studio


Transmission Type No of Sync
transmission type 0 Synchronous (acyclic) -
transmission type 1 - Synchronous (cyclic) CANopen:
240 transmission type
transmission type 254 Event-driven -
(manufacturer-specific)
transmission type 255 Event-driven -
(profile specific)

Synchronous transmission types:


Each synchronous transmission type requires the transmission of the sync message

 Synchronous RPDO CANopen: transmission type 0 - 240


 the data of a received synchronous RPDO is updated / processed by the
reception of the next sync message

 Synchronous (acyclic) TPDO CANopen: transmission type 0


 the TPDO is exclusively transmitted after the reception of a sync
message
if its data has changed

 Synchronous (cyclic) TPDO CANopen: transmission type 1 - 240


 the TPDO is exclusively transmitted when
CANopen: transmission type / Configurations Studio: No Sync
sync messages have been received
 exception:
a synchronous(cyclic) TPDO must be transmitted
after the reception of the 1st sync message
when the CANopen NMT state of the CANopen device

23 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

has changed
from not operational to operational

Asynchronous transmission types: Event-driven


 asynchronous RPDO CANopen: transmission type 254 - 255
 the data of a received asynchronous RPDO is updated / processed
immediately

 asynchronous TPDO CANopen: transmission type 254 – 255


 trigger condition for the transmission of the TPDO:
 data of the TPDO has changed
 the event timer of the TPDO (if supported and not 0) has elapsed
 hint: Inhibit Time
 the inhibit time defines a minimum delay between subsequent
transmissions of the TPDO
 the Inhibit time should be used
 for TPDOs
that transfer analogous or real values
to reduce the bus load
because
these values always jitter a little bit
=> change of a value triggers the transmission
otherwise these TPDOs
can flood the CAN bus
and block the transmission of CAN messages
with a lower priority
e.g.: heartbeat messages, SDO message

 Event-driven (profile specific) transmission type 255


the TPDO is transmitted
 when its data has changed
 exception:
the inhibit time has not elapsed
 the event timer has elapsed
 Event-driven (manufacturer-specific) transmission type 254
 it includes the transmission type 255
 but the manufacturer has implemented additional device specific
trigger conditions

24 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4.2 Transmission type of a PDO of a slave

It must be differentiated between


 the use of the default mapping of a PDO
 the selection of single objects

PDO shall use its default mapping:


 The transmission type of a PDO of a slave is defined by
 Application Objects:
=> right click in the device
=> Select Default Mappings of Device
=> select the transmission type

25 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 Hint: Synchronous (cyclic) CANopen: transmission type 1 - 240


 Synchronous (cyclic) defines the general transmission type
 but CANopen: transmission type 1 - 240 requires that the number of
sync messages must be set:
 field: “No of Sync” must be configured

Selection of single objects:


 the transmission type is an attribute of the selected object
 click on “Transmission Type” field of the selected object
and select the requested transmission type:

 Hint: Synchronous (cyclic) CANopen: transmission type 1 - 240


 Synchronous (cyclic) defines the general transmission type
 but CANopen: transmission type 1 - 240 requires that the number of
sync messages must be set:
 field: “No of Sync” must be configured
 Note:
The task of the Configuration Studio is
 to find a PDO configuration where all mapped objects of a PDO has the
same transmission type:
 the PDO inherits the transmission type from its mapped objects
 there will be not a mix of transmission types in a PDO

26 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

general note:
 one PDO can transfer maximum 8 data bytes
 the data of a mapped object cannot be split into several PDOs
 it must be checked
 how many RPDOs / TPDOs are supported by the slave device
 please select the single objects and their transmission type very carefully
 when there are not sufficient PDOs
Note: change of the transmission type of a PDO
 the transmission type of a PDO is changed in “PDO Mapping Parameters”

 PDO is not locked:


 the transmission type will be overwritten with the next “Calculate
Configuration”

 PDO is locked when the transmission type has changed:

27 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 the transmission type of the corresponding PDO of the CM CANopen is


not adjusted

28 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4.3 Transmission type of the PDOs of the CM CANopen

The transmission type of a PDO of the CM CANopen


is fixed by / is identical with
the transmission type of the corresponding PDO of a slave:
 the transmission type of a PDO of the CM CANopen cannot be changed!

 e.g.: TPDO i of a slave is received by RPDO n of the CM CANopen


 the transmission type of RPDO n of the CM CANopen
is set by the transmission type of TPDO i of the slave

 e.g.: TPDO i of the CM CANopen is received by RPDO n of a slave


 the transmission type of TPDO i of the CM CANopen
is set by the transmission type of RPDO n of the slave

Hint: Transmission type Synchronous (cyclic) of a RPDO of a slave


 the transmission type of the corresponding TPDO of the CM CANopen is also
Synchronous (cyclic)
 the Synchronous (cyclic) TPDO of the CM CANopen
is exclusively and unconditionally
transmitted
after the reception of the configured number of sync message
 this transmission type may cause problems if the TPDO of the CM CANopen
shall not be transmitted when its data has not changed:
 e.g.: the controlword of a drive
 solution:
 the RPDO of the slave must be configured
with the transmission type Synchronous (acyclic)
see chapter: Transmission type of a PDO of a slave

29 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4.4 Transmission type: Synchronous

Synchronous PDOs requires the transmission of the sync message to be processed


 the data of received synchronous RPDOs are updated / processed by the
reception of the next sync message
 synchronous TPDOs will not be transmitted if the sync message is not
transmitted
Therefore: one device must be configured as sync producer
 it is highly recommended that the CM CANopen is selected as the sync
producer
 because the CM CANopen has to manage the CANopen network
Additionally: the sync cycle time must be configured.

Selection of the sync producer and configuration of the sync cycle time:
 selection of the sync producer:
 open the combo box of “Sync Producer”
 select the device provided by the CAnopen node id
 configuration of the sync cycle time
 see chapter: Operating mode: CANopen Manager
 enter the required value in “Communication Cycle period (ms)

30 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.4.5 Slave device is pre-configured by its own tool

The EDS of the slave must be adjusted to the pre-configuration:


 the objects of the EDS
that must not be changed by the CM CANopen Configuration Studio
must be set ro (read only)
to avoid
that the generated configuration changes the pre-configured values

Hint: Bit 7 of NMT Slave


 Bit 7 of the NMT Slave configuration of a pre-configured device should not be
set:
 set bit 7
forces a restore to the default configuration of the parameter area
that is set by the value Restore Configuration

31 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.5 PDO Parameters

The generated mapping must be checked after “Calculate Configuration”


 are all selected objects mapped?
 are objects mapped in several enabled PDOs?
 are objects mapped (in enabled PDOs) that have not been selected?

Hint:
 the following considerations does not concern PDOs that default configuration
is used
=> Application Objects:
=> right click in the device
=> Select Default Mappings of Device

32 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.5.1 Objects are mapped in several PDOs

A selected object is mapped in several PDOs by default in the EDS of the slave
 the Configuration Studio cannot know which configuration shall be used

Hint: an object is mapped in several TPDOs of the slave


 it must be avoided that a selected object is mapped in several TPDOs
because
 the object is only received by one of the corresponding RPDOs of the CM
CANopen
 the other RPDOs uses a dummy object for this object
=> the data of this object is ignored
 the download of the configuration to the CM CANopen will fail:
=> the CM CANopen does not support dummy objects
=> the download will be aborted with:

 action:
 the mapping must be changed manually

33 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

Hint: an object is mapped in several RPDOs of the slave


 it must be individually checked if this configuration matches the requirements
of the slave

 e.g.: controlword of a drive


 the change of the controlword triggers the transmission of each
TPDO of the CM CANopen that transfers this controlword
 the order of the received RPDOs determines the action of the
slave

 action:
 the mapping must be changed manually

4.1.5.2 Selected objects are not mapped

Possible reasons:
 there is not sufficient free space in the data fields of the slave`s PDOs to map
the object
 one PDO can maximum transfer 8 data bytes
 the data of an object cannot be split into several PDOs
 too many objects have been selected
 select the objects that are really relevant
 there are objects that have not been selected
 the Configuration Studio tries to be as close as possible to the default
configuration of the PDOs of a slave
 the configuration of the transmission type caused this error
 only objects with the same transmission type can be mapped in a PDO
Action:
 check the mentioned reasons
 the mapping must be changed manually

34 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.5.3 an object is mapped in an enabled PDOs although it has not been selected

Reason:
 the Configuration Studio tries to be as close as possible to the default
configuration of the PDOs of a slave
Action:
 the mapping must be changed manually

4.1.5.4 Manual change of the mapping of a PDO

The manual change is done in the tab: “PDO Mapping Parameters” for the selected
slave.

Hint:
 manual change of the mapping is not possible for PDOs
 that are activated by “Select Default Mappings of Device”
 that are not enabled

Procedure:
1. PDOs of the slave device shall not be locked
2. Select the objects that shall be mapped
3. Calculate Configuration
4. Change manually the mapping according your needs
 right click on the PDO that mapping shall be changed
=> PDO must be enabled!
 remove / add object(s)
 move up / down a mapped object (if necessary)
 when the manual mapping has been finished for the PDO:
=> Lock the PDO
5. repeat the manual mapping for all PDOs that mapping shall be changed
 hint:
an enabled PDO that does not transfer any data after changing
must be disabled (Enabled: not set)
before it is locked
6. Calculate Configuration

35 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

7. check the generated mapping

4.1.5.5 Processing of the Process Image Output by the CM CANopen

Note:
 “Processing of the Process Image Output by the CM CANopen”
does not consider
Transmission Type, Inhibit Time and Event Timer
of the TPDOs of the CM CANopen
 transmission type, inhibit time and event timer do not affect the below
described procedure

4.1.5.5.1 Processing of the Process Image Output

The processing of the process image output consists of 2 buffers


 PLC process image output:
the process image data that is received from the PLC
is copied to this buffer
hint:
 “Set Process Data Out” (see manual of the CM CANopen)
 informs that the data has been written to this buffer
 does not inform if the data has been processed / transmitted to
the CANopen network
 each received process image output from the PLC overwrites the data in
this buffer
 CANopen process image output:
this buffer provides the data
that is transmitted by TPDOs to the CANopen network
so the transmitted data are consistent / based on the same set of data

Description of the procedure:


1. Start of a new cycle of the processing of the process image output
=> the data of the PLC process image output buffer
is copied to the CANopen process image output buffer
=> continue with step 2.

36 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

2. Processing of the CANopen process image output buffer


=> when the CANopen process image output buffer has been processed
continue with step 1.

Processing of the CANopen process image output buffer:

Hint: runtime of the one cycle of the processing of the CANopen process
image output buffer
 the runtime depends of the processing of the asynchronous TPDOs
 asynchronous TPDOs are entered in
the standard transmission FIFO
that is also used for
=> the heartbeat message
=> NMT commands
=> emergency messages
=> SDO commands

an overrun of the FIFO must be avoided


=> the CM CANopen checks
=> if a message can be entered in this FIFO
=> if not:
=> the message will be entered
when there is space in the FIFO

 synchronous TPDOs are entered in


the synchronous transmission FIFO
that has a higher priority than the standard transmission FIFO
=> the synchronous transmission FIFO is processed first
=> the standard transmission FIFO is processed
when the synchronous transmission FIFO is empty

 therefore:
the processing is described for the asynchronous TPDOs

37 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

Processing of asynchronous TPDOs:


 the CM CANopen checks each asynchronous TPDO if it must be transmitted
 the TPDOs of the CM CANopen are processed according their TPDO
number
 TPDO 1 is processed first
TPDO 2 is processed next

TPDO 64 is processed last

when TPDO 64 has been processed:


a new cycle of the processing of the process image output is started

 processing of an asynchronous TPDO:


check if the TPDO must be transmitted:
 no:
continue with the next TPDO
 yes:
check if it can be entered in the transmit FIFO
 yes:
continue with the next TPDO
 no:
retry

Hint: runtime of the processing of asynchronous TPDOs


 see chapter: Operating mode: CANopen Manager

38 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.1.5.5.2 CANopen devices that require a specific order of the reception of RPDO
data

Check if the order crictical RPDO data can be mapped in one RPDO of the slave:
 if yes:
=> arrange the data manually
=> see chapter: Manual change of the mapping of a PDO

The order critical data are mapped in several RPDOs of the slave:
 check if the order of transmission can be controlled by the PLC
if yes:
=> arrange the data manually (if necessary)
=> see chapter: Manual change of the mapping of a PDO
=> see chapter: Processing of the Process Image Output

The mentioned solutions are not possible:


 the TPDOs of the CM CANopen are processed / entered in the transmit FIFO
according their TPDO number
=> TPDO 1 is processed first
=> TPDO 2 is processed next

=> TPDO 64 is processed last

How to find out the number of the corresponding TPDO(s) of the CM CANopen:
 note the CAN-IDs of the relevant RPDOs of the slave
=> click on the slave in "Project Explorer"
=> click on the relevant RPDO of the slave in the tab: PDO Parameters...
=> note its CAN-ID
 click on the Manager in "Project Explorer"
=> search for the TPDOs that use the CAN-IDs of the relevant RPDOs
=> their TPDO numbers inform about the order of transmission

39 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

how to change the TPDO number:


 the TPDO number cannot be changed
 change the mapping of the RPDOs of the slave manually
=> exchange the data of the relevant RPDOs of the slave

e.g.:
 RPDO 1 (its data is transferred by TPDO i of the CM CANopen)
contains the data that shall be processed
after the reception of RPDO 2 (its data is transferred by TPDO n)
 map the data of RPDO 1 in RPDO 2 and vice versa
 lock RPDO 1 and RPDO 2
it must be locked otherwise Calculate Configuration will overwrite it
 calculate and check once more if the order of the TPDOs match the
required order

4.1.6 Tab: Device -Parameters Node-ID

Values that must be set only after power on or a reset of a slave can be configured in
the tab: Device -Parameters Node-ID
 their configuration is added to the configuration of the slave
 the slave will be automatically configured with these values by the
CM CANopen after power on / reset of the slave
 these values must not be configured by the PLC application

Procedure:
 => click on the slave in "Project Explorer"
=> click on Device -Parameters Node-ID
=> click on the index
=> click on the subindex (if the index consists of several subindex)
=> enter the value in the field: Value of the selected object
 greyed objects are read only and cannot be configured

40 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 + indicates that the index consists of several subindex

41 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

4.2 Download errors

The CM CANopen is not powered on or the USB cable has not been connected

 see Interface Configuration

not connected:

42 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

connected:

The CM CANopen is running in Operating mode: Transparent CAN

 Operating mode must be set to CANopen Manager


in the “Device configuration” of the CM CANopen in TIA Portal
 the changed hardware configuration must be downloaded to the PLC

The CM CANopen is running in Operating mode: CANopen slave

43 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 Operating mode must be set to CANopen Manager


in the “Device configuration” of the CM CANopen in TIA Portal
 the changed hardware configuration must be downloaded to the PLC

44 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

The CANopen node id of the CM CANopen


set in the “Device configuration” of the CM CANopen in TIA Portal
is different
from the CANopen node id of the CM CANopen
in CM CANopen Configuration Studio

 Node number in the “Device configuration” of the CM CANopen in TIA Portal


must be set according
the CANopen node id of the CANopen Manager
in CM CANopen Configuration Studio
 the changed hardware configuration must be downloaded to the PLC

Running SDO commands of the PLC block the download:

 wait until all running SDO commands have been finished


 do not start a new one
 note:
 STOP PLC does not deactivate a running SDO command

45 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

 The SDO command is still active and will block the download
 download the configuration to the CM CANopen

“CANopen Manager auto configuration” is enabled in the “Device configuration” of


the CM CANopen in TIA Portal

 deactivate “CANopen Manager auto configuration”


in the “Device configuration” of the CM CANopen in TIA Portal

hint:
 “CANopen Manager auto configuration” shall not be activated
 It has been forgotten to implement the functionality that provides
the information of the auto generated configuration to the PLC
application
 the changed hardware configuration must be downloaded to the PLC

46 CM CANopen Support Manual, V1.0


CANopen Configuration Studio

The CM CANopen does not support dummy mapping

 an object of a slave is mapped in several TPDOs of a slave


 see chapter: 4.1.5.1

47 CM CANopen Support Manual, V1.0


TIA Portal

5 TIA Portal
An older project is migrated in TIA Portal V14 or later:
 the compilation of the project fails
 reported error:
Data type 'Word' cannot be converted implicitly into data type 'HW_IO'

 this error is caused by the sloppy data type of


the input parameter: ID
of WriteSDO FB / ReadSDO FB
CAN_RCV FB / CAN_SEND FB / CAN_CTRL FB

 solution:
change the data type from Word to HW_IO

48 CM CANopen Support Manual, V1.0


Operating mode: CANopen

6 Operating mode: CANopen


More details / implementation hints are provided by the CANopen demo.

Note:
 the demo uses a revised library
 the library has been revised
 to improve the performance
 to be more flexible
 to solve bugs of the older version
 the interface of the FBs of the library has been changed
 the changed interface is described by the demo (see below)
 this library is not available on the homepage
 it is delivered with the demo (see below)

The CANopen demo consists of


 a CANopen demo project for TIA Portal V13
 this project can be integrated in / upgraded by TIA Portal V14 or later
versions
 the revised library for TIA Portal V13
 this library can be integrated in / upgraded by TIA Portal V14 or later
versions
 a demo project of CM CANopen Configuration Studio
 the CANopen demo project for TIA Portal V13 is based on this demo
 it is used to demonstrate the relationship of the layout of the process
image in the Configuration Studio and its implementation in TIA Portal
 a description of the CANopen demo
 that describes the CANopen demo
 that describes how the demo must be adjusted by the customer
 that describes the revised CANopen FBs of the new library

49 CM CANopen Support Manual, V1.0


Operating mode: Transparent CAN

7 Operating mode: Transparent CAN


More details / implementation hints are provided by the transparent CAN demo.

Note:
 the demo uses a revised library
 the library has been revised
 to improve the performance
 to be more flexible
 to solve bugs of the older version
 the interface of the FBs of the library has been changed
 the changed interface is described by the demo (see below)
 this library is not available on the homepage
 it is delivered with the demo (see below)

The transparent CAN demo consists of


 a transparent CAN demo project for TIA Portal V13
 this project can be integrated in / upgraded by TIA Portal V14 or later
versions
 the revised library for TIA Portal V13
 this library can be integrated in / upgraded by TIA Portal V14 or later
versions
 a description of the transparent CAN demo
 that describes the transparent CAN demo
 that describes how the demo must be adjusted by the customer
 that describes the revised transparent CAN FBs of the new library

50 CM CANopen Support Manual, V1.0


CAN bus load

8 CAN bus load


The recommended average CAN bus load should not exceed 55%
 Hint:
 a CAN controller automatically inserts an additional stuff bit after
a sequence of 5 equal bits
 55% does not consider stuff bits

The average bus load depends of


 the bit size of the CAN frames that are transmitted
 the frequency of the transmission of each CAN frame
 the CAN baudrate

Transmission time of a CAN frame:


The transmission time of a CAN frame depends of
 its bit size:
 47 bits + 8 bits * number of data bytes of the CAN frame
 Note:
an additional stuff bit is automatically inserted after
a sequence of 5 equal bits
 the CAN baudrate
 e.g.: a CAN frame with 8 data bytes
 bit size = 47 bits + 8 * 8 bits = 111 bits
 CAN baud rate: 1000 kbit / sec
=> bit time = 1µs / bit
 transmission time (without stuff bits):
=> transmission time = bit size * bit time = 111 bits * 1µs / bit = 111µs

51 CM CANopen Support Manual, V1.0


CAN bus load

8.1 Operating mode: CANopen Manager

Rule of thumb to calculate the average CAN bus load:


 Calculate the sum over the bit size
 of all enabled PDOs of the slaves
in the CM CANopen Configuration Studio
 of the heartbeat / guarding messages of all slaves and the CM CANopen
 a heartbeat message consists of 55 bits (without stuff bits)

 calculate the transmission time of the calculated bit sum


 calculate the transmission time that generates 55% bus load

 e.g.: calculated bit sum: 2500bits


CAN baudrate: 1000 kbit / sec bit time = 1µs / bit

 transmission time of the calculated bit sum (without stuff bits):


=> transmission time = 2500bits * 1µs / bit = 2.5ms
 transmission time that generates 55% average bus load
=> transmission time 55% = transmission time * 100% / 55%
= 2.5ms * 100% / 55% = 4,55ms

Consequences:
 CM CANopen Configuration Studio:
 Communication Cycle Period (ms):
minimal value > transmission time that generates 55% average bus load

 Processing time of the process image output by the CM CANopen


 processing time >= transmission time
that generates 55% average bus load

52 CM CANopen Support Manual, V1.0

You might also like