Siemens WinCC SCADA Tutorials
Siemens WinCC SCADA Tutorials
You can create the project from the Portal View with “Create new project”.
EngineersCommunity.com
You have created a project but the project tree is empty:
EngineersCommunity.com
Add the PLC and the WinCC Professional Runtime
Add the PLC
Begin by selecting “Add new device” to add a PLC and a SIMATIC HMI Station.
EngineersCommunity.com
The Device View Window is populated with the PLC.
Select the CPU and in the Properties, Check the clock memory check box and leave the default address 0
EngineersCommunity.com
Next, select the Profinet ports on the CPU
EngineersCommunity.com
3. Take the default IP Address
EngineersCommunity.com
Add the WinCC RT Professional
Select “Add new device” again. In the window,
EngineersCommunity.com
From the Catalog, drag the IE General (1) and drop it in Slot 2 of the PC(2).
EngineersCommunity.com
In the Properties section, Open the Subnet box and select PN/IE_1. The next available IP address will
automatically be entered in the address field.
EngineersCommunity.com
10
EngineersCommunity.com
Configure the Connection
Select the Network view
11
EngineersCommunity.com
The connection also appears in the Connections tab
Expand the HMI tags in the HMI _RT, in the PC System. Double Click the “Add new tag table” icon
12
EngineersCommunity.com
A new tag table appears:
13
EngineersCommunity.com
To complete the process, select the address and enter MW 2 and select the check to complete.
Scaling
WinCC Professional can scale values from the PLC. When using linear scaling, you can map the value
range of a process tag to a certain value range of a process tag in WinCC. The process value itself is not
modified.
You will specify the following properties for the linear scaling:
End Value and Start Value of the process: determine the value range of the process value
End Value and Start Value of the process tag: determine the value range of the process tag in
14
EngineersCommunity.com
WinCC
Linear scaling is only available for process tags. Internal tags cannot be scaled.
To enter the Start and End values for the PLC (-20, 20) and for WinCC (0, 100):
1. Select the Properties section
2. Select Linear scaling
3. Enter the values as shown for the PLC
4. Enter the values as shown for WinCC
15
EngineersCommunity.com
16
EngineersCommunity.com
Creating Process Screens
The next Step is to create some process screens. Two screens are going to be created, Start and Sample.
These will be created in the Screens section of the Project tree.
Select the Screen_1 in the status bar and go to the properties to change the name to Start
17
EngineersCommunity.com
The Screen_1 is the default start screen. You can right click on a screen and select Define as start screen
to change the start screen designation
EngineersCommunity.com
Elements
Controls
19
EngineersCommunity.com
Graphics has a directory tree as well. It contains a variety of premade graphic objects, such as
machine and system parts, measuring devices, operating controls and buildings.
20
EngineersCommunity.com
The animations folder has folder for Movements, Display, Tag binding, and Animate
21
EngineersCommunity.com
The Layout Folder Has Zoom, Layers, Grid, and Object outside range.
22
EngineersCommunity.com
If you assign objects to positions that are outside the configurable area, these objects will be
hidden. The functions of the "Objects outside the visible area" palette in the "Layout" task card
are used to move these objects back into the screen.
The Task tab has Find and replace and Languages & resources.
23
EngineersCommunity.com
24
EngineersCommunity.com
Libraries tab contain the Project and Global library folders
25
EngineersCommunity.com
In the area "Project library" you can store self-made objects. These objects can be copied to the global
library or you can create global libraries.
Start screen
Open the Start screen
In the Toolbox, Open the Graphics, WinCC Graphics folder, Tanks folder, True color folder.
26
EngineersCommunity.com
Select the tank highlighted below
27
EngineersCommunity.com
In the Properties > Properties > Miscellaneous change the name to “watertank.”
Now return to the Global Library to assemble the piping. Open the Pipes, True color folder
28
EngineersCommunity.com
Drag the two elbows and the straight pipe on to the screen
Next drop down to the Valves folder and select the valve designated
29
EngineersCommunity.com
Drag on to the screen
They are too large for the screen so we will resize them and connect them. To resize you can use the
mouse to drag and resize or you can use the Properties, Layout and enter values. I started with the
valve and worked from that point. I change the size to 65 X 65
30
EngineersCommunity.com
And assigned the name valve_10
Using the Layout tab from the Task card area I zoomed in to start connecting and resizing
31
EngineersCommunity.com
To size the length of the pipe section, move it under the tank
Lasso the items to move them together. Then resize the pipe so the valve is outside the support leg of
the tank.
32
EngineersCommunity.com
Lasso the drain pipe pieces, right click and select Group to group the objects
Rename the group DrainGroup. Copy the DrainGroup and make it the InletGroup
33
EngineersCommunity.com
Move the Inlet group to the top of the tank.
34
EngineersCommunity.com
Adding a level indicator to the Tank
The tank does not indicate the level. We will add a bar to the tank for level indications. Open the
Elements in the Toolbox and select the Bar. Drag the Bar to the screen and position it on top of the
tank.
35
EngineersCommunity.com
Like This
In the Properties, set the name to Tanklevel. In the General Section, Set the Maximum to 100, the
Starting Point to 0 and the Minimum to 0.
36
EngineersCommunity.com
The border width to 0
If you want to set limits then the color gradient should be set to segmented in the Appearance tab. You
can also have the limits displayed by checking the marks box.
37
EngineersCommunity.com
You can turn off the scale in the Scales tab
In the limits tab, you can turn on the limits and set the values. This example will use absolute since the
process variable will be from 0 to 100.
38
EngineersCommunity.com
We will assign the tag in a later step
Text Field
Now add a test field for “Water Supply Atlanta.” From the Toolbox, select the Text field Icon and drag to
the screen.
Now type in “Water Supply Atlanta” and select 36 pixel font size.
39
EngineersCommunity.com
Don’t forget to rename the text field in the Miscellaneous tab.
40
EngineersCommunity.com
Sample Screen
Open the Sample screen.
41
EngineersCommunity.com
Using Customized Menus and Toolbars
For a production process consisting of multiple sub-processes, you will configure multiple screens. You
have the following options to enable the operator to switch from one screen to another in Runtime:
Use the "Menus and Toolbars" editor to configure customized menus and toolbars. The customized
menus and toolbars are displayed in all screens of a project and in the screen windows. You connect the
menu commands and icons with the local scripts.
A menu is placed at the top margin of each screen beginning on the left. In a configuration file you
specify which menu and toolbars are created with this file in screens or screen windows. You can
configure one menu line for each configuration file.
Menu structure
The configuration options for a menu element depend on the position where the menu is located in the
menu structure.
The following figure shows a typical menu structure with different menu elements:
In the "Menus and Toolbars" editor you create a menu with main menu commands and the
corresponding menu commands with up to six hierarchy levels. The menu is shown as it is displayed
later in the screens or a screen window.
42
EngineersCommunity.com
Creating a menu
1. Select the Menus & Toolbars in the Screen Management folder and Double click or right click and select
Open to open the editor.
3.
The first main menu command is created in the preview of the menu commands.
43
EngineersCommunity.com
4. Change the name of the menu and enter a comment, if appropriate.
3. Enter the names, “Screens” and “StopRuntime” under "Properties > Properties > General
>Name" in the Inspector window for the two buttons created.
44
EngineersCommunity.com
4. Enter “Screens” and “Stop Runtime” labels for the main menu command buttons “Properties >
Properties > General >Text" in the Inspector window.
45
EngineersCommunity.com
1. To display the main menu command as visible in Runtime, activate "Properties > Properties >
Miscellaneous > Visibility".
2. To define an operator authorization, select an authorization under "Properties > Properties >
Security".
46
EngineersCommunity.com
Creating menu commands
1. Click in the preview on the Screen button in the main menu command.
3. Configure the menu command in the Inspector window like figure below Name is “start”, Text is
“Start” and in the Graphic item scroll down and select “Home”.
47
EngineersCommunity.com
Note
The authorization, visibility and activation for Runtime can be configured both in the menu as
well as in each individual menu command. In the case of differing configurations the following
applies: Menu overwrites menu command.
4. Go to the Events tab, select “Add new”, and type in or select “ActivateScreen”.
48
EngineersCommunity.com
5. Repeat the process to add the Sample screen. Click the yellow star below the selection
rectangle.
6. Configure the menu command in the Inspector window like figure below Name is “sample”, Text
is “Sample”
49
EngineersCommunity.com
7. Go to the Events tab, select “Add new”, and type in or select “ActivateScreen.” Then select the
Sample screen.
8. The Exit Runtime can be done in the Menu or the Toolbar. The process with the Menu is to click
the yellow star below the selection rectangle.
A menu command is created under the main menu command. Configure the menu command in
the Inspector window with Name equals “Exit”, Text equal “Exit”
50
EngineersCommunity.com
Toolbar
1. The process is similar with the toolbar. In the Toolbar tab. select “Add new”.
51
EngineersCommunity.com
5. In the Events tab, in the “add new” type or select “StopRuntime.”
Configuration
1. In the Configuration tab, a new configuration must be added. Select the “Add new”
2. Cnnfiguration_1 is created and there are tabs to specify which toolbar and which Menu to
include in the configuration.
52
EngineersCommunity.com
3. Double click the “Add new” in the Toolbar tab and select the Toolbar_1
4. Double click the “Add new” in the Menu tab and select the Main
Runtime Properties
1. The last step is to go to the Runtime Settings and ensure the Configuration_1 is called out in the
Menus toolbars
53
EngineersCommunity.com
This completes the Menus & Toolbars. We can leave the editor open because we are going to
make changes later. Close the Runtime settings editor
In practice, the dynamic object on a screen is connected to a process tag. If there is a connection
between WinCC Runtime and the automation system, the automation systems supplies values to the
tag. The dynamic object shows the changes of process values in Runtime.
In the screen editor you can configure objects that transfer values to the automation system. The
automation system controls the process according to the transferred values. You do not need an
automation system for this project. In this project you will connect the internal tag "TankLevel" to the
bar on the water tank. Configure an I/O field to define values for the internal tag. The I/O field is an
input/output field that is used to display and change tag values. If you enter a value in the I/O field in
Runtime, this value is taken on by the internal tag "TankLevel". The internal tag transfers the entered
value to the object that depicts the level of the water tank. The fill level indicator of the bar changes
with respect to the tag value.
When activating a project, WinCC Runtime is started. WinCC Runtime will execute a project
in process mode. The project is then in Runtime. You will operate and observe the process
in Runtime. You will define the Runtime settings in the editor. For this project we will be using the
Simulator.
54
EngineersCommunity.com
1. Go to the Start screen and select the Bar
2. In the General section of the Properties, access the drop down menu and select “TankLevel”.
3. Add an I/O field to change the tank level. Select from the Element s and drop on the screen
near the tank.
55
EngineersCommunity.com
4. Connect the I/O field to the TankLevel tag
56
EngineersCommunity.com
6. Change the alignment to right and middle
Runtime Settings
In order to test the configuration we must complete the Runtime Settings. These are located in the
Project tree under the HMI_RT device.
57
EngineersCommunity.com
2. In the Screens section, select Title, Maximize, Minimize and Adapt Screen.
3. Previously, the Start screen and the Menus toolbars configuration had been
specified
Activate Simulation
The next step is to activate the simulation. There are two ways to do this. The first is from the Online
Menu
58
EngineersCommunity.com
The Simulation can be started, started with the tag simulator or started with the script debugger. The
other method is to use the icon on the toolbar. . Either method will start the simulation.
Starting the simulation will also trigger a compile.
2. Enter values between 0 and 100 in the I/O field. Observe the changes in the fill level
indicator.
3. Click on the "SAMPLE" instruction in the "Screens" menu to switch to the process
screen “SAMPLE.pdl".
4. Click on the "Start" instruction in the "Screens" menu to switch back to the process
Screen “START.pdl".
6. Click on the Stop Runtime button on the Toolbar to exit the runtime. This is a
one step process.
Test project
The following steps will show you how to test the "Getting Started” project by means of the
Tag Simulator.
The Tag Simulator allows testing of a project, without connection to a PLC. During testing you will check
how the project acts when connected to an automation system. In the "Getting Started" project, you
will simulate the values of the internal tag "TankLevel" with the Tag Simulator. The Tag Simulator assigns
different values to the internal tag "TankLevel". As the internal tag with the graphic depiction is
connected to the fill level indicator of the water tank, it will change according to the tag values as will
the value displayed in the I/O field.
59
EngineersCommunity.com
1. Select the HMI in the Project tree. From the Menu bar select Online, Simulation, With tag
simulator
2. This message may be displayed while the runtime simulation is starting up.
60
EngineersCommunity.com
3. The Tag simulator is started in the background.
61
EngineersCommunity.com
6. In the simulation, the choices are Sin, Oscillation, Random, Increase, Decrease and Slider. Stay
with Sin and check the Activate box.
9. Deactivate the project with the Tool bar Stop Runtime. The Simulation is also stopped and the
following message is displayed.
62
EngineersCommunity.com
10. Select OK
2. If the HMI Tag parameter section is not visible, drag to open the window.
63
EngineersCommunity.com
3. Select the Logging tags tab to open and select”Add new”.
4. Add the TankLevel tag. A data log is required to store the values. The add object can be used to
create the data log. The default name is
adequate
5. The data log can be stored in the database or in memory. Values stored in memory are available
in runtime only.
64
EngineersCommunity.com
6. The tag is defined and the data log is defined. The acquisition and logging times have to be
defined. The default is 500 milliseconds for both.
The drop down menu offers a selection of predefined cycles. IF the predefined cycles do not
meet your requirements, the “Add object” enables you to create a custom
cycle.
i
Selecting “Add object” entering “30 s” for the “Name”, 30 for the “Cycle time” and Second for
the “Cycle unit” creates a 30 second cycle time.
65
EngineersCommunity.com
7. By selecting the TankLevel tag in the logging window and selecting the Properties tab in the
Inspector window, we will modify the TankLevel archive tag to change the name to
Fill_Level_Archive, 1 second Acquisition cycle and 1 second logging cycle.
And
EngineersCommunity.com
screen. In the project you will connect this object with the archive tag
"Fill_Level_Archive". Hence, the values saved in the archive tag in Runtime are output as a
trend.
c. Add the required trend view, "WinCC OnlineTrendControl" (f(t) trend view), to the screen from
the "Tools" task card. The f(t) trend view has a "time axis" and a "value axis"
Make the Trend Control half the width of the page. We are going to add a Trend table
control later. In the Properties tab of the Inspector Area, check the “Show ruler “ box
located in the General property list.
67
EngineersCommunity.com
o Configure the appearance of the trend view under "Properties > Properties >
Appearance".
o Configure the properties of the trend view in Runtime under "Properties >
Properties > Window".
68
EngineersCommunity.com
5. Configure additional diagrams, if required.
A trend view is assigned a display range as standard, in which you can configure one or
more trends.
Alternatively, you can subdivide the display range into several "diagrams". Each
"diagram" functions like a standalone trend view. In this way, for example, temperature
changes can be displayed clearly without overlapping trends. You can set the height of a
diagram using "Range proportion". The "range proportion" establishes how much room is
made available to a diagram in the trend view.
The amount of each range proportion can be calculated from the total number of range
components. If, for example, you have configured a total of three diagrams, a range
proportion of "1" each will result in three diagrams of equal size. To increase the size of
range components in relation to each other, increase the range proportion of one or more
diagrams. Changes to the range proportions immediately affect the trend view.
69
EngineersCommunity.com
6. Configure the axes of the trend view in the Inspector window.
o Assign each axis to a diagram of the trend view.
1. Time: The time range for trend display is configured with time axes. In a
trend view you can create several time axes, which you can assign to one
or more diagrams.
If you assign several time axes to a trend view, the sequence of the time
axes in the Inspector window corresponds to the sequence in the trend
view. If several time axes are aligned to the same side of a trend display,
the first time axis in the list takes the lower left position. The last time axis
takes the upper right position.
The time axis is available only with the f(t) trend display.
2. Value: In a trend view you can create several value axes, which you can
assign to one or more diagrams.
If you configure a value axis for the f(t) trend view, you can also set up
axis sections. A value range and a display name are assigned to an axis
section.
To always update the trends assigned to the time axis in the trend view,
activate "Online".
7. Enter the trends in the Inspector window that are shown in the trend view:
o Define the "data source" for each trend. Select Logging Tags in the Data source
70
EngineersCommunity.com
In the tag blank, select Data_log_1\Fill_level_Archive.
o Assign each trend the "diagram" in which it will be displayed. We did not define
a diagram so the default will suffice..
o Assign the axes to each trend. The defaults, Time Axis and Value Axis are the
only ones we defined
o Configure the view of each trend. The default, trend_view_1, is the only one we
defined.
8. Configure the toolbar and status bar of the trend view.
The General Toolbar tab contains the location of the toolbar, Top, Bottom, Right or Left.
71
EngineersCommunity.com
The Toolbar Buttons is where the configuration of the buttons is performed
The Security area also has the Persistence configuration as well. This is for what to do
with the online changes to the trend control.
72
EngineersCommunity.com
Configuring the Table View
To display tag values in tables in Runtime, add a table view to a screen. A time stamp is displayed for
each value. The values are displayed in value columns, and the time stamps in time columns. Assign the
time column to one or several value columns.
1. Add the required table view to the screen from the "Tools" task card.
Place it next to the Trend View and make it half the width of the screen . If it doesn’t fit
well you can rearrange the screen to put the controls above and below each other. You
can use the Layout task card to Zoom the graphic so you can see the entire screen
73
EngineersCommunity.com
Adjust it until you get the look you want.
74
EngineersCommunity.com
o Configure the basic properties of the table view, e.g. "Time base", under "Properties >
Properties > General".
o Configure the appearance of the table view under "Properties > Properties >
Appearance".
The defaults will suffice but you can experiment with the colors
75
EngineersCommunity.com
o Configure the properties of the table view in Runtime under "Properties > Properties >
"Window".
The defaults will suffice for everything except the Window title, change this to
Fill Level Table.
76
EngineersCommunity.com
o Configure one or more time columns with the time ranges for the table. Type in a
Label, Fill Time,
o Configure the value column. The main items to configure are the column label
o And the data source. The data source is the same as the trend view.
o Assign time columns to the value columns. There is only one time column so the default
will suffice.
77
EngineersCommunity.com
4. Configure the appearance of each trend:
o Configure the "Headers", the "Structure" and the "Grid". Take
Defaults.
78
EngineersCommunity.com
79
EngineersCommunity.com
o If needed, configure the settings for "selecting" table entries. Take
Defaults
o If needed, configure the settings for sorting table entries. Take the
defaults
5. Configure the toolbar and status bar of the table view. Take the defaults
80
EngineersCommunity.com
81
EngineersCommunity.com
6. If required, configure the data export from the table view.
The data export defaults in most cases will suffice. \you may want to specify a comma
instead of a semi-colon for the delimiter
82
EngineersCommunity.com
7. If required, configure the security settings of the table view.
The security and \persistence options are the same as for the Trend View.
2. Under the Screens tab, select “Sample” and left mouse click. Asterisks appear above, to the
right and below “Sample”. These allow you to insert a new entry. Choose to enter below
“Sample”
83
EngineersCommunity.com
4. In the Inspector window, properties tab, General properties enter Trendscreen for the name
and in the
events tab enter ”Add function” enters “ActivateScreen” and choose the Trends screen.
Introduction
When you activate a project, additional program modules will be loaded to execute Runtime. Select the
Runtime Settings, Services to specify the applications that will be started o activation of a project.
“Screens in Runtime” is always started and is enable by default. Start only the applications required in
Runtime t obtain the highest performance level.
84
EngineersCommunity.com
Procedures
1. Open the Runtime Settings, Services editor.
The “Screens in runtime” setting is already checked. We must check “Data logging in runtime.”
2. Enable the display of the online help in Runtime by activating "Enable help in Runtime". This is
found in the General tab.
85
EngineersCommunity.com
We will return later to enable the “Alarm logging in runtime”.
Procedure
1. Start simulation by selecting the PC Station in the project tree. The Select Online from the Menu
bar. In the Online menu, select “Simulation with tag simulator”.
The runtime will appear and a popup will appear while the simulator is loaded.
86
EngineersCommunity.com
3. In the tag browser window that opens, select Internal tags in the left window and TankLevel in
the right window.
87
EngineersCommunity.com
6. Observer the output of the simulation values in the Trends screen.
A window will pop up asking where to save the Tag Simulation configuration. The project
directory is the best place.
88
EngineersCommunity.com
8. Deactivate the project
Creating Reports
A report is created and edited in the "Reports" editor. In this editor, you configure the following report
items:
Formal appearance
Specify the formal layout of the report in the Inspector window. In this window, for example,
you specify the page format, page margins, title page, back page, headers, or footers for the
report.
89
EngineersCommunity.com
Moreover, you can specify whether to output the different pages with or without watermark in
the reports for Runtime Professional.
Content
In the work area, specify the content of the report, for example, the alarms of a shift. To this
purpose, insert the corresponding objects into the detail page(s).
You can also design the title page, back page, headers, and footers as you please. For
watermarked pages, create additional pages to be included as "background image" in the
output.
The modular structure lets you configure reports that suit all of your applications.
Report Output
In Runtime Advanced, the configured reports are output on the default printer of the HMI device.
For Runtime Professional, make the following decisions with the help of a print job:
Structure of reports
Introduction
A report in WinCC consists of several sections that can be enabled or disabled, as required
90
EngineersCommunity.com
Sections of a report
The following figure shows an example of the different sections of a report in the "Reports" editor.
The title page contains important information about the report content. The back page is used, for
example, to provide contact information of shift managers or service technicians. The title page and
back page are output separately on a single page. The page has a precise length and no page break,
regardless of whether you configured a dynamic object to be output on that page.
Detail page
Configure the output of runtime data such as recipe or alarm reports on the detail pages of the report.
Use the shortcut menu on the detail page to insert additional detail pages or change their order.
The header and footer are output on each detail page of the report. You typically insert the project
name, report name, page numbers or the date in the header or footer.
Watermarks
The title, detail and back pages can be output with a watermark. The page is printed with its
superimposed watermark.
With the help of a watermark, output an object "A" next to an object of variable length "B" without
displacing object "A". Example: You want to output an output field (A) next to a table (B) on all pages.
The title and back pages, as well as the detail pages have separate watermarks.
91
EngineersCommunity.com
Working with reports
Creating Reports
Principles for parathion of reports
Introduction
A report in WinCC consists of several sections that can be enabled or disabled, as required.
Title page
Back page
Detail pages
Headers and footers for the detail pages
Procedure
The following figure shows the general procedure for creating a report
92
EngineersCommunity.com
1) Settings depend on the report object used.
Steps
Procedure
1. Double-click "Add new report" under "Reports" in the project navigation. Or left click on “reports” and select
“Add new report”:
93
EngineersCommunity.com
Open the new report if it is not displayed in the "Reports" editor.
2. Select the "Report properties" command in the shortcut menu of the report.
94
EngineersCommunity.com
3. In the "Properties > Properties > General" area of the Inspector window, specify whether you want to configure
the "Title page", "Back page", "Header" and "Footer" in the report.
95
EngineersCommunity.com
4. Configure the format, the page layout, and the page margins of the report under "Properties > Properties >
Layout." Change the Format to Letter, the Alignment to Portrait and the unit to
US
5. Enter the name Data_logging_TankLevel under "Properties > Properties > Miscellaneous."
Drag and drop the necessary basic objects, elements, graphic images and controls from the "Tools" task card to
the required position.
1. Header
o Drag the Project name and the Report name from the Toolbox > Elements category. Expand the
field sizes to accommodate the length of the text.
96
EngineersCommunity.com
And drop in the \header
2. Footer
o Drag the date Time and Page number elements to the footer. Expand the field sizes to
accommodate the length of the text.
3. Body
o To display the TankLevel table view, drag the table view from the Toolbox > Controls
97
EngineersCommunity.com
In the Inspector Window > Properties > Value columns > Data source: use the dropdown menu
to select Data_log_1\Fill_level_Archive for the tag. The time Column needs to expanded to
allow the full date time to be displayed. Use the defaults for the rest of the settings
5. In the Work area, double click on “Add new” to add a new print job.
98
EngineersCommunity.com
o Rename the print job, “GS_Print_job
o Select the print job, “ Data_logging_TankLevel”
o Return the Table view Properties >General properties > Print job to specify the print job that
was just configured, GS_Print_job”
99
EngineersCommunity.com
o Save the project and go to menu bar > Online Start > with tag simulator. When the Simulation
window appears, select Start Simulation. Then go to the Trends page. After the values start
appearing the table view, click on the printer icon in the Toolbar to execute the print job.
Executing the print job pauses the Table view. Aft the report is printed, use the control to
restart.
6. Stop the tag simulation and close the Tag Simulator before closing the runtime simulation
Alarm logging allows you to display and record operating states and faults on the HMI device that are
present or occur in a plant. Alarm logging processes various alarm procedures used by the PLC and the
HMI device. The alarm procedures can be broken down into system-defined alarms and user-defined
alarms:
The detected alarm events are displayed on the HMI device. You can use the alarm logging system to log
alarms from the ongoing process. Targeted access to the alarms combined with supplementary
information about individual alarms ensures that faults are localized and cleared quickly. This reduces
stoppages or even prevents them altogether.
Introduction
The alarm types serve various purposes for monitoring the plant. The alarms from the individual alarm
types are configured and triggered in different ways.
100
EngineersCommunity.com
Select the relevant tab in the "HMI alarms" editor to configure alarms based on the individual alarm
types.
User-defined alarms
Analog alarms
o Analog alarms are used to monitor limit violations.
Discrete alarms
o Discrete alarms are used to monitor states.
User alarms
o User alarms serve to monitor operator input.
o User alarms are triggered by means of alarm number and can be also used in scripts in
Runtime.
Controller alarms
o You configure controller alarms in STEP 7.
o You continue to process the controller alarms in WinCC.
System-defined alarms
System events
o System events belong to the HMI device and are imported into the project.
o System events monitor the HMI device.
Alarm States
Introduction
An alarm assumes various alarm states in Runtime. The user analyzes and reports on the process
execution with reference to the alarm states.
101
EngineersCommunity.com
Description
Every alarm has an alarm status. The alarm states are made up of the following events:
Incoming (I)
The condition for triggering an alarm is satisfied. The alarm is displayed, such as "Boiler pressure
too high."
Outgoing (O)
The condition for triggering an alarm is no longer satisfied. The alarm is no longer displayed as
the boiler was vented.
Acknowledge (A)
The following table shows the alarm states for alarms that do not have to be acknowledged:
The following table shows the alarm states for alarms that have to be acknowledged:
102
EngineersCommunity.com
acknowledged after this time
IA Incoming, The condition for an alarm is satisfied. The operator has acknowledged
acknowledged the alarm.
IAO Outgoing The condition for an alarm is no longer satisfied. The operator
but acknowledged acknowledged the alarm while the condition was still satisfied.
first
Many alarms occur in a plant. These are all of different importance. You can assign the alarms of your
project to alarm classes to clearly show the user which of the alarms are most important.
Description
The alarm class defines how an alarm is displayed. The alarm class specifies if and how the user has to
acknowledge alarms of this alarm class.
The "Speed of fan 1 in upper tolerance range" alarm has "Warnings" alarm class. The alarm is
displayed with a white background. The alarm does not have to be acknowledged.
The "Speed of fan 2 has exceeded upper warning range" alarm is assigned to the "Errors" alarm
class. The alarm is displayed with a red background and flashes at high frequency in runtime.
The alarm is displayed until the user acknowledges it.
Use the following alarm classes to define the acknowledgment model and display of alarms for your
project:
103
EngineersCommunity.com
You cannot delete predefined alarm classes and edit them only to a limited extent. Predefined
alarm classes have been created for each HMI device under "HMI alarms > Alarm classes".
The following alarm classes already created in WinCC for every HMI device:
"Warnings"
The "Warnings" alarm class is designed to show irregular statuses and routines
in the process. Users do not acknowledge alarms from this alarm class.
"Errors"
The "Errors" alarm class is intended to show critical or dangerous states or limit
violations in the process. The user must acknowledge alarms from this alarm
class.
"System"
The "System" alarm class contains alarms that display states of the HMI device
and the PLCs.
"Diagnosis Events"
The "Diagnosis Events" alarm class contains alarms that display states and
events in SIMATIC S7 controllers. Users do not acknowledge alarms from this
alarm class.
You can create new alarm classes under "HMI alarms > Alarm classes", configure how you want
the alarms to be displayed, and define an acknowledgment model for alarms of this alarm class.
The possible number of custom alarm classes depends on which runtime is used in your project.
Common alarm classes are displayed under "Shared data > Alarm classes" in the project tree and
can be used for the alarms of an HMI device. Common alarm classes originate in the alarm
configuration of STEP 7. If needed, you can create additional common alarm classes in WinCC.
104
EngineersCommunity.com
Alarm components and properties
Overview
You configure the components of alarms in WinCC. The following table shows the basic components of
alarms:
Alarm Alarm Time of Date Alarm Alarm Alarm Tooltip Trigger tag Limit
class number day Status text Group value
Alarm class
Alarm classes, such as "Warnings" or "Errors". The alarm class defines the following for an
alarm:
Acknowledgment model
Appearance in Runtime (e.g. color)
Logging
Alarm number
An alarm is identified by a unique alarm number. The alarm number is assigned by the system.
You can change the alarm number to a sequential alarm number, if necessary, to identify alarms
associated in your project.
Every alarm has a time stamp that shows the time and date at which the alarm was triggered.
105
EngineersCommunity.com
Alarm status
An alarm has the events "Incoming," "Outgoing," "Acknowledge." For each event, a new alarm
is output with the current status of the alarm.
Alarm text
The alarm text can contain output fields for current values. The values you can insert depend on
the Runtime in use. The value is retained at the time at which the alarm status changes.
Alarm group
Tooltip
You can configure a separate tooltip for each alarm; the user can display this tooltip in Runtime.
Trigger tag
Each alarm is assigned a tag as trigger. The alarm is output when this trigger tag meets the
defined condition, e.g. when its state changes or it exceeds a limit.
Limit value
Analog alarms indicate limit violations. Depending on the configuration, WinCC outputs the
analog alarm as soon as the trigger tag exceeds or undershoots the limit value.
You use the alarm class to define how an alarm will be displayed in runtime and to define the
acknowledgment model for it.
106
EngineersCommunity.com
o Configure the tags for your project.
o You create range values for the tags.
To output configured alarms, configure an alarm view or an alarm window in the "Screens"
editor.
Additional tasks may be necessary for configuring alarms, depending on the requirements of your
project:
You can import system events when you initially open the "System events" tab in the "HMI
alarms" editor. On completion of the import, you can edit the system events.
For integrated operation of a project in STEP 7, specify the controller alarms to be displayed on
your HMI device in the alarm settings.
Assign the alarms of your project to alarm groups based on their relation, e.g. by error cause
(e.g. "power failure"), or by error source (e.g. "Motor 1").
Configuring Loop-In-Alarm
107
EngineersCommunity.com
Creating alarm classes
Introduction
Create alarm classes in the "Alarm classes" tab of the "HMI alarms" editor. Some default alarm classes
are already created for every project. You can create additional custom alarm classes. You can configure
up to 256 alarm classes per project.
Procedure
A new alarm class is created. Each new alarm class is automatically assigned a static ID.
The properties of the new alarm class are shown in the Inspector window.
2. Configure the alarm class under "Properties > Properties >General" in the Inspector window:
o Enter “GSAlarm_class” for the "Name" and the "Display name".
o Activate the “Log" check box .
3. Select "Properties > Properties > Acknowledgment" in the Inspector window to define the
acknowledgment model for the alarm class and alarm annunciator.
108
EngineersCommunity.com
Take the defaults
4. You can edit the default text under "Properties > Properties > Status" in the Inspector window.
This text indicates the status of an alarm in Runtime. Take the defaults.
5. You can also change the default background and foreground colors under "Properties >
Properties > Colors" in the Inspector window.
These settings define how alarms from this alarm class are displayed in Runtime. Take the
109
EngineersCommunity.com
defaults.
Comments in Runtime
The user enters a comment for an incoming alarm in Runtime, as required. Using the buttons of the
alarm view, users can show the comments in the "Historical alarm list" display. You can configure this
function in the alarm class. Enter the user in the "User name" system block.
Any user can enter the first comment if a comment has yet to be entered.
When the first comment has been entered, all other users have read-only access to it.
110
EngineersCommunity.com
Use comment of the incoming alarm
Whenever the status of an alarm changes, for example, from "incoming" to "acknowledged" status, the
alarm is output once again with another status. The user only assigns comments to one incoming alarm.
To include comments for alarm output with the new status, proceed as follows:
Introduction
An alarm display is made up of alarm text blocks. Each alarm text block corresponds to one column in
the table in the alarm view.
System blocks
System blocks contain system data, such as date, time, alarm number and status.
User text blocks contain the alarm text with the description of the cause of a fault and additional
text with information, for example, the location of a fault.
Parameter blocks
Parameter blocks are used to link the alarms to process values, such as current fill levels,
temperatures or speeds. You can configure up to 10 parameter blocks per alarm.
You enable and edit the alarm text blocks on the "Alarm text blocks" tab. To display alarm text blocks in
an alarm view, select the alarm text blocks to be displayed and logged from the enabled alarm text
blocks in the "Screens" editor.
111
EngineersCommunity.com
Properties of Alarm Text Blocks
Text length
Set the length of the parameter block to 32 characters to ensure that all characters will be
displayed.
Note
The status texts of the alarms are displayed in the "Status" system block. This system block must
be configured so that it is long enough to display the status texts in full.
Flashing
An alarm to be acknowledged or single alarm text blocks can be displayed as flashing in Runtime. They
have to meet the following requirements:
The "Flashing" property must be enabled in the alarm class of the alarm. You configure this
property on the "Alarm classes" tab.
The "Flashing" option is enabled in the "Alarm text block" area under "General" in the Inspector
window for alarm text blocks that should flash.
Alignment
On the "Alarm text blocks" tab, you define whether the alarm text block should be right-justified, left-
justified or centered in an alarm view column.
Format
For certain alarm text blocks, you can choose between different display formats.
112
EngineersCommunity.com
Configuring Alarm Text Blocks
Introduction
An alarm is made up of configured alarm text blocks. You enable the alarm text blocks for an HMI device
on the "Alarm text blocks" tab. Then you select, from the enabled alarm text blocks for each alarm view,
which enabled alarm text blocks are to be displayed and logged.
1. Select the Alarm Text blocks tab , then select the "System blocks", "User
text blocks" or "Parameter blocks" tab for the alarm text blocks.
2. Select the System blocks tab , Date. And change the format to MM/DD/YY
Make the length for Alarm text 25. Change “Additional text 1” length to 15 and check the enable box.
4. Under "Shared data > Text lists" in the project navigation, define the display names for the user
text blocks.
113
EngineersCommunity.com
5. Select the System_AlarmServices_TextNameList
1. Select the tabs for the alarm text blocks that you want to disable.
2. Disable the alarm text blocks that you no longer want to use for alarm view and alarm logging.
3. Repeat the process for every alarm text block that you no longer want to display.
Discrete alarms triggered by the PLC indicate status changes in a plant. They indicate the opened or closed state of a valve
The following sections describe the configuration procedures in the "HMI alarms" editor. You can also configure d
tags" editor.
Procedure
114
EngineersCommunity.com
To configure a discrete alarm, proceed as follows:
1. Create a new tag, Inflow_Valve, Unsigned integer, in the HMI tag, Tag table_1
5. To configure the alarm, select "Properties > Properties >General" in the Inspector window:
o You can always change the object name of the alarm.
o Select the alarm class and the alarm group, if necessary.
o To display the CPU number or PLC that sends the alarm, enter these in the "Connection" area. This optio
enabled the "CPU/PLC number" alarm text block on the "Alarm text blocks" tab.
115
EngineersCommunity.com
Take the defaults
6. Select "Properties > Properties > Trigger" in the Inspector window to select the tag and the bit that triggers the
information:
o Use data types "Bool" "USInt", "UInt", or "UDInt".
o Use trigger tag bits only for alarms.
o Do not use trigger tags for anything else.
116
EngineersCommunity.com
Note
If the object does not yet exist in the selection list, create it directly in the object list and change its
properties later.
Note
The trigger bit is not incremented automatically if you generate a discrete alarm by copying an alarm
text to a new table row. Avoid any redundant use of the trigger bit.
Notice
Note the method used to count bits in the utilized PLC when specifying the bit. For more information,
refer to the "Communication" section in the PLC Online Help.
7. Select "Mode" to specify whether to trigger the alarm at a rising or falling edge.
8. To configure the alarm text, select "Properties > Properties > Alarm texts".
o To enter the alarm text, select "Alarm text".
o To create additional alarm texts, select "Additional texts".
o Use the functions of the shortcut menu to format text on a character-by-character basis and to insert p
Note
You can only enter additional text in the rows that you have enabled as user text blocks on the
"Alarm text blocks" tab.
Enter the Alarm text = “Valve open” and Point of Error = “Inflow Valve”
Result
9. Repeat steps, create the following properties for the second bit message:
o Message tag: "Inflow_Valve"
o Message bit: 3
117
EngineersCommunity.com
o Message text: "Valve closed"
o Point of error: "Inflow Valve"
10. Repeat steps, create the following properties for the third bit message:
o Message tag: "Inflow_Valve"
o Message bit: 4
o Message text: "Valve inop"
o Point of error: "Inflow Valve"
To output process values to an output field in the alarm text, assign corresponding tags to the parameter blocks. Proceed
Insert the activated process values as selection box into an alarm text, or show them as parameter block in the
Note
118
EngineersCommunity.com
To show the process values as parameter blocks, the parameter blocks must be enabled in the alarm view.
You only edit parameters that you have enabled under "Parameter blocks" on the "Alarm text blocks" tab.
In the "HMI alarms" editor, you can configure analog alarms and define their properties. You can also configure analog ala
Procedure
119
EngineersCommunity.com
A new analog alarm is created.
3. To configure the alarm, select "Properties > Properties >General" in the Inspector window:
o You can always change the object name of the alarm.
o Select the alarm class and the alarm group, if necessary.
4. To display the CPU number or PLC that sends the alarm, enter this under "Connection to the PLC". This option is
the "CPU/PLC number" alarm text block on the "Alarm text blocks > System blocks" tab.
5. In the Inspector window, select TankLevel as tag that triggers the alarm under "Properties > Properties > Tri
anything else.
6. To configure the alarm text, select "Properties > Properties > Alarm texts".
o To enter the alarm text, select "Alarm text"
o To create additional alarm texts, select "Additional texts".
o Use the functions of the shortcut menu to format text on a character-by-character basis and to insert o
parameters.
Note
You can only enter additional text in the rows that you have enabled as user text blocks on the "Alarm
Defining limits
120
EngineersCommunity.com
1. Select the analog alarm to which you want to assign the limits.
2. On the bottom of the work area, click <Add> under "Limits for analog alarm".
o In the Inspector window, click the button under "Properties > Properties > Trigger > Value" and se
o Enter the required limit value.
Note
If the object included in the selection does not yet exist, create it in the object list and change its properties late
Note
121
EngineersCommunity.com
If a process value fluctuates around the limit, the alarm associated with this fault may be triggered multiple tim
deadband or delay time.
8.
Proceed as follows to enter a tolerance range for the arrival or departure of an alarm:
122
EngineersCommunity.com
To set the priority, proceed as follows:
If you filter the alarm view by priority, the alarm with priority 0 will appear at the top.
To display system or alarm parameters, insert an appropriate output field in the analog alarm.
123
EngineersCommunity.com
o Computer name
o Comments
o Application Name
Procedure
1. Type in the text , “Tank level out of limits”. Place the cursor at the end of the alarm text.
2. To output an alarm parameter, right click and select "Insert parameter output field in analog alarm"
3. Specify the length, number of decimal places, tolerance, and alignment of the output field for alarm parameters
o Parameters = Limit
o Length = 3
o Decimal places = 0
o Alignment = Right
o Leading Zero = No check
124
EngineersCommunity.com
To display leading zeros in the output field, enable "Leading zeros".
WinCC inserts a placeholder for the output field into the alarm text:
Note
If you test a project using the simulator, the output field values are not output in the alarm texts.
Select the output field in the alarm text and then select the "Delete" command from the shortcut menu.
Note
The sequence of output fields in the alarm text depends on the language. The sequence of the Runtime language is used
125
EngineersCommunity.com
file.
Changing the tag of an output field in one language causes the modified output field to appear at the end of the alarm te
changes the sequence of the output fields in the log.
Introduction
Current, and logged alarms are displayed in the alarm view. Alarms from all alarm classes are displayed in an alarm view,
for alarm filtering.
Procedure
126
EngineersCommunity.com
2. Rename the screen, Alarms.
3. Insert an "Alarm view" object from the "Tools" task card into the screen.
4. Select the alarm view and click "Properties > Properties > General" in the Inspector window.
127
EngineersCommunity.com
o Under "Display > Type", select the “Pending alarms” as default in the alarm view.
o Under "Display > Display" select “Visible alarms” to be displayed. This shows or hides the alarms to be s
o Double-click by the operator on an alarm in Runtime starts a specific action. The action is specified und
want to trigger the Loop-In-Alarm not only using the "Loop-In-Alarm" button, select "Loop-In-Alarm". Le
action.”
128
EngineersCommunity.com
o Select the required time base under "Time base".
5. To specify the appearance of the alarm view, select "Properties > Properties > Appearance" in the Inspector win
6. To specify the appearance of the headers, content, and table grid in the alarm view, select "Properties > Proper
o To specify the visualization of selected alarms in Runtime, select "Properties > Properties > Table > Tabl
129
EngineersCommunity.com
Selection".
o To specify the sorting method for alarms in Runtime, select "Properties > Properties > Table > Table -
Sorting".
7. To specify the sort order of alarms in Runtime, select "Properties > Properties > Alarm list" .
130
EngineersCommunity.com
8. Select the “Properties > Properties > Columns to add the Point of Error to the columns displayed.
1. Select "Properties > Properties > Blocks > Inherit project settings for alarm text blocks" in the Inspector window
settings from the "Alarm text blocks" tab in the "HMI alarms" editor to this alarm view.
2. Select "Properties > Properties > Blocks" to enable the alarm text blocks to be visualized in the alarm view. You
properties for each alarm text block:
o Label (Name)
131
EngineersCommunity.com
o Title as (Layout of the header)
o Content as (Layout of content)
o Alignment
o Length
o Format
o Flashing
1. To specify the toolbar layout, select "Properties > Properties > Toolbar > Toolbar -
General".
2. Select "Properties > Properties > Toolbar > Toolbar - Buttons", to enable the operator input elements to be inclu
132
EngineersCommunity.com
3. To specify the status bar layout, select "Properties > Properties > Status bar > Status bar - General".
4. Select "Properties > Properties > Status bar > Status bar - Elements", to enable the elements to be included in th
133
EngineersCommunity.com
Result
Alarms of various alarm classes are output in the alarm view during runtime. To change the view in Runtime, click the con
toolbar.
Procedure
1. From the Taskbar > Toolbox > Elements, select a Slider and place on the screen.
2. In the Inspector window, Properties > Properties > General configure as follows:
134
EngineersCommunity.com
Adding an I/O field
An I/O field will be added to trigger the Discrete alarms previously configured.
Procedure
1. From the Taskbar > Toolbox > Elements, select an I/O Field and place on the screen
2. In the Inspector window, Properties > Properties > General configure as follows:
135
EngineersCommunity.com
3. In the properties > Properties > Miscellaneous change the name to Inflow_valve.
Font = 24 pixels,
Horizontal alignment = Right
Vertical alignment = Middle
Result
136
EngineersCommunity.com
Modifying the menu
1. Open the Main menu from the Screen Management folder in the Project tree. You can
double click on the Menus and Toolbars and select the Menu tab in the Working
window or you can select Screen Management and then double click on main in the
Details view.
2. Under the Screens tab, select “Trends” and left mouse click. Asterisks appear above, to
the right and below “Trends”. These allow you to insert a new entry. Choose to enter
below “Trends”
137
EngineersCommunity.com
3. In the Text box that appears type “Alarms”
4. In the Inspector window, properties tab, General properties enter Alarmscreen for the
name
and in the events tab enter ”Add function” enters “ActivateScreen” and choose the
Alarms screen.
138
EngineersCommunity.com
Revising the Start Sequence
Procedures
1. Open the Runtime Settings, Services editor.
Procedure
1. Select the HMI_RT_1 in the project tree to ensure the simulator has focus.
139
EngineersCommunity.com
4. The Tanklevel should be in Low alarm (less than 10) Move the slider to 100 to put it in High
Alarm. Observe the alarm control.
5. Acknowledge the alarms with the Group Acknowledge button . The result should
look like this
6. Now to trigger the discrete alarms. Enter the following values in the I/O field.
100,
1000,
10000
140
EngineersCommunity.com
7. Enter 0 in the I/O field then acknowledge the alarms with the Group Acknowledgement button
8. Change the slider value to less than 90 but greater than 10 and view the alarm control.
Procedure
1. Start simulation by selecting the PC Station in the project tree. The Select Online from the Menu
bar. In the Online menu, select “Simulation with tag simulator”.
The runtime will appear and a popup will appear while the simulator is loaded.
141
EngineersCommunity.com
3. In the tag browser window that opens, select Internal tags in the left window and TankLevel in
the right window.
142
EngineersCommunity.com
5. Repeat the process to add Inflow_Valve
7. Observe how the different simulation values affect the message window.
143
EngineersCommunity.com
8. Close the " Tag Simulation" after ending the simulation. Save the simulation in the project
directory for future use.
11. Deactivate the project with the Stop Runtime button on the toolbar
12. This completes the Getting Started project
144
EngineersCommunity.com