Panels and S7-400H DOC V2.0 en
Panels and S7-400H DOC V2.0 en
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
Fehler! Linkreferenz ungültig..
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: Fehler! Linkreferenz ungültig..
Table of contents
Legal information ......................................................................................................... 2
1 Task ..................................................................................................................... 4
2 Solutions ............................................................................................................ 5
2.1 Connecting the panels redundantly ...................................................... 5
2.2 Connecting a script-capable panel with a "software solution" to
both H CPUs ........................................................................................ 6
2.3 Connecting a script-incompatible panel with a "software
solution" to both H CPUs ...................................................................... 7
2.4 Comparison of the solutions ................................................................. 8
3 Software solution with scripts ......................................................................... 9
3.1 Components used ................................................................................ 9
3.2 Principle of operation ............................................................................ 9
3.3 Configuration ...................................................................................... 11
3.3.1 STEP 7 configuration ......................................................................... 11
3.3.2 WinCC configuration .......................................................................... 12
3.4 Example scenarios ............................................................................. 18
4 Software solution without scripts .................................................................. 20
4.1 Components used .............................................................................. 20
4.2 Principle of operation .......................................................................... 20
© Siemens AG 2020 All rights reserved
1 Task
Introduction
You wish to connect a SIMATIC HMI panel with a SIMATIC H-station.
2 Solutions
2.1 Connecting the panels redundantly
You will connect a panel to each H CPU.
Figure 2-1
H-CPU 1 H-CPU 2
PROFINET IE
© Siemens AG 2020 All rights reserved
Panel 1 Panel 2
PROFINET IE
PROFINET IE
Software components
Table 3-2
Component Qty. Item number Note
STEP 7 V5.6 1 6ES7810-4C.11-..
© Siemens AG 2020 All rights reserved
Script_connection_lost
In the event of a complete connection loss, there is no longer a fast trigger on the
panel to run scripts.
In order to detect a total failure and display it, the Scheduled tasks is used on a
one-minute cycle. The script used in the Scheduled tasks (Script_connection_lost)
contains the following functions:
1. Error marking:
The connection state tag is set to 5 for both connections. If both connections
are active, the intervention once every minute has no effect. 5 corresponds to
the connection status "OK".
2. Disable:
If the connection state tags for the two connections are at 5 or higher, they are
set to 100. 100 corresponds to the connection status "disabled".
"Script_connection_lost" is written to the connection memory of the data
connection.
Status of the connection state tags:
Table 3-4
Values Status
0 Initializing, waiting for first trigger
1 to 5 OK
6 to 10 Fault
11 to 20 Failed
100 Disabled
3.3 Configuration
3.3.1 STEP 7 configuration
Table 3-5
No. Action
1. Configure your fault-tolerant system as normal with STEP 7 V5.x
2. Open the properties of the H CPU.
3. In the "Cycle/Clock Memory" tab, enable the clock memory and enter the desired
memory byte.
This example uses memory byte 0.
© Siemens AG 2020 All rights reserved
The proxy PLC in WinCC (TIA Portal) is used to connect the operator device to the
H CPU. For this reason, no further steps are needed in the STEP 7 project.
A prerequisite for using the proxy PLC is a consistent STEP 7 V5.x project.
Additional information on using the proxy PLC can be found in the article at \3\.
Table 3-6
No. Action
1. Open the WinCC (TIA Portal) project with the Comfort Panel that you wish to
connect to the H CPU.
2. Add a new device of type "Device proxy".
© Siemens AG 2020 All rights reserved
No. Action
5. Open the Network view and create an HMI connection between the operator
device and the proxy PLC.
The panel will communicate with the H CPU via this connection.
No. Action
7. Create two more connections, "PLC_1" and "PLC_2".
Adjust the connection settings (IP address, component rack and slot number) for
both H CPUs.
In this example:
PLC_1: 192.168.0.130 (Slot 3, component rack 0)
PLC_2: 192.168.0.131 (Slot 3, component rack 1)
© Siemens AG 2020 All rights reserved
No. Action
8. Open the global library "96837136_Panel_H-PLC_library", downloadable from
the downloads page of this article.
https://support.industry.siemens.com/cs/ww/en/view/96837136
3
© Siemens AG 2020 All rights reserved
No. Action
10. Open the tag table "hmiTagTable".
No. Action
13. Open the Scheduled tasks.
Add a new task with the trigger "1 Minute".
con_state_PLC1 = con_state_PLC1 + 1
– con_state_PLC2 = 1
Scenario 1
Due to an error, the connection to PLC_1 is lost.
• The trigger can no longer be read via this connection.
• The script "Script_connection_PLC1" is no longer executed.
• The script "Script_connection_PLC2" continues to be executed cyclically.
The connection state tag for the connection PLC_1 ("con_state_PLC1") is no
longer reset, so the connection state tag reaches the limit of 11 (see Table 3-4).
The script "Script_connection_PLC2" checks the connection memory
"connected_to". Because this memory is on PLC_1, the "ChangeConnection"
function switches the data connection over to the parameters of the PLC_2
connection. The connection memory is set to PLC_2.
• connected_to = PLC_2
Scenario 2
The PLC_2 connection also fails due to a fault, therefore the script
"Script_connection_PLC2" can no longer be run.
Scheduled tasks runs the script "Script_connection_lost" once every minute.
Both connection state tags are set to 5 in the first cycle.
• con_state_PLC1 = 5
• con_state_PLC2 = 5
Both connection state tags are set to 100 in the second cycle; the connection
memory to "Script_connection_lost".
• con_state_PLC1 = 100
• con_state_PLC2 = 100
• connected_to = connection_lost
→ A complete connection loss has occurred.
© Siemens AG 2020 All rights reserved
Software components
Table 4-2
Component Qty. Item number Note
STEP 7 V5.5 + SP4 1 6ES7810-4CC10-0YA5
WinCC Comfort V16 1 6AV2101-0AA06-0AA5
© Siemens AG 2020 All rights reserved
Note Please remember that when using this solution, no switchover will take place if
there are communication failures.
4.3 Configuration
4.3.1 STEP 7 configuration
The FB523 function block enables the output of the "RUN/STOP" operating modes
and the "Master/Reserve" status for a fault-tolerant system.
Table 4-3
No. Action
1. Download the library from link \4 and add it to your project as described in the
article.
2. Define tags for the outputs "R0_MSTR" and "R1_MSTR" (in this example:
DB1.DBX4.0 and DB1.DBX5.0)
The proxy PLC in WinCC (TIA Portal) is used to connect the operator device to the
H CPU. For this reason, no further steps are needed in the STEP 7 project.
A prerequisite for using the proxy PLC is a consistent STEP 7 V5.x project.
Additional information on using the proxy PLC can be found in the article at \3\.
Table 4-4
No. Action
1. Open the WinCC (TIA Portal) project with the operator device that you wish to
connect to the H CPU.
2. Add a new device of type "Device proxy".
No. Action
3. Right-click the proxy PLC and select "Initialize device proxy".
No. Action
6. Open the "Connections" editor rename the connection you created to
"PLC_Changer_12".
© Siemens AG 2020 All rights reserved
The panel will communicate with the H CPU via this connection.
7. Create two more connections, "PLC_1" and "PLC_2".
Adjust the connection settings (IP address, component rack and slot number) for
both H CPUs.
In this example:
PLC_1: 192.168.0.130 (Slot 3, component rack 0)
PLC_2: 192.168.0.131 (Slot 3, component rack 1)
No. Action
8. Open an HMI tag table and add the following tags.
10. Also configure the system function "SetTag" to the event "On exceeding" for both
tags.
Describe the tag "connected_PLC" with the name of the respective controller.
PLC_1 is Master
The operator device evaluates the upper limit of the tag "DB1.DBB4" (limit: 0). If
the bit "DB1.DBX4.0" is set, the limit is exceeded and the function
"ChangeConnection" is run.
The connection switches from the defined connection of "PLC_Changer_12" to the
parameterized connection parameters of "PLC_1".
The connection to PLC_1 is established.
PLC_2 is Master:
© Siemens AG 2020 All rights reserved
The operator device evaluates the upper limit of the tag "DB1.DBB5" (limit: 0). If
the bit "DB1.DBX5.0" is set, the limit is exceeded and the function
"ChangeConnection" is run.
The connection switches from the defined connection of "PLC_Changer_12" to the
parameterized connection parameters of "PLC_2".
The connection to PLC_2 is established.
Note In order to test the function, you can manually switch the Master CPU to STOP
mode.
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
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:
Fehler! Linkreferenz ungültig.
Table 5-2
© Siemens AG 2020 All rights reserved