0% found this document useful (0 votes)
285 views38 pages

Connect SIMATIC HMI to S7-1500R/H

This document provides instructions for connecting a SIMATIC HMI Panel to a redundant SIMATIC S7-1500R/H controller. It introduces the components used, including the HMI Panel and S7-1500R/H controller. It then describes how to redundantly link the HMI Panel to the S7-1500R/H controller in 2-3 sentences. Legal information and a table of contents are also provided.

Uploaded by

harold_anillo
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)
285 views38 pages

Connect SIMATIC HMI to S7-1500R/H

This document provides instructions for connecting a SIMATIC HMI Panel to a redundant SIMATIC S7-1500R/H controller. It introduces the components used, including the HMI Panel and S7-1500R/H controller. It then describes how to redundantly link the HMI Panel to the S7-1500R/H controller in 2-3 sentences. Legal information and a table of contents are also provided.

Uploaded by

harold_anillo
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

Connecting a

SIMATIC HMI Panel


with a
SIMATIC S7-1500R/H

WinCC TIA Portal / V16 / Comfort Panels, Basic Panels,


Siemens
S7-1517R/H Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109781687 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 AG 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.

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Task ...................................................................................................... 4
1.3 Scope of the application example ........................................................ 4
1.4 Components used ................................................................................ 5
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller ............ 6
2.1 Panel directly in the redundant PROFINET ring .................................. 6
2.2 Panel in redundant PROFINET ring via a switch ............................... 11
3 Linking a SIMATIC Panel to an S7-1500R/H controller ................................ 16
3.1 Creating connections .......................................................................... 17
3.2 Creating tags ...................................................................................... 21
3.3 Creating scripts .................................................................................. 23
3.4 Task scheduler ................................................................................... 24
3.5 "20_PlcMonitoring" screen ................................................................. 25
4 Evaluating the operating state of the connection ........................................ 26
4.1 Evaluating the PLC state .................................................................... 26
4.1.1 Parameterization of "R_H_Sys_Status" (FB3) ................................... 27
4.1.2 Parameterization of "plcStateEvaluation" (FB102)............................. 30
© Siemens AG 2020 All rights reserved

4.1.3 "MonitoringS7_1500" library ............................................................... 31


4.2 HMI configuration for Comfort Panel .................................................. 32
4.2.1 Tags.................................................................................................... 32
4.2.2 Faceplate ............................................................................................ 34
4.2.3 Script "plcStopMonitoring" .................................................................. 34
4.2.4 Task scheduler ................................................................................... 34
4.2.5 "20_PlcMonitoring" screen ................................................................. 35
4.3 HMI configuration for KTP1200 Basic ................................................ 36
5 Appendix .......................................................................................................... 37
5.1 Service and support ........................................................................... 37
5.2 Links and literature ............................................................................. 38
5.3 Change documentation ...................................................................... 38

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 3
1 Introduction

1 Introduction
1.1 Overview
Redundant system S7-1500R/H
In an S7-1500R/H redundant system, the CPUs are duplicated (i.e. redundantly
available). Both CPUs process the same project data and the same user program
in parallel. Both CPUs synchronize over two redundancy connections. If one CPU
fails, the other CPU maintains control over the process.

HMI operator device on a S7-1500R/H


If an HMI operator device is connected to a redundant system such as the
S7-1500R/H, the operator device must be connected to the active CPU.
There are two ways of switching over to the active CPU:
• The SIMATIC S7-1500R/H controller can be configured in such a way that,
should one PLC module fail, the HMI operator device will automatically connect
with the second, still running, PLC module.
• Alternatively, there is the option of switching from the failed PLC module to the
running PLC module with the help of a script in the HMI configuration.

1.2 Task
© Siemens AG 2020 All rights reserved

You wish to connect an HMI operator device with a SIMATIC S7-1500R/H


controller.
You also want to evaluate the current status of each CPU (Stop/Run).

Figure 1-1

1.3 Scope of the application example


The application example describes:
• how to redundantly link a SIMATIC Comfort Panel or a SIMATIC Basic Panel
to an S7-1500R/H controller.
• how to link a SIMATIC Comfort Panel to an S7-1500R/H controller and switch
the connection using scripts.
• how to evaluate the operating mode of the S7-1500R/H controller with a
function block and output it via the HMI operator device.

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 4
1 Introduction

1.4 Components used


The following hardware and software components were used to create this
application example:
Table 1-1
Components Quantity Item number Note
SIMATIC WinCC TIA 1 6AV210.-....6-0 Alternatively, a newer
Portal V16 version
SIMATIC STEP 7 1 6ES7822-1AA06-0YA5 Alternatively, a newer
Professional V16 version
CPU 1517H-3 PN 2 6ES7517-3HP00-0AB0 --
TP1200 Comfort 1 6AV2124-0MC01-0AX0 --
KTP1200 Basic 1 6AV2123-2MB03-0AX0 --
SCALANCE X308-2 1 6GK5308-2GG00-2AA2 --

This application example consists of the following components:


Table 1-2
Components File name Note
Documentation 109781687_Panels_and_1500H_DOC_en --
HMI library 109781687_S7_1500H_Monitoring_Lib
© Siemens AG 2020 All rights reserved

Project_01 109781687_S7_1500H_Monitoring_MRP
Project_02 109781687_S7_1500H_ChangeConnection

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 5
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

2 Redundantly linking a SIMATIC Panel to an


S7-1500R/H controller
If a redundant connection between the HMI operator device and the controller is
required, then use the X1 interfaces on the PLC modules. If one connection
between the PLC and the operator device fails, then there is always another
connection via the second port of the operator device.
The switchover of the connection between an HMI operator device and the
S7-1500H controller will occur automatically in this case.

Note The configuration for this chapter can be found in the project
"109781687_S7_1500H_Monitoring_MRP ".

Connection between panel ↔ PLC via the "X1 P1 R" and "X1 P2 R" PROFINET interfaces
The operator device is integrated in the redundant PROFINET ring of PLC modules
directly via the "X1 P1 R" and "X1 P2 R" PROFINET interfaces.
• The PROFINET ring is based on media redundancy (MRP).
Media redundancy is a function that ensures network and system availability.
• All PROFINET devices in this PROFINET ring must support media redundancy
(MRP). A detailed description of the "MRP" topic can be found here: \3\.
© Siemens AG 2020 All rights reserved

• The interface has the advantage that, in the event of an error (failure of a
CPU), the connection to the HMI operator device remains intact without
additional configuration effort.

2.1 Panel directly in the redundant PROFINET ring


In this chapter, the HMI operator device is integrated directly via the
PLC PROFINET interfaces "X1 P1 R" and "X1 P2 R".
The HMI operator device must have two ports in order to do this.
Figure 2-1

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 6
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

Creating a connection
1. Use the Project tree to open the device configuration of the first PLC module
and then select "Topology view" (1).
The X1 PROFINET interface "Port_2 [X1 P2]" is already networked with both
PLC modules by default (2).
Figure 2-2

2. Network the "X1" PLC interfaces and the interfaces of the Comfort Panel such
that they form a closed ring.

To use the example:


PLC_2\Port_1 [X1 P1 R] << >> TP900 Comfort_CP_1\Port_1
PLC_1\Port_1 [X1 P1 R] << >> TP900 Comfort_CP_1\Port_2
© Siemens AG 2020 All rights reserved

Figure 2-3

Note You must network the devices on the hardware level exactly as you have
arranged them in the configuration.

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 7
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

3. Select the Comfort Panel (1) and open the "Media redundancy" menu item (2)
via the Properties.
(PROFINET interface [X1] > Advanced options > Media redundancy).
Use the drop-down list under "Media redundancy role" (3) to select the option
"Client".
Figure 2-4

3
© Siemens AG 2020 All rights reserved

4. Switch to the "Device view" (1). Select the "X1" PROFINET interface of the first
PLC (2) and specify an IP address (3) for the first PLC under the "Ethernet
addresses" menu.
Figure 2-5

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 8
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

5. In the section below, enable the option "Enable system IP address for switched
communication" and enter an IP address.
The HMI operator device will use this IP address to communicate with the PLC.
Make sure that the IP address is in the same IP range as the IP address
specified previously.
Figure 2-6

6. Click an "empty" field in the Device view and scroll to the second PLC module.
There, select the "Ethernet addresses" menu item and enter an IP address.
In the section below that, the configuration of the first PLC has already enabled
the option "Enable system IP address for switched communication".

7. Switch to the Network view (1).


Highlight the Comfort Panel and select the menu item "Ethernet addresses" via
the properties. Enter an IP address (2).
© Siemens AG 2020 All rights reserved

Figure 2-7

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 9
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

8. In the Network view, select the "Connections" tab (1).


Left-click to select the "X1" interface (2) of the first PLC, then hold down the left
mouse button and drag a connection to the Ethernet interface of the HMI
operator device. A selection window opens.
Here, select "S7-1500R/H-System_1" (3).
Figure 2-8

2 3

The settings in the hardware configuration are now complete.

The figure below shows an overview of the configured network.


(Network view > Connections. Left-click on the HMI connection and select a
connection. Then click on the connection again).
Figure 2-9
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 10
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

2.2 Panel in redundant PROFINET ring via a switch


In this chapter, the HMI operator device is integrated directly into the "X1 P1 R"
and "X1 P2 R" PLC PROFINET interfaces via an MRP-capable switch.
In comparison to the previous configuration, the HMI operator device is only
connected with the PLC modules by only one port (Ethernet cable).
Figure 2-10
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 11
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

Creating a connection
1. Use the Project tree to open the device configuration of the first PLC module
and then select "Topology view" (1).
By default, the PROFINET X1 interface is already networked (2) with both
PLC modules.
Add an MRP-capable switch from the catalog, in this case a SCALANCE X308-
2 (3).

Figure 2-11

2. Network the PLC interfaces and the SCALANCE X308 so that they form a
closed ring.

Note
© Siemens AG 2020 All rights reserved

Only the first two ports on the SCALANCE X308 are MRP-capable!

To use the example:


a. PLC_2\Port_1 [X1 P1 R] << >> Switch_1\Port_1
b. PLC_1\Port_1 [X1 P1 R] << >> Switch_1\Port_2
c. TP900 Comfort.CP_1\Port_1 << >> Switch_1\Port_3

Figure 2-12

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 12
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

3. Select the SCALANCE X308 (1) and open "Media redundancy" via the
properties (2). ("PROFINET interface [X1] > Advanced options > Media
redundancy > MRP instance 1").
Use the drop-down list under "Media redundancy role" (3) to select the option
"Client".

Figure 2-13

3
2
© Siemens AG 2020 All rights reserved

4. Select the Comfort Panel (1) and open the "Media redundancy" menu item (2)
via the Properties (PROFINET interface [X1] > Advanced options > Media
redundancy).
Use the drop-down list under "Media redundancy role" (3) to select the option
"Client".
Figure 2-14

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 13
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

5. Change to the network view.


Right-click to select the SCALANCE X308 (1).
In the context menu, select the option
"Assign to new DP master / IO controller" (2)

Figure 2-15

2
© Siemens AG 2020 All rights reserved

Another window opens.


Assign the two IO controllers (1) to the SCALANCE X308.

Figure 2-16

Frei verwendbar

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 14
2 Redundantly linking a SIMATIC Panel to an S7-1500R/H controller

6. Highlight the Comfort Panel (1) and select the menu item "Ethernet addresses"
via the properties. Enter an IP address (2).

Figure 2-17

2
© Siemens AG 2020 All rights reserved

7. In the Network view, select the "Connections" tab (1).


Left-click to select the "X1" interface (2) of the first PLC, then hold down the left
mouse button and drag a connection to the Ethernet interface of the HMI
operator device. A selection window opens.
Here, select "S7-1500R/H-System_1" (3).

Figure 2-18

2 3

The settings in the hardware configuration are now complete.

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 15
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3 Linking a SIMATIC Panel to an S7-1500R/H


controller
If no redundant connection between the HMI operator device and the controller is
required, then you can connect the HMI operator device via the
X2 interface of the PLC modules.
In this case, the automatic switchover of the connection between an HMI operator
device and the S7-1500H controller will be accomplished with three scripts.

Note The configuration for this chapter can be found in the project
"109781687_S7_1500H_ChangeConnection".

Connection between panel ↔ PLC via the PROFINET X2 interface


The operator device is connected via the "X2 interface" of the PLC module.
• The operator device is not integrated into the redundant PROFINET ring of the
PLC modules.
• In the event of a fault, the connection will be switched over with scripts in the
HMI configuration. For this purpose, the HMI operator device must support
script functionality.
• Here, the HMI operator device is connected to the CPU with only one port
© Siemens AG 2020 All rights reserved

(Ethernet cable).
• The switch being used does not have to be MRP-capable.
Figure 3-1

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 16
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3.1 Creating connections


So that the connection is automatically routed to the second controller if the first
one fails, a total of three connections must be created.

1. Use the Project tree to open the device configuration and then select the
"Network view" (1).
Figure 3-2

2. Select the first PLC module and, in the Properties, open the menu "PROFINET
interface [X2] > Ethernet addresses" (1).
Specify an IP address (2) for the first PLC, in the example "192.168.0.100".
Then select the second PLC module (3) and enter another IP address under
"PROFINET interface [X2] > Ethernet addresses", in the example
© Siemens AG 2020 All rights reserved

"192.168.0.102".
Figure 3-3

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 17
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3. Select the Comfort Panel and open the menu "PROFINET interface [X1] >
Ethernet addresses" in the Properties. Enter an IP address (1), in the example
"192.168.0.200".
Figure 3-4

1
© Siemens AG 2020 All rights reserved

4. In the Network view, select the "Connections" tab (1). Left-click to select the
"X2 interface" of the first PLC (2), then hold down the left mouse button and
drag a connection to the Ethernet interface of the HMI operator device.
A selection window opens.
Here, select "PLC_1" (3).
Figure 3-5

2 3

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 18
3 Linking a SIMATIC Panel to an S7-1500R/H controller

5. Left-click to select the "X2 interface" of the second PLC (2), then hold down the
left mouse button and drag a connection to the Ethernet interface of the
HMI operator device. A selection window opens.
Here, select "PLC_2" (3).
Figure 3-6

2 3

6. A third HMI connection is needed so that the connection to the HMI operator
device automatically switches over in the event of a fault (failure of a PLC). The
switchover is accomplished with scripts in the HMI configuration.

Via the Project tree, select the Comfort Panel and open the "Connection" (1).
You will see the two connections that you created earlier (2).
Manually add a third connection with "<Add new>" (3).

Figure 3-7
© Siemens AG 2020 All rights reserved

3
1

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 19
3 Linking a SIMATIC Panel to an S7-1500R/H controller

Enter the following parameters:


– Name: Connection12
– Communication driver: SIMATIC S7 1500
– HMI device: (IP address of the Comfort Panel; in the example this is
"192.168.0.200")
– PLC: IP address of the first PLC module, the example "192.168.0.100".
Figure 3-8

3
2
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 20
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3.2 Creating tags


1. Open the Tag editor via "Project tree > HMI tags > Application".
2. Create the following tags:

Table 3-1
Tag Type Connection
con_state_PLC1 Integer Internal tag
con_state_PLC2 Integer Internal tag
connected_to WString Internal tag
triggerBitPLC1 Bool HMI_Connection1
(Clock memory)
triggerBitPLC2 Bool HMI_Connection2
(Clock memory)

Figure 3-9
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 21
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3. Specify the tag properties.


a. triggerBitPLC1
"Properties > Events > Value change"
- Call the script "connection_PLC1".

"Properties > Properties > Settings"


- Acquisition mode: Cyclic continuous
- Acquisition cycle: 100 ms
b. triggerBitPLC2
"Properties > Events > Value change"
- Call the script "connection_PLC2".

"Properties > Properties > Settings"


- Acquisition mode: Cyclic continuous
- Acquisition cycle: 100 ms

Figure 3-10
© Siemens AG 2020 All rights reserved

Note Default communication between the H CPU and the HMI operator device
happens over the connection "Connection12".

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 22
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3.3 Creating scripts


Three scripts are used for the automatic switchover between the PLC controller
and the HMI operator device:
• connection_lost
• connection_PLC1
• connection_PLC2

Script "connection_lost"
You do not need to modify this script for the application.
The script is called once every minute by the Task scheduler.

Script "connection_PLC1"
Modify the parameters to suit your application.
The script is called once a second via the tag "triggerBitPlc" (clock memory).
1. Call the script with "Project tree > Scripts > VB scripts >
ApplicationChangeConnection".
2. You have to adjust the parameters of the "ChangeConnection" function in line
40 (1) and line 55 (2).
– Connection name: The name must match the name stored under
© Siemens AG 2020 All rights reserved

"Connections". In this case, the name is "Connection12" (3).


– Modify the IP address as per the first connection (4).

Figure 3-11

3 4

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 23
3 Linking a SIMATIC Panel to an S7-1500R/H controller

Script "connection_PLC2"
Modify the parameters to suit your application.
The script is called once a second via the tag "triggerBitPlc2" (clock memory).
1. Call the script with "Project tree > Scripts > VB scripts >
ApplicationChangeConnection".
2. You have to adjust the parameters of the "ChangeConnection" function in line
41 (1) and line 55 (2).
– Connection name: The name must match the name stored under
"Connections". In this case, the name is "Connection12" (3).
– Modify the IP address as per the second connection (4).

Figure 3-12

1
© Siemens AG 2020 All rights reserved

3 4

3.4 Task scheduler


The "connection_lost" script is called once a minute by the Task scheduler.
"Project tree > Task scheduler > Events"

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 24
3 Linking a SIMATIC Panel to an S7-1500R/H controller

3.5 "20_PlcMonitoring" screen


The "20_PlcMonitoring" screen shows a graphical connection between the
HMI operator device and the two PLC modules.
An animated graphic (1) displays the current status of the two PLC modules.
Additionally, a text field indicates which controller the HMI operator device is
currently communicating (2).
Figure 3-13

1 1
© Siemens AG 2020 All rights reserved

Animated graphic (1)


The tag "triggerBitPLC1" is used for the first PLC module under "Properties >
Animation > Display > Appearance". Similarly, the tag "triggerBitPlc2" is used for
the second PLC module.

Text field (2)


The tag "connected_to" is assigned to the text field under "Properties > Properties
> General".
The value assignment for the tag comes from the scripts "connection_PLC1" or
"connection_PLC2".

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 25
4 Evaluating the operating state of the connection

4 Evaluating the operating state of the


connection
A complete configuration as well as a library are included with the application
example.
The library contains:
• All necessary blocks.
• A fully configured TP1200 Comfort Panel project.
• A fully configured KTP1200 Basic project.
The following description pertains to the included configuration.

4.1 Evaluating the PLC state


The blocks from the AWB "Diagnostics of the operating state of an S7-1500R/H
system using a function block" have been used for the evaluation of the PLC
status.
You can find the article at the following link: \4\

PLC program overview


The folder labeled with (1) contains the blocks for diagnosing the operating state.
The blocks come from the AWB "Diagnostics of the operating state of an
© Siemens AG 2020 All rights reserved

S7-1500R/H system using a function block".


The folder labeled with (2) contains the blocks for outputting the PLC status via the
HMI operator device.
Figure 4-1

2
1

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 26
4 Evaluating the operating state of the connection

4.1.1 Parameterization of "R_H_Sys_Status" (FB3)

• The function block FB3 is called via the OB "Main" (OB1).


• The input parameters for the FB can be found under the "System constants" of
the PLC (Device configuration > Network view > Properties > System
constants).
Figure 4-2
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 27
4 Evaluating the operating state of the connection

Configured "FB3"
(1) Input parameters with the system constants
(2) You can navigate to the system constants using the button.
System constants in use (HW identifier)
Figure 4-3

– 65147 – PLC_1
– 65347 – PLC_2
– 34 – PLC_1
– 65164 – PLC_1
– 65364 – PLC_2
(3) Output parameters used for further evaluation.
Figure 4-4
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 28
4 Evaluating the operating state of the connection

Other blocks for "FB3"


• "FB3" needs other blocks to evaluate the PLC status.
• The blocks are not called separately, instead they are only loaded into the
controller. You can find the blocks in the included library.
Figure 4-5
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 29
4 Evaluating the operating state of the connection

4.1.2 Parameterization of "plcStateEvaluation" (FB102)

• This FB evaluates the output signals from "FB3" and forwards them to the
HMI operator device.
• The function block is called via the OB "Main" (OB1).
• The input parameters of "FB102" (1) correspond to the output parameters of
the FB "R_H_Sys_Status" (FB3).
The individual PLC states are forwarded to the HMI operator device via the
output parameters (2). A faceplate is created for the display.
Figure 4-6

2
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 30
4 Evaluating the operating state of the connection

4.1.3 "MonitoringS7_1500" library

All blocks listed above can be found in the global library "MonitoringS7_1500".
(1) PLC program blocks
• If, for example, you select a "folder" and add it to your project, all blocks inside
that folder will also be added. This ensures that no blocks are forgotten.
• The numbers marked in "red" describe the order in which you should add the
folders (program elements) to your project.
Figure 4-7

1 1
© Siemens AG 2020 All rights reserved

3
2

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 31
4 Evaluating the operating state of the connection

4.2 HMI configuration for Comfort Panel


The HMI configuration is composed of the HMI Template Suite and the screens
and objects for evaluating the PLC status.
• For the sake of recognizability, the screens, tags, etc. used for evaluating the
PLC status are stored in the folders with the label "Application".
• The screens, tags, etc. used for the "Template Suite" are stored in the folders
with the label "TemplateSuite".
You can find a precise description of the HMI Template Suite at the following link:
\8\

4.2.1 Tags

The tags are located in the folder "TagsApplication_TP" (1); they are the output
parameters of the function block "FB102". These are passed to the faceplate and
its interface.
Figure 4-8
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 32
4 Evaluating the operating state of the connection

Tag "hmiDatatransferTP1200_plcStopMonitoring"
Two properties are assigned to the tags.
• Properties > Properties > Settings
– Acquisition mode: Cyclic continuous
– Acquisition cycle: 500 ms
• Properties > Events > Value change
– SetTag (see figure)
Figure 4-9
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 33
4 Evaluating the operating state of the connection

4.2.2 Faceplate

The faceplate displays the status of the two PLC modules.


Tag assignment is carried out via the "interface" (see figure).
Figure 4-10

For a description of creating a faceplate, refer to \9\.


© Siemens AG 2020 All rights reserved

4.2.3 Script "plcStopMonitoring"

The script is called once every minute by the Task scheduler.


If both PLC controllers fail, or if the connection between PLC and HMI operator
device fail completely, then the PLC cannot perform any "action/function".
The script serves to evaluate this edge case.

Principle of operation
• A fixed value of "200" for the tag "plcStopMonitoring" is passed via the
controller.
• This value is overwritten by the script once a minute with the value "zero".
• As long as there is a connection, the value reset by the script is in turn
overwritten with "200".
• If there is no connection, then the value remains "zero" and an alarm is output
via the HMI operator device after a delay period.

4.2.4 Task scheduler

The "plcStopMonitoring" script is called once a minute with the Task scheduler.

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 34
4 Evaluating the operating state of the connection

4.2.5 "20_PlcMonitoring" screen

The "20_PlcMonitoring" screen has been created for the evaluation. The screen
contains a faceplate which outputs the PLC status.
The faceplate is stored in the attached project and in the library.
Figure 4-11
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 35
4 Evaluating the operating state of the connection

4.3 HMI configuration for KTP1200 Basic


In addition to the TP1200 Comfort, the AWB also contains a KTP1200 Basic
configuration.
The functionality is equivalent to that of the TP1200 Comfort configuration.
The differences are briefly described below.
• The panel does not use a "faceplate" to output the PLC status, but rather
individual objects. Connection to the controller is effected with the same tags.
• The panel does not support scripts.
• A clock memory is used to evaluate the edge case (both CPUs in STOP or
connection is completely severed).
• The status of the PLC is output with an animated graphic (circle).
– Blinking graphic => At least one PLC is in "RUN".
– Graphic not blinking => The connection or both PLC controllers are in
"STOP".
© Siemens AG 2020 All rights reserved

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 36
5 Appendix

5 Appendix
5.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:
https://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

SITRAIN – Training for Industry


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:
www.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:
https://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 Apple iOS, Android and Windows
Phone:
https://support.industry.siemens.com/cs/ww/en/sc/2067

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 37
5 Appendix

5.2 Links and literature


Table 5-1
No. Subject
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the article page of the application example
https://support.industry.siemens.com/cs/ww/en/view/109781687
\3\ SIMATIC S7-1500 redundant system S7-1500R/H
https://support.industry.siemens.com/cs/ww/en/view/109754833
\4\ Diagnostics of the operating state of an S7-1500R/H system using a function block
https://support.industry.siemens.com/cs/ww/en/view/109763768
\5\ SIMATIC S7-1500R/H Getting Started
https://support.industry.siemens.com/cs/ww/en/view/109757712
\6\ SIMATIC HMI operator devices - Comfort Panels
https://support.industry.siemens.com/cs/ww/en/view/49313233
\7\ SIMATIC HMI operator devices - Basic Panels 2nd Generation
https://support.industry.siemens.com/cs/ww/en/view/90114350
\8\ HMI design with the HMI Template Suite
https://support.industry.siemens.com/cs/ww/en/view/91174767
\9\ Creating Faceplates with WinCC Runtime Advanced and Comfort Panels
© Siemens AG 2020 All rights reserved

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

5.3 Change documentation


Table 5-2
Version Date Change
V1.0 10/2020 First edition

Verbindung HMI-Panel und S7-1500R/H


Article ID: 109781687, V1.0, 10/2020 38

You might also like