Professional Documents
Culture Documents
Siemens
ET 200SP Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109779316 Support
Legal information
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are
non-binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens 2020 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with Industrial Security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Principle of operation............................................................................ 5
1.3 Components used ................................................................................ 7
2 Hardware configuration and wiring ................................................................. 8
2.1 Hardware setup .................................................................................... 8
2.2 Wiring of the CANopen modules .......................................................... 8
3 Configuration and engineering of the CAN modules .................................... 9
3.1 Configuration and engineering as CANopen Slave ............................. 9
3.2 Configuration and engineering as CANopen Manager ...................... 12
4 Using the library for CAN communications module .................................... 18
4.1 Interface description ........................................................................... 18
4.2 Integration into the user project .......................................................... 19
5 Diagnostic blocks ............................................................................................ 21
5.1 FC "CMCANManagerStatus" ............................................................. 21
5.2 FC "CMCANSlaveStatus" ................................................................... 22
5.3 Integration into the user project .......................................................... 23
© Siemens AG 2020 All rights reserved
6 Operation .......................................................................................................... 24
7 Appendix .......................................................................................................... 25
7.1 Service and support ........................................................................... 25
7.2 Links and Literature ............................................................................ 26
7.3 Change documentation ...................................................................... 26
1 Introduction
1.1 Overview
This application example shows the configuration of two CAN communications
modules within the ET 200SP distributed I/O system. These modules are:
• CM CANopen Manager
• CM CANopen Slave
PROFINET / IE
CAN Bus
4 Call FB "ET200SPCM_CANConfig"
CM CAN Slave
7
Control byte: 0000 0001 "Set Operational"
CM CAN Manager
8 Control byte: 0000 0101 "Set Operational"
CM CAN Manager
9
Status byte: 1001 0011 "Operational"
CM CAN Slave
10
Status byte: 0001 0011 "Operational"
PROFINET / IE
CAN bus
Figure 1-3 Process data between IO controller and IO device via PROFINET and communication between
CM CANopen Manager and CM CANopen Slave
CM CANopen
Manager Slave
S7-1500 CPU Process data exchange over PROFINET ET 200SP
IO-Controller IO-Device
Output CM CAN Manager
1
QX.0 -> True
CM CAN Slave 4
Status Byte: 0001 0111 “OD Updated“
CM CAN Manager 8
Status Byte: 1001 0111 “OD Updated“
Manager Slave
© Siemens AG 2020 All rights reserved
CAN PDO
Manager to Slave
2
Communication between
the CAN modules
CAN PDO
Slave to Manager
PROFINET / IE
CAN Bus
DOC_V1_0_en.pdf document
Note The required function block from the library is already integrated in the STEP 7
program of this application example.
2. HSP 0310
You can find HSP_V15_1_0310_ET200SP_CM_CAN_1.0 for download on the
following HMTL page:
https://support.industry.siemens.com/cs/ww/en/view/72341852
Figure 2-2 Wiring of the CAN bus signal to the BaseUnits of the CAN modules
CAN High
CAN Low
Ground
Note The bridge from terminal 2 to terminal 4 ensures the switching of a terminating
resistor (120 Ω). This must be activated in the CAN bus for the first and last
node.
Figure 3-4 Setting send data of the CM CANopen Slave under "Object dictionary
(OD)"
© Siemens AG 2020 All rights reserved
Figure 3-5 Setting the Receive data of the CM CANopen Slave under the
"Object dictionary (OD)"
© Siemens AG 2020 All rights reserved
11. Define the data to be sent from the CM CANopen Slave to the CM CANopen
Manager via the CAN bus.
Figure 3-9 Configuration of the Send data from the CM CANopen Slave to the
CM CANopen Manager
© Siemens AG 2020 All rights reserved
12. Define (via the Receive Process Data Objects) the data that should be
received from the CM CANopen Slave via the CAN bus from the CM CANopen
Manager.
Figure 3-10 Configuration of the Receive data of the CM CANopen from the
CM CANopen Manager
13. Create the Send data OD in the CM CANopen Manager so that they match the
© Siemens AG 2020 All rights reserved
14. Configure the Send process data (PDOs) in the CM CANopen Manager.
The COB ID of the Receive PDO of the CM CANopen Slave must be set as the
COB ID (2).
Figure 3-12 Configuring Send process data (PDOs) in the CM CANopen Manager
15. In the CM CANopen Manager, define the Receive data ODs that must
correspond to the Send process data objects of the CM CANopen Slave.
Figure 3-14 Specifying the Receive data ODs
16. Configure the Send process data objects (PDOs) in the CM CANopen
© Siemens AG 2020 All rights reserved
Manager.
The COB ID of the Send PDO of the CM CANopen Slave must be set as the
COB ID (2).
Parameters
Table 4-1 Parameters of FB "ET200SPCM_CANConfig"
Parameter Interface Data Description
type
DB_NO Input Variant Data block with data records to be written.
(symbolic name or "%DBxy")
CAN_STATE Input Byte Status byte of the CAN module (CM)
REQ InOut Bool Positive edge: Start data transfer
ABORT InOut Bool Positive edge: Cancel data transmission
BUSY Output Bool True: Data transmission active
DONE Output Bool True: Data transmission completed
ERROR Output Bool True: Data transmission failed
STATUS Output DWORD Status code of the error (see Table 4-2)
Figure 4-2 Automatically generated data blocks for the configuration data
of the CAN modules (CMs)
The respective data blocks are connected to the input of the formal parameter
"DB_NO" of the "ET200SPCM_CANConfig" FB:
• "IOdev1.CM_CAN_Manager" for configuration of the CM CANopen Manager.
• "IOdev1.CM_CAN_Slave" for configuration of the CM CANopen Slave.
1. Automatic transmission
When the input parameter "CAN_STATE" (status byte of the CM CAN module)
is used. In this case, you do not need to connect the additional inputs "REQ"
and "ABORT".
2. Manual transmission
If the InOut parameter "REQ" = "True" is set. Then "REQ" is set to "False"
again.
5 Diagnostic blocks
Other blocks are used in addition to the library block from Section 4. These are
proprietary developments. The functionality of these blocks includes diagnostics for
the CAN bus and the CM CANopen Manager and CM CANopen Slave modules.
The blocks are described below.
5.1 FC "CMCANManagerStatus"
This block displays the status of CAN bus and CM CANopen Manager.
Figure
Figure 5-1 FC "CMCANManagerStatus"
© Siemens AG 2020 All rights reserved
Parameters
Table 5-1 Parameters of FC "CMCANManagerStatus"
Parameter Interface Data Description
type
managerStatusByte Input Byte Status byte of the CM CAN Manager
module
busStatus Output Int 0: Module OFF
1: Bus inactive or not synchronized
2: Error passive
3: OK
modulStatus Output Int 0: Start up slaves
1: Pre-stage ready for operation
2: Ready for operation
3: Stopped
4: Waiting for startup
5: Not configured
6: Bad parameterization
7: Reserved
False: Not OK
odEntriesUpdated Output Bool True: All ODs have undergone an
update since the last reset.
5.2 FC "CMCANSlaveStatus"
This block displays the status of CAN bus and CM CANopen Slave.
Figure
Figure 5-2 FC "CMCANSlaveStatus"
© Siemens AG 2020 All rights reserved
Parameters
Table 5-2 Parameters of FC "CMCANSlaveStatus"
Parameter Interface Data Description
type
slaveStatusByte Input Byte Status byte of the CM CAN Slave
busStatus Output Int 0: Module OFF
1: Bus inactive or not synchronized
2: Error passive
3: OK
modulStatus Output Int 0: Reserved
1: Pre-stage ready for operation
2: Ready for operation
3: Stopped
4: Reserved
5: Not configured
6: Bad parameterization
7: Reserved
CMCAN
Manager
© Siemens AG 2020 All rights reserved
Status
CMCAN
OB1 Slave
Status
ET200SPCM
CANConfig
6 Operation
Operation
The following instructions will help you operate the application example.
7 Appendix
7.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries
to Technical Support via Web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2020 All rights reserved
Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
support.industry.siemens.com/cs/sc