show the entry list
WinCC flexible ES -- Configuring and programming communication -- Configuring communication to S7
What should you watch out for when connecting a SIMATIC HMI device configured with WinCC flexible ES to a SIMATIC ET 200 CPU?
How do you configure a connection between WinCC flexible Runtime (PC/Panel) and a SIMATIC S7-300/S7400 via PROFIBUS/MPI?
How do you integrate a WinCC flexible project in STEP 7?
How can you use one and the same WinCC flexible operator panel configuration for multiple controllers?
How can you visualize the current status of the CPU on a WinCC flexible operator panel?
How can you have any number of automation systems addressed one after the other by the "Change Connection" function with WinCC flexible PC Runtime or a Panel?
How do you use WinCC flexible to configure communication between an operator panel and an S7 station via S7 routing?
What should you watch out for when setting up a connection between S7-200 and SIMATIC Panels or WinCC flexible PC Runtime and what are the options?
Which ports are used by WinCC flexible?
How can you increase the performance of HMI devices?
Which settings do you need to make to access a panel and an S7-200 controller via TeleService?
How do you configure a connection between WinCC flexible Runtime (PC or Panel) and a SIMATIC S7-300 / S7-400 via Industrial Ethernet?
How do you configure a PROFINET connection to an S7 controller in WinCC flexible?
How do you specify the MPI address of an FM in the HMI configuration tool if the address doesn't appear in the HW Config and is thus unknown?
How do you connect a panel to a SIMATIC H station?
What settings have to be made for a PROFIBUS DP connection between a panel or a PC with WinCC flexible Runtime and an S7-200?
Why is the communication driver marked "orange" in WinCC flexible when another Ethernet communication is added to an existing MPI/DP?
PROFIBUS communications between Windows-based operator panel (configured with WinCC flexible 2004) and WinAC Basis / WinAC RTX V4.0
How do you configure communication between the WinCC flexible Runtime and WinLC via SOFTBUS on a PC?
How do you configure communication between WinCC flexible Runtime or a Windows-based operator panel and an S7-200 (CP 243-1) via Ethernet?
WinCC flexible ES -- Working with projects -- Creating, editing, archiving and copying projects
What do you have to do if you can no longer access symbols and data blocks of STEP 7 from an integrated WinCC flexible project?
Which entries are available on the internet for migration to STEP 7 (TIA Portal) and WinCC (TIA Portal)?
How can you change the column width of picture objects in WinCC flexible?
In WinCC flexible, how can you prevent pictures and picture objects being fitted automatically when you change the screen resolution (possibly widescreen)?
How do you activate access protection for a STEP 7 project and set up a user as project editor?
How do you integrate a WinCC flexible project in STEP 7?
How can you use one and the same WinCC flexible operator panel configuration for multiple controllers?
What are the solutions offered for working with different versions of WinCC flexible?
Which problems might arise if the "log.LDF" file is not available in a WinCC flexible project?
Why does WinCC flexible close again automatically after the program start?
How do you save WinCC flexible projects / libraries in the format of an earlier version of WinCC flexible?
How can you delete unused tags or objects from a WinCC flexible project?
What options do you have for copying pictures from one WinCC flexible project to another?
Copying HMI projects integrated in SIMATIC STEP 7 at file level
How can you open a WinCC project integrated in STEP 7 faster?
How do you archive projects in WinCC flexible and which files are required?
How do you back transfer the projects of an operator panel and what should you watch out for?
Which connector cables are available for connecting to SIMATIC Panels?
How can you use one and the same WinCC flexible operator panel configuration for multiple controllers?
Part number:

When creating serial plants, the question always arises as to how you can use one HMI configuration for multiple plants without having to change the address parameters for the PLC in the configuration.

The aim is to create just one HMI configuration and to change the address parameters for the controller connection to the PLC at Runtime and store them permanently.

The following describes the procedure taking a practical example.
You can use the function on operator panels that support Script and Archive functions.
No. Procedure
1 Function description
The following parameters are assigned to the "Change connection" system function via IO fields:
  • Address
  • Slot
  • Subrack

The name of the connection is defined and stored, and cannot be changed.

The connection data predefined via the IO fields is written to an archive by script. When you restart the operator panel, a second script reads out this archived connection data.

The operator panel then sets up a connection to the PLC using this predefined connection data.

2 Create an HMI connection
First you configure a "standard connection" for your operator panel.
If the operator panel does not find any stored connection data, it attempts to use this fixed address to set up a connection to the PLC.

Fig. 01

3 Define tags
You need three internal tags to transfer the parameters to the "Change connection" system function.
A further internal tag is needed to ensure that the script used is called only once when the operator panel is restarted.

Two tags with controller connection were used for test purposes.

For later use, you must of course make sure that the data blocks and markers used to execute the program are identical in all the PLCs.

4 Script description for MP 277 / PC Runtime:
(The specifications in the "brackets" refer to the PC Runtime project.)

Two scripts are used in the sample projects:

  1. WinCE_Write_data / (WinPC_Write_data)
  2. WinCE_Read_data / (WinPC_Read_data)

WinCE_Write_data / (WinPC_Write_data)
The "WinCE_Write_data" script is executed via the "Save PLC data" button.
The connection data are stored via this script in a "Text" file.

You can change the storage location and the name of the file in line 13 (13 and 14).

In lines 37, 38 and 39 (63, 64 and 65) you can also change the tags used.

WinCE_Read_data / (WinPC_Read_data)
The "WinCE_Read_data" script is executed just once via the "Start" page of the operator panel.
This script reads out the previously stored connection data and executes the "Change connection" system function.

You can change the storage location and the name of the file in line 18 (21).

In lines 51, 52 and 53 (59, 60 and 61) you can also change the tags used.

The "Change connection" system function is executed with the tags used in line 65 (75).


  • The source codes for Windows CE systems and PC Runtime systems are different.
  • The archive path depends on the operator panel you are using.
    Refer to the relevant manual to see which archive path your operator panel supports.
  • You should not use the internal flash memory of the operator panel, because it affects the service life of the operator panel.
5 Program description
When you start the operator panel, the plant picture "Screen 01" (Start screen) is called first.
Opening of the "Screen 01" screen causes the script "WinCE_Read_data" to be executed.

If there is no connection data stored in the archive, the operator panel first attempts to set up the connection defined and stored in the configuration.

If the correct connection data is stored, the "WinCE_Read_data" script reads out the connection data and sets up the connection to the relevant PLC via the "Change connection" system function.

You can specify and change the connection data via the plant screen "Screen 02".

Below is plant screen 02 "Change PLC connection data".

Fig. 02

Point 1: Permanent window
You can call "Screen 01" and "Screen 02" via the permanent window. You can also change the language and stop Runtime via the permanent window.

Points 2 - 4: Overview of "Plant Screen 02"

Point 2
Via the IO fields, you specify the connection data of the PLC via which the operator panel is to communicate.

Point 3
The "Save PLC data" is for executing the "WinCE_Write_data" script. The previously entered connection data is stored in an archive. If you enter new connection data, pressing the button overwrites the "old" data.

The "Change Connection" button is for executing the "Change connection" system function. The connection data is transferred from the IO fields from "Point 2" to the system function.
For test purposes, therefore, you can check in Runtime whether your connection data functions.

Point 4
Via the IO fields you can specify and read out tag values for test purposes in order to ensure that you are connected with the "right" PLC.

The attached download contains the archived WinCC flexible project with the functions described above.

Attachment 1: ( 4517 KB )

Creation environment
The example can be used on all operator panels that support script and archive functions.
The following table lists the components that have been used to create this entry.
Component Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools -
Engineering tools STEP 7 5.4 SP4
HMI software WinCC flexible 2008 SP1
HMI devices MP 277 Touch, PC Runtime
Controllers CPU 315-2DP, CPU 317F-2PN/DP


 Entry ID:37577813   Date:2009-08-12 
I regard this helpfulas not helpful                                 
My Documentation Manager 
Support Request
To this entry
Create PDF 
Send to a friend
Compatibility tool 
Online Help
Guided Tour