Simatic
Simatic
Caution:
The functions and solutions described in this entry are mainly limited to the
realization of the automation task. In addition, please note that suitable security
measures in compliance with the applicable Industrial Security standards must be
taken, if your system is interconnected with other parts of the plant, the company’s
network or the Internet. For more information, please refer to Entry ID 50203404.
http://support.automation.siemens.com/WW/view/en/50203404
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
2 Version 1.0, Entry ID: 68679830
s Task Description 1
Automation Solution 2
Integrating WinCC into
the SIMATIC Manager 3
Subfunctions
History 10
General Example
Version 1.0, Entry ID: 68679830 3
Warranty and Liability
Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The application
examples do not represent customer-specific solutions. You are responsible for
ensuring that the described products are used correctly. These Application
Examples do not relieve you of your responsibility to use safe practices in
application, installation, operation and maintenance. 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 shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
4 Version 1.0, Entry ID: 68679830
Preface
Preface
Objective of this application
This document describes how STEP 7 and WinCC are used to solve an automation
task.
The sensors (binary and analog values) and the actuators (valves, motors) of a
plant are the basic components for each automation project. Technology blocks
required for the configuration of basic automation tasks are not included as
standard features in the scope of delivery of STEP 7 and WinCC. Basic automation
tasks include the following functions:
• Processing of the information received from sensors and actuators
• Controlling the actuators
Configuring the basic automation functions is the prerequisite for the configuration
of higher-level automation tasks, e.g. control functions or step chains.
• the individual configuration examples of the blocks for usage in your own
projects.
The table below shows all blocks included in this application:
Table 1-1
Block No. Description
BST_DIGITAL FB650 Visualization and operation of digital signals.
BST_ANALOG FB640 Visualization and operation of analog signals.
BST_COUNT FB654 Numerical rectangle integrator, e.g. simulation of a fill
level. (without faceplate)
BST_FF FB653 Visualization and operator control of a FlipFlop
BST_ILOCK FB651 Visualization and operator control of a logic gate
AND/OR with 8 inputs
BST_VALVE FB630 Visualization and operator control of a binary valve
BST_MOTOR FB620 Visualization and operator control of a motor with fixed
speed and rotational direction
BST_SIMODIR FB611 Visualization and control of the motor management
system SIMOCODE Pro as direct starter.
BST_SIMOREV FB610 Visualization and control of the motor management
system SIMOCODE Pro as reversing starter.
BST_MM4 FB681 Visualization and control of the MICROMASTER 440
frequency converter
BST_SINAG120 FB680 Visualization and control of the SINAMICS G120
frequency converter.
BST_PIDCTRL FB670 Visualization and operator control of a software-
implemented PID controller for regulating technical
parameters with continuous input and output values.
BST_LAG FB656 Simulation of a controlled system (without faceplate)
BST_SPLITR FB657 Splitting an actuating signal for two opposing actuators,
e.g. heating and cooling (without faceplate)
BST_SIPART FB690 Visualization and control of the positioner SIPART PS2
PA.
General Example
Version 1.0, Entry ID: 68679830 5
Preface
Main contents
This application describes the creation and configuration of basic automation
functions. It provides detailed information on the configuration of technology
blocks, for example, blocks for the processing of binary and analog values and for
the control of valves and motors. The structure of these technology blocks enables
plant operation in different modes (local, manual, automatic and simulation mode).
Furthermore, it describes how these technology blocks are called and interlinked in
STEP 7 and WinCC. To do so, an example plant has been configured which
includes several binary and analog values, valves and motors. This example
project also shows how the individual technology blocks are interconnected (basic
automation). Higher-level automation functions (two-step and PID control) are also
configured.
Based on the example plant, this application describes how the automatic functions
can be tested without real connection to the process with minimum effort. In this
way, automatic functions can be tested already during the configuration phase (e.g.
in the office). For this purpose, the technology blocks are provided with a
“Simulation ON” function. The feedback signals from sensors and actuators are
simulated by the technology blocks themselves. It simulates, for example, the
“Valve OPEN” feedback after the output of the “Valve OPEN” control command.
Furthermore, individual blocks for the simulation of different control functions are
available, e.g. to simulate the temperature or filling level of a container.
WinCC V7.0 or a later version also includes the “Faceplate type” object type. This
Copyright Siemens AG Copyright-2013 All rights reserved
application describes how the “Faceplate type” object type can be used to variably
design block icons in process pictures.
General Example
6 Version 1.0, Entry ID: 68679830
Table of Contents
Table of Contents
Warranty and Liability ................................................................................................. 4
Preface .......................................................................................................................... 5
1 Task Description ................................................................................................ 9
1.1 Requirements ....................................................................................... 9
1.2 Requirements for the control program ............................................... 10
1.3 Requirements to the visualization ...................................................... 11
2 Automation Solution ....................................................................................... 14
2.1 WinCC in the SIMATIC Manager integrated with CFC ...................... 14
2.2 Alternative solutions ........................................................................... 17
2.2.1 WinCC integrated in the SIMATIC Manager without CFC ................. 17
2.2.2 Separate configuration of WinCC and SIMATIC Manager................. 17
2.2.3 Using the “Basic Process Control” option .......................................... 18
2.2.4 Using PCS 7 ....................................................................................... 18
2.3 Hardware requirements ...................................................................... 19
2.4 Software components used ................................................................ 19
3 Integrating WinCC into the SIMATIC Manager.............................................. 22
3.1 Installing WinCC ................................................................................. 22
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 7
Table of Contents
10 History............................................................................................................... 67
General Example
8 Version 1.0, Entry ID: 68679830
1 Task Description
1 Task Description
1.1 Requirements
For automating a process engineering plant with STEP 7 and WinCC it makes
sense to describe the individual automation functions in detail prior to project start.
The following information for a process engineering plant should always exist
before the project start:
• Process flowsheets
In one or several process flowsheets the plant is represented with the
individual process tags. The individual aggregates and the respective pipes are
represented. In the process flowsheet the individual process tags are included
with the process tag names. The process flowsheets normally form the basis
for generating the WinCC process pictures.
• Process tag list
The process tag list contains all process tags with name and respective
detailed information.
Example:
The process tag name is “TIC120”, for example. The name contains the
Copyright Siemens AG Copyright-2013 All rights reserved
following information.
– “T” The recorded physical variable is a temperature.
– “I” The temperature is recorded as analog value.
– “C” The temperature is used for regulation.
– „120“ The process tag has the unique number “120”.
The detailed information contains, for example, the following information:
Process tag comment (short description e.g. temperature of Tank 120)
Manufacturer of the field device.
Type of measuring transmitter (e.g. 4..20mA)
Value range (value range top and bottom)
Unit of measurement.
• Interlock list
The interlock list contains the information of those process tags which must be
interlocked under certain conditions. If a process tag is locked the respective
device of the process tag takes on the safety position.
Example
The supply valve of a container must be closed if the filling level monitoring of
the container sends the “Container full” signal or if the process tag for filling
level monitoring has failed.
• Signal flow charts, function descriptions
Signal flow charts or function descriptions often describe production processes.
This information often provides the basis for creating automation functions or
step chains.
General Example
Version 1.0, Entry ID: 68679830 9
1 Task Description
General Example
10 Version 1.0, Entry ID: 68679830
1 Task Description
Figure 1-1
Copyright Siemens AG Copyright-2013 All rights reserved
Using this process picture, some requirements regarding the visualization shall be
explained.
General Example
Version 1.0, Entry ID: 68679830 11
1 Task Description
• The classic WinCC group display shall not be used in the user project. For the
classic group display the icons for the different message types are displayed
next to each other. This may waste valuable space. The display of a group
warning, for example, is not important if a group alarm or process tag error
occurs simultaneously. The individual information of a group display shall, if
possible, be superimposed according to priority. This may considerable reduce
the size of a block icon. For example, the display of a warning can be
superimposed by the display of an alarm or process tag failure.
Uniform representation
Equal functions (e.g. simulation ON/OFF, manual/automatic, ...) in different blocks
shall each be displayed in the same way.
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
12 Version 1.0, Entry ID: 68679830
1 Task Description
General Example
Version 1.0, Entry ID: 68679830 13
2 Automation Solution
2 Automation Solution
2.1 WinCC in the SIMATIC Manager integrated with CFC
In this application WinCC is used as integrated project. The WinCC project has
been integrated in the SIMATIC Manager (STEP 7). The process tags of an
automation project are configured in the CFC of STEP 7. Each process tag is
generated in a separate CFC chart. In the CFC the message texts as well as texts
for process tag names, process tag comments and units are configured. The
information is then transferred to WinCC by means of a compilation process.
Prior to the start of the configuration the existing process tags are grouped together
according to different process tag types. For example, there are binary values,
analog values, valves and pumps. A separate block (block type) is created for each
process tag type. For most block types of this application an additional block icon
and faceplate is created for operator control and monitoring.
In the course of this application the following technology blocks have been created:
Table 2-1
Copyright Siemens AG Copyright-2013 All rights reserved
Block Description
BST_DIGITAL Binary value display
Display of a binary signal with the option of time delay, negation of the
input signal and simulation.
BST_ANALOG Analog value display
General Example
14 Version 1.0, Entry ID: 68679830
2 Automation Solution
Block Description
BST_SIMODIR SIMOCODE direct starter
Monitoring 8 binary input signals for AND/OR logic. Input and output
can be simulated separately and negated.
This block for example, is called by other faceplates to display
interlock conditions during runtime.
BST_FF Visualizable RS-Flip-Flop
This block splits the output signal of a PID controller (0%..100%) into
two analog or binary output signals.
This enables, for example, using the output signal of a PID controller
to control a controller with two actuators. (e.g. temperature control with
heating and cooling circuit)
BST_MM4 MICROMASTER 440
General Example
Version 1.0, Entry ID: 68679830 15
2 Automation Solution
The technology blocks described above are provided with the respective sources.
Note Before using the blocks in your own projects, check their proper functioning and
adjust them to your individual requirements where necessary. The blocks
described in this application are only intended as a template for creating your
own blocks.
The example project of this application shows the use of technology blocks by
means of an example plant.
The example plant consists of several binary and analog values, valves and
motors. For each process tag an independent CFC chart was generated in STEP 7
in which the respective block type is called and interconnected. Higher-level
automation functions (two-step and PID control) are also configured.
The following figure gives an example of the work screen on a configuration system
for STEP 7 and WinCC.
Figure 2-1
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
16 Version 1.0, Entry ID: 68679830
2 Automation Solution
• Editor CFC
The right side of the screen contains an opened CFC chart. It displays the
interconnection of two valve blocks (BST_VALVE) in test mode. The signals can be
monitored and controlled online.
• WinCC Runtime
WinCC Runtime is visible in the back. Some block icons and pipes are displayed in
the process picture. The bottom left corner contains an opened faceplate of the
“BST_MOTOR” block type.
Using the STEP 7 option CFC (Continuous Function Chart) is not necessary. The
STEP 7 configuration may occur in the conventional way in STL, LAD or FBD. If
the WinCC project has been integrated in the STEP 7 project, the following
configuration data from the STEP 7 project can be transferred to the WinCC
project:
• Tags (Tag Management)
Copyright Siemens AG Copyright-2013 All rights reserved
The procedure for configuring the technology blocks described in this application
can also be applied to projects where WinCC has not been integrated in the
SIMATIC Manager. The main differences are:
• Configuration data (tags, messages, texts) for WinCC are not automatically
transferred to WinCC by a compilation process of STEP 7.
• The chronological alarm reporting (e.g. ALARM_8P) cannot be used. The bit
alarm procedure must be used.
General Example
Version 1.0, Entry ID: 68679830 17
2 Automation Solution
The WinCC “Basic Process Control” option provides functions for picture
management and for calling up faceplates. The “Basic Process Control” option is
available free of charge as of WinCC V6.0, it can be selected during the installation
of WinCC.
The layout of the runtime, for example, (number and resolution of the screens) can
be configured. The process pictures can be filed in order in the picture tree. The
configuration occurs as in PCS 7.
The WinCC “Basic Process Control” option (process control options) contains no
technology blocks (e.g. motor, valve). These must be generated by the user. The
procedure in this document can be used.
Note The WinCC “Basic Process Control” option can also be used if WinCC has not
been integrated in the SIMATIC Manager. However, the overview area of
Runtime then contains WinCC group displays which are not supplied with valid
values. A possible remedy is omitting the “Basic Process Control” or proceeding
according to the FAQ with entry ID 17778440.
Copyright Siemens AG Copyright-2013 All rights reserved
Plant hierarchy
Without PCS 7 only the “Component view” is available to the user in the SIMATIC
Manager. All charts for configuring the process tags are filed in the “Charts” folder.
When using PCS 7 there are additional views in the SIMATIC Manager. In the
“Plant view”, for example, it is possible to create hierarchy folders. This enables
structuring the plant, e.g. “Plant > Unit > Function”. The configured Plant Hierarchy
is displayed by the picture tree (Picture Tree Manager) during runtime.
Faceplate Designer
The faceplate designer is only available for PCS 7. It is an aid for configuring
faceplates.
General Example
18 Version 1.0, Entry ID: 68679830
2 Automation Solution
Table 2-2
Component Qty.
Development system 1 PC for the configuration of the control functions and of
WinCC. The usual hardware requirements for STEP 7
and WinCC apply.
S7-400 CPU 1 The technology blocks of this application use the
chronological message procedure (ALARM_8P).
Therefore an S7-400 CPU is required.
Alternatively, the controller can also be simulated with
PLCSIM.
Copyright Siemens AG Copyright-2013 All rights reserved
Table 2-3
Component Note
STEP 7 V5.5 SP3 S7-PLCSIM and S7-SCL are included in the scope of
Professional delivery.
• S7-PLCSIM can be used for simulation.
• S7-SCL is used for the creation of control blocks.
CFC V8.0 SP2 CFC is used for the easy interconnection of blocks.
Additionally, CFC offers the option to transfer texts (process
tag comment, units, interlock information, …) to WinCC.
WinCC V7.2 Install AS-OS Engineering and Object Manager as well
WinCC WebNavigator V7.2
SIMATIC PDM V6.0 SP3 Used to configure the special field devices, SIMOCODE pro,
MICROMASTER 440 and SINAMICS G120.
SIMOCODE ES 2007 SP1 Used to configure a special field device: SIMOCODE pro.
General Example
Version 1.0, Entry ID: 68679830 19
2 Automation Solution
Example project
The figure below shows the setup of the example project: Only an S7-400 and a
SIMATIC PC station are used for configuring and starting WinCC Runtime. The S7-
400 can alternatively be simulated with PLCSIM.
The following list includes all files and projects used in this example.
Table 2-4
Component Note
BST_EXAMPLE.zip This zip archive contains the example project.
The file was generated with the “Archive…” function of
the SIMATIC Manager and can be extracted again with
the “Retrieve…” function.
BST_EXAMPLE_DOC_e.pdf This document.
BST_FILES.zip This ZIP archive contains the block library for STEP 7
as well as all necessary WinCC pictures and scripts to
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
20 Version 1.0, Entry ID: 68679830
2 Automation Solution
The following screenshot shows the opened STEP 7 “BST_Example” project in the
SIMATIC Manager.
Figure 2-2
Copyright Siemens AG Copyright-2013 All rights reserved
Note The “Sources” folder of the S7 programs contains the sources of the technology
blocks.
The “Blocks” folder contains the completely compiled and preconfigured blocks
(with alarms, messages and units).
The “Charts” folder contains the CFCs. The CFCs represent the configuration of
an example plant. It is shown how the technology blocks are interconnected to
configure a plant.
General Example
Version 1.0, Entry ID: 68679830 21
3 Integrating WinCC into the SIMATIC Manager
Note General notes on the integration of WinCC into the SIMATIC Manager are
available:
• in the FAQ with entry ID 11841504
How do you integrate an existing WinCC project into a STEP 7 project?
• in the FAQ with entry ID 22272911
How should you proceed when "chronological reporting" is to be used, but
WinCC has been installed before STEP 7?
Copyright Siemens AG Copyright-2013 All rights reserved
Note To determine the correlation between message classes in STEP 7 and WinCC
the independent “GETMSGCLAS” PC station was created the SIMATIC
Manager.
General Example
22 Version 1.0, Entry ID: 68679830
4 Creating the Blocks
4.1 Interfaces
The following interfaces have been standardized for all blocks and can be used on
demand:
Table 4-1
Name In I/O Out Type Description
LOCK x BOOL Interlock
ERR_EXTERN x BOOL External error
LIOP_SEL x BOOL Connection or operation selected
L_AUT x BOOL (linked) manual/automatic mode
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 23
4 Creating the Blocks
Thereafter the individual bits can be used in the usual order of bit[0] to bit[31].
General Example
24 Version 1.0, Entry ID: 68679830
4 Creating the Blocks
General Example
Version 1.0, Entry ID: 68679830 25
4 Creating the Blocks
The blocks “Alarm8P” and “Notify8P” are called for the chronological reporting.
Signals 5 to 8 of “Alarm8P” are each reserved for standard error messages and of
“Notify8P” for standard status messages. Signals 1 to 4 respectively are available.
Figure 4-3
Copyright Siemens AG Copyright-2013 All rights reserved
Figure 4-4
General Example
26 Version 1.0, Entry ID: 68679830
4 Creating the Blocks
For the bit alarm procedure the signals are transmitted to the “QwAlarm” HMI alarm
tag. The messages must be created in the WinCC Alarm Logging and be
configured with the respective bits of “QwAlarm”.
Bits 4-7 of “QwAlarm” are reserved for standard error messages and bits 12-15 of
“QwAlarm” are reserved for standard status messages. Bits 0-3 (error) and bits 8-
11 (status) are at free disposal.
Figure 4-5
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 27
5 Configuration of the Screen Management Functions
Note This section is only significant if you are not using the OS project editor. When
using the OS project editor, screen management functions (change process
picture, open faceplate) are available by default.
Note The “Alarm.pdl” picture does not serve the actual picture management. It can be
loaded into the workspace to display messages.
General Example
28 Version 1.0, Entry ID: 68679830
5 Configuration of the Screen Management Functions
In the WinCC Control Center you define the WinCC picture, downloaded during the
start of Graphics Runtime, with “Computer properties > Graphics Runtime”. Select
the “@BST_Main_1M.pdl” image for the single monitor mode or the
“@BST_Main_2M.pdl” image for the two monitor mode as start picture.
When using several monitors, the Graphics Runtime is not executed separately for
each monitor, but one Graphics Runtime supplies all monitors. This means that the
picture size of the start screen must fill the entire display area of all monitors.
Figure 5-1
Copyright Siemens AG Copyright-2013 All rights reserved
Example:
If two monitors are used next to each other and each monitor has a resolution of
1280x1024 pixels, the start screen should have a resolution of 2560x1024. In this
case, the following figure shows the configuration of the “@BST_Main_2M.pdl”
start screen in the Graphics Designer.
Figure 5-2
Note The WinCC Web client represents an exception. For a WinCC web client the
WinCC Runtime runs completely within the Internet Explorer, whereby the
Internet Explorer can be executed several times (also with WinCC).
General Example
Version 1.0, Entry ID: 68679830 29
5 Configuration of the Screen Management Functions
5.1.2 Desktop
Figure 5-3
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
30 Version 1.0, Entry ID: 68679830
5 Configuration of the Screen Management Functions
5.1.3 Header
Figure 5-4
Copyright Siemens AG Copyright-2013 All rights reserved
The “@BST_WORK.pdl” picture in return contains a picture window into which the
actual process picture can be downloaded. The following figure shows the
“@BST_WORK.pdl” picture. During runtime start the “Overview.pdl” process
picture is displayed. In the “@BST_WORK.pdl” picture you define the WinCC
process picture to be displayed during Runtime start.
General Example
Version 1.0, Entry ID: 68679830 31
5 Configuration of the Screen Management Functions
Figure 5-5
Copyright Siemens AG Copyright-2013 All rights reserved
5.1.5 Footer
General Example
32 Version 1.0, Entry ID: 68679830
5 Configuration of the Screen Management Functions
Figure 5-6
General Example
Version 1.0, Entry ID: 68679830 33
6 General Configuration of Faceplates
Note This section is only important if you are not using the OS project editor. When
using the OS project editor, picture management functions (open a process
picture, open a faceplate) are available as a standard. You can then open a
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
34 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
The picture windows have the object names “TOP01” to “TOP10”. The following
function is called when clicking a block icon:
int BST_TopfieldOpen(char*, char*, char*)
Parameter
char *lpszPictureName Absolute name of the picture from which the
function was called.
char *lpszObjectName Name of the clicked object.
General Example
Version 1.0, Entry ID: 68679830 35
6 General Configuration of Faceplates
• set the “Tag prefix” property of the picture window with the prefix of the
determined tag and
• set the “Display” property of the picture window to “TRUE”.
General Example
36 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
Using the “ANALOG” faceplate, the figure below illustrates which WinCC pictures
compose the faceplate.
Figure 6-3
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 37
6 General Configuration of Faceplates
General Example
38 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
The graphic elements of a block are configured in the individual views of a block. In
order make variable changes, the types of dynamization “direct tag connection” or
“dynamic dialog” are used. The following figure shows the variable change of the
display of an error bit with the dynamic dialog.
Figure 6-4
Copyright Siemens AG Copyright-2013 All rights reserved
This picture illustrates the configuration using the tag prefix. For variable changes
in the faceplate no complete tag names are specified, but only the names of the
individual structure elements of a block type. When opening the faceplate the tag
prefix of the faceplate is set via the “BST_TopFieldOpen()” script. This accesses
valid process tags during runtime.
Operator logging is not realized in the example project. A possible procedure for
configuration is described in the FAQ entry 24325381 “How to create user-defined
operator messages in WinCC?”
General Example
Version 1.0, Entry ID: 68679830 39
6 General Configuration of Faceplates
In the block icon mainly WinCC status displays are used for dynamizing.
For the various characteristics (states) of a block, separate status displays are
configured. Although individual blocks differ in their main function, they often
contain similar functions that are displayed in the same way:
• Display local / remote operation
“Remote” operating mode
“Local” operating mode
• Display manual / automatic operation
“Manual” operating mode
“Automatic” operating mode
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
40 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
Figure 6-5
Copyright Siemens AG Copyright-2013 All rights reserved
Note The “Export…” function of the Graphics Designers is used to save the individual
picture files for a status display as a meta file (EMF).
This application uses a WinCC object of the “Faceplate type” to display a block
icon. WinCC V7.0 or a later version also includes the “Faceplate type” object type.
Alternatively, a block icon can also be configured as “user object”. The main
advantage of a “Faceplate type” as opposed to a “User object” is the central
changeability.
For each block icon of a block there is a WinCC picture of the “FPT” type. The file
name has the structure “BST_<TYPICAL>_ICON.FPT”.
The following screen shows the faceplate types existing in the example project.
General Example
Version 1.0, Entry ID: 68679830 41
6 General Configuration of Faceplates
Figure 6-6
Copyright Siemens AG Copyright-2013 All rights reserved
If it is necessary to take into account the alignment in the process picture, two
icons were created. e.g.: “BST_VALVE_ICON.fpt” and “BST_VALVEH_ICON.fpt”.
Figure 6-7
These block icons only differ in the alignment of the status displays. The function is
identical for both.
The faceplate types are configured with different objects: Status displays, graphic
objects, text fields, etc. For each faceplate type an input/output field named
“Trigger_QdwState” has been created. The “Output value” property of the object is
placed outside, below the “QdwState” property name.
General Example
42 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
Figure 6-8
Copyright Siemens AG Copyright-2013 All rights reserved
With this property, the “QdwState” process tag is connected. If the value of
“QdwState” changes, a VB script is executed internally which transmits the
individual bits or bit groups from “QdwState” to the internal faceplate tags. The
script has been configured at the event “Selected Properties > Input/Output >
Output value” of the “TRIGGER_QdwState” object.
The following tags of faceplate types are configured using the example of
“BST_ANALOG_ICON.fpt”:
General Example
Version 1.0, Entry ID: 68679830 43
6 General Configuration of Faceplates
Figure 6-9
Copyright Siemens AG Copyright-2013 All rights reserved
Note In a faceplate type only the “Direct tag connection” dynamization types and VB
script are possible.
To keep the number of process tags as low as possible (optimizing the licensing
costs) all binary information of a process object is transferred to WinCC in a 32
bit tag (“QdwState”).
General Example
44 Version 1.0, Entry ID: 68679830
6 General Configuration of Faceplates
In order to save space there shall be no static display of the process tag name at
the block icon. The process tag name shall be shown on demand for all block
icons. For example, a screen shot of a process picture can then be created in
which all configured process tags are labeled. Persons with little background
knowledge of the actual process can quickly find certain process tags in the
process pictures with this function. If the process tag names are no longer required,
they can be hidden again.
For this reason, a “szTagName” text object is configured at each faceplate type
and the properties “Display” and “Text” are placed on the outside.
The process tag name is configured at the “szTagNameText” property of the
faceplate type. The “szTagNameVisible” property is connected with an internal
WinCC tag, which is responsible for showing/hiding the text field. In the example
project, the value of the tag is inverted via the “Paper clip” button.
Figure 6-10
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 45
7 Configuring Technology Subfunctions
Status signals
The technology blocks (FBs) of this application use the “QdwState” (DWORD)
output to summarize different binary states in a tag (e.g. feedback “Valve OPEN”,
“Valve CLOSED”, “Valve execution time monitoring”) and to transfer it to WinCC.
Using the “QdwState” tag, 32 binary signals (DWORD) can be transferred. The
“QdwState” tag is used for dynamization of the process pictures.
General Example
46 Version 1.0, Entry ID: 68679830
7 Configuring Technology Subfunctions
Control signals
The blocks use the “QdwState” (DWORD) input/output signal to transfer binary
control commands from the WinCC runtime (switching commands of the operator)
to the control program (e.g. commands, “Valve OPEN”, “Valve CLOSED”,
“Simulation On/Off”). In the “OP_dwCmd” tag up to 32 commands can be
summarized.
The bit assignment of the “QdwState” tag has been selected for different block
types so that similar signals have the same bit position.
The following bits of “QdwState” are reserved:
Table 7-1
Bit Signal
QdwState [16] 0 = manual 1 = automatic
QdwState [17] 0 = local 1 = remote
QdwState [18] 0 = process 1 = simulation
QdwState [24] General error
QdwState [25] external error
QdwState [26] Error interlock
QdwState [27] Interlock pending
General Example
Version 1.0, Entry ID: 68679830 47
7 Configuring Technology Subfunctions
General Example
48 Version 1.0, Entry ID: 68679830
7 Configuring Technology Subfunctions
The blocks for S7-300 controllers use the bit alarm procedure to store messages in
WinCC Alarm Logging. These messages can be displayed and acknowledged in
runtime with WinCC Alarm Control.
At the output of the blocks, the “QwAlarm” (WORD) tag and internally a 16 bit array
“QabAlarmPLC” were created for this.
Figure 7-4
Copyright Siemens AG Copyright-2013 All rights reserved
Bits 0-3 and 8-11 are configured individually for each block. With this method the
messages are not transferred to WinCC and must therefore be created manually
there for each block.
Note Compared to the bit alarm procedure, the use of the STEP 7 message blocks
“ALARM_8P” and “NOTIFY_8P” considerably reduces the time and effort
required for WinCC message configuration. The messages are generated in the
course of OS compilation with WinCC Alarm Logging.
General Example
Version 1.0, Entry ID: 68679830 49
7 Configuring Technology Subfunctions
The different control commands of a block type are managed centrally within
WinCC Global Script in the “BST_HEADER.h” header file. The identifiers in
“General BST Commands” are universal and are used by all blocks. They assign
bits 16-31 of the control word. Bits 0-15 of the control word can be used for
individual commands.
Figure 7-6
General Example
50 Version 1.0, Entry ID: 68679830
7 Configuring Technology Subfunctions
If the operator presses the button of a faceplate in WinCC Runtime, the following
function is called up:
int BST_COMMAND(DWORD)
Parameter
DWORD dwCmd Contains the respective command bit for the command to be
executed.
The identifiers of the command bits are defined in the
“BST_FPDEF.h” header file.
Returned value
int The function always returns the value (int) 0.
Figure 7-7
The “BST_COMMAND()” function is called and the bit (bit 21) contained in the
“BST_CMD_SIMULATION” identifier is transferred.
Figure 7-8
General Example
Version 1.0, Entry ID: 68679830 51
7 Configuring Technology Subfunctions
Example:
The control program contains the “Simulation ON” instruction of an operator of
WinCC (control tag “OP_dwCmd” bit 21 was set).
The following program code is executed.
Figure 7-9
Copyright Siemens AG Copyright-2013 All rights reserved
Your block is in the simulation mode (QSIM := TRUE). At the end of the block the
control word is reset.
Figure 7-10
General Example
52 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
8.1 S7 program
The program for the automating system was configured using CFC.
A CFC chart was created for each unit. An additional “General” chart was created
to show an overview of all created blocks in WinCC.
Figure 8-1
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 53
8 Descriping the Sample Project
Unit 100 represents a simulated tank. The medium in the tank can be filled,
drained, mixed, heated and cooled.
The following respective objects are configured in the “Unit_100_Tank” CFC chart:
Table 8-1
Object Process tag Description
BST_FF_400 Unit_100_Sim Switching simulation mode of the
actuators for Tank 100 on/off
Unit_100_Auto Switching automatic mode of the
actuators for Tank 100 on/off
Unit_100_Lock Blocking actuators for Tank 100.
BST_ILOCK LIOP_SEL Blocking the HMI operation of the
actuators for Tank 100
BST_VALVE_400 V101 Supply valve
V102 Drain valve
V103 Valve heating circuit
V104 Valve cooling circuit
BST_MOTOR_400 E101 Agitators
E103 Pump heating circuit
E104 Pump cooling circuit
BST_ANALOG_400 LEVAN101 Analog value display for filling level
BST_DIGITAL_400 WH_T100 Upper filling level mark
WL_T100 Lower filling level mark
BST_COUNT LEV101 Filling level simulation Unit 100
General Example
54 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
Unit 200 represents a simulated tank. The medium in the tank can be filled,
drained, mixed and heated.
The following respective objects are configured in the “Unit_200_Tank” CFC chart:
Table 8-2
Object Process tag Description
BST_FF_400 Unit_200_Sim Switching simulation mode of the
actuators for Tank 200 on/off
Unit_200_Auto Switching automatic mode of the
actuators for Tank 200 on/off
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 55
8 Descriping the Sample Project
Unit 300 represents a pump station for transferring the medium from unit 200 to
unit 100.
The following respective objects are configured in the “Unit_300_Balance”CFC
chart:
Table 8-3
Object Process tag Description
BST_VALVE_400 V301 Valve
BST_MOTOR_400 E301 Pump
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
56 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
General Example
Version 1.0, Entry ID: 68679830 57
8 Descriping the Sample Project
The picture shows, how the blocks created for this application can be used in a
plant. The process picture is displayed at Runtime start or can be called via the
“Home” button.
The picture is saved in the WinCC project under the name “Overview.pdl”.
Figure 8-4
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
58 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
This screen displays all currently pending alarm messages. These can be
acknowledged here at a central location.
The picture is saved in the WinCC project under the name “Alarm.pdl”.
Figure 8-5
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
Version 1.0, Entry ID: 68679830 59
8 Descriping the Sample Project
This screen displays all blocks of this example application. For a process
connection the “General” CFC chart was created and all S7 blocks were also
configured. In this screen, the blocks are also represented which were not adopted
in the process picture. These are:
• BST_SIMODIR
• BST_SIMOREV
• BST_MM4
• BST_SINAG120
These blocks here can only run in simulation mode.
In this screen you can also have the interfaces and icon configurations displayed
for all blocks.
The picture is saved in the WinCC project under the name “General.pdl”.
Figure 8-6
Copyright Siemens AG Copyright-2013 All rights reserved
General Example
60 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
This screen is used for system diagnosis. The current values use the special
WinCC “SYSTEM INFO” driver channel. You receive information on the processor
load, storage load as well as load of the data carrier.
The picture is saved in the WinCC project under the name “PCDiagSysInfo.pdl”.
Figure 8-7
Copyright Siemens AG Copyright-2013 All rights reserved
Note This process picture is taken from the example application for monitoring the
SIMATIC PC hardware. The example project is also offered to you in this entry
as a download. However, please note that a complete function requires special
SIMATIC PC hardware.
General Example
Version 1.0, Entry ID: 68679830 61
8 Descriping the Sample Project
The filling levels of both containers can be regulated via the inlet valves (V101,
V201) and the outlet valves (V102, V202). As illustrated in the process picture
opening the “V101” valve causes a filling of the “Unit 100” container. The current
filling level is displayed at the bar and as decimal value at the analog block. If the
container is full, this is displayed at the “U100HL” digital block. “U100LL” shows if
the container is empty.
Figure 8-8
Copyright Siemens AG Copyright-2013 All rights reserved
The figure displays the faceplate of the valve (V101). Valve (V101) is opened,
valve (V102) is closed. The tank is filled.
The temperatur of the medium is simulated using the block (U100_TEMP). The
controller (CTU100) uses the block (U100_SPLIT) to control the binary control of
the valves (V103, V104) and pumps (E103, E104). If the setpoint value (SP) is
changed at the faceplate of the control, it controls the valve and the motor
accordingly for cooling or heating. The valves and pumps of the heat exchanger
are for this reason not enabled (local mode and automatic mode).
Raising the temperature opens the valve (V103) and starts the pump (E103). If the
heating circuit is activated, the actuators (V104, E104) of the cooling circuit are
locked (Interlock). They can therefore not be activated by another process.
General Example
62 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
Figure 8-9
In the figure the faceplate of the control (CTU100) is opened. The setpoint value
Copyright Siemens AG Copyright-2013 All rights reserved
was raised from 30 °C to 60 °C. The control opens the valve (V103) and starts the
pump (E103). The “heating” operating mode is displayed by the “Heating” icon.
Using the valve (V301) and the pump (E301) of “Unit 300” the medium can be
transferred from “Unit 200” to “Unit 100”. The requirement for transferring the
medium is that tank (Unit 100) is not full and tank (Unit 200) is not empty. If one of
both cases has occurred, the valve (V301) cannot be opened (Interlock). The motor
(E301) can only be started if the valve (V301) was opened.
General Example
Version 1.0, Entry ID: 68679830 63
8 Descriping the Sample Project
Figure 8-10
Copyright Siemens AG Copyright-2013 All rights reserved
In the figure the valve (V301) is opened and the motor (E301) is started. The
medium is transferred from “Unit 200” to “Unit 300” until the pump has stopped, the
“Unit 200” tank is empty, or the “Unit 100” tank is full.
The analog displays (U100_VALUE) and (U200_VALUE) show the filling level as
decimal value and are configured with alarm and warning limits. The messages are
visible in the alarm view of the respective faceplates or in the “Alarm picture” of the
project.
If one of the states reaches “Unit 100” full or “Unit 200” empty, valve (V301) and
pump (E301) are blocked and go to the “Interlock error” state. The error must be
reset prior to renewed operation.
General Example
64 Version 1.0, Entry ID: 68679830
8 Descriping the Sample Project
Figure 8-11
Copyright Siemens AG Copyright-2013 All rights reserved
The switches Simulation and Automatic are active, the valves (V101, V102) and
the motor (E101) are therefore in simulated automatic mode. As long as one of the
switches is active, the actuators for operation in WinCC are blocked, the “Local
mode” is displayed again with the “HMI Settings locked” signal. If all states
(Simulation, Automatic and Interlock) have been reset again, the respective blocks
must be set manually to remote operation at the faceplate so they can be operated
again.
General Example
Version 1.0, Entry ID: 68679830 65
9 Links & Literature
General Example
66 Version 1.0, Entry ID: 68679830
10 History
Topic Title
\12\ Faceplates for Step 7 http://support.automation.siemens.com/WW/view/en/66839614
V11 and
WinCC Runtime Advan
ced V11
\13\ Faceplates for Step 7 http://support.automation.siemens.com/WW/view/en/66839614
V11 and
WinCC Runtime Advan
ced V11
\14\ Configuration http://support.automation.siemens.com/WW/view/en/68014632
instruction to create
faceplates for Comfort
Panels and WinCC
Runtime Advanced
\15\ SENTRON PAC http://support.automation.siemens.com/WW/view/en/67318600
faceplates for WinCC
Runtime Professional
\16\ Example blocks for http://support.automation.siemens.com/WW/view/en/31624179
STEP 7 V5.4 and
WinCC V7.0
Copyright Siemens AG Copyright-2013 All rights reserved
10 History
Table 10-1
Version Date Modifications
V1.0 06/2013 First version
General Example
Version 1.0, Entry ID: 68679830 67