Download as pdf or txt
Download as pdf or txt
You are on page 1of 106

Application Description 06/2015

Example Blocks for


WinCC (TIA Portal) and
STEP 7 (TIA Portal)
(for S7-1500 in SCL)

http://support.automation.siemens.com/WW/view/en/66839614
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility of safely and professionally using, installing, operating
and servicing equipment. 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 within 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 will be excluded. Such an exclusion will not
apply in the case of mandatory liability, e.g. under the German Product Liability Act
(“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body
or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
Siemens AG 2015 All rights reserved

(“wesentliche Vertragspflichten”). The compensation for damages due to a breach


of a fundamental contractual obligation is, however, limited to the foreseeable
damage, typical for the type of contract, except in the event of intent or gross
negligence or injury to life, body or health. The above provisions do not imply a
change of the burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens Industry Sector.

Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
https://support.industry.siemens.com.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Task ..................................................................................................................... 5
1.1 Overview............................................................................................... 5
1.2 Problem description.............................................................................. 6
2 Solution............................................................................................................... 7
2.1 Overview............................................................................................... 8
2.2 Hardware and software components ................................................. 10
2.2.1 Validity ................................................................................................ 10
2.2.2 Components used .............................................................................. 10
3 Basics ............................................................................................................... 12
3.1 Library objects .................................................................................... 12
3.2 Faceplates .......................................................................................... 14
3.3 Screen window ................................................................................... 15
4 Mode of Operation ........................................................................................... 16
4.1 Faceplate ............................................................................................ 16
4.2 Screen window ................................................................................... 21
4.2.1 Overview of the components of the screen window ........................... 23
4.3 Tags.................................................................................................... 37
4.3.1 Tags with function tasks ..................................................................... 38
Siemens AG 2015 All rights reserved

4.3.2 General tags – Signal values ............................................................. 42


4.3.3 General tags – Controller parameters ................................................ 44
4.3.4 General tags – Limit values ................................................................ 46
4.3.5 Tags with function tasks without controller connection ...................... 50
4.4 Control and status signals .................................................................. 51
4.4.1 Processing of switching commands in the controller ......................... 51
4.4.2 Evaluating process states and displaying them in WinCC ................. 53
4.4.3 Actual value Real value / S7-I/O ........................................................ 55
4.4.4 Setpoint / manual value specification ................................................. 57
4.4.5 Local/remote switchover..................................................................... 59
4.4.6 Determine controller values................................................................ 61
4.4.7 Manipulated variable limit ................................................................... 63
4.4.8 External error / block locked ............................................................... 66
5 Installation and Commissioning .................................................................... 68
5.1 Software installation (download) ........................................................ 68
5.2 Commissioning WinCC ...................................................................... 70
5.3 Commissioning the PLC ..................................................................... 79
6 Configuration and Settings............................................................................. 83
7 Operating the Application ............................................................................... 86
7.1 Navigation .......................................................................................... 87
7.2 Faceplate icon .................................................................................... 90
7.3 Screen window ................................................................................... 92
8 Block Connectors .......................................................................................... 101
8.1 Input parameters .............................................................................. 101
8.2 Output parameters ........................................................................... 103
9 Further Notes ................................................................................................. 104
10 Links & Literature .......................................................................................... 105
10.1 Bibliographic references ................................................................... 105

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 3
Table of Contents

10.2 Internet link specifications ................................................................ 105


11 History............................................................................................................. 106
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 4
1 Task

1 Task
1.1 Overview
Introduction
The example blocks for STEP 7 (TIA Portal) and WinCC Professional enable the
user to utilize various automation functions or to use these blocks as templates for
the configuration of individual blocks.
The sample configuration shows how the technology blocks are called and
interconnected in STEP 7 and WinCC Professional.
The advantages when using faceplates and screen window technology in
WinCC Professional shall also be illustrated:
Making changes from a central location
– When changes are made to one faceplate, all other locations where this
faceplate is used will be updated automatically.
– Screen windows shall enable several instances to call identical screens, so
this also applies for screen windows technology.
Re-usability in other projects
– Organizing the screen objects for WinCC Professional in a global library
enables using them further in another project without problems.
Siemens AG 2015 All rights reserved

Reducing the configuration effort


– It shall be possible to integrate frequently used automation components
quickly into an existing configuration.
– The screen objects for WinCC Professional shall be entirely interface-
compatible with the faceplates of WinCC Advanced (identical blocks in the
controller).
– The screen objects for WinCC Professional shall be structured so they can
be used as the basis for the user to create his own screen objects without
extensive workload.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 5
1 Task

1.2 Problem description


The application is divided into technology block “PIDCtrlV2” (FB 700) for the
controller family S7-1200/S7-1500, and the respective screen objects for WinCC
Professional.
They are used to visualize and control a configurable software-based PID controller
to control technical processes with continuous input and output variables.

Requirements of the automation task


The block offers the following functions:
Local/Remote mode
Real / I/O value
Setpoint specification
Manual value specification
PID algorithm
Guided controller optimization via technology object
Reversing the control direction
Interconnecting external errors
Interconnection of interlocks
Siemens AG 2015 All rights reserved

Alarm view
Limit value configuration

The following errors are evaluated, displayed in the screen window and saved in
Alarm Logging:
High Limit
Low Limit
Warning, limit violation
External error
Interlock

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 6
2 Solution

2 Solution
The application describes the configuration of technology block “PIDCtrlV2”
(FB 700) for the controller family S7-1200/S7-1500, and the respective screen
objects for WinCC Professional.
They are used to visualize and control a configurable software-based PID controller
to control technical processes with continuous input and output variables.
To calculate the variables the block uses the “PID_Compact” (Version 2.2)
standard block from the “PID Control Blocks” standard library.
The graphics editor of the respectively used technology object can be used for
configuration and commissioning.

NOTICE Before using the block in your own projects, check the proper functioning
of the block and adjust it to your individual requirements where necessary.
The block described in this application is only intended as a template for
creating your own blocks.

Note A copy of the technology blocks for the controller is already contained in the
example project and connected at the screen object. The controller blocks of
the example project, however, are not maintained and do not represent the
Siemens AG 2015 All rights reserved

current state of development.


The latest version of the technology blocks for the controller is available in a
separate project library of this application.
The screen objects for WinCC Professional are entirely interface-compatible
with the faceplates of WinCC Advanced. The technology blocks can hence
be used for the controller without modifications.
For simulating the control characteristic, technology block “PIDCtrlV2” (FB 700) is
interconnected in the example project with a PT1 element "PROC_C" (FB 100). The
PT1 element is not part of the library and is therefore not required in real mode.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 7
2 Solution

2.1 Overview
Schematic layout
The following illustrations show the block in the controller (left), the faceplate
(small), and the screen window (large) for controlling, operating and monitoring a
PID controller:
Table 2-1
Block Faceplate and screen window
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 8
2 Solution

Advantages

This application offers the following advantages:


Making changes from a central location
When changing a faceplate or screen, all usage locations of this faceplate are
updated and you save on multiple changes for all usage locations.
Re-usability in other projects
A library is offered as download. This makes it easy to use the faceplates in
your individual projects.
Reducing the configuration effort
Using these preassembled blocks saves on development expenses.
Basis for creating your own screen objects
The screen objects for WinCC Professional are designed so they can be used
as a basis for creating your own screen objects without greater workload.

Topics not covered in this application


This document is not a user guide for the TIA Portal, but only discusses the
configuration steps necessary for commissioning the screen objects.

Assumed knowledge
For this application it is assumed, that the user has basic TIA Portal V13 handling
Siemens AG 2015 All rights reserved

skills.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 9
2 Solution

2.2 Hardware and software components


2.2.1 Validity

This application is valid for


STEP 7 as of V13 SP1 Update 3
WinCC Professional ab V13 SP1 Update 3
S7-1200 and S7-1500

2.2.2 Components used

The application was created with the following components:

Hardware components
Table 2-2
Component No. Article number Note
Development 1 PC to configure the controller and
system WinCC Professional.
The hardware requirements for
STEP 7 and WinCC Professional
Siemens AG 2015 All rights reserved

apply.
S7-1200 CPU as of 1 6ES72..-1….-0XB0 Alternatively, the controller can
FW V4.0 also be simulated with PLCSIM
(as of TIA V13 SP1).
S7-1500 CPU 1 6ES751.-…00-0AB0 Alternatively, the controller can
also be simulated with PLCSIM.

Software components
Table 2-3
Component No. Article number
STEP 7 Professional V13 SP1 Update 3 1 6ES7822-1..03-..
WinCC Runtime Professional V13 SP1 Update 3 1 6AV2105-….3-0
WinCC Engineering V13 SP1 Update 3 1 6AV210.-….3-0

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 10
2 Solution

Sample files and projects


The following list includes all files and projects that are used in this example.
Table 2-4
Component Note
66839614_WCP_Faceplates_Demo_V13.zip The zip file contains the example
project (STEP 7 and WinCC
Professional) for the application.
66839614_WCP_Faceplates_Documentation_d.zip The zip file contains the documents
for all blocks of the application.
66839614_WCP_Faceplates_Library_V13.zip The zip-file contains a library with
the WinCC blocks of the application.
66839614_ Blocks_ Library_V13.zip The zip-file contains a library with
the STEP 7 blocks.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 11
3 Basics

3 Basics
Introduction
Understanding this application requires knowledge of
managing the library objects,
using faceplates and screen windows,
and the differences between faceplates and screen windows.

3.1 Library objects


The library provides two options for filing and using library objects.
Depending on this, they are managed in two different folders within the library and
show a different functionality:
Types
When using the library objects of the “Types” folder in your project, you create
instances of these types. The instances, that is, the usage locations in the
project, are bound to their respective type. If the type in the library changes, all
instances within the project also change.
Copy template
Siemens AG 2015 All rights reserved

For creating independent copies of a library object, you use the master copies.
The copies of these master copies in the project have no correlation with each
other after copying.
If a copy template is processed in the library, these changes do not affect the
copies. The individual copies and their changes in the project are independent
of each other.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 12
3 Basics

Note “Project library” as well as “Global library” both contain the two folders
“Master copies” and “Types”.
For changing the library types, the TIA Portal offers a sophisticated
management for managing several versions of a type and a specific release
of this version regarding the instances.
The usage of types is restricted to the following objects:
– Faceplates
– Screens
– Scripts
– UDTs
– Style sheets
Using master copies is principally possible for all objects with the exception
of faceplates.
You can copy the library objects between a global library and a project
library. The following applies here:
– you only copy the master copies to the “Master copies” folder or any
subfolder of “Master copies”.
– you can only insert types in the “Types” folder or any subfolder of “Types”.
– as soon as you add a library object from a global library into a screen, this
object will also be stored in the project library.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 13
3 Basics

3.2 Faceplates
Faceplates consist of a configured group of display and control objects which you
can manage and modify centrally in a library.

Usage
Faceplates are used to create individually configured display and control
objects.
A faceplate is used several times in the project or in several projects, as
required.
The faceplates are stored in the library as types.
A faceplate type can be edited in the “Faceplates” editor.
All instances of a faceplate in the project are changed centrally. This reduces
the configuration workload.
A faceplate does not support the display of complex objects and controls, for
example alarm or trend display.
A faceplate only supports VB scripts.
A faceplate has a defined interface which facilitates the integration into a
project (e.g. tag connection) considerably.
Siemens AG 2015 All rights reserved

Types and instances


To support central changeability, faceplates are based on a type-instance model.
The faceplate type is stored in the project library. When using the faceplate
type in a screen, you create an instance of the faceplate type.
In the faceplate type you specify the properties that can be changed at the
faceplate. When changing a property of a faceplate type, the property is stored
centrally and changed in all other instances as well.
The instances represent local locations where the types are used and are
bound to the respective faceplate type.
When configuring the properties at the faceplate instance, you overwrite the
properties of the faceplate type:
– For example, you assign the tag of your project to the faceplate.
– The changes at the faceplate are stored in the location of usage and have
no effects on the faceplate type.

Note Please note that a faceplate is always configured for a certain class of
operator panels. You cannot, for example, use a faceplate type configured
for “RT Professional” in a screen of the “RT Advanced” operator panel.
The number of instances of faceplates in a screen is not limited. Please note
that the performance when opening or updating a screen is affected by the
number of faceplate instances or the usage of scripts in the faceplate
instances.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 14
3 Basics

3.3 Screen window


With the “screen window” object you display other screens of the project in the
current window pane.

Usage
Use screen windows for displaying individually configured display and control
objects of one or several screens.
A screen window is used several times in the project or in several projects, as
required.
The screens of a screen window can be filed in the library as types or as
master copies.
Edit the screen of a screen window like any other screen in the screen editor.
After the screens of a screen window have been stored in the library as types,
they can be changed centrally in the project for all locations of usage. This
reduces the configuration workload.
A screen window also supports the display of complex objects and controls, for
example alarm or trend display.
The screen window itself as well as the screens displayed in it support C cripts
as well as VB scripts.
Siemens AG 2015 All rights reserved

You can use independent screen windows separately from the respective
screen. With respective hardware equipment and support from the operating
system you can also control several monitors and depict processes in a more
comprehensive and differentiated way.
A screen window has no defined interface. The tag connection is performed in
the displayed screens and is independent of the tag prefix of the screen
window. Multiple application (in other projects as well) therefore requires
extensive knowledge of the structure of the screens displayed in the screen
window.

Types and instances


In order to support the central changeability, the screens of a screen window in the
library must be stored as types.
If a screen has been stored in the project library as type, the following applies:
When using this screen within the project (e.g. a screen window), you create
an instance of the screen.
When changing a property of a screen type, the property is stored centrally and
also changed in all other instances.
The instances represent local locations where the types are used and are
bound to the respective screen type.
When configuring tags at the screen, and the screen is displayed in a screen
window, the tag name is composed of the tag prefix of the screen window and
the tag suffix of the screen.
Various tag instances of a UDT, and hence different tag addresses, can be
assigned to the screen window during runtime via the tag prefix.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 15
4 Mode of Operation

4 Mode of Operation
Introduction
Here you learn how faceplate and screen window interact, which functions they
have and how their connection with the controller is established.

Note The following chapter gives you a detailed insight into the blocks of this
application.
If you are only interested in operating the application example, you can directly
jump to the chapter “Operation of the Application”.

4.1 Faceplate
Figure 4-1
Siemens AG 2015 All rights reserved

Note The screen shows the faceplate in the configuration environment. The display
during runtime (RT) is described in the chapter “Operating the Application”.

Properties
The faceplate has the following properties:
Simplified status display
Opens the respective screen window via mouse-click
Contains no language-dependent objects
Has a defined interface

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 16
4 Mode of Operation

Parameter
Table 4-1
No. Path Usage
1. Properties > Miscellaneous > Name PIDCtrlV2_Icon_1
2. Interface > Label > Unit PIDCtrlV2_001.Unit
3. Interface > Process > ManValue PIDCtrlV2_001.OP_ManualValue
4. Interface > Process > SetPoint PIDCtrlV2_001.OP_Setpoint
5. Interface > Process > State PIDCtrlV2_001.QdwState
6. Interface > Process > Value PIDCtrlV2_001.ScaledInput
7. Animations > Tag connections > ManValue PIDCtrlV2_001.OP_ManualValue
8. Animations > Tag connections > SetPoint PIDCtrlV2_001.OP_Setpoint
9. Animations > Tag connections > State PIDCtrlV2_001.QdwState
10. Animations > Tag connections > Unit PIDCtrlV2_001.Unit
11. Animations > Tag connections > Value PIDCtrlV2_001.ScaledInput
12. Events > Click SetPropertyByConstant
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 17
4 Mode of Operation

Explanation
Table 4-2
No. Explanation
1. The name “PIDCtrlV2_Icon_1” was selected randomly.
However, it is important that it is only assigned once in a screen.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 18
4 Mode of Operation

No. Explanation
2. As shown in the screen, the interface of the faceplate has the properties “Unit”,
“Value”, “ManValue” and “SetPoint” for displaying the controller values, and the
property “State” to which all other objects point.
Siemens AG 2015 All rights reserved

The “QdwState” tag of the controller is connected at the “State” property of


the faceplate instance. It is required for displaying the status signals.
The “Unit” tag of the controller is connected at the “Unit” property of the
faceplate instance and is used for displaying the unit of the values.
The “ScaledInput” tag of the controller is connected at the “Value” property of
the faceplate instance and is used for displaying the actual value.
The “OP_ManualValue” tag of the controller is connected at the “ManValue”
property of the faceplate instance. It is used for displaying and entering the
manual value.
The “OP_Setpoint” tag of the controller is connected at the “SetPoint”
property of the faceplate instance. It is used for displaying and entering the
setpoint value.

Note
Note that the tags are elements of the used UDTs, in this case “PIDCtrlV2_001”,
and hence, the tag names have the respective prefix:

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 19
4 Mode of Operation

No. Explanation
3. The tags connected at the properties in “Animations > Tag connections” are
only a reference to the respective properties of the interface.
The tags can be connected and modified in either location; the entries
mutually affect each other.
4. The visibility of the screen window assigned to the faceplate is deactivated in
“Properties > Miscellaneous > Visibility”.
In order to make the screen window visible by clicking on the faceplate icon,
the “SetPropertyByConstant” function must be configured in “Events > Click”
with the following parameters:
– Screen name: Screen_2_1
– Screen object: PIDCtrlV2_1
– Name of the property: visible
– Value: 1
If you wish to use several faceplate and screen windows in one screen, you
need to adjust the parameters “Screen name” and “Screen object”
accordingly:
– Screen name: <name of the screen in which the blocks are used>
– Screen object: <name of the assigned screen window>
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 20
4 Mode of Operation

4.2 Screen window

Note For better understanding, the screen window is initially described in the
configuration environment.
The following screens for describing the components then refer to the display
during runtime (RT), unless stated otherwise.
The individual screens successively build on one another and therefore only
show parts of the screen window instead of the usual display during runtime
(RT).

Figure 4-2
Siemens AG 2015 All rights reserved

Properties
The screen window has the following properties:
Comprehensive status display
Parameterization for service technician possible
Contains language-dependent objects (German/English(USA))
Permanent tag prefix for addressing a tag structure (UDT)
Includes a frame for shifting the screen window

Parameter
Table 4-3
No. Path Usage
1. Properties > General > Displayed screen Frame
2. Properties > General > Tag prefix PIDCtrlV2_001
3. Properties > Layout > Borders <active>
4. Properties > Layout > Moveable <active>
5. Properties > Miscellaneous > Name PIDCtrlV2_1
6. Properties > Miscellaneous > Visibility <inactive>

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 21
4 Mode of Operation

Explanation
Table 4-4
No. Explanation
1. In the screen window, the “Frame” screen is displayed.
The “Frame” screen consists of several objects. In this chapter, the setup is
explained in greater detail.
All screen windows of this application display the “Frame” screen when
opening the screen window.
The content of the “Frame” screen depends on the name of the screen
window.
2. Tag prefix “PIDCtrlV2_001” is permanently assigned to the screen window.
Depending on the objects and the tag address to be displayed, the tag prefix
varies for each screen window.
Note that the tags of the screen window are elements of the used UDTs, in
this case “PIDCtrlV2_UDT”, and hence influence the address in the
controller.
3. The frame is a requirement for shifting the screen window during runtime
(RT).
Operation during runtime (RT) is described in the chapter “Operating the
Application”.
4. Movability is a requirement for shifting the screen window during runtime
(RT).
Siemens AG 2015 All rights reserved

Operation during runtime (RT) is described in the chapter “Operating the


Application”.
5. The name of screen window “PIDCtrlV2_1” must match parameter “Screen
object” of the “SetPropertyByConstant” function of the calling faceplate.
The name of screen window “PIDCtrlV2_1” has a direct impact on the
screens displayed in the screen window. In this chapter, the function is
explained in greater detail.
6. The screen window is hidden during runtime (RT) via the inactive visibility.
The calling faceplate activates the visibility of the screen window during
runtime (RT).

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 22
4 Mode of Operation

4.2.1 Overview of the components of the screen window

The screen window has several components which are graphically displayed here
during runtime (RT).

“PIDCtrlV2_1” screen
Screen window “PIDCtrlV2_1” integrated in the screen here is used
as container for the objects to be represented,
for shifting the screen window during runtime (RT),
for addressing the tags of the screens displayed in the screen window via the
tag prefix.
The “Frame” screen is always displayed which therefore only exists once in the
project.

Figure 4-3
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 23
4 Mode of Operation

“Frame” screen
The “Frame” screen has a resolution of 560x350 pixels and hence an aspect ratio
of 16:10.
It consists of two screen windows:
The upper screen window “Header” (1), to which the “Header” is permanently
assigned, and
The bottom screen window “Base” (2), with no permanently assigned screen.
A script which assigns a screen of this name to screen window “Base” is connected
to the “Frame” screen via the path “Events > Loaded”:
The front part of the name of the higher-level screen window (including the
underscore), followed by the number “0” (“PIDCtrlV2_” + “0”),
here: “PIDCtrlV2_0”.
The script now enables creating own screen windows with own screen contents on
the basis of existing screen windows, which, apart from the screen contents
themselves, need no further editing.
Only the name of the higher-level screen window, for example “PIDCtrlV2_1” and
the names of the screens to be displayed, for example “PIDCtrlV2_0”,
“PIDCtrlV2_1”, etc., need to be adjusted.

Figure 4-4
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 24
4 Mode of Operation

Screen window “Header”, screen “Header”


The “Header” screen of the screen window of the same name contains two I/O
fields and three buttons.
1 2 3
Figure 4-5

String tag “LabelLeft” is permanently assigned to the left I/O field “LabelLeft”
(1). The start value is preset to “WinCC (TIA Portal)” and can be changed any
time to specify the plant identification, for example.
The text of the right I/O field “LabelRight” (2) is assigned via a script at the
“Frame” screen via the path “Events > Loaded”.
The text depends on the value of the “SelectLabelRight” tag:
– Value “0” (default):
The content of the string tag “INSTANCE” is displayed and can hence be
influenced by the controller.
– Value “1”:
The name of the higher-level screen window is displayed (e.g.
“PIDCtrlV2_1”).
Siemens AG 2015 All rights reserved

– Value “2”:
The tag prefix of the higher-level screen window is displayed
(e.g. “PIDCtrlV2_001”).
The three buttons at the right end of the screen have the following function:
Table 4-5
Button Explanation
Close (via a script at the path “Events > Click”):
The screen window can be closed via this button.

Reduce (via a script at the path “Events > Click”):


The screen window can, via this button, be reduced by the factor 2/3
of the original size.
The screen area taken up by the screen window is reduced by
approximately half.
For better readability and operability, the “Header” screen retains its
full height; the I/O field “LabelRight” (2) is hidden.
The “Reduce” button is hidden; instead, the “Maximize” button is
shown at the same location.
Simple objects at screen window “Base” are reduced by the factor
2/3 of the original size.
Toolbars of complex objects, e.g. trend view, retain their original size
for a more convenient operability.
Maximize (via a script at the path “Events > Click”):
The screen window can, via this button, be reduced to its original
size.
The “Maximize” button is hidden; instead, the “Minimize” button is
shown at the same location.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 25
4 Mode of Operation

NOTICE The value of string tag “INSTANCE” for the right-hand I/O field “LabelRight” (2)
serves as a filter criterion for the alarms display of the faceplate window.
When changing the start value in the controller, you need to adjust the
“Additional text 2” of the bit alarms assigned to the faceplate window accordingly,
otherwise no alarms are displayed.

Screen window “Base”


The screen name of the screen assigned to screen window “Base” is composed of
the front part of the name of the higher-level screen window (including the
underscore), followed by the number “0”.
Example:
The higher-level screen window has the name “PIDCtrlV2_1”; the left part of
the name is used including the underscore, i.e. “PIDCtrlV2_”.
The “0” character is added to this. The screen name of the screen assigned to
screen window “Base” is hence named: “PIDCtrlV2_0”.
Screen window “Base” hence shows the “PIDCtrlV2_0” screen triggered by a
script when opening the higher-level screen window “PIDCtrlV2_1”.
Siemens AG 2015 All rights reserved

Note This functionality enables creating own screen windows with own screen
contents on the basis of existing screen windows.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 26
4 Mode of Operation

“PIDCtrlV2_0” screen
For better understanding, the “PIDCtrlV2_0” screen is shown in the configuration
environment.

1 2
Figure 4-6

3
Siemens AG 2015 All rights reserved

A script in path “Events > Loaded” at the screen causes:


the display of screen “PIDCtrlV2_1” in the screen window (3)
the copying of the text of the “Tab_1” (1) button to the text of the “ActiveTab”
(2) button, in this case: “Overview”
the positioning of the “ActiveTab” (2) button via the “Tab_1” (1) button

The following applies here, similar as for the “Frame” screen, or screen window
“Base” respectively:
The front part of the name of the screen to be displayed in the screen window
must match the front part of the name of the higher-level screen window.
The back part of the name of the screen to be displayed in the screen window
is “1”, so that “PIDCtrlV2_1” screen is displayed in the screen window (3) when
the screen builds up.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 27
4 Mode of Operation

Screen “PIDCtrlV2_0” consists of:


The upper buttons “Tab_1” to “Tab_8” (1). A script in the path “Events >
Loaded” at each of these buttons causes:
– a change of screen contents in the screen window (3)
– the copying of the text of the respective button (1) to the text of the
“ActiveTab” (2) button
– the positioning the “ActiveTab” (2) button via the respective button (1)
The following applies here, similar as for the “Frame” screen, or screen window
“Base” respectively:
– The front part of the name of the screen to be displayed in the screen
window must match the front part of the name of the higher-level screen
window.
– The back part of the name of the screen to be displayed in the screen
window depends on the respective button (1), so that screen “PIDCtrlV2_3”
is displayed in the screen window (3) when pressing button “Tab_3”
(“Trends”).
The “ActiveTab” (2) button which takes on the position and the text of the
respective lower-level button (1).
Screen window “Content” to which no permanent screen is assigned. The
actual screen contents “PIDCtrlV2_1” to “PIDCtrlV2_8” are displayed here via
the buttons (1).
Siemens AG 2015 All rights reserved

Note Since the text for the “ActiveTab” (2) button is only copied when clicking the
respective lower-level button (1), or when opening the higher-level screen
window for the current language, it is not updated when changing the language.
There are two options to avoid this:

close the faceplate window when changing the language.


after changing the language, select another tab via the buttons (1).

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 28
4 Mode of Operation

“PIDCtrlV2_1” screen
For this screen, no further background information is required.

Figure 4-7
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 29
4 Mode of Operation

“PIDCtrlV2_2” screen
The “PIDCtrlV2_2” screen is used for alarms display.
It contains:
an alarm display.
a script which is executed via the path “Events > Loaded” when the screen
builds up.

Figure 4-8
Siemens AG 2015 All rights reserved

The alarms display is divided into four columns:


Date
Time
Alarm text
Additional text 1

“Additional text 1” is intended for your own usage, for example for plant
identification or location code.
The “Additional text 2” of any alarm is not displayed in the alarms display. The
script at screen “PIDCtrlV2_2”, however, requires this additional text as selection
criterion. An alarm is only displayed if the value of the “INSTANCE” string tag is
identical with “Additional_text_2”, depending on the alarm tag “QwAlarm”.

Note If the “Additional text 2” of your bit alarm has already been assigned otherwise,
you can use any other additional text as selection criterion.
The script at screen “PIDCtrlV2_2” uses the “SelectFilterColumn” tag to specify
the used additional text. In this case, the default start value is “3”, according to
“Additional text 2”. If, for example, you wish to use “Additional text 5” as a
selection criterion, the start value of the “SelectFilterColumn” tag must be set to
value “6”.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 30
4 Mode of Operation

“PIDCtrlV2_3” screen
The “PIDCtrlV2_3” screen is used for alarms display.
It contains:
a trend view.
a script which is executed via the path “Events > Loaded” when the screen
builds up.

Figure 4-9
Siemens AG 2015 All rights reserved

For each of the three curves, the respective tag suffix is assigned via the script
when the screen builds up, for example “Output”. This procedure becomes
necessary since it is not possible to specify the suffix in the trend view directly.
A fully qualified access of the individual trends to the respective trend tag does not
make sense, since the multi-instance capability via the tag prefix would then be
lost.

To compile the project without warning notes, dummy tag “Trend” from the
Note
“_TagTemplates” folder is stored for each trend as a data tag.
If you wish to use this trend picture for your own screen window, you need to adjust the
script according to the number of used trends and connected tags.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 31
4 Mode of Operation

“PIDCtrlV2_4” screen
For this screen, no further background information is required.

Figure 4-10
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 32
4 Mode of Operation

“PIDCtrlV2_5” screen
For this screen, no further background information is required.

Figure 4-11
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 33
4 Mode of Operation

“PIDCtrlV2_6” screen
For this screen, no further background information is required.

Figure 4-12
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 34
4 Mode of Operation

“PIDCtrlV2_7” screen
For this screen, no further background information is required.

Figure 4-13
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 35
4 Mode of Operation

“PIDCtrlV2_8” screen
For this screen, no further background information is required.

Figure 4-14
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 36
4 Mode of Operation

4.3 Tags
The tags used in this application are exclusively elements of so-called PLC data
types (UDT).
For the “PIDCtrlV2” screen objects, the defined data structure “PIDCtrlV2_UDT” (2)
has already been stored in the library as a type. As already described in the
chapter “Library objects”, you only create instances of this structure for UDT-type
tags.
In the example project of this application, an instance has been created for each
block, for example, “PIDCtrlV2_001” (1) for the controller block:

1 2
Figure 4-15
Siemens AG 2015 All rights reserved

When creating a new tag, for example “PIDCtrlV2_002” of data type


“PIDCtrlV2_UDT”,
name
PLC data type
address
start value
and the comment

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 37
4 Mode of Operation

are automatically defined for each structure element, or each structure tag
respectively.

Note The name of the instance (e.g. “PIDCtrlV2_001”) automatically defines the tag
prefix of the individual structure elements (e.g. “PIDCtrlV2_001.”).
In the project, the tag prefix must precede each location of usage for the
structure elements, for example “PIDCtrlV2_001.QdwState”.
An exception is only the higher-level screen window to which the tag prefix is
permanently assigned. Elements (also further screen windows) within this
screen window therefore only use the respective structure name with
preceding dot and without preceding tag prefix, for example “QdwState”.

Subdivision
The individual structure tags can principally be divided into three categories:
Tags with function tasks
General tags for signal values, controller parameters and limit values
Tags with function tasks without controller connection

4.3.1 Tags with function tasks


Siemens AG 2015 All rights reserved

The tags of this group have a process connection and constitute the basic interface
between controller and operating device.

Instance
The “Instance” tag is a text string with a field length of 254 characters and with two
usage locations:
The tag serves as filter criterion for the alarm display of the faceplate window.
This ensures that only alarms referring to this faceplate window will be
displayed.
The tag is displayed in the right half of the title bar to distinguish between the
individual faceplate instances, if the value of the “SelectLabelRight” tag has the
value “0” (default setting).
Table 4-6
Instance
Name PIDCtrlV2_001.INSTANCE
Data type String
Address %DB700.DBX104.0
Length 254 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 38
4 Mode of Operation

NOTICE When changing the start value in the controller, you need to adjust the
“Additional text 2” of the bit alarms assigned to the faceplate window accordingly,
otherwise no alarms are displayed.
The script at screen “PIDCtrlV2_2” requires this additional text as selection
criterion. An alarm is only displayed if the value of the “INSTANCE” tag is
identical with “Additional_text_2”, depending on the alarm tag “QwAlarm”.

Note If the “Additional text 2” of your bit alarm has already been assigned otherwise,
you can use any other additional text as selection criterion.
The script at screen “PIDCtrlV2_2” uses the “SelectFilterColumn” tag to specify
the used additional text. In this case, the default start value is “3”, according to
“Additional text 2”. If, for example, you wish to use “Additional text 5” as a
selection criterion, the start value of the “SelectFilterColumn” tag must be set to
value “6”.

QdwState
The “QdwState” tag is used to display the different states in the process picture.
Siemens AG 2015 All rights reserved

Table 4-7
QdwState
Name PIDCtrlV2_001.QdwState
Data type DWord
Address %DB700.DBD398
Length 4 bytes

The following table shows the setup of the tags.


Table 4-8
Bit
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
INVERT_CONTROL
WARNING_HIGH

PERIPHERY_ON
WARNING_LOW
ALARM_HIGH

ALARM_LOW

D_PART_ON

P_PART_ON
I_PART_ON
QMAN_AUT
QERR_EXT

QREMOTE
QLOCK
Signal

QERR
LOCK

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 39
4 Mode of Operation

QwAlarm
This application uses the bit alarm procedure to display alarms in the process
picture. The alarms must be configured as bit alarms in the alarm editor of WinCC
Professional.
In the example configuration, all bit alarms were created for the used faceplate
instances, as well as their “QwAlarm” trigger tags.
Table 4-9
QwAlarm
Name PIDCtrlV2_001.QwAlarm
Data type Word
Address %DB700.DBW404
Length 2 bytes

The following table shows the setup of the tags. For the first instance of the PID
faceplate window, the filter attribute “PIDCtrlV2_001” was assigned to the alarm
text as additional text 2.
Table 4-10
Bit Signal Alarm text Additional text
2
Siemens AG 2015 All rights reserved

1
0 SetpointLimit_L Alarm lower limit undercut PIDCtrlV2_001
1
1 SetpointLimit_H Alarm upper limit exceeded PIDCtrlV2_001
2 PIDCtrlV2_001
3 PIDCtrlV2_001
4 QLOCK Interlock, value locked PIDCtrlV2_001
5 PIDCtrlV2_001
6 QERR_EXT External error PIDCtrlV2_001
7 QERR Group error PIDCtrlV2_001
1
8 InputWarning_L Warning lower limit undercut PIDCtrlV2_001
1
9 InputWarning_H Warning upper limit undercut PIDCtrlV2_001
10 NOT QPERIPH Actual value from external (Real) PIDCtrlV2_001
11 QPERIPH Actual value from I/O (Int) PIDCtrlV2_001
12 NOT QREMOTE Controller => LOCAL PIDCtrlV2_001
13 QREMOTE Controller => REMOTE PIDCtrlV2_001
14 NOT QMAN_AUT Manual value active PIDCtrlV2_001
15 QMAN_AUT Process value active PIDCtrlV2_001

NOTICE When changing the start value in the “Instance” tag of the controller, you need to
adjust “Additional text 2” of the bit alarms assigned to the faceplate window
accordingly, since otherwise no alarms are displayed.
The script at screen “PIDCtrlV2_2” requires this additional text as selection
criterion. An alarm is only displayed if the value of the “INSTANCE” tag is
identical with “Additional_text_2”, depending on the alarm tag “QwAlarm”.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 40
4 Mode of Operation

Note If the “Additional text 2” of your bit alarm has already been assigned otherwise,
you can use any other additional text as selection criterion.
The script at screen “PIDCtrlV2_2” uses the “SelectFilterColumn” tag to specify
the used additional text. In this case, the default start value is “3”, according to
“Additional text 2”. If, for example, you wish to use “Additional text 5” as a
selection criterion, the start value of the “SelectFilterColumn” tag must be set to
value “6”.

OPdwCmd
The “OPdwCmd” tag is used to transmit commands from WinCC Professional to
the controller. The PLC block analyzes the control command, executes the desired
action and then initiates a reset of the pending control command. For this purpose,
the value of the control parameter is set to “0”.
Table 4-11
OPdwCmd
Name PIDCtrlV2_001.OPdwCmd
Data type DWord
Address %DB700.DBD408
Length 4 bytes
Siemens AG 2015 All rights reserved

The following table shows the setup of the tags.


Table 4-12
Bit
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PERIPHERY
EXTERNAL
PROCESS
REMOTE

MANUAL

INVERT
RESET

LOCAL
Signal

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 41
4 Mode of Operation

4.3.2 General tags – Signal values

The tags in this group have a process connection and influence the controller
signal.

ScaledInput
The “ScaledInput” tag displays the scaled actual value and can be read via WinCC.
Table 4-13
ScaledInput
Name PIDCtrlV2_001. ScaledInput
Data type Real
Address %DB700.DBD366
Length 4 bytes

Output
The “Output” tag displays the initial value and in REAL format and can be read via
WinCC.
Table 4-14
Output
Siemens AG 2015 All rights reserved

Name PIDCtrlV2_001. Output


Data type Real
Address %DB700.DBD370
Length 4 bytes

QSetpoint
The “QSetpoint” tag displays the setpoint value of the PID controller in automatic
mode and can be read via WinCC.
Table 4-15
QSetpoint
Name PIDCtrlV2_001. QSetpoint
Data type Real
Address %DB700.DBD362
Length 4 bytes

OP_Setpoint
The “OP_Setpoint” tag specifies the setpoint value of the PID controller in
automatic mode and can be read and written via WinCC.
Table 4-16
OP_Setpoint
Name PIDCtrlV2_001. OP_Setpoint
Data type Real
Address %DB700.DBD414
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 42
4 Mode of Operation

OP_ManualValue
The “OP_ManualValue” tag specifies the initial value in manual mode and can be
read and written via WinCC.
Table 4-17
OP_ManualValue
Name PIDCtrlV2_001. OP_ManualValue
Data type Real
Address %DB700.DBD422
Length 4 bytes
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 43
4 Mode of Operation

4.3.3 General tags – Controller parameters

The tags in this group have a process connection and influence the behavior of the
controller signal during control deviation.

OP_Cycle
The “OP_Cycle” tag specifies the value of the scan time for the PID algorithm and
can be read and written via WinCC.
Table 4-18
OP_Cycle
Name PIDCtrlV2_001. OP_Cycle
Data type Real
Address %DB700.DBD428
Length 4 bytes

OP_Gain
The “OP_Gain” tag specifies the value of the proportional gain and can be read
and written via WinCC.
Table 4-19
Siemens AG 2015 All rights reserved

OP_Gain
Name PIDCtrlV2_001. OP_Gain
Data type Real
Address %DB700.DBD432
Length 4 bytes

OP_Ti
The “OP_Ti” tag specifies the value of the integration time and can be read and
written via WinCC.
Table 4-20
OP_Ti
Name PIDCtrlV2_001. OP_Ti
Data type Real
Address %DB700.DBD436
Length 4 bytes

OP_Td
The “OP_Gain” tag specifies the value of the proportional gain and can be read
and written via WinCC.
Table 4-21
OP_Td
Name PIDCtrlV2_001. OP_Td
Data type Real
Address %DB700.DBD440
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 44
4 Mode of Operation

OP_TdFiltRatio
The “OP_TdFiltRatio” tag specifies the value of the derivative time lag coefficient
and can be read and written via WinCC.
Table 4-22
OP_TdFiltRatio
Name PIDCtrlV2_001. OP_TdFiltRatio
Data type Real
Address %DB700.DBD444
Length 4 bytes

OP_PWeighting
The “OP_PWeighting” tag specifies the weighting of the P component and can be
read and written via WinCC.
Table 4-23
OP_PWeighting
Name PIDCtrlV2_001. OP_PWeighting
Data type Real
Address %DB700.DBD448
Length 4 bytes
Siemens AG 2015 All rights reserved

OP_DWeighting
The “OP_DWeighting” tag specifies the weighting of the D component and can be
read and written via WinCC.
Table 4-24
OP_DWeighting
Name PIDCtrlV2_001. OP_DWeighting
Data type Real
Address %DB700.DBD452
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 45
4 Mode of Operation

4.3.4 General tags – Limit values

The tags in this group have a process connection and influence the limit values of
the controller signal.

OP_LMNUpperLimit
The “OP_LMNUpperLimit” tag specifies the upper limit of the output value and can
be read and written via WinCC.
Table 4-25
OP_LMNUpperLimit
Name PIDCtrlV2_001. OP_LMNUpperLimit
Data type Real
Address %DB700.DBD456
Length 4 bytes

OP_LMNLowerLimit
The “OP_LMNLowerLimit” tag specifies the lower limit of the output value and can
be read and written via WinCC.
Table 4-26
Siemens AG 2015 All rights reserved

OP_LMNLowerLimit
Name PIDCtrlV2_001. OP_LMNLowerLimit
Data type Real
Address %DB700.DBD460
Length 4 bytes

OP_ MinimumOnTime
The “OP_LMNLowerLimit” tag specifies the minimum switch-on time of the PWM
output value and can be read and written via WinCC.
Table 4-27
OP_ MinimumOnTime
Name PIDCtrlV2_001. OP_ MinimumOnTime
Data type Real
Address %DB700.DBD464
Length 4 bytes

OP_MinimumOffTime
The “OP_MinimumOffTime” tag specifies the minimum switch-off time of the PWM
output value and can be read and written via WinCC.
Table 4-28
OP_MinimumOffTime
Name PIDCtrlV2_001. OP_MinimumOffTime
Data type Real
Address %DB700.DBD468
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 46
4 Mode of Operation

OP_SPUpperLimit
The “OP_SPUpperLimit” tag specifies the upper limit of the setpoint value and can
be read and written via WinCC.
Table 4-29
OP_SPUpperLimit
Name PIDCtrlV2_001. OP_SPUpperLimit
Data type Real
Address %DB700.DBD472
Length 4 bytes

OP_SPLowerLimit
The “OP_SPLowerLimit” tag specifies the lower limit of the setpoint value and can
be read and written via WinCC.
Table 4-30
OP_SPLowerLimit
Name PIDCtrlV2_001. OP_SPLowerLimit
Data type Real
Address %DB700.DBD476
Length 4 bytes
Siemens AG 2015 All rights reserved

OP_PVUpperLimit
The “OP_PVUpperLimit” tag specifies the upper limit of the actual value and can be
read and written via WinCC.
Table 4-31
OP_PVUpperLimit
Name PIDCtrlV2_001. OP_PVUpperLimit
Data type Real
Address %DB700.DBD480
Length 4 bytes

OP_PVLowerLimit
The “OP_PVLowerLimit” tag specifies the lower limit of the actual value and can be
read and written via WinCC.
Table 4-32
OP_PVLowerLimit
Name PIDCtrlV2_001. OP_PVLowerLimit
Data type Real
Address %DB700.DBD484
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 47
4 Mode of Operation

OP_LowerPointIn
The “OP_LowerPointIn” tag specifies the lower limit of the I/O input and can be
read and written via WinCC.
Table 4-33
OP_LowerPointIn
Name PIDCtrlV2_001. OP_LowerPointIn
Data type Real
Address %DB700.DBD488
Length 4 bytes

OP_UpperPointIn
The “OP_UpperPointIn” tag specifies the lower limit of the I/O input and can be
read and written via WinCC.
Table 4-34
OP_UpperPointIn
Name PIDCtrlV2_001. OP_UpperPointIn
Data type Real
Address %DB700.DBD492
Length 4 bytes
Siemens AG 2015 All rights reserved

OP_LowerPointOut
The “OP_LowerPointOut” tag specifies the lower limit of the scaled I/O input and
can be read and written via WinCC.
Table 4-35
OP_LowerPointOut
Name PIDCtrlV2_001. OP_LowerPointOut
Data type Real
Address %DB700.DBD496
Length 4 bytes

OP_UpperPointOut
The “OP_UpperPointOut” tag specifies the upper limit of the scaled I/O input and
can be read and written via WinCC.
Table 4-36
OP_UpperPointOut
Name PIDCtrlV2_001. OP_UpperPointOut
Data type Real
Address %DB700.DBD500
Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 48
4 Mode of Operation

OP_PVUpperWarning
The “OP_PVUpperWarning” tag specifies the upper limit for the warning when
exceeding the actual value and can be read and written via WinCC.
Table 4-37
OP_PVUpperWarning
Name PIDCtrlV2_001. OP_PVUpperWarning
Data type Real
Address %DB700.DBD504
Length 4 bytes

OP_PVLowerWarning
The “OP_PVLowerWarning” tag specifies the lower limit for the warning when
falling short of the actual value and can be read and written via WinCC.
Table 4-38
OP_PVLowerWarning
Name PIDCtrlV2_001. OP_PVLowerWarning
Data type Real
Address %DB700.DBD508
Siemens AG 2015 All rights reserved

Length 4 bytes

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 49
4 Mode of Operation

4.3.5 Tags with function tasks without controller connection

The usage of these tags was already explained in the chapter “Screen window”.
For completeness, they are once more displayed in this table:
Table 4-39
Name Data type Start value
Unit String %
LabelLeft String “WinCC (TIA Portal)”
SelectLabelRight USInt “0”
SelectFilterColumn USInt “3”
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 50
4 Mode of Operation

4.4 Control and status signals


4.4.1 Processing of switching commands in the controller

The “OPdwCmd” control tag of a block is used to transmit commands from WinCC
to the controller.
The PLC block analyzes the control command, executes the desired action and
then initiates a reset of the pending control command. For this purpose, the value
of the control parameter is set to “0”.

Figure 4-16
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
Siemens AG 2015 All rights reserved

InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 51
4 Mode of Operation

The following table shows the setup of the tags.


Table 4-40
Bit
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PERIPHERY
EXTERNAL
PROCESS
REMOTE

MANUAL

INVERT
RESET

LOCAL
Signal
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 52
4 Mode of Operation

4.4.2 Evaluating process states and displaying them in WinCC

The technology block of this application uses the output “QdwState” to show the
different states in the WinCC process picture.

Figure 4-17
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
Siemens AG 2015 All rights reserved

SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 53
Siemens AG 2015 All rights reserved

Signal Bit
31
30 Table 4-41
29
28
LOCK 27
4 Mode of Operation

QLOCK 26
QERR_EXT 25
QERR 24
23

Entry ID: 66839614, V1.0, 06/2015


22
21
20
19
18
QREMOTE 17

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


QMAN_AUT 16
ALARM_HIGH 15
WARNING_HIGH 14
WARNING_LOW 13
The following table shows the setup of the tags.

ALARM_LOW 12
11
10
9
8
7
PERIPHERY_ON 6
INVERT_CONTROL 5
4
3
D_PART_ON 2
I_PART_ON 1

54
P_PART_ON 0
4 Mode of Operation

4.4.3 Actual value Real value / S7 periphery

The actual value can be interconnected in an I/O format (WORD) or as an external


value in floating point format (REAL).

Figure 4-18
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
Siemens AG 2015 All rights reserved

SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 55
4 Mode of Operation

“Input_PER_On”
The “Input_PER_ON” input is only effective when the “LIOP_SEL” input has
been set. When the “Input_PER_ON” input is active, the interconnection in the
peripheral format at “Input_PER” applies, otherwise the external value at
“Input” applies.
“LIOP_SEL” = 1 AND “Input_PER_On” = 0 “QPERIPH” = 0
“LIOP_SEL” = 1 AND “Input_PER_On” = 1 “QPERIPH” = 1

“OP_dwCmd“
The operator commands of the control word “OPdwCmd” will be effective only,
if the “LIOP_SEL” input is not set.
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 7]” = 1 “QPERIPH” = 0
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 6]” = 1 “QPERIPH” = 1

“QPERIPH”
The mode is displayed on the “QPERIPH“ output:
“QPERIPH” = 0 “Input” is active
“QPERIPH” = 1 “Input_PER” is active.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 56
4 Mode of Operation

4.4.4 Setpoint / manual value specification

The manipulated variable can be specified via a setpoint or a manual value.


If the setpoint specification (QMAN_AUT = 1) has been configured, the
manipulated variable is calculated by means of the “Setpoint” value.
If the manual value specification (QMAN_AUT = 0) is configured, the value
“ManualValue” is written to output “Output_PER” as manipulated variable.

Figure 4-19
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
Siemens AG 2015 All rights reserved

MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 57
4 Mode of Operation

“LIOP_SEL”
If the “LIOP_SEL” input is set, the mode will be determined via control input
“L_AUT”.
If the “LIOP_SEL” input is not set, the mode is defined by the operator
(“OPdwCmd [Bit 16 and 17]”).
“L_AUT”
The “L_AUT” input will be effective only, if the “LIOP_SEL” input is set.
“LIOP_SEL” = 1 AND “L_ AUT” = 0 Manual value active
“LIOP_SEL” = 1 AND “L_ AUT” = 1 Process value active

“OPdwCmd”
The operator commands of the control word “OPdwCmd” will be effective only,
if the “LIOP_SEL” input is not set.
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 16]” = 1 Manual value active
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 17]” = 1 Process value active

“QMAN_AUT”
The operating mode is indicated at the “QMAN_AUT” block output.
“QMAN_AUT” = 0 Manual value active
Siemens AG 2015 All rights reserved

“QMAN_AUT” = 1 Process value active

“QdwState”
The current mode is transferred to WinCC in Bit 16 of the “QdwState” status
word.
“QdwState [Bit 16]” = 0 Manual value active
“QdwState [Bit 16]” = 1 Process value active

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 58
4 Mode of Operation

4.4.5 Local/remote switchover

In “Local” mode the control commands by the operator become effective directly at
the device.
In “Remote” mode, the control signals of an automatic function (e.g. control, step
chain ...) or the control signals of the operation are effective in WinCC.

Figure 4-20
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
Siemens AG 2015 All rights reserved

OutputLowerLimit QTd
SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 59
4 Mode of Operation

“LIOP_SEL”
If the “LIOP_SEL” input is set, the mode is determined by the control input
“L_REMOTE”.
If the “LIOP_SEL” input is not set, the mode is defined by the operator
(“OPdwCmd [Bit 18 and 19]”).
“L_REMOTE”
The “L_REMOTE” input is effective only, if the “LIOP_SEL” input is set.
“LIOP_SEL” = 1 AND “L_REMOTE” = 0 Local
“LIOP_SEL” = 1 AND “L_REMOTE” = 1 Remote

“OPdwCmd”
The operator commands of the control word “OPdwCmd” are only effective, if
the “LIOP_SEL” input is not set.
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 18]” = 1 Local
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 19]” = 1 Remote

“QREMOTE”
The operating mode is indicated at the “QREMOTE” block output.
“QREMOTE” = 0 Local
Siemens AG 2015 All rights reserved

“QREMOTE” = 1 Remote

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 60
4 Mode of Operation

4.4.6 Determine controller values

The source of the proportional, integral and differential components used for
controlling can be switched over.
Either the PID parameters of the technology object (for example for optimization)
are effective, or the PID parameters at the block input.
The respectively active parameters are transferred to WinCC and there, they can
be manipulated in “Remote” mode.

Figure 4-21
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
Siemens AG 2015 All rights reserved

InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
SetpointUpperLimit QdwState
SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 61
4 Mode of Operation

CAUTION If the controller values are changed during runtime, the danger of
destroying the actuators (e.g. motor, mechanism) in the controlled system
arises.
A manipulation of the control parameters during runtime should only be permitted
for expert staff familiar with optimization of controlled systems and setting up the
plant.

Note If the controller values are determined automatically via the technology object,
the PID parameters must not be overwritten during the optimization phase.
Set the “PIDManualEnable” block to “0” (false).
Set the operating mode to “Local”, or avoid changing the controller values manually
via WinCC during the optimization phase.
If the PID parameters at the block input or the operating mode “Remote” is
activated, the values of the technology object are overwritten.

“PID_Man_En”
– The “PID_Man_En” input is only effective when input “LIOP_SEL” has
been set.
Siemens AG 2015 All rights reserved

– If input “PID_Man_En” is active, the values of block inputs “Gain”, “Ti”,


“Td”, “TdFiltRatio”, “PWeighting”, “DWeighting” and “Cycle” are used as
control parameters, and the existing control parameters in the technology
object of the controller are overwritten.
– If input “PID_Man_En” is not active, the control parameters contained in
the technology object of the controller are used.
“LIOP_SEL” = 1 AND “PID_Man_En” = 0 Technology object parameter
“LIOP_SEL” = 1 AND “PID_Man_En” = 1 Block input parameter

“GAIN”
The “GAIN” input (proportional coefficient) indicates the controller gain.
“TI”
The “TI” input (integration time) specifies the time behavior of the integrator.
“TD”
The “TD” input (derivative action time) specifies the time behavior of the
derivative action element.
“TdFiltRatio”
The “TdFiltRatio” input (derivative time lag) determines the deceleration of the
effect of the D component.
“PWeighting”
The “PWeighting” input determines the weighting of the P component.
“DWeighting”
The “DWeighting” input determines the weighting of the D component.
“Cycle”
The “Cycle” input determines the scan time for the PID algorithm and is a
multiple of the cycle time of the callig OB.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 62
4 Mode of Operation

4.4.7 Manipulated variable limit

The following inputs are available for the limiting the manipulated variable:

Figure 4-22
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
SetpointUpperLimit QdwState
Siemens AG 2015 All rights reserved

SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 63
4 Mode of Operation

“InputUpperLimit”
– With the “InputUpperLimit” input, the upper limit of the actual value is
determined.
– The upper limit of the actual value must be larger here than the lower limit
of the actual value.
“InputLowerLimit”
– The “InputLowerLimit” input specifies the lower limit of the actual value.
– The lower limit of the actual value must be smaller here than the upper limit
of the actual value.
“UpperPointOut”
– The upper scaled limit value is specified via the “UpperPointOut” input.
– The two value pairs “UpperPointOut” and “UpperPointIn”, as well as
“LowerPointOut” and “LowerPointIn” are used for converting the value
at “Input_PER” into a percentage.
– The upper scaled limit value must be larger than the lower scaled limit
value.
– Scaling is only active if the “InputPerOn” input has been activated.
“LowerPointOut”
– The lower scaled limit value is specified via the “LowerPointOut” input.
– The two value pairs “UpperPointOut” and “UpperPointIn”, as well as
Siemens AG 2015 All rights reserved

“LowerPointOut” and “LowerPointIn” are used for converting the value


at “Input_PER” into a percentage.
– The lower scaled limit value must be smaller than the upper scaled limit
value.
– Scaling is only active if the “InputPerOn” input has been activated.
“UpperPointIn”
– The upper limit value of the analog signal at “Input_PER” is specified via
the “UpperPointIn” input.
– The two value pairs “UpperPointOut” and “UpperPointIn”, as well as
“LowerPointOut” and “LowerPointIn” are used for converting the value
at “Input_PER” into a percentage.
– The upper limit value must be larger than the lower limit value of the
analog signal.
– Scaling is only active if the “InputPerOn” input has been activated.
“LowerPointIn”
– The lower limit value of the analog signal at “Input_PER” is specified via
the “LowerPointIn” input.
– The two value pairs “UpperPointOut” and “UpperPointIn”, as well as
“LowerPointOut” and “LowerPointIn” are used for converting the value
at “Input_PER” into a percentage.
– The lower limit value must be larger than the lower limit value of the analog
signal.
– Scaling is only active if the “InputPerOn” input has been activated.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 64
4 Mode of Operation

“InputUpperWarning”
– The upper warning threshold for the actual value is specified via the
“InputUpperWarning” input.
– If the actual value exceeds the entered value, output parameter
“InputWarning_H” is set.
– If you enter a value larger than the upper actual value limit, the upper
actual value limit is used as the upper warning limit.
“InputLowerWarning”
– The lower warning threshold for the actual value is specified via the
“InputLowerWarning” input.
– If the actual value falls short of the entered value, output parameter
“InputWarning_L” is set.
– If you enter a value smaller than the lower actual value limit, the lower
actual value limit is used as the lower warning limit.
“MinimumOnTime”
– The minimal switch-on time of the pulse width modulation for the
manipulated variable “Output_PWM” is set via input “MinimumOnTime”
(switch-on time pulse width modulation).
– If you have selected “Output” or “Output_PER” as the output value
instead of output value “Output_PWM”, specify value 0.0 for
Siemens AG 2015 All rights reserved

“MinimumOnTime”.
“MinimumOffTime”
– The minimal switch-off time of the pulse width modulation for the
manipulated variable “Output_PWM” is set via input “MinimumOffTime”
(switch-off time pulse width modulation).
– If you have selected “Output” or “Output_PER” as the output value
instead of output value “Output_PWM”, specify value 0.0 for
“MinimumOffTime”.
“OutputUpperLimit”
– The “OutputUpperLimit” input limits the upper limit of the output.
– The output value does not exceed this limit in any operating mode.
– The upper output limit value as a percentage value applies for the outputs
“Output”, “Output_PER” and “Output_PWM”.
“OutputLowerLimit”
– The “OutputLowerLimit” input specifies the lower limit of the output.
– The output value does not fall short of this limit in any operating mode.
– The lower output limit value as a percentage value applies for the outputs
“Output”, “Output_PER” and “Output_PWM”.
“SetpointUpperLimit”
The “SetpointUpperLimit” input limits the upper limit of the setpoint value.
“SetpointLowerLimit”
The “SetpointLowerLimit” input limits the lower limit of the setpoint value.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 65
4 Mode of Operation

4.4.8 External error / block locked

The following inputs are available for blocking and error handling:

Figure 4-23
“PIDCtrlV2” (FB 700)
EN QSetpoint
InvertControl ScaledInput
InputPerOn Output
InputUpperLimit Output_PER
InputLowerLimit Output_PWM
UpperPointOut SetpointLimit_H
LowerPointOut SetpointLimit_L
UpperPointIn InputWarning_H
LowerPointIn InputWarning_L
InputUpperWarning State
InputLowerWarning Error
MinimumOnTime ErrorBits
MinimumOffTime QGain
OutputUpperLimit QTi
OutputLowerLimit QTd
SetpointUpperLimit QdwState
Siemens AG 2015 All rights reserved

SetpointLowerLimit QPERIPH
PIDManualEnable QMAN_AUT
Gain QREMOTE
Ti QLOCK
Td QERR
TdFiltRatio QERR_EXT
PWeighting QwAlarm
DWeighting ENO
Cycle
Setpoint
Input
Input_PER
ManualValue
LOCK
ERR_EXTERN
LIOP_SEL
L_AUT
L_REMOTE
L_RESET
INSTANCE
RESTART
VISIBILITY
OPdwCmd

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 66
4 Mode of Operation

If a signal is pending at the “LOCK” input and the controller is in an active state,
an error message is generated and the controller switches to the inactive state.
The state is displayed on the output “QLOCK” and “QERR”.
After the “LOCK” signal has disappeared again, the block continues to be in a
faulty state until it is reset with “L_RESET” or via HMI operation.
However, if the controller is in an active state and a signal is pending at the
“LOCK” input, then only the state at output “QLOCK” is displayed.
As soon as the signal at “LOCK” disappears, the controller is released.

Active controller:
“LOCK” = 1 “QLOCK” = 1 “QERR” = 1
Inactive controller:
“LOCK” = 1 “QLOCK” = 1

Operating the block is not possible if a signal is pending on the “ERR_EXTERN”


input. The controller is switched inactive if it was active before.
When the “ERR_EXTERN” signal disappears again afterwards, the block continues
Siemens AG 2015 All rights reserved

to be in an incorrect state until it is reset with “L_RESET” or the HMI operation.


The state is displayed on output “QLOCK” and “QERR”.
“ERR_EXTERN” = 1 “QERR_EXT” = 1 “QERR” = 1

“L_RESET”
When setting the “LIOP_SEL” input parameter and a positive edge at the
“L_RESET” input, the “QERR” output is reset. This only occurs if no error is
pending anymore.
“LIOP_SEL” = 1 AND “L_RESET” = 1 “QERR” = 0

“OPdwCmd”
By pressing the “Reset” button in the faceplate window, the bit 24 is set in
control word “OPdwCmd”. The controller evaluates this bit and resets the
“QERR” output. This only occurs if no error is pending anymore and input
parameter “LIOP_SEL” has not been set.
“LIOP_SEL” = 0 AND “OPdwCmd [Bit 24]” = 1 “QERR” = 1

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 67
5 Installation and Commissioning

5 Installation and Commissioning


Introduction
Here you will learn how you can integrate objects of the library of this application
into an empty or existing project.

Note The following chapter gives detailed instructions on how to integrate the library
blocks into an empty or existing project.
If you are only interested in operating the application example, you can directly
jump to the chapter “Operation of the Application”.

5.1 Software installation (download)


This chapter describes the steps for the installation of the library.
Table 5-1
No. Action
1. Load the “66839614_WCP_Faceplates_Library_V13_SP1.zip” file of the
application into a directory of your choice and extract it.
2. Select the “Libraries” task card and expand the “Global libraries” palette.
Siemens AG 2015 All rights reserved

3. Click on the “Open global library” icon in the “Global libraries” palette:

4. Select the path in which the library is stored and click on “Open”.

Note
To gain access from several projects to a global library, open the global library
write protected. If a global library is not opened write protected, the access to
other projects is blocked.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 68
5 Installation and Commissioning

No. Action
5. The “Global libraries” palette now contains the global library “WCP Faceplates
V13 SP1”:
Siemens AG 2015 All rights reserved

Note The technology blocks for the controller are contained in the project library of
this application.
Program integration or calling the STEP 7 blocks has been performed
exemplary in the example project and is not explained in greater detail.
The connection of the WinCC screen objects to the technology blocks of the
controller is performed via their instance data blocks.
Appropriate addressing of WinCC screen objects is described below in the
chapter “Commissioning”.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 69
5 Installation and Commissioning

5.2 Commissioning WinCC


This chapter describes the steps for integrating the library elements into an empty
or existing WinCC project.

Table 5-2
No. Action
1. Use drag&drop to copy the folders “Types” and “Master copies” of the “Global library”
individually to the respective folders of your project library.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 70
5 Installation and Commissioning

No. Action
2. Create groups for your screens for an improved subdivision.
In the example, the groups “BaseTemplates” and “PIDCtrlV2” were created in navigation
folder “Screens”.
Move the screens “Frame” and “Header” from the library into your project using
drag&drop.
Pay attention to the name of the copied screens and adjust it accordingly. The screen
names must not contain the ending “_1”, for example.
Move the screens “PIDCtrlV2_0” and “PIDCtrlV2_8” from the library into your project
using drag&drop.
Siemens AG 2015 All rights reserved

Note
If you have already created other screen objects of the application library, for example
“Motor”, in your project, it is not necessary to copy the screens “Frame” and “Header”. It
is sufficient if these screens exist once in the project.
Should you wish to use several instances of identical screen objects, for example
“PIDCtrlV2_001” or “PIDCtrlV2_002”, in your project, copying the screens “PIDCtrlV2_0”
to “PIDCtrlV2_8” is no longer necessary. It is sufficient if these screens exist once in the
project.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 71
5 Installation and Commissioning

No. Action
3. Create groups for your tags for an improved subdivision.
In the example, the group “PIDCtrlV2” was created in navigation folder “HMI tags”.
Create a separate tag table for each instance, for example “PIDCtrlV2_001” or
“PIDCtrlV2_002”, for an improved subdivision.
In the example, the “PIDCtrlV2_001” tag table was created in the “PIDCtrlV2” group.
Siemens AG 2015 All rights reserved

4. Open tag table “PIDCtrlV2_001”.


Create a new tag “PIDCtrlV2_001” in the tag table.
Select an existing control connection for the tag.
Select data type “PIDCtrlV2_UDT”.
Set the address to DB700.
Create a separate tag with its own higher-level tag table for each instance, for example
“PIDCtrlV2_001” or “PIDCtrlV2_002”.

Note
You can also move UDT “PIDCtrlV2_UDT” from the Types of the library into the “Data
type” field via drag&drop. However, a connection already assigned to the tag is also the
prerequisite for using the UDT here.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 72
5 Installation and Commissioning

No. Action
5. Move the bit alarms “PIDCtrlV2_Alarms” from the library into the HMI alarms of your project
via drag&drop.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 73
5 Installation and Commissioning

No. Action
6. Open the HMI alarms and select the “Bit alarms” tab.
Configure the “PIDCtrlV2_001.QwAlarm” tag as trigger tag for each controller alarm of the
“PIDCtrlV2_001” instance.

Note
The alarm texts were configured in “German” and “English (USA)” language. The
Siemens AG 2015 All rights reserved

appropriate language in the alarms editor only appears if created as a project language
first.
For each alarm in the alarms editor, the trigger tag can be multiplied in Excel via
drag&drop analog to the copied cell.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 74
5 Installation and Commissioning

No. Action
7. Create a new or existing screen in which you wish to integrate the screen objects.
Move faceplate “PIDCtrlV2_Icon_1” and screen window “PIDCtrlV2_1” from the library
into your project via drag&drop.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 75
5 Installation and Commissioning

No. Action
8. The visibility of the screen window assigned to the faceplate is deactivated in “Properties
> Miscellaneous > Visibility”.
In order to make the screen window visible by clicking on the faceplate icon, the
“SetPropertyByConstant” function must be configured for the “PIDCtrlV2_Icon_1”
faceplate in “Events > Click” with the following parameters:
– Screen name: <name of the screen in which the blocks are used>
– Screen object: <name of the assigned screen window>
– Name of the property: visible
– Value: 1
If you wish to use several faceplate and screen windows in one screen, you need to
adjust the parameters “Screen name” and “Screen object” accordingly:
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 76
5 Installation and Commissioning

No. Action
9. One respective script in which tags without tag prefix are used is connected to the screens
“Header” and “PIDCtrlV2_2”. This causes warnings when compiling the project. To by-pass
these warnings, tags of the same name are created in the project without connection to the
controller.
Move the “_TagTemplates” tags from the library into the HMI tags of your project via
drag&drop.
The “_TagTemplates” group is automatically created here with the “TagDummies” tag
table in which the tags are stored.
If you have already created other screen objects of the application library, for example
“Motor”, in your project, it is not necessary to copy the “_TagTemplates” tags. It is
sufficient if these tags exist once in the project.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 77
5 Installation and Commissioning

No. Action
10. Load the technology blocks into the controller and create a connection.

Note
The technology blocks for the controller are contained in the project library of this
application.
The graphics used in the screens were created in “German” and “English (USA)”
language. The respective graphic only appears on all screens if the respective project
language was created.
Some graphics are only displayed depending on the “QdwState” tag. If this tag does not
have a valid value, a graphic is not displayed at the respective location of usage
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 78
5 Installation and Commissioning

5.3 Commissioning the PLC


This chapter describes the steps for integrating the library elements into an empty
or existing PLC project.
As opposed to the other blocks of this application, there are special requirements
for integrating the “PIDCtrlV2” controller block into a program:
To ensure a constant scan time of the controller, calling a PID controller must
always be executed in a cyclic OB, for example in cyclic interrupt OB “OB30”.
Controller block “PIDCtrlV2” must be informed of the clock cycle of the cyclic
interrupt OB via the “Cycle” input.
If you wish to use several controllers in your program, a separate technology
object “PID_Compact” must be created for each “PIDCtrlV2” controller block.
For each “PIDCtrlV2” controller block, the symbolic name of the respective
“PID_Compact” technology object must be exchanged.

Note Calling the technology object with the symbolic name enables using the
commissioning wizard of the respective controller for optimizing the controller, for
example.
If you do not need graphically guided commissioning, you can also call the
Siemens AG 2015 All rights reserved

controller as multi-instance within controller block “PIDCtrlV2”, that is, without


using a technology object. Adjusting the symbolic name of the respective
technology object “PID_Compact” is then no longer necessary.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 79
5 Installation and Commissioning

Table 5-3
No. Action
1. Add a cyclic interrupt OB “OB30”, for example with a cycle time of 100 ms (0.1 s) into your
program.
Siemens AG 2015 All rights reserved

2. In cyclic interrupt OB “OB30” you call the controller block “PIDCtrlV2”.


Inform controller block “PIDCtrlV2” of the clock cycle of the cyclic interrupt OB via the
“Cycle” input. The input expects the clock cycle in the unit seconds (s).

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 80
5 Installation and Commissioning

No. Action
3. Create a new technology object “PID_Compact”.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 81
5 Installation and Commissioning

No. Action
4. If you wish to use several controllers in your program, a separate technology object
“PID_Compact” must be created for each “PIDCtrlV2” controller block.
In controller block “PIDCtrlV2”, the symbolic name “PID_Compact_1” has been
preassigned for the technology object.
If you wish to use several controllers in your program, the symbolic name
“PID_Compact_1” must be replaced with the name of the respectively used technology
object in each further “PIDCtrlV2_(x)” controller block via the “Find and replace” task.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 82
6 Configuration and Settings

6 Configuration and Settings


Introduction
Here you learn how you can design your own faceplates and screen windows with
the existing objects of the library of this application in only a few steps.
The requirements are either
performing the steps in chapter “Installation”, or
already configured objects of the “Motor” group.

Note The following chapter gives detailed instructions on how to create your own
faceplates.
If you are only interested in operating the application example, you can directly
jump to the chapter “Operation of the Application”.

Configuration of a pump
In the following step table it is assumed that objects for a pump shall be
configured.
Already configured objects for the “Motor” are used as a template here.
Siemens AG 2015 All rights reserved

NOTICE When executing the following steps, the underlying project will partially be
corrupted.
Therefore, do not execute the following steps with a project you still need.

Table 6-1
No. Action
1. Copy an existing project and open it.
If the project library of the project does not yet have motor types and motor
master copies, copy these from the global library “WCP Faceplates V13 SP1”
into the project library.
Open the project library.
2. In the project library you add one new “PUMP” folder respectively in “Types” and
in “Master copies”.
3. In “Types > Motor” you select faceplate “Motor_Icon” and choose menu item
“Duplicate type” from the context menu.
In the “Duplicate type” window which appears, you select type name
“Pump_Icon”.
In “Types > Motor” you select the UDT “Motor_UDT” and choose menu item
“Duplicate type” from its context menu.
In the “Duplicate type” window which appears you select type name
“Pump_UDT”.
In “Types > Motor” you select faceplate “Pump_Icon” and the UDT
“Pump_UDT” and move them to folder “Types > Pump” via drag&drop.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 83
6 Configuration and Settings

No. Action
4. In the Properties menu of the “Pump_UDT” type you select entry “Edit
faceplate” and adjust it accordingly to your requirements.
In the project library you then select the new version of the UDT and select
the entry “Release version” from its Properties menu.
In “HMI-tags” you create a new group “Pump” and in it a tag table
“Pump_001”.
Open the tag table and create a new tag “Pump_001” with data type
“Pump_UDT”.
5. In “Copy templates > _ScreenTemplates” you select the screens
– “Template_0” (window frames with button for screen switching)
– “Template_1_4-8” (general picture for your own screen contents)
– “Template_2” (screen to display alarms)
– “Template_3” (optional, screen to display trends)
and drag them into your project.
Rename the screens:
– “Template_0” in “Pump_0”
– “Template_1_4-8” in “Pump_1”
– “Template_2” in “Pump_2”
– “Template_3” in “Pump_3” (optional, screen to display trends)
If you need further screens for your own screen contents, you can drag
“Template_1_4-8” into your project several times. A total of eight screens can
Siemens AG 2015 All rights reserved

be represented in the screen window. Rename the screens:


– “Template_1_4-8” in “Pump_3” or “Pump_4” (if using “Template_3”)
– all further inserted “Template_1_4-8” screens accordingly in rising order
(“Pump_4” to “Pump_8”)
6. Open the “Pump_0” screen and select the “Texts” tab in its properties.
Adjust the texts of the buttons in the screen (“Tab_1” to “Tab_8”) to your
requirements (this is only necessary for the buttons required for screen
selection later on).
In the respective object properties you select the “Visibility” in the respective
object properties of the buttons in “Properties > Miscellaneous”, depending on
whether these buttons are later required for screen selection.
Save the screen.
Design the screens without screen contents (“Template_1_4-8”) as desired.
The “Pump_2” screen with the alarm control needs not be adjusted. The
alarms are automatically selected via a script.

Optional (when using “Template_3”, trend view):


Open the “Pump_3” screen (“Template_3”), if using it.
In the properties of the contained trend view, you select the entry “Trends”
and configure the desired number of trends.
As a data source for all trends you configure the “Trend” tag from tag group
“_TagTemplates” with the “TagDummies” tag table.
In “Events > Loaded” you open the script and assign the data source for the
configured trends. An example for five trends has already been configured
and needs to be adjusted accordingly.
Needs to be adjusted regarding the number of trends. According to the
number of trends, the script of the screen must also be revised to assign the
respective tags there.
Save the screen.
7. In the project navigation you select screens “Pump_0” to “Pump_8” and move
them into the project library in “Types > Pump” via drag&drop.
8. In “Types > Motor” you select faceplate “Pump_Icon” and choose the menu

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 84
6 Configuration and Settings

No. Action
item “Edit faceplate” from its context menu.
Design the faceplate according to your needs.
Then select the new version of the faceplate in the project library and select
the “Release version” entry from its Properties menu.
Move the faceplate from the project library into a screen of your choice via
drag&drop.
9. In “Master copies > Motor” you use drag&drop to move the “Motor_1” screen
window from the project library into the same screen to which you have
already copied the “Pump _Icon” faceplate.
Open the Properties menu of screen window “Motor_1”.
Rename the screen window from “Motor_1” to “Pump_1”.
Adjust the tag prefix from “Motor_001” to “Pump_001”.
Use drag&drop to move the “Pump_1” screen window into the project library
under “Master copies > Pump”.
10. In “Master copies > Motor” you select the “Motor_Alarms” alarm and use
drag&drop to move it to “HMI alarms”.
Open the alarms editor in the project navigation and adjust the alarms
according to your needs.
Select the alarms and drag them to “Master copies > Pump” in the project
library.
Rename the alarms in the project library to “Pump_Alarms”.
Siemens AG 2015 All rights reserved

11. Open the global library “WCP Faceplates V13 SP1”.


Use drag&drop to copy the respective folders “Pump” in “Types” and “Master
copies” of your project library individually to the respective folders of the
global library.
Save the global library.
12. In order to make the screen window visible by clicking on the faceplate icon, the
“SetPropertyByConstant” function must be configured for the “Pump_Icon”
faceplate in “Events > Click” with the following parameters:
– Screen name: <name of the screen in which the blocks are used>
– Screen object: Pump_1
– Name of the property: visible
– Value: 1

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 85
7 Operating the Application

7 Operating the Application


Here you will find out how to operate the example project and which options the
blocks provide to engage in the process.
The opened or downloaded project is a prerequisite for operating the application:
Table 7-1
Step Description
1. Extract the “66839614_WCP_Faceplates_Demo_V13_SP1.zip” file into a
directory of your choice.
2. Open the project with TIA Portal V13 SP1 Update 3, or higher.
3. Adjust the configured hardware according to your requirements at
“Devices & Networks”.
4. Open the STEP 7 project and generate it new.
5. Load the technology blocks into the controller and start them.
6. Open the WinCC Professional project and generate it new.
7. Start the WinCC project.
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 86
7 Operating the Application

7.1 Navigation
Overview of the user interface
Figure 7-1 1
Siemens AG 2015 All rights reserved

2 3
4

Table 7-2
Figure Explanation
1 Start screen
Here you can branch into two further screens in the bottom area via the
buttons.
2 Application example
Here you can reach the example blocks of this application.
3 Support
Here you find out more about the Siemens Industry Online Support.
4 Navigation
You reach the navigation in each screen at the left window frame.
You reach the start screen via this button.

This button takes you to the preceding screen.

Close the application via this button.

This button enables you to change the language.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 87
7 Operating the Application

Element selection
2
Figure 7-2

1
Siemens AG 2015 All rights reserved

Table 7-3
Figure Explanation
1 Primary navigation
Here you can select the individual sets of the application via buttons.
The application consists of a total of four sets with two elements respectively.
2 Secondary navigation
Here, the individual elements (example blocks) of the selected sets can be
accessed.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 88
7 Operating the Application

Block call
Figure 7-3

2
Siemens AG 2015 All rights reserved

Table 7-4
Figure Explanation
1 When calling an element of this application, only the faceplate icon can be
seen.
2 When selecting the faceplate icon, the appropriate screen window containing
more detailed information opens.

Screen window operation


1
Figure 7-4

Table 7-5
Figure Explanation
1 Shift window bar
The complete window can be shifted with the top window bar.
2 Tab
The individual information and settings pages can be called up via the tabs.
3 Window representation
You determine the representation of the screen window via these buttons.
The screen window can be reduced via this button.
The screen window can be enlarged via this button.
The screen window can be closed via this button.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 89
7 Operating the Application

7.2 Faceplate icon


Figure 7-5

The faceplate icon has the following properties:


Simplified status display
Opens the respective screen window via mouse-click
Contains no language-dependent objects

The faceplate icon offers the following functionality:


Display of the operating states:
– Setpoint value
– Actual value
– Manual value
Siemens AG 2015 All rights reserved

– Enabled variable component


– Signal processing
– Mode
– Interlock
Warnings display:
– Warning upper actual value limit
– Warning lower actual value limit
Display of errors:
– General error
Operation:
– Calling up the assigned faceplate window

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 90
7 Operating the Application

The following table shows the possible operating modes of the actual value field:
Table 7-6
State QdwState Symbol Blinking
Actual value within Bits 12, 13, 14 and no
the limit values 15 = 0
Alarm lower limit Bit 12 = 1 yes
undercut
Warning lower limit Bit 13 = 1 no
undercut
Warning upper limit Bit 14 = 1 no
exceeded
Alarm upper limit Bit 15 = 1 yes
exceeded

The following table shows the possible status displays:


Table 7-7
State Symbol
P component OFF
P component ON
I component OFF
Siemens AG 2015 All rights reserved

I component ON
D component OFF
D component ON
Upper warning limit actual value OFF
Upper warning limit actual value ON
Lower warning limit actual value OFF
Lower warning limit actual value ON
Signal processing manual value
Signal processing of process value
Mode REMOTE
Mode LOCAL
Interlock OFF
Interlock triggered
No error
Error pending

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 91
7 Operating the Application

7.3 Screen window


The screen window has the following properties:
Tab selection
Reduce, maximize, close
Detailed status display
Provides the option of engaging in the process
Contains language-dependent objects (German-DE / English-US)
Shows relevant alarms (filtered)
Enables changes for service staff

Overview
Figure 7-6
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Specifying a setpoint (only in “Remote” mode).
Specifying a manual value (only in signal type “Manual”).
Reset error states.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 92
7 Operating the Application

The following table shows the possible operating modes of the actual value field:
Table 7-8
State QdwState Symbol Blinking
Actual value within Bits 12, 13, 14 and no
the limit values 15 = 0
Alarm lower limit Bit 12 = 1 yes
undercut
Warning lower limit Bit 13 = 1 no
undercut
Warning upper limit Bit 14 = 1 no
exceeded
Alarm upper limit Bit 15 = 1 yes
exceeded

The following table shows the possible status displays:


Table 7-9
State Symbol Symbol
Off On
P component
Siemens AG 2015 All rights reserved

I component

D component

Real value
Manual value
Remote controlled
Inverted
External error
Interlock
General error

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 93
7 Operating the Application

Alarms
Figure 7-7
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Display of block-related alarms and messages
Acknowledge alarms

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 94
7 Operating the Application

Trends
Figure 7-8
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Display the setpoint
Display the actual value
Display the manipulated variable

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 95
7 Operating the Application

Actual value
Figure 7-9
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Actual value scaling
– Setting the upper process value limit
– Setting the lower process value limit
– Setting the lower analog value limit
– Setting the upper analog value limit
Actual value limits
– Setting the lower actual value limit
– Setting the upper actual value limit

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 96
7 Operating the Application

MONITORING
Figure 7-10
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Setting the upper warning limit of the actual value
Setting the lower warning limit of the actual value

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 97
7 Operating the Application

Output
Figure 7-11
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Setting the upper output value limit
Setting the lower output value limit
Setting the minimal ON time of the PWM output
Setting the minimal OFF time of the PWM output signal

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 98
7 Operating the Application

Parameter
Figure 7-12
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Setting parameters for the P component
– Gain
– Weighting
Setting parameters for the I component
– Integration time
Setting parameters for the D component
– Derivative time
– Time lag coefficient
– Weighting
Making further settings
– Sampling time
– Reversing the control direction

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 99
7 Operating the Application

Service
Figure 7-13
Siemens AG 2015 All rights reserved

In this view you can perform the following actions:


Switching over the process input
– I/O value (analog value)
– Real value
Switching over the operating mode
– Local operation
– Remote control
Switching the signal processing
– Manual value
– Process value

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 100
8 Block Connectors

8 Block Connectors
8.1 Input parameters
Table 8-1
Parameter Data type Default setting Description
EN BOOL FALSE Release
InvertControl BOOL FALSE 1= Activate reversing of control
direction
InputPerOn BOOL FALSE 0= Real value, 1= S7 periphery
InputUpperLimit REAL 120.0 Input of upper actual value limit
(%)
InputLowerLimit REAL 0.0 Setting the lower actual value
limit (%)
UpperPointOut REAL 100.0 Input of scaled upper actual
value (%)
LowerPointOut REAL 0.0 Input of scaled lower actual
value (%)
UpperPointIn REAL 27648.0 Input of upper value of
Input_PER
Siemens AG 2015 All rights reserved

LowerPointIn REAL 0.0 Input of lower value of


Input_PER
InputUpperWarning REAL 200.0 Input of upper warning limit (%)
InputLowerWarning REAL -200.0 .. Input of lower warning limit (%)
MinimumOnTime REAL 0.0 Input der minimal switch-on time
(s)
MinimumOffTime REAL 0.0 Input der minimal switch-off time
(s)
OutputUpperLimit REAL 100.0 Input der upper limit of the
output value (%)
OutputLowerLimit REAL 0.0 Input of lower limit of the output
value (%)
SetpointUpperLimit REAL 100.0 Upper setpoint value limit
SetpointLowerLimit REAL 0.0 Lower setpoint value limit
PIDManualEnable BOOL FALSE 1= Enable controller parameter
Gain REAL 1.0 Enter the proportional gain
Ti REAL 20.0 Enter the integration time (s)
Td REAL 0.0 Enter the derivative time (s)
TdFiltRatio REAL 0.0 Enter the derivative time lag
coefficient
PWeighting REAL 1.0 Enter the weighting of the P
component
DWeighting REAL 1.0 Enter the weighting of the D
component
Cycle REAL 0.5 Enter the sampling time for the
PID algorithm (s)
Setpoint REAL 0.0 Setpoint of the PID controller in
automatic mode
Input REAL 0.0 Actual value in REAL format

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 101
8 Block Connectors

Parameter Data type Default setting Description


Input_PER INT 0 Analog actual value (I/O)
ManualValue REAL 0.0 This value is used as output
value in manual mode.
LOCK BOOL FALSE 1= Interlock pending
ERR_EXTERN BOOL FALSE 1= External error
LIOP_SEL BOOL FALSE 0= Operator, 1= Interconnection
L_AUT BOOL FALSE 0= Manual value active
1= Process value active
L_REMOTE BOOL FALSE 0= Local, 1= Remote
L_RESET BOOL FALSE Reset errors (pos. edge)
INSTANCE STRING[16] PIDCtrlV2_001 Filter attribute for alarms,
labeling of title bar
RESTART BOOL FALSE Initializing at restart
VISIBILITY BYTE 0 Representation of
faceplate window
OPdwCmd DWORD 0 Control tag (HMI)
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 102
8 Block Connectors

8.2 Output parameters


Table 8-2
Parameter Data type Default setting Description
QSetpoint REAL 0.0 Setpoint of the PID controller
in automatic mode
ScaledInput REAL 0.0 Scaled actual value
Output REAL 0.0 Output value in REAL format
Output_PER INT 0 Analog output value
Output_PWM BOOL FALSE 1= Pulse width modulation
ON output
SetpointLimit_H BOOL FALSE 1= Absolute upper limit of
setpoint value reached
SetpointLimit_L BOOL FALSE 1= Absolute lower limit of
setpoint value reached
InputWarning_H BOOL FALSE 1= Upper warning limit of
actual value reached or
exceeded
InputWarning_L BOOL FALSE 1= Lower warning limit of
actual value reached or
undercut
Siemens AG 2015 All rights reserved

State INT 0 The State parameter


indicates the current
operating mode of the PID
controller.
Error BOOL FALSE 1= At least one error
message within the current
cycle
ErrorBits DWORD DW#16#0 The ErrorBits parameter
displays the pending error
messages
QGain REAL 0.0 Proportional gain used
QTi REAL 0.0 Integration time used
QTd REAL 0.0 Derivative time used
QdwState DWORD DW#16#0 Status tag (HMI)
QPERIPH BOOL FALSE 0= Real value active, 1= S7
periphery active
QMAN_AUT BOOL FALSE 0= Manual value active
1= Process value active
QREMOTE BOOL FALSE 0= Local, 1= Remote
QLOCK BOOL FALSE 1= Interlock error
QERR BOOL FALSE 1= Error
QERR_EXT BOOL FALSE 1= External error
QwAlarm WORD W#16#0 Alarm tag
ENO BOOL FALSE Release

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 103
9 Further Notes

9 Further Notes
Further blocks for this application
This document is part of an application which describes further technology blocks.
Within the framework of this application, the number of technology blocks is
successively expanded.

The following table shows the roadmap:


Table 9-1
Block Description
MOTOR Visualization and operator control of a motor with fixed speed and
rotational direction
VALVE Visualization and operator control of a binary valve
DIGITAL Visualization and operation of digital signals.
ANALOGUE Visualization and operation of analog signals.
PIDCTRL Visualization and operator control of a software-implemented PID
controller for regulating technical parameters with continuous input and
output values.
SIMODIR Visualization and control of the SIMOCODE pro motor management
system as a direct starter.
Siemens AG 2015 All rights reserved

SIMOREV Visualization and control of the SIMOCODE pro motor management


system as a reversing starter.
SINAG120 Visualization and control of the SINAMICS G120 frequency converter.

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 104
10 Links & Literature

10 Links & Literature


This list is by no means complete and only presents a selection of suitable
information.

10.1 Bibliographic references


Table 10-1
Topic Title
/1/ STEP 7 Automating with SIMATIC S7-1200
SIMATIC S7-1200 Author: Hans Berger
Publicis MCD Verlag
ISBN: 978-3-89578-355-5
/2/ STEP 7 Automation with SIMATIC S7-1500
SIMATIC S7-1500 Author: Hans Berger
Publicis MCD Verlag
ISBN: 978-3-89578-403-3
/3/ STEP 7 Automating with STEP 7 in STL and SCL
STL and SCL Author: Hans Berger
Publicis MCD Verlag
ISBN: 978-3-89578-397-5
Siemens AG 2015 All rights reserved

10.2 Internet link specifications


Table 10-2
Topic Title
\1\ Siemens Industry http://support.automation.siemens.com
Online Support
\2\ Download page of the http://support.automation.siemens.com/WW/view/en/66839614
entry
\3\ Configuration
instruction for creating
faceplates for Comfort http://support.automation.siemens.com/WW/view/en/68014632
Panels and WinCC
Runtime Advanced
\4\ SENTRON PAC
faceplates for WinCC http://support.automation.siemens.com/WW/view/en/67318600
Runtime Professional
\5\ Sample blocks for
STEP 7 V5 and WinCC http://support.automation.siemens.com/WW/view/en/31624179
V7
\6\ Sample blocks for
STEP 7 V5 and WinCC http://support.automation.siemens.com/WW/view/en/36435784
flexible 2008

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 105
11 History

11 History
Table 11-1
Version Date Modifications
V1.0 06/2015 First version
Siemens AG 2015 All rights reserved

PIDCtrl block WinCC Professional, S7 (TIA Portal), S7-1500


Entry ID: 66839614, V1.0, 06/2015 106

You might also like