Enumerations in WinCC
Enumerations in WinCC
Enumerations in WinCC
texts of enumerations
for display in WinCC?
Siemens
SIMATIC WinCC / SIMATIC PCS 7 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/27147567 Support
This entry is from the Siemens Industry Online Support. The general terms of use
(http://www.siemens.com/terms_of_use) apply.
Security Siemens provides products and solutions with industrial security functions that
Informatio support the secure operation of plants, systems, machines and networks.
n 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 only
form one element of such a concept.
The customer is responsible to prevent unauthorized access to its plants,
systems, machines and networks. Systems, machines and components should
only be connected to the enterprise network or the internet if and to the extent
necessary and with appropriate security measures (e.g. use of firewalls and
network segmentation) in place.
Additionally, Siemens’ guidance on appropriate security measures should be
taken into account. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them
more secure. Siemens strongly recommends to apply product updates as soon
as available and to always use the latest product versions. Use of product
versions that are no longer supported, and failure to apply latest updates may
increase the customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial
© Siemens AG 2022 All rights reserved
1 Summary
Enumerations allow you to assign texts to values. The following entry shows you
how to define enumerations in the STEP 7 project in the SIMATIC Manager and
how to use them in the CFC and WinCC.
© Siemens AG 2022 All rights reserved
2 Requirements
The WinCC component "AS-OS Engineering" is installed.
You can select this component when doing a user-defined setup of WinCC. Please
use the following installation sequence:
1. STEP 7
2. WinCC with the "AS-OS Engineering" component
3. The CFC software for STEP 7 must be installed to be able to create shared
declarations in the STEP 7 project.
4. The WinCC project is integrated in the STEP 7 project.
Entry 11841504 includes information on how to integrate a WinCC project in
STEP 7.
If you are building on top of an existing project, it is possible that the component
"AS-OS Engineering" is missing and has to be installed retroactively. Entry
22272911 includes a description of how to retroactively install the "AS-OS
Engineering" component.
© Siemens AG 2022 All rights reserved
3 Procedure
3.1 Implementation in the CFC
Define the enumeration
1. In the SIMATIC Manager, you define the enumeration in the STEP 7 project
under "Shared Declarations > Enumerations".
4. Configure the enumeration texts for all the display languages that will be used
at WinCC Runtime. For this, in the SIMATIC Manager you select the menu
command "Options > Display Language...". This opens the window "Add,
remove language, set default language ...".
5. You select a language in the "Installed Languages in Project" list and click the
"Set as Default" button.
6. Click the "Apply" button and then close the dialog with the "OK" button.
7. Once you have set a default display language you match the display texts of
the enumeration to the default language selected (see 3).
Note You can of course also define the attribute "S7_enum" in other programming
languages for the S7 controller (STL, for example).
2. You can then select an initial value in the "Value" combo box. The configured
texts of the enumeration are available for selection.
© Siemens AG 2022 All rights reserved
Note Make sure that you also configure the enumeration for the output parameters.
Compiling makes the data available in the WinCC project for using the enumeration
in Runtime. These are:
• Entries in the Text Library
The name of the enumeration and the display texts of the individual values are
entered in the Text Library.
© Siemens AG 2022 All rights reserved
The initial values of the text reference tags are assigned the text IDs of the
corresponding texts in the WinCC Tag Management. In the following two figures
the white fields show the values of the internal tags of the enumeration for the
different Runtime languages. The blue I/O field shows the current value of the
enumeration tag. The value can be changed. The yellow text field shows the
current value of the enumeration tag as text. When the value of the enumeration
tag changes, the corresponding text of the enumeration is displayed in the current
Runtime language.
© Siemens AG 2022 All rights reserved
In the "Static" column for the dynamized property, you select a value that does
WARNING not in any way occur in the process mode. This ensures that the property
changes when a screen is opened and the process connection functions. This is
important for the next configured script to be executed in any case when a
screen opens.
3. Now you define the C action: For this you select the event "Static Text >
Property Topics > Flashing > Flashing Background Color Off > Change". A
window opens where you insert the C action.
© Siemens AG 2022 All rights reserved
Note The method described here can be used repeatedly. This means:
If several different measuring points are dynamized in this way, you can copy the
graphics object of an existing measuring point. Then all you have to do is change
the tag direct link accordingly. It is not necessary to change the script or a trigger
requirement. This method is thus also suitable for creating customized objects
(block symbols) in PCS 7 projects.