0% found this document useful (0 votes)
332 views37 pages

Use of A CM PTP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
332 views37 pages

Use of A CM PTP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Use of a CM PtP

module with a
SIMATIC ET 200SP HA
station
Siemens
CPU S7 400, ET 200SP HA CM PtP Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109814871 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 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
© Siemens AG 2022 All rights reserved

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 under
https://www.siemens.com/cert.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 2
Table of contents

Table of contents
Legal information .............................................................................................................................. 2
1 Task .......................................................................................................................................... 4
2 Solution .................................................................................................................................... 5
3 Information on Modbus RTU and the CM PtP module ........................................................ 6
3.1 Modbus RTU principle of operation ........................................................................... 6
3.2 Supported serial standards - CM PtP module ........................................................... 7
4 Implementation........................................................................................................................ 9
4.1 Hardware and software components used ................................................................ 9
4.2 Hardware setup .......................................................................................................10
4.3 Hardware configuration ...........................................................................................12
4.4 CFC engineering......................................................................................................15
4.4.1 Function blocks used ...............................................................................................15
4.4.2 CFC instructions ......................................................................................................21
4.4.3 Commissioning ........................................................................................................30
4.5 Troubleshooting .......................................................................................................34
5 Restrictions ...........................................................................................................................35
© Siemens AG 2022 All rights reserved

6 Appendix ................................................................................................................................36
6.1 Service and support .................................................................................................36
6.2 Industry Mall ............................................................................................................37
6.3 Links and literature ..................................................................................................37
6.4 Change documentation ...........................................................................................37

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 3
1 Task

1 Task
Introduction
In the process industry there are often couplings between third-party devices or systems. This is
implemented in some cases with the Modbus Remote Terminal Unit (RTU) through the use of
the serial standards RS232, RS422 or RS485. In the past, the SIMATIC ET 200M was used for
this in combination with a CP341 and a separate library. The recommended solution for the
process industry today is a SIMATIC ET 200SP HA station with a CM PtP.

Overview of the automation task

Figure 1-1 Overview of the automation task


© Siemens AG 2022 All rights reserved

Description of the automation task


A device needs to be integrated into the process control system, either as slave or master,
using Modbus RTU. PCS 7, a 400 series SIMATIC CPU and a SIMATIC ET 200SP HA with a
CM PtP module are used.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 4
2 Solution

2 Solution
This application example demonstrates handling of a CM PtP (Point To Point) module of the ET
200SP model series in conjunction with an ET 200SP HA station.

Overview of the complete solution

Figure 2-1 Overview of the complete solution


© Siemens AG 2022 All rights reserved

Core contents of this application

This application example explains the use of the SIMATIC ET 200SP CM PtP module
(Communication Module Point to Point) with a SIMATIC ET 200SP HA for Modbus RTU
(Remote Terminal Unit) communication. In the process, we will address one particularity when
using ET 200SP modules with an
ET 200SP HA, present the supported protocols with wiring examples, explain the configuration
in PCS 7 and demonstrate module-specific features.

Core contents in summary:


• Basics of the Modbus RTU protocol, in particular PtP
• Supported protocols of the CM PtP module
• Necessary hardware and software
• Configuration of the hardware environment
• Overview of channel blocks used
• CFC engineering of Modbus communication
• Commissioning of Modbus communication
• Limitations and compatibility of the CM PtP module

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 5
3 Information on Modbus RTU and the CM PtP module

3 Information on Modbus RTU and the CM PtP


module
3.1 Modbus RTU principle of operation
Overview
Modbus RTU (Remote Terminal Unit) is a standard protocol for a serial interface between
master and slave.

Table 3-1 Maximum number of connection partners per interface

Interface Maximum number of slaves


RS485 2-wire 32
RS422 4-wire 10
RS232 2- to 6-wire 1
Any Modbus participant must be uniquely addressed (address space 1-247).

Master-slave relationship
Modbus RTU uses a master-slave relationship in which all entire communication flows from a
sole master device, while the slaves can only respond to the request by the master. The master
© Siemens AG 2022 All rights reserved

sends a request to the slave address and only the slave with this slave address answers the
request.
Special case: When using the Modbus slave address "0", the CM PtP sends a broadcast
telegram to all slaves (without receiving a slave response).

References
Master-slave communication via a CM PtP using the Modbus RTU protocol:

Readme
https://support.industry.siemens.com/cs/ww/en/view/68202723

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 6
3 Information on Modbus RTU and the CM PtP module

3.2 Supported serial standards - CM PtP module


The CM PtP module supports the three serial standards RS232, RS422 and RS485 in a total of
five different modes.
Table 3-2 CM PtP module protocols

Mode Direction Wiring Type PhysicMode CFC


RS232 Full duplex 2- to 6-wire 0
RS422 Full duplex 4-wire PtP 1
RS422 Full duplex 4-wire Multipoint master 2
RS422 Full duplex 4-wire Multipoint slave 3
RS485 Half duplex 2-wire 4

Explanation of terms
Terms from the table above will be explained in the following. Further details can be found in the
manual (link).

References
Manual: CM PtP - Configurations for Point-to-Point Coupling
© Siemens AG 2022 All rights reserved

Readme
https://support.industry.siemens.com/cs/ww/en/view/59057093

Register
Int values

Coil
Bool values

RS232 mode
In RS232 mode, data are transmitted via at least two wires. There is one line each for the send
direction and the receive direction. It is possible to send and receive simultaneously (full
duplex).

RS422 mode
In RS422 mode, the data are transmitted via two pairs of wires (four-wire mode). There is one
line pair each for the send direction and the receive direction. It is possible to send and receive
simultaneously (full duplex). Every communication partner must be able to operate a send and a
receive facility simultaneously. Data can be exchanged between two or more communication
partners at the same time. With RS422 multipoint mode, only one slave may transmit at a time.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 7
3 Information on Modbus RTU and the CM PtP module

RS485 mode
In RS485 mode, the data is transmitted via a pair of wires (two-wire operation). The cable pair is
alternately available for the transmission direction and the reception direction. It can either be
sent or received (half duplex). After a send process, the system immediately switches to receive
mode (ready to receive). Once a new send request is received, it switches back to Send.

Half-duplex mode
Data are exchanged between the communication partners in both directions in alternation. Half-
duplex operation means that one communication partner is transmitting at one time and the
other communication partner is receiving. In this case, a wire is used alternately for sending and
receiving.

Full duplex operation


Data are exchanged between one or more communication partners in both directions
simultaneously; both sending and receiving can take place at the same time. This requires a line
for transmission and a line for reception.

PtP (Point to Point)


In this operating mode, both participants are equal.

Multipoint slave
© Siemens AG 2022 All rights reserved

The communication module can be used as a multipoint slave.

Multipoint master
The communication module can be used as a multipoint master.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 8
4 Implementation

4 Implementation
PCS 7 enables configuration of Modbus RTU communication for the CM PtP module of the ET
200SP in conjunction with the ET 200SP HA by means of channel blocks in the CFC chart. This
chapter will show you which settings should be adjusted for this in the hardware configuration, in
CFC engineering and during commissioning.
To this end, a CM PtP module will be configured as master (for recording third-party data) and a
CM PtP module as slave (for provision of data from a third-party system). The communication
partner in each case in production operations is a Modbus sensor in the slave role or a third-
party station as either the master or slave, for example, which use the Modbus RTU.

4.1 Hardware and software components used


The application was created with the following components:

Hardware components
Table 4-1 Hardware components used
Component Qty. Item number Note
IM 155-6 PN 1 6DL1155-6AU00-0PM0 FW V1.2
BA 2xRJ45 1 6DL1193-6AR00-0AA0
Carrier module (Single) 1 6DL1193-6BH00-0SM0
© Siemens AG 2022 All rights reserved

Server module 1 6DL1193-6PA00-0AA0


Base Unit 2 6ES7193-6BP00-0DA1
CM PtP Communication 2 6ES7137-6AA01-0BA0
Module
CPU 410-5H 1 6ES7410-5HX08-0AB0

If you use other hardware than that used in the example project, such as a redundant setup,
Note you must make the corresponding changes in the hardware configuration. In this case, note
the modules approved for use with PCS 7.

Standard software components


Table 4-2 Software components used
Component Note
PCS7 V9.1 SP2
PCS 7 Basic Library Version 9.1 SP2
PCS 7 APL (Advanced Version 9.1 SP2
Process Library)

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 9
4 Implementation

4.2 Hardware setup


The SIMATIC ET 200SP HA is connected to an IO controller via PROFINET. Depending on the
requirements, the IO station can connected to the IO controller either singularly (S1, S2) or
redundantly (R1). When installing the CM PtP, note the setup rules of the SIMATIC ET 200SP
HA:

References
FAQ: Which additional modules can be used on the SIMATIC
ET 200SP HA and what do you have to watch out for in the slotting sequence?
Readme https://support.industry.siemens.com/cs/ww/en/view/109811985

Wiring
The Base Unit of the CM PtP module is wired differently depending on the desired protocol type,
as shown in the tables below.

RS 485
Table 4-3 RS 485 wiring

CM Master CM Slave
© Siemens AG 2022 All rights reserved

Description Pin Pin Description


T(A)/R(A) 12 12 T(A)/R(A)
T(B)/R(B) 14 14 T(B)/R(B)
GND 15 15 GND
GND 16 16 GND

RS 422
Table 4-4 RS 422 wiring

CM Master CM Slave
Description Pin Pin Description
T(A)- 11 12 R(A)-
R(A)- 12 11 T(A)-
T(B)+ 13 14 R(B)+
R(B)+ 14 13 T(B)+
GND 15 15 GND
GND 16 16 GND

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 10
4 Implementation

RS 232
Here, at least the pins for RXD, TXD and GND must be used.
Table 4-5 RS 232 wiring

CM Master CM Slave
Description Pin Pin Description
RXD 2 1 TXD
TXD 1 2 RXD
RTS 3 4 CTS
CTS 4 3 RTS
CSR/DSR 6 5 DTR
DTR 5 6 CSR/DSR
GND 10 9 GND
GND 9 10 GND

References
CM PtP interface names:

Readme
https://support.industry.siemens.com/cs/ww/en/view/59057093
© Siemens AG 2022 All rights reserved

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 11
4 Implementation

4.3 Hardware configuration


The hardware configuration described below builds on an existing PCS 7 project with an already
configured SIMATIC ET 200SP HA station.
By selecting the ET 200SP HA station, the station's individual slots can be displayed together
with any already configured modules, if applicable.
The CM PtP module is located in the PCS 7 catalog in the "CM" subfolder → "Point-to-Point"
under the name "CM PtP" of the configured ET 200SP HA station.

Note The configured version of the ET 200SP HA must be at least version 1.2.

The CM PtP module is dragged onto the slot corresponding to the wiring.

Figure 4-1 Hardware configuration: Adding CM PtP modules to ET 200SP HA


© Siemens AG 2022 All rights reserved

The hardware catalog only contains the CM PtP module


(MLFB 6ES7137-6AA00-0BA0).
Note
The CM PtP V2 module (6ES7137-6AA01-0BA0) is the spare-part-compatible successor and
can be inserted in this configuration.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 12
4 Implementation

Right-clicking on the added module, then clicking on the "Object properties..." option opens the
module settings menu. In the "Parameters" section, you can change typical settings for
modules, such as the type of the potential module. Specific parameters for the CM PtP module
such as the protocol or mode can be adjusted in the "Connection configuration" tab. With this
module, the settings in the "Connection configuration" tab and "Connection parameters" tab will
be overwritten by the channel blocks in the CFC chart, configured later. However, it is
recommended to set these parameters to be identical to the ones in the CFC charts.
This prevents a malfunction of the CM PtP modules and an interruption of communication
during H-CiR download, which among other things is required when adding another hardware
module to the SIMATIC ET 200SP HA.

Figure 4-2 Hardware configuration: CM PtP module parameter settings


© Siemens AG 2022 All rights reserved

Parameter settings of the CM PtP, which can be made both in the hardware configuration as
Note well as in the CFC chart, should be identical in order to better ensure reliable communication
after carrying out the H-CiR functionality.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 13
4 Implementation

For later CFC engineering, a symbol must be created for the first input byte of a CM PtP: Select
module → right-click on "E address" → "Edit symbols...".

Figure 4-3 Hardware configuration: editing module symbols

Under "Symbol", assign the first input byte (EB) of the module an appropriate name and confirm
your entry → "Apply" → "Close".

Figure 4-4 Hardware configuration: symbol editing dialog


© Siemens AG 2022 All rights reserved

Afterwards, the hardware configuration is compiled by clicking "Save and compile" (1), then
downloaded to the CPU with "Download target system" (2).

Figure 4-5 Hardware configuration: save, compile and download

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 14
4 Implementation

4.4 CFC engineering


4.4.1 Function blocks used

Note PCS 7 V9.1 SP2 or later is a prerequisite for use.

Channel blocks
The program blocks required for communication are located in the PCS 7 AP Library V9.1 →
Block+Templates\ → Comm.

Table 4-6 Overview of channel blocks

Channel block Description FB number


MBComm Global communication block FB 1941
MBRdCoil Reads slave coils as Modbus master FB 1942
MBRdReg Reads slave registers as Modbus master FB 1943
MBWrCoil Writes slave coils as Modbus master FB 1944
MBWrReg Writes slave registers as Modbus master FB 1945
MBRcvReg Receives register values from the Modbus master as FB 1946
slave
MBPdReg Provides registers for a Modbus master as slave FB 1947
© Siemens AG 2022 All rights reserved

The function blocks call the following system functions in the background:
Channel block FB number
Send_Config FB1991
Receive_Config FB1992
Send_P2P FB1993
Receive_P2P FB1994
Receive_Reset FB1995
Modbus_Comm_ FB1996
Load
Modbus_Master FB1997
Modbus_Slave FB1998

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 15
4 Implementation

Diagnostic block
For each configured CM PtP module, a diagnostic block is created and interconnected in the
@charts during compilation of the CFC charts with driver generator.

Table: Diagnostic block


Table 4-7 Diagnostics module for Modbus communication

Channel block Description FB number


MOD_CM Diagnostics module for Modbus communication FB 221

The block issues messages about failures, wire breaks, power supply faults, incorrectly inserted
modules or timeout.

Inputs and outputs of the channel blocks


The following contains a brief description of the parameters of the channel blocks used in the
application example. The step-by-step instructions later on will go into the most relevant
parameters in more detail.

MBComm
MBComm represents the basis for connecting additional channel blocks. One such block must
be created for every CM PtP module. A maximum of ten channel blocks may be connected to
© Siemens AG 2022 All rights reserved

MBComm.
Table 4-8 MBComm parameters

Parameter Data Declaration Available options


type
BAUD DInt IN 300, 600, 1200, 2400, 4800, 9600, 19200, 38400,
57600,
76800, 115200 in Bit/s
STOP_BITS Byte IN Stop bits: • 1 = 1 stop bit • 2 = 2 stop bits
PARITY Int IN Parity of the port: • 0 = No parity • 1 = Odd parity • 2 =
Even
FLOW_CTRL Int IN Flow control: • 0 = No flow control • 1 = Hardware
RTS always ON • 2 = Hardware RTS switched
RTS_ON_DLY Int IN Number of milliseconds to wait after activating RTS
before starting transmission of send data. This
parameter is only valid if the hardware flow control is
activated. The valid range is 0 to 65535 ms. The
value 0 deactivates the function.
RTS_OFF_DLY Int IN IN Number of milliseconds to wait after transmitting
send data before turning off RTS: This parameter is
only valid if the hardware flow control is activated. The
valid range is 0 to 65535 ms. The value 0 deactivates
the function.

RESP_TO USInt IN Time interval during which the master waits for an
answer. The valid range is 5 to 65535 ms.

RETRIES Int IN The number of repeat communication attempts made


by the master before an error is issued.

ICHAR_GAP WORD IN Delay for the character spacing between the


characters. This parameter is specified in milliseconds
and is used to increase the expected time between
received characters. The appropriate number of bit
Use of a CM PtP module with SIMATIC ET 200SP HA
Article ID: 109814871, V1.0, 11/2022 16
4 Implementation

Parameter Data Declaration Available options


type
times for this parameter is added to the Modbus
default of 35 bit times (3.5 character times).
LINE_PRE Byte IN Receive wire default: Permissible default states are: •
0 = "No" default • 1 = Signal R(A)=5V, Signal R(B)=0
V (break detection): This default state allows for break
detection. Only selectable with: "Full duplex (RS422)
four-wire operation (point-to-point connection)" and
"full duplex (RS422) four-wire operation (multipoint
slave)". • 2 = Signal R(A)=0 V, Signal R(B)=5 V: This
default state corresponds to the idle state (no
transmission active). With this default, no break
detection is possible.
Physic Mode Byte IN • 0 = Full duplex (RS232) • 1 = Full duplex (RS422)
four-wire mode (Point-to-Point) • 2 = full-duplex
(RS422) four-wire mode (multipoint master) • 3 = full
duplex (RS422) four-wire mode (multipoint slave) • 4
= half duplex (RS485) two-wire mode
IsMaster Bool IN • 0 = Slave •1 = Master
ConOut Struct OUT Connections to channel blocks
TagCount Int OUT Number of blocks registered on MBComm
ConfInit Bool OUT • 1 Configuration successfully applied
ConfError Bool OUT • 1 Configuration could not be applied successfully
© Siemens AG 2022 All rights reserved

ConfStat Word OUT Status word of the configuration

References
Table taken from chapter 3.2.2 and adapted for the CM PtP module:

Readme
https://support.industry.siemens.com/cs/ww/en/view/69124220

MBPdReg
With the "Modbus Provide Registers" block, the slave provides register values (Int) for a master.

Table 4-9 MBPdReg parameters

Parameter Data Declaration Available options


type
Enable Bool IN • 0 Block is deactivated • 1 block registered with
MBComm
ConIn Struct IN Connected with output parameter ConOut of
MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start memory address
PV_In_1 – Int IN Input values of register (INT variables)
PV_In_8
Bad Struct OUT • 1 Error in the configuration, Enable or ConIn
deactivated
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 1 Block initialized with MBComm
MBRcvReg
The slave receives register values (Int) from a master with the block "Modbus Receive
Registers".
Use of a CM PtP module with SIMATIC ET 200SP HA
Article ID: 109814871, V1.0, 11/2022 17
4 Implementation

Table 4-10 MBRcvReg parameters

Parameter Data Declaration Available options


type
Enable Bool IN • 0 Block is deactivated • 1 Block registered with
MBComm
ConIn Struct IN Connected with output parameter ConOut of
MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start address in Modbus slave
SimOn Struct IN • 0 Simulation deactivated • 1 simulation activated
SimPV_In_1 Struct IN Simulation value PV_In_1
SubsPV_In_1 Int IN Replacement value for PV_In_1
Bad Bool OUT • 1 Error in the configuration
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 1 Block initialized with MBComm
PV_Out_1 – INT OUT Register data received
PV_Out_8
NewData Bool OUT • 1 New data received in this cycle

MBWrCoil
The master writes coil values (Bool) to a slave with the "Modbus Write Coil" block.
© Siemens AG 2022 All rights reserved

Table 4-11 MBWrCoil parameters

Parameter Data Declaration Available options


type
Enable DInt IN • 0 Block is deactivated • 1 Block registered with
MBComm
EnCom Bool IN • 1 Modbus communication of the block is activated
ConIn Struct IN Connected with output parameter ConOut of
MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start memory address
Num Int IN Number of coils to be written
PV_IN_1 – Bool OUT Coil input data to be written to the slave
PV_Out_8
CycMin Int IN Minimum number of cycles until next data transfer
CycMax Int IN Maximum number of cycles until next data transfer
Timeout DInt IN Time in ms when "Bad" is "1" after no send
Bad Struct OUT • 1 Error in the configuration
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 1 Block initialized with MBComm

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 18
4 Implementation

MBRdCoil
The master reads coil values (Bool) from a slave with the "Modbus Read Coil" block.
Table 4-12 MBRdCoil parameters

Parameter Data Declaration Available options


type
Enable Int IN • 0 Block is deactivated • 1 block registered with
MBComm
EnComm Bool IN • 1 Modbus communication of the block is activated
ConIn Struct IN Connected with output parameter ConOut of
MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start memory address
Num Int IN Number of coils to be read
SimOn Struct IN • 0 Simulation deactivated • 1 Simulation activated • 0
Simulation deactivated • 1 Simulation activated
SimPV_In_1 Struct IN Simulation value PV_In_1
Subs_PV_In_1 Bool IN Replacement value for PV_IN_1
Timeout DInt IN Time in ms when "Bad" is "1" after no receive
Bad Struct OUT • 1 Error in the configuration
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 1 initialized
© Siemens AG 2022 All rights reserved

PV_Out_1 – Struct OUT Output data of read coils


PV_Out_8
NewData Bool OUT • 1 New data received in this cycle

MBWrReg
The master writes register values (Int) to a slave with the "Modbus Write Registers" block.
Table 4-13 MBWrReg parameters

Parameter Data Declaration Available options


type

Enable Bool IN • 0 Block is deactivated • 1 block registered with MBComm


EnComm Bool IN • 1 Modbus communication of the block is activated
ConIn Struct IN Connected with output parameter ConOut of MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start memory address
Num Int IN Number of the block's registers to be written
PV_In_1 – Int IN Input values to be written to the slave
PV_In_8
CycMin Int IN Minimum number of cycles until next data transfer
CycMax Int IN Maximum number of cycles until next data transfer
Timeout DInt IN Time in ms when "Bad" is "1" after no send
Bad Struct OUT • 1 Error in the configuration
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 1 Block initialized with MBComm

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 19
4 Implementation

MBRdReg
The master reads register values (Int) from a slave with the "Modbus Read Registers" block.
Table 4-14 MBRdReg parameters

Parameter Data Declaration Available options


type
Enable Bool IN • 0 Block is deactivated • 1 block registered with
MBComm
EnComm Bool IN • 1 Modbus communication of the block is activated
ConIn Struct IN Connected with output parameter ConOut of
MBComm
ModbAdr Int IN Modbus slave address
DataAddr DInt IN Start memory address
Num Int IN Number of the block's registers to be received
SimOn Struct IN • 0 Simulation deactivated • 1 simulation activated
SimPV_In_1 Struct IN Simulation value PV_In_1
SubsPV_In_1 Int IN Replacement value for PV_IN_1
Timeout DInt IN Time in ms when "Bad" is "1" after no receive
Bad Struct OUT • 1 Error in the configuration
Status DWord OUT Status word about the status of the block
Initialized Bool OUT • 0 not initialized • 1 initialized
© Siemens AG 2022 All rights reserved

PV_Out_1 – Struct OUT Input values, received register data


PV_Out_8
NewData Bool OUT • 1 Error in the configuration

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 20
4 Implementation

4.4.2 CFC instructions

This chapter explains all the steps to commission the CM PtP, either as master or as slave. This
application example uses the serial standard RS 232. Only the settings required for
commissioning will be addressed in this chapter.
Optional changes will be mentioned or can be found in the previous
chapter 4.4.1.
The CFC charts for Modbus communication must be created or extended in the Plant View in
the hierarchy folder of the CPU that is connected with the ET 200SP HA.

MBComm
An "MBComm" channel block must be created for each CM PtP module. The channel blocks
can be found under "Libraries". You can search for them with the navigation or by entering the
function block number or name. A function block is added to the CFC by dragging and dropping.

A maximum of 10 channel blocks can be connected to an MBComm. Exactly one MBComm


Note can be connected to a CM PtP module.

Figure 4-6 Adding MBComm


© Siemens AG 2022 All rights reserved

The input "CM_Start" must be linked with the first input byte of the CM PtP module. To do this, a
symbol is created in the hardware configuration for the corresponding address (see 4.3
Hardware configuration), then the address is linked in the CFC chart:
Right-click on "CM_Start" → "Text interconnect..." → select desired symbol.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 21
4 Implementation

Figure 4-7 Interconnecting CM_Start with symbol (1/2)


© Siemens AG 2022 All rights reserved

Figure 4-8 Interconnecting CM_Start with symbol (2/2)

Clicking on "Compile" will open the dialog with compilation settings.

Figure 4-9 CFC chart compile button

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 22
4 Implementation

Here you should make the following settings and confirm with "OK".
• Scope → "Entire program"
• Generate module drivers → "checked"

Figure 4-10 CFC compile dialog


© Siemens AG 2022 All rights reserved

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 23
4 Implementation

Then a name must be assigned for the "MBComm" block.


Right-click on an empty area of MBComm → "Object Properties..." → enter desired name under
"Name" → confirm with "OK".

Figure 4-11 Opening MBComm Object Properties


© Siemens AG 2022 All rights reserved

Figure 4-12 Naming MBComm block

The name change and previous compilation of the


CFC chart displays the system interconnections to the @charts.
Use of a CM PtP module with SIMATIC ET 200SP HA
Article ID: 109814871, V1.0, 11/2022 24
4 Implementation

Figure 4-13 MBComm, interconnected parameters after initial compilation


© Siemens AG 2022 All rights reserved

Afterward, the various input parameters can be modified as needed.


In this example, the CM PtP serves as the master in RS 232 mode. All parameters for this have
already been set by default.
• IsMaster (Bool; setting of CM PtP module as master or slave) → "1" for master
• PhysicMode (Byte; communication protocol) → "16#0" for RS 232

The "Configure" parameter is needed later during commissioning to set the Modbus
communication settings (with an edge).

The other input parameters must be adapted to suit the communication partner. In this
Note application example, the communication partner has the same parameters as the default
input parameters of MBComm.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 25
4 Implementation

The other desired channel blocks are used on MBComm and are connected with the associated
input parameter "ConIn" via the output parameter "ConOut" of "MBComm" Here, remember to
always use MBComm in the same cyclic organization block as all the connected blocks.
The "MBRdCoil" block is configured in this example to read the coils of a slave:
Add "MBRdCoil" block → click on "ConOut" output parameter of MBComm → click on "ConIn"
input parameter of "MBRdCoil".

Figure 4-14 Connecting MBComm with MBRdCoil

After this, the following parameters must be modified:


• ModbAdr (Int; Modbus slave address of the partner) → "2"
• DataAddr -> (DInt; start of the desired memory range 1-19999 from which you wish to read)
→ "9"
• Num (Int; number of coils that you wish to receive 1-8) → "8"
• PV_Out_[1-8] (STRUCT of 1 Bool (value) and 1 byte (signal status); output values, that the
© Siemens AG 2022 All rights reserved

master read from the slave)

Coils (Bool variables) are written from the master to a slave with the "MBWrCoil" block. Here,
like with "MBRdCoil", the three parameters described above are likewise required and
complement the values to be written:
• ModbAddr (Int; Modbus slave address of the partner) → "2"
• DataAdr (DInt; start of the desired memory range 1-9999 to which you wish to write) → "1"
• Num (Int; number of coils that you wish to send 1-8) → "8"
• PV_In_[1-8] (Bool; input values that must be written to the slave)

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 26
4 Implementation

The blocks "MBRdReg" and "MBWrReg" are structured like "MBRdCoil" and "MBWrCoil".
Here, however, the PV variables are Int values and the parameter DataAdr has a different
memory range:
• DataAdr MBRdReg (DInt; start of the desired memory range 40001-49999) → "40009"
• DataAdr MBWrReg (DInt; start of the desired memory range 30001-49999) → "40001"

Figure 4-15 CFC master example


© Siemens AG 2022 All rights reserved

If the CM PtP module is acting as a slave, a "MBComm" block still has to be created and the
parameter inputs must be interconnected with the same settings (identical Baud rate, etc.) as
with a master. Here you must not forget to run the block in slave mode:
• IsMaster (Bool; setting of CM PtP module as master or slave) → "0" for slave

Note If the CM PtP module is used as a slave, then no coils can be written or read, only registers.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 27
4 Implementation

The MBPdReg block is required for provision of data to the master by the slave. After this, the
following parameters must be modified:
• ModbAdr (Int; Modbus slave address of the partner) → "2"
• DataAddr → (DInt; start of the desire memory range with start addresses 40001 - 40073
from which you wish to read) → "40009"
• PV_In_[1-8] (STRUCT of 1 Int (value) and 1 byte (signal status), input values provided by
the slave)

The following start addresses for DataAddr are typical when using Integers (8 bytes): 40001,
Note
40009, 40017, 40025, 40033, 40041, 40049, 40057, 40065, 40073

MBRcvReg for receiving data provided by the master is configured like MBPdReg, but in this
case the process values are output:
• ModbAdr (Int; Modbus slave address of the partner) → "2"
• DataAddr → (DInt; start of the desired memory range with start addresses 40001 - 40073
to which you wish to write → "40009"
• PV_Out_[1-8] (STRUCT of 1 Int (value) and 1 byte (signal status), output values that the
master previously wrote to the slave)

Figure 4-16 Slave CFC example


© Siemens AG 2022 All rights reserved

Once all desired CFC objects have been created, the program must be recompiled and then
downloaded to the CPU. This completes the preliminary configurations for commissioning.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 28
4 Implementation

Figure 4-17 CFC chart compile button

Final note
The PV parameters can be interconnected with additional blocks or tags in data blocks. When
doing so, pay attention to the structure of the outputs, since in this case for each PV output, a
status value is also transmitted alongside with coil/register value.

Figure 4-18 Data block structure, register and coil input & output values
© Siemens AG 2022 All rights reserved

To avoid overcomplication, the PV parameters of the blocks have not been interconnected
Note
with data blocks or other data block types in this application example.

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 29
4 Implementation

4.4.3 Commissioning

After successful compilation of the CFC charts, the program is downloaded to the CPU. Next,
the CFC charts and the values pending at the parameters can be monitored:
1. Press the "Test mode (on/off)" switch.
2. Right-click on block "Watch On".
3. "Ctrl + left-click" keyboard combination on respective parameter you wish to monitor.

Figure 4-19 Activating Test Mode

Figure 4-20 Activating Watch On


© Siemens AG 2022 All rights reserved

Communication is initialized with a rising edge at the input parameter "Configure" of the
respective "MBComm" block.

Figure 4-21

After this, the following values should be present at the output parameters on "MBComm":
TagCount (Int; number of blocks connected with MBComm)
ConfInit (Bool; 1 if initialization successful) → "1"
Use of a CM PtP module with SIMATIC ET 200SP HA
Article ID: 109814871, V1.0, 11/2022 30
4 Implementation

ConfError (Bool; 0 if no error pending) → "0"


ConfStatus (Word; 16#0 if status "error-free") → "16#0"

The following parameters are contained in all connected communication blocks:


• Enable (Bool; 1 if block registered with MBComm)
• EnComm (only for master; Bool; 1 if communication is activated)
• Bad (Bool; 0 if communication successful)
• Status (DWord; 16#A0000 if communication successful)
• Initialized (Bool; 1 if initialized successfully)

There is also an additional parameter for read/receive blocks, but because it appears in the
CFC with a delay it is not suitable to Watch, although it can be interconnected with program
logic.
• NewData (Bool; value 1 if new data were received in this cycle)

This completes commissioning. If the status deviates from the expected value and no data
exchange is taking place, chapter 4.5, "Troubleshooting" can provide assistance.
© Siemens AG 2022 All rights reserved

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 31
4 Implementation

CFC examples
The following lists example images with Modbus communication from two
CM PtP modules.

"Figure 4-22 Coil data transfer" shows how the CM PtP master modules writes coils to a slave
and reads them from a slave, including the associated MBComm block.

Figure 4-22 Coil data transfer


© Siemens AG 2022 All rights reserved

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 32
4 Implementation

Figure 4-23 Register data transfer shows how the Modbus master provides registers to the
slave and vice versa – how the Modbus slave provides registers to the Modbus master.

Figure 4-23 Register data transfer


© Siemens AG 2022 All rights reserved

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 33
4 Implementation

4.5 Troubleshooting
The table below lists state codes and error codes of the output parameter "Status" from the
channel blocks interconnected at MBComm.

Table 4-15 Error codes

Code Meaning
16#000A No new data from MBComm; communication established; status good
16#000B No new data from MBComm; time error in communication
16#000C Block is deactivated
16#000D Communication is disabled
16#000E Error on higher level; channel/module/rack error
16#000F Function block attempting to connect with MBComm
16#0010 DATA_ADDR modified, PV_Out valid if the master queries the slave
16#0020 MBComm is configured as slave and not as master, or vice versa

If Enable or EnComm is deactivated on a block that is connected to MBComm, the


Note parameters Bad and Status will show an error.

References
© Siemens AG 2022 All rights reserved

Chapter 4 of the manual provides verbose information about further error codes:

Readme
https://support.industry.siemens.com/cs/ww/en/view/69124220

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 34
5 Restrictions

5 Restrictions
• The technical specifications of the CM PtP module (chapter 7) must be observed. See:
https://support.industry.siemens.com/cs/ww/en/view/109793681

• What restrictions are there for active jobs when communicating with "WR_REC/"RD_REC"
and "RDREC"/"WRREC" via PROFIBUS DP and PROFINET IO? - See:
https://support.industry.siemens.com/cs/ww/en/view/15364459

• A maximum of 8 CM PtP modules can be configured in one PROFINET IO system.


A CM PtP module can only be configured with one MBComm channel block, thus serving
either as slave or master with the support of exactly one serial interface.

• No more than ten channel blocks can be connected to the MBComm channel block or have
the parameter set to "Enabled". If this is not the case, communication will no longer work for
the eleventh block on up. Scheduling can be a workaround for this.

• Parameter settings of the CM PtP module, which can be made both in the hardware
configuration as well as in the CFC chart, should be identical in order to ensure more
reliable communication after
executing the H-CiR functionality.
© Siemens AG 2022 All rights reserved

• Approved for PCS 7 CM PtP V1 (6ES7137-6AA00-0BA0), V2 (6ES7137-6AA01-0BA0) can


be purchased and used as a replacement part. For more, see the list of approved modules
for PCS 7.
https://support.industry.siemens.com/cs/ww/en/view/109812604

Table 5-1 Supported write and read access operations of the CM PtP
Role Area Support
Master Coils Yes
Register Yes
Slave Coils No
Register Yes

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 35
6 Appendix

6 Appendix
6.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:
siemens.com/SupportRequest
© Siemens AG 2022 All rights reserved

SITRAIN – Digital Industry Academy


We support you with our globally available training courses for industry with practical
experience, innovative learning methods and a concept that’s tailored to the customer’s specific
needs.
For more information on our offered trainings and courses, as well as their locations and dates,
refer to our web page:
siemens.com/sitrain

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

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry Online Support"
app. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/en/sc/2067

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 36
6 Appendix

6.2 Industry Mall

The Siemens Industry Mall is the platform on which the entire siemens Industry product portfolio
is accessible. From the selection of products to the order and the delivery tracking, the Industry
Mall enables the complete purchasing processing – directly and independently of time and
location:
mall.industry.siemens.com

6.3 Links and literature


Table 6-1
Nr. Thema
\1\ Siemens Industry Online Support
© Siemens AG 2022 All rights reserved

https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109814871
\3\ SIMATIC Process Control System PCS 7 Released modules (V9.1 SP2)
https://support.industry.siemens.com/cs/ww/en/view/109812604
\4\ SIMATIC ET 200SP CM PtP
https://support.industry.siemens.com/cs/ww/en/view/109793681
\5\ PtP communication instructions used on distributed I/O of an S7-300/400
https://support.industry.siemens.com/cs/ww/en/view/69124220
\6\ CM PtP - Configurations for point-to-point connections
https://support.industry.siemens.com/cs/ww/en/view/59057093
\7\ Master-Slave Communication via a CM PtP using the Modbus RTU Protocol
https://support.industry.siemens.com/cs/ww/en/view/68202723

6.4 Change documentation


Table 6-2
Version Date Modifications
V1.0 11/2022 First version

Use of a CM PtP module with SIMATIC ET 200SP HA


Article ID: 109814871, V1.0, 11/2022 37

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy