0% found this document useful (0 votes)
292 views23 pages

Panels and S7-400H en

This document discusses connecting an HMI panel to a SIMATIC S7-400H system with redundant CPUs using WinCC (TIA Portal). It provides two solutions - one using scripts on a script-capable panel, and one without scripts on a non-script panel. The solutions allow the panel to communicate with either CPU and switch communication between CPUs if one fails. The document compares the solutions and provides configuration details and example scenarios for each.

Uploaded by

Lam
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)
292 views23 pages

Panels and S7-400H en

This document discusses connecting an HMI panel to a SIMATIC S7-400H system with redundant CPUs using WinCC (TIA Portal). It provides two solutions - one using scripts on a script-capable panel, and one without scripts on a non-script panel. The solutions allow the panel to communicate with either CPU and switch communication between CPUs if one fails. The document compares the solutions and provides configuration details and example scenarios for each.

Uploaded by

Lam
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/ 23

Application Example  03/2015

Connecting SIMATIC HMI


Panel with SIMATIC S7-400H
WinCC (TIA Portal) V13 SP1 and STEP 7 V5.5

https://support.industry.siemens.com/cs/ww/de/96837136
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility of safely and professionally using, installing, operating
and servicing equipment. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time and without prior notice. If there are any
deviations between the recommendations provided in this Application Example
and other Siemens publications – e.g. catalogs – the contents of the other
documents have priority.

We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data, etc.,
described in this Application Example will be excluded. Such an exclusion will not
apply in the case of mandatory liability, e.g. under the German Product Liability Act
(“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body
or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
 Siemens AG 2015 All rights reserved

(“wesentliche Vertragspflichten”). The compensation for damages due to a breach


of a fundamental contractual obligation is, however, limited to the foreseeable
damage, typical for the type of contract, except in the event of intent or gross
negligence or injury to life, body or health. The above provisions do not imply a
change of the burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.automation.siemens.com.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Task ..................................................................................................................... 4
2 Solutions ............................................................................................................ 5
2.1 Connecting redundant panels .............................................................. 5
2.2 Connecting a script-capable panel with a “software solution”
with two H CPUs .................................................................................. 6
2.3 Connecting a non-script-capable panel with a “software
solution” with two H CPUs .................................................................... 7
2.4 Comparing the solutions....................................................................... 8
3 Software Solution with Scripts ......................................................................... 9
3.1 Components used ................................................................................ 9
3.2 Mode of operation ................................................................................ 9
3.3 Configuration ...................................................................................... 11
3.3.1 STEP 7 configuration ......................................................................... 11
3.3.2 WinCC configuration .......................................................................... 12
3.4 Example scenarios ............................................................................. 15
4 Software Solution without Scripts ................................................................. 17
4.1 Components used .............................................................................. 17
4.2 Mode of operation .............................................................................. 17
4.3 Configuration ...................................................................................... 18
 Siemens AG 2015 All rights reserved

4.3.1 STEP 7 configuration ......................................................................... 18


4.3.2 WinCC configuration .......................................................................... 18
4.4 Example scenarios ............................................................................. 22
5 References ....................................................................................................... 23
6 History............................................................................................................... 23

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 3
1 Task

1 Task
Introduction
You would like to connect SIMATIC HMI Panel with a SIMATIC H station.

Overview of the automation task


The figure below provides an overview of the automation task.
Figure 1-1
 Siemens AG 2015 All rights reserved

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 4
2 Solutions
2.1 Connecting redundant panels

2 Solutions
2.1 Connecting redundant panels
Connect a panel to each H CPU.
Figure 2-1
 Siemens AG 2015 All rights reserved

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 5
2 Solutions
2.2 Connecting a script-capable panel with a “software solution” with two H CPUs

2.2 Connecting a script-capable panel with a “software


solution” with two H CPUs
Connect an operator panel with two H CPUs.
With scripts it is specified with which H CPU the operator panel is connected.
In the event of an error, the connection is automatically switched over:
• STOP of the addressed CPU
• CP failure
• Cable fault
• EMC
Figure 2-2
 Siemens AG 2015 All rights reserved

A precise description of this solution can be found in chapter Software Solution with
Scripts.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 6
2 Solutions
2.3 Connecting a non-script-capable panel with a “software solution” with two H CPUs

2.3 Connecting a non-script-capable panel with a


“software solution” with two H CPUs
Connect an operator panel with two H CPUs.
With the status of the H CPU (master/reserve) it is specified with which H CPU the
operator panel is connected.
Figure 2-3

PROFINET IE
 Siemens AG 2015 All rights reserved

A precise description of this solution can be found in chapter Software Solution


without Scripts.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 7
2 Solutions
2.4 Comparing the solutions

2.4 Comparing the solutions


Table 2-1
Solution Advantage Disadvantage
2.1 Connecting redundant High availability Higher hardware costs
panels
2.2 Connecting a script- Lower hardware costs Longer response times
capable panel with a
“software solution” with two
H CPUs
2.3 Connecting a non-script- Lower hardware costs No switchover in the event
capable panel with a of communication errors
“software solution” with two
H CPUs
 Siemens AG 2015 All rights reserved

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 8
3 Software Solution with Scripts
3.1 Components used

3 Software Solution with Scripts

3.1 Components used


Hardware components
Table 3-1
Component No. Article number Note
PS 407 10A 2 6ES7407-0KA02-0AA0
CPU 416-5H PN/DP 2 6ES7416-5HS06-0AB0
TP1200 Comfort 1 6AV2124-0MC01-0AX0
SCALANCE X204-2 1 6GK5204-2BB10-2AA3

Software components
Table 3-2
Component No. Article number Note
STEP 7 V5.5 + SP4 1 6ES7810-4CC10-0YA5
 Siemens AG 2015 All rights reserved

WinCC Comfort V13 SP1 1 6AV2101-0AA03-0AA5

Example files and projects


Table 3-3
Component Note
96837136_WinCC_TIA_redundant_communication_en.pdf This document
96837136_Panel_H-PLC_Library.zip This zip file includes a
WinCC (TIA Portal) library

3.2 Mode of operation


The operator panel is connected with the two H CPUs. Scripts are used in the
operator panel in order to check which of the controllers are accessible. If the
connected H CPU or the communication to the H CPU fails, the connection is
automatically switched to the other H CPU.
The following script templates can be found in the library “96837136_Panel_H-
PLC_Library.zip”:
• connection_PLC1
• connection_PLC2
• connection_lost

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 9
3 Software Solution with Scripts
3.2 Mode of operation

Connection_PLC1 and connection_PLC2


The two scripts are functionally identical and only differ in terms of the connection
parameters.
The following functions are performed in the scripts “connection_PLC1” and
“connection_PLC2”:
1. Initializing:
The connection that reaches the trigger describes the tag for the connection
memory of the data connection with the connection name.
2. Resetting:
The connection status tag is set to 1 in order to get the “OK” state.
3. Fault detection:
The connection status tag of the other connection is increased. This process
discovers an existing fault of the other connection after some cycles and
checks a required switchover of the data connection.
4. Switchover:
If the other connection cannot reset the connection status tag, it will reach a
limit value. As a result, it will be checked whether the data connection in this
failed connection is available.
If this is the case, the connection is switched over.
5. Reentry:
This section deals with the reentry after a complete disconnection. The first
active connection switches the data connection to itself.
 Siemens AG 2015 All rights reserved

Connection_lost
In the event of a complete disconnection, there is no fast trigger available on the
panel for the execution of scripts.
In order to be able to detect and display a total failure, the scheduler is used with a
cycle of one minute. The script (connection_lost) used in the scheduler includes the
following functions:
1. Fault marking:
The connection status tag is set to 5 for both connections. If both connections
are active, the access that is every minute, will have no effect. 5 corresponds
to connection status “OK”.
2. Deactivating:
If the connection status tags of the two connections are 5 or higher, they will be
set to 100. 100 corresponds to connection status “deactivated”.
“connection_lost” is written in the connection memory of the data connection.
Status of the connection status tags:
Table 3-4
Values Status
0 Initialization, waiting for the first trigger
1 to 5 OK
6 to 10 Faulty
11 to 20 Failed
100 Deactivated

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 10
3 Software Solution with Scripts
3.3 Configuration

3.3 Configuration
3.3.1 STEP 7 configuration

Table 3-5
No. Action
1. Configure your H system as usual with STEP7 V5.x
2. Open the properties of the H CPU.
3. Enable the clock memory in the “Cycle/Clock Memory” tab and enter the desired
memory byte.
In the example the memory byte 0 is used.
 Siemens AG 2015 All rights reserved

To connect the operator panel to the H CPU, the proxy PLC is used in WinCC (TIA
Portal). This is why no further steps are required in the STEP 7 project.
Prerequisite for the use of the proxy PLC is a consistent STEP 7 V5.x project. More
detailed information on the use of the proxy PLC can be found in entry \3\.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 11
3 Software Solution with Scripts
3.3 Configuration

3.3.2 WinCC configuration

Table 3-6
No. Action
4. Open the WinCC (TIA Portal) project with the comfort panel which you would like
to connect to the H CPU.
5. Add a new device from the “device proxy” type.
 Siemens AG 2015 All rights reserved

6. Right click the proxy PLC and select “Initialize device proxy”.

7. Select the STEP 7 V 5.x project.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 12
3 Software Solution with Scripts
3.3 Configuration

No. Action
8. Open the network view and create an HMI connection between the operator
panel and the proxy PLC.

9. Open the “Connections” editor and rename the created connection to


“PLC_Changer_12”.
 Siemens AG 2015 All rights reserved

The panel communicates via this connection with the H CPU.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 13
3 Software Solution with Scripts
3.3 Configuration

No. Action
10. Create two further connections “PLC_1” and “PLC_2”.
Set the connection settings (IP address, racks and slot number) of the two H
CPUs.
 Siemens AG 2015 All rights reserved

11. Open the “96837136_Panel_H-PLC_library” global library that you can download
from the download page of this entry.
https://support.industry.siemens.com/cs/ww/de/96837136
12. Drag the “H-System_Connection” tag table and the VB scripts via drag & drop
into your project.
13. Open the “H-System_Connection” tag table.
Change the addresses of the tags “trigger_PLC1”, “trigger_PLC2” and
“Clock_memory” if you do not wish to use the clock memory as memory byte 0.

14. Open the “connection_PLC1” script.


Change the address parameter of the “PLC_Changer_12” connection in line 40
and line 54 to the address parameter of your “PLC1”.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 14
3 Software Solution with Scripts
3.4 Example scenarios

No. Action
15. Open the “connection_PLC2” script.
Change the address parameters of the “PLC_Changer_12” connection in line 40
and line 54 to the address parameters of your “PLC2”.

16. Open the scheduler.


Add a new task with the trigger “1 Minute”.

Add the “connection_lost” script in “Events > Update”.


 Siemens AG 2015 All rights reserved

Calling the scripts “connection_PLC1” and “connection_PLC2” is already


configured in the “value change” of the tags “trigger_PLC1” and “trigger_PLC2”.
17. Download the project into your operator panel.

3.4 Example scenarios


Initialization
The connections “PLC_1” and “PLC_2” are both active.
According to the assignment, the connection “PLC_Changer_12” is switched to
“PLC_1” (“connected_to” = PLC_1)

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 15
3 Software Solution with Scripts
3.4 Example scenarios

Fault detection and resetting


The scripts “connection_PLC1” and “connection_PLC2” are triggered by reading
the triggers (“trigger_PLC1” and “trigger_PLC2”).
• “connection_PLC1” increments the connection status tag by 1 with each
execution of the connection to PLC_2 and sets its own connection status tag to
1.
– con_state_PLC2 = con_state_PLC2 + 1
– con_state_PLC1 = 1
• “connection_PLC2” increments the connection status tag by 1 with each
execution of the connection to PLC_1 and sets its own connection status tag to
1.
– con_state_PLC1 = con_state_PLC1 + 1
– con_state_PLC2 = 1

Scenario 1
The PLC_1 connection fails due to an error.
• The trigger can no longer be read through this connection
• The “connection_PLC1” script is not executed.
 Siemens AG 2015 All rights reserved

• The “connection_PLC2” script is still executed cyclically.


The connection status tag of the connection PLC_1 (“con_state_PLC1”) is no
longer reset, this is why the connection status tag reaches the limit value 11 (see
Table 3-4).
The “connection_PLC2” script checks the connection memory “connected_to”.
Since this memory is set to PLC_1, the “ChangeConnection” function switches the
data connection to the parameters of connection PLC_2. The connection memory
is set to PLC_2.
• connected_to = PLC_2

Scenario 2
The connection PLC_2 also fails due to an error, therefore the “connection_PLC2”
script can no longer be executed.
The “connection_lost” script is executed once every minute by the scheduler.
Both connection status tags are set to 5 in the first cycle.
• con_state_PLC1 = 5
• con_state_PLC2 = 5
Both connection status tags are set to 100 in the second cycle. The connection
memory is set to “connection_lost”.
• con_state_PLC1 = 100
• con_state_PLC2 = 100
• connected_to = connection_lost
 The connection is totally disconnected.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 16
4 Software Solution without Scripts
4.1 Components used

4 Software Solution without Scripts


4.1 Components used
Hardware components
Table 4-1
Component No. Article number Note
PS 407 10A 2 6ES7407-0KA02-0AA0
CPU 416-5H PN/DP 2 6ES7416-5HS06-0AB0
KTP400 Basic PN 1 6AV2123-2DB03-0AX0
SCALANCE X204-2 1 6GK5204-2BB00-2AA3

Software components
Table 4-2
Component No. Article number Note
STEP 7 V5.5 + SP4 1 6ES7810-4CC10-0YA5
WinCC Comfort V13 SP1 1 6AV2101-0AA03-0AA5 As of WinCC Basic
V13 SP1
 Siemens AG 2015 All rights reserved

4.2 Mode of operation


Through the evaluation of the status of the H CPU (master/reserve) as well as the
internal system function “ChangeConnection” there is the option to connect a panel
to an H CPU.
For this purpose, you have to set different addresses for the H CPUs.
If the SIMATIC H Station detects the failure of an H CPU (e.g. H-CPU_1), a
connection to a different H CPU is created with the help of the “ChangeConnection”
function.
The “ChangeConnection” function terminates the connection to the controller
currently in use and establishes a new connection with the specified controller.
You have two options to use the “ChangeConnection” function:
• Manual switchover with a function button: Configure the “ChangeConnection”
system function on the “Press” event.
• Automatic switchover: Automated call of “ChangeConnection”, e.g. on the “On
exceeding” event of a process tag.

Note Please note that no switchover takes place for this solution in the event of
communication errors.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 17
4 Software Solution without Scripts
4.3 Configuration

4.3 Configuration
4.3.1 STEP 7 configuration

The FB523 function block allows the output of the modes “RUN/STOP” and of the
status “Master/Reserve” of an H system.
Table 4-3
No. Action
1. Download the library from the link \4\ and add it to your project as described in
the entry.
2. Define tags for the outputs “R0_MSTR” and “R1_MSTR” (in this example:
DB1.DBX4.0 and DB1.DBX5.0)

To connect the operator panel to the H CPU, the proxy PLC is used in WinCC (TIA
Portal). This is why no further steps are required in the STEP 7 project.
Prerequisite for the use of the proxy PLC is a consistent STEP 7 V5.x project. More
detailed information on the use of the proxy PLC can be found in entry \3\.

4.3.2 WinCC configuration


 Siemens AG 2015 All rights reserved

Table 4-4
No. Action
1. Open the WinCC (TIA Portal) project with the operator panel that you would like
to connect to the H CPU.
2. Add a new device from the “device proxy” type.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 18
4 Software Solution without Scripts
4.3 Configuration

No. Action
3. Right click the proxy PLC and select “Initialize device proxy”.

4. Select the STEP 7 V 5.x project.


5. Open the network view and create an HMI connection between the operator
panel and the proxy PLC.
 Siemens AG 2015 All rights reserved

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 19
4 Software Solution without Scripts
4.3 Configuration

No. Action
6. Open the “Connections” editor and rename the created connection to
“PLC_Changer_12”.
 Siemens AG 2015 All rights reserved

The panel communicates via this connection with the H CPU.


7. Create two further connections “PLC_1” and “PLC_2”.
Set the connection settings (IP address, racks and slot number) of the two
H CPUs.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 20
4 Software Solution without Scripts
4.3 Configuration

No. Action
8. Open an HMI tag table and add the following tags.

• Status_Connection_PLC1_Master: Data type: Byte, connection: PLC_1,


address: DB1.DBB4, acquisition mode: Cyclic continuous, maximum: 0

• Status_Connection_PLC2_Master: Data type: Byte, connection: PLC_2,


address: DB1.DBB5, acquisition mode: Cyclic continuous, maximum: 0

• Connected_PLC: Data type: WString, connection: Internal tag


Length: 15

9. Configure the “ChangeConnection” system function for the tags


“Status_Connection_PLC1_Master” and “Status_Connection_PLC2_Master” in
“Events > On exceeding”. Enter the connection parameters for the respective
connection “PLC_1” or “PLC_2” for the “PLC_Changer_12” connection.
 Siemens AG 2015 All rights reserved

10. In addition, configure the “SetTag” system function on the “On exceeding” event
of the two tags. Describe the “connected_PLC” tag with the name of the
respective controller.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 21
4 Software Solution without Scripts
4.4 Example scenarios

4.4 Example scenarios


Table 4-5
H CPU: Address Bit status Result
PLC_1 DB1.DBX4.0 1 Master
PLC_2 DB1.DBX5.0 0 Reserve
PLC_1 DB1.DBX4.0 0 Reserve
PLC_2 DB1.DBX5.0 1 Master

PLC_1 is master
The operator panel evaluates the upper limit value of the “DB1.DBB4” tag (limit
value: 0). If the “DB1.DBX4.0” bit is set, the limit value is exceeded and the
“ChangeConnection” function is executed.
The connection changes from the specified connection of the “PLC_Changer_12”
to the configured connection parameters of the “PLC_1”.
The connection to the PLC_1 is established.

PLC_2 is master
 Siemens AG 2015 All rights reserved

The operator panel evaluates the upper limit value of the “DB1.DBB5” tag (limit
value: 0). If the “DB1.DBX5.0” bit is set, the limit value is exceeded and the
“ChangeConnection” function is executed.
The connection changes from the specified connection of the “PLC_Changer_12”
to the configured connection parameters of the “PLC_2”.
The connection to the PLC_2 is established.

Note You can switch the master CPU manually to STOP mode in order to test the
function.

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 22
5 References

5 References
Table 5-1
Topic Title
\1\ Siemens Industry http://support.automation.siemens.com
Online Support
\2\ Download page of the https://support.industry.siemens.com/cs/ww/de/96837136
entry
\3\ Combined configuration http://support.automation.siemens.com/WW/view/en/73502293
with WinCC (TIA Portal)
and STEP 7 V5.x
\4\ How do you read out http://support.automation.siemens.com/WW/view/en/19537149
the operating state and
status of an H system?

6 History
Table 6-1
Version Date Modifications
 Siemens AG 2015 All rights reserved

V1.0 02/2015 First version

Panel an H-Steuerung mit WinCC (TIA Portal)


Entry ID: 96837136, V1.0, 03/2015 23

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