You are on page 1of 81

Cover

Sample Blocks for STEP 7 and WinCC


flexible
WinCC flexible
Application Description January 2010

Applications & Tools


Answers for industry.

Industry Automation and Drives Technologies Service & Support Portal


This article is taken from the Service Portal of Siemens AG, Industry Automation
and Drives Technologies. The following link takes you directly to the download
page of this document.

Copyright Siemens AG 2010 All rights reserved

http://support.automation.siemens.com/WW/view/de/36435784

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

SIMATIC
WCF_BLOCKS_PIDCtrl (FB670)

Copyright Siemens AG 2010 All rights reserved

Application

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Automation Task

Automation Solution

Basics

Function Mechanisms

Configuration Process

Starting up the
Application

Operating the Application

Block Diagram

Block Connectors

Further Notes

Literature

History

Warranty and Liability

Warranty and Liability


Note

The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The application
examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. 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 without prior notice. If there are any deviations
between the recommendations provided in this application example and other
Siemens publications e.g. Catalogs the contents of the other documents
have priority.

We do not accept any liability for the information contained in this document.

Copyright Siemens AG 2010 All rights reserved

Any claims against us based on whatever legal reason resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
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
("wesentliche Vertragspflichten"). The damages for a breach of a substantial
contractual obligation are, 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.
It is not permissible to transfer or copy these application examples or excerpts of
them without having prior authorization from Siemens Industry Sector in writing.
For questions about this document please use the following e-mail address:
online-support.automation@siemens.com

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Table of Contents

Table of Contents
Warranty and Liability ........................................................................................................... 4
1

Automation Task ......................................................................................................... 7


1.1

Overview ........................................................................................................ 7

Automation Solution................................................................................................... 9
2.1
2.2

Overview ........................................................................................................ 9
Required Hardware and Software Components .................................... 10

Basics........................................................................................................................... 11

Function Mechanisms .............................................................................................. 12

Copyright Siemens AG 2010 All rights reserved

4.1
4.2
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.3
4.3.1
4.3.2
4.3.3
4.4
4.5
4.5.1
4.6
4.7
4.7.1
4.8
4.8.1
4.8.2
4.8.3
4.8.4
4.8.5
4.8.6
4.8.7
4.8.8
4.8.9
4.8.10
4.8.11
5

Configuration Process ............................................................................................. 53


5.1
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
5.1.6
5.1.7

Configuring the faceplate window ............................................................ 55


Layer 0 frames ......................................................................................... 55
Layer 1 tab 1 ............................................................................................ 58
Layer 2 tab 2 ............................................................................................ 59
Layer 3 tab 3 ............................................................................................ 59
Layer 4 tab 4 ............................................................................................ 59
Level 5 Tab 5 ........................................................................................... 60
Layer 6 tab 6 ............................................................................................ 60

Starting up the Application..................................................................................... 61


6.1
6.2

Interfaces of the faceplate window........................................................... 12


Dynamic properties of the faceplate window .......................................... 14
Animations ................................................................................................... 14
Process ........................................................................................................ 15
Process_Limits............................................................................................ 17
Process_Values .......................................................................................... 19
Process_Parameters.................................................................................. 20
Static properties of the faceplate window ............................................... 24
Process_Trends_Value ............................................................................. 24
Label ............................................................................................................. 24
UserManagement ....................................................................................... 25
Interfaces of the faceplate icons............................................................... 26
Dynamic properties of the faceplate icon ................................................ 27
Process ........................................................................................................ 27
Static properties of the faceplate icon ..................................................... 30
Alarms and messages ............................................................................... 31
Message tag ................................................................................................ 31
Control and status signals ......................................................................... 32
Processing of switching commands in the controller............................. 32
Evaluating process states and displaying them in WinCC flexible...... 34
Local / remote mode................................................................................... 36
Setpoint / manual value specification ...................................................... 38
Process variable real value/S7 periphery ............................................... 40
Enabling/disabling of PID components.................................................... 42
Controller configuration.............................................................................. 44
Manipulated variable adjustment.............................................................. 46
Manipulated variable limit .......................................................................... 48
Disturbance variable compensation......................................................... 50
External error / block locked...................................................................... 51

Configuring the STEP 7 block................................................................... 62


Configuring the WinCC flexible faceplates ............................................. 63

Operating the Application ....................................................................................... 67

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Table of Contents
7.1
7.2

Faceplate icon ............................................................................................. 67


Faceplate window ....................................................................................... 69

Block Diagram............................................................................................................ 76

Block Connectors...................................................................................................... 77
9.1
9.2

Input parameters......................................................................................... 77
Output parameters...................................................................................... 78

10

Further Notes.............................................................................................................. 79

11

Literature ..................................................................................................................... 80
11.1
11.2

History.......................................................................................................................... 81

Copyright Siemens AG 2010 All rights reserved

12

Bibliography................................................................................................. 80
Internet Link Specifications ....................................................................... 80

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Automation Task

Automation Task
1.1

Overview

Introduction
The sample blocks for STEP 7 and WinCC flexible is to offer the user various
automation functions or the use of 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.
The advantages when using faceplates in WinCC flexible are also illustrated:

central changeability
When changes are made to a faceplate, all locations of this faceplate are
automatically updated.

reuse in other projects

Copyright Siemens AG 2010 All rights reserved

Storing the faceplates in a library to be able to reuse them in another project.

Reducing the workload for the configuration


It is to be possible to quickly integrate frequently used automation components
into a configuration.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Automation Task

Description of the automation task


This application describes the configuration of the "PIDCtrl" (FB 670) technology
block and the related faceplates. They are used to visualize and control a
configurable software PID controller to control technical processes with continuous
input and output variables. To calculate the variables the block uses the "CONT_C"
standard block from the "PID Control Blocks" standard library.

Copyright Siemens AG 2010 All rights reserved

The block offers the following functions:

NOTE

Local / remote mode

Setpoint specification

Error signal specification

PID algorithm

Manual value specification

Processing of the manipulated value

Disturbance variable compensation

Interconnection of external errors

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.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Automation Solution

Automation Solution
2.1

Overview

Display
The figures below show the block in the controller, the faceplate icon and the
faceplate window to control and operate the continuous control:
Table 2-1
Faceplate Icon and Faceplate

Copyright Siemens AG 2010 All rights reserved

Block

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Automation Solution

2.2

Required Hardware and Software Components


The application was generated with the following components:

Hardware components
Table 2-2
Component

Number

Note

Development system

PC for the configuration of the control functions


and WinCC flexible. The hardware
requirements for STEP 7 and WinCC flexible
apply.

S7-300 CPU
or
S7-400 CPU

Alternatively, the controller can also be


simulated with PLCSIM.

Software components
Table 2-3

Copyright Siemens AG 2010 All rights reserved

Component

Number

STEP 7 V5.4 SP5

MLFB / Order number

Note

6ES7810-4CC08-0YA7

WinCC flexible 2008 SP1

6AV6613-0AA51-3CA5

S7-PLCSIM V5.4

6ES7841-0CC05-0YA5

[Optional]

Sample files and projects


The following list contains all files and projects that are used in this example.
Table 2-4
Component

10

Note

36435784_S7_WCF_Blocks_CODE.zip

The zip file contains the STEP 7


project with the integrated
WinCC flexible project.

36435784_Dokumentation_d.zip

All documents for this application.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Basics

Basics

Introduction
Faceplates are objects that you compile from existing picture objects.
Faceplates provide the following advantages:

central changeability

reuse in other projects

reducing the workload for the configuration

Faceplates are created and changed in the "Faceplate" editor. The created
faceplates are added to the "Project Library" and can be inserted into screens in
the same way as other objects.
Using a faceplate

Copyright Siemens AG 2010 All rights reserved

After you have generated a faceplate, the faceplate appears as an object in the
project library.
Insert the faceplate into your process screens and configure it for the respective
location in the properties window.
Faceplate instance
Inserting a faceplate into a process screen, generates an instance of this faceplate.
When editing the faceplate in the project library the resulting faceplate instance is
automatically updated.
Reusing faceplates in several projects
WinCC flexible enables you to add faceplates to a global library. This enables you
to reuse faceplates also in other projects.
As soon as you insert a faceplate from a global library into a screen, the faceplate
is also stored in the project library. You only change the faceplate in the project
library and the changes are not automatically adopted in the global library.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

11

Function Mechanisms

Function Mechanisms
4.1

Interfaces of the faceplate window

Copyright Siemens AG 2010 All rights reserved

Figure 4-1

12

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Basically, the interface of a faceplate differentiates between dynamic and static


properties:
A dynamic property is always connected to a tag via the interface; in Runtime,
the tag supplies the property with values.

Static properties are either configured directly in the picture editor, the
properties are then stored together with the faceplate, or at the interface of the
faceplate. Static properties cannot be changed in Runtime.

Copyright Siemens AG 2010 All rights reserved

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

13

Function Mechanisms

4.2

Dynamic properties of the faceplate window

4.2.1

Animations
The tags of this group are used to display and represent the faceplate windows;
process connection is optional.

Visibility
The "Visibility" property is used to influence the display properties of the faceplate
window during runtime.
The following properties are influenced:

opening

closing

minimizing

maximizing

selection of individual tabs

Table 4-5
Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.OP_VISIBILITY

Data type

byte

Address

DB 670 DBB 346

Length

1 byte

Reading cycle

100 ms

Acquisition mode

Cyclic when used

Bits 0..6 are used for opening or selecting the individual tabs of the faceplate
window (maximized display). If more than one bit is set, only the background of the
faceplate window is displayed. If bit 7 is set, only the faceplate window title bar is
displayed (minimized display) irrespective of the status of the remaining bits. If
none of the bits is set, the faceplate window is closed.
The following table illustrates the structure of the tags.
Table 4-6
Bit

Select

Minimize

Note

Tab 6

Tab 5

Tab 4

Tab 3

Tab 2

Tab 1

The tag can also be defined as an internal tag without PLC connection if only a
limited number of control tags are available.
If the tag has a PLC connection, read and write access is possible from the
controller. Aside from the known screen selection, the respective faceplate
window can also be opened from the controller and a specific tab can be
selected.

14

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.2.2

Process
The tags of this group feature a process connection and are the basic interface
between controller and operating device.

Command
The "Command" property is used to transfer the commands of WinCC flexible to
the controller. The block in the controller evaluates the control command, executes
the desired action if necessary and subsequently resets all pending control
commands. For this purpose the value of the control tag is set to value "0".
Table 4-7

Symbolic Name

PIDCtrlDB.OPdwCmd

Data type

DWord

Address

DB 670 DBD 148

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

The following table illustrates the structure of the tags.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

D_SEL
I_SEL
P_SEL

ALARM_HIGH
WARNING_HIGH
WARNING_LOW
ALARM_LOW
EXTERN
PERIPHERY
INTEGRAL_HOLD
INIT_I_ON

REMOTE
LOCAL
PROCESS
MANUAL

RESET

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

Table 4-8

Signal

Copyright Siemens AG 2010 All rights reserved

Tag used

15

Function Mechanisms

Instance
The "Instance" property is a text string with a field length of 16 characters and
has two locations:

The tag is used as a filter criterion for the message display of the faceplate
window. This ensures that only messages that relate to this faceplate window
are displayed.

The tag is displayed in the right half of the title bar to distinguish between the
individual faceplate instances.

Table 4-9
Tag used
Symbolic Name

PIDCtrlDB.INSTANCE

Data type

String

Address

DB 670 DBB 78

Length

16 bytes

Reading cycle

1s

Acquisition mode

Cyclic when used

Copyright Siemens AG 2010 All rights reserved

Figure 4-2

NOTE

The tag contents have to be adjusted for each instance of a faceplate.


The tag contents are specified in the declaration section of the respective
function block as a start value. Please ensure that the messages in the
WinCC flexible discrete alarms editor include not only the actual message
text, but also the same text string.

16

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

State
The "State" property is used to display the different states in the WinCC flexible
faceplate.
Table 4-10
Tag used
Symbolic Name

PIDCtrlDB.QdwState

Data type

DWord

Address

DB 670 DBD 98

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

The following table illustrates the structure of the tags.

4.2.3

D_PART_ON
I_PART_ON
P_PART_ON

PERIPHERY_ON
INTEGRAL_HOLD
INIT_I_ON

QREMOTE
QMAN_AUT
ALARM_HIGH
WARNING_HIGH
WARNING_LOW
ALARM_LOW
AH_ACTIVE
WH_ACTIVE
WL_ACTIVE
AL_ACTIVE

LOCK
QLOCK
QERR_EXT
QERR

Signal

Copyright Siemens AG 2010 All rights reserved

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

Table 4-11

Process_Limits
The tags in this group have a process connection and can be monitored and
controlled in the "Limits" tab.
The tags are used to define the high and low limit of the manipulated value and to
define limits for message triggering.

HighLimit
The HighLimit" property shows the upper limit (limit) of the manipulated value.
When reaching this limit due to the process variable an additional alarm is
triggered, according to the activated messages in the "limits" tab.
Table 4-12
Tag used
Symbolic Name

PIDCtrlDB.OP_LMN_HLM

Data type

Real

Address

DB 670 DBD 306

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

17

Function Mechanisms

LowLimit
The "LowLimit" property shows the lower limit (limit) of the manipulated value.
When reaching this limit due to the process variable an additional alarm is
triggered, according to the activated messages in the "limits" tab.
Table 4-13
Tag used
Symbolic Name

PIDCtrlDB.OP_LMN_LLM

Data type

Real

Address

DB 670 DBD 318

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

WarningUpperLimit
When exceeding this limit due to the process variable an alarm is triggered,
according to the activated messages in the "limits" tab.
Copyright Siemens AG 2010 All rights reserved

Table 4-14
Tag used
Symbolic Name

PIDCtrlDB.OP_LMN_HWN

Data type

Real

Address

DB 670 DBD 310

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

WarningLowerLimit
When falling below this limit due to the process variable an alarm is triggered,
according to the activated messages in the "limits" tab.
Table 4-15
Tag used
Symbolic Name

18

PIDCtrlDB.OP_LMN_LWN

Data type

Real

Address

DB 670 DBD 314

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.2.4

Process_Values
The tags in this group have a process connection and can be monitored and
controlled in the "Overwiew" tab.

Value
The "Value" property is is used to acquire the effectively acting process variable at
the block output. When reading the process variable as peripherial value it is
previously normed according to the input parameters "PV_FACTOR" and
"PV_OFFSET".
Table 4-16

Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.QPV

Data type

Real

Address

DB 670 DBD 134

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

SetPoint
The "SetPoint" property is used to assign an internal setpoint in the "Remote"
mode.
Table 4-17
Tag used
Symbolic Name

PIDCtrlDB.OP_SP_INTERNAL

Data type

Real

Address

DB 670 DBD 278

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

ManValue
The "ManValue" property is used to assign a manual value in the "Remote" mode.
The control loop is interrupted when a manual value is set and only the parameters
"LMN_HLM", "LMN_LLM", "LMN_FACTOR" and "LMN_OFFSET" apply.
Table 4-18
Tag used
Symbolic Name

PIDCtrlDB.OP_MAN_VALUE

Data type

Real

Address

DB 670 DBD 282

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

19

Function Mechanisms

4.2.5

Process_Parameters
The tags in this group have a process connection and can be monitored and
controlled in the "Parameter" tab.

PropGain
The "PropGain" property specifies the proportional gain and indicates the control
enhancement.
Table 4-19
Tag used
Symbolic Name

PIDCtrlDB.OP_GAIN

Data type

Real

Address

DB 670 DBD 286

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

ResetTime
Copyright Siemens AG 2010 All rights reserved

The "ResetTime" property specifies the time properties of the integrator and
indicates the reset time.
Table 4-20
Tag used
Symbolic Name

PIDCtrlDB.OP_TI

Data type

Time

Address

DB 670 DBD 290

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

InitialValue
The "InitialValue" property specifies the initialization value for the integral
component and indicates the reset time. On the input, the output of the integrator
can be set to "I_ITL_ON".
Table 4-21
Tag used
Symbolic Name

20

PIDCtrlDB.OP_I_ITLVAL

Data type

Real

Address

DB 670 DBD 338

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

DerivTime
The "DerivTime" property specifies the time properties of the derivative unit and
indicates the derivative time.
Table 4-22
Tag used
Symbolic Name

PIDCtrlDB.OP_TD

Data type

Time

Address

DB 670 DBD 294

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

TimeLag
The "TimeLag" property specifies the delay for the derivative component and
indicates the time lag.
Table 4-23
Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.OP_TM_LAG

Data type

Time

Address

DB 670 DBD 298

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

DeadbWidth
The "DeadbWidth" property specifies the size of the dead band within which an
error signal has no effect on the controller and indicates the dead band width.
Table 4-24
Tag used
Symbolic Name

PIDCtrlDB.OP_DEADB_W

Data type

Real

Address

DB 670 DBD 302

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

21

Function Mechanisms

NormFactor
The "NormFactor" property is multiplied with the manipulated value "LMN" or
"LMN_PER" and is used to adjust the manipulated value range. It indicates the
factor for manipulated value factor.
Table 4-25
Tag used
Symbolic Name

PIDCtrlDB.OP_LMN_FACTOR

Data type

Real

Address

DB 670 DBD 330

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

NormOffset
The "NormOffset" property is added with the setting "LMN" or "LMN_PER" and is
used to adjust the manipulated value range. It indicates the factor for manipulated
value offset.
Copyright Siemens AG 2010 All rights reserved

Table 4-26
Tag used
Symbolic Name

PIDCtrlDB.OP_LMN_OFFSET

Data type

Real

Address

DB 670 DBD 334

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

P-Component
The "P-Component" property contains the manipulated variable and indicates the
proportionality component.
Table 4-27
Tag used
Symbolic Name

22

PIDCtrlDB.QLMN_P

Data type

Real

Address

DB 670 DBD 110

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

I-Component
The "I-Component" property contains the integral component of the manipulated
variable and indicates the integral component.
Table 4-28
Tag used
Symbolic Name

PIDCtrlDB.QLMN_I

Data type

Real

Address

DB 670 DBD 114

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

D-Component
The "D Component" property contains the derivative component of the manipulated
variable and indicates the derivative component.
Table 4-29
Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.QLMN_D

Data type

Real

Address

DB 670 DBD 118

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

23

Function Mechanisms

4.3

Static properties of the faceplate window


Static properties cannot be changed during runtime, this is why they never have a
process interface.

4.3.1

Process_Trends_Value
The properties of this group define the individual trends of the faceplate window.

Trends
The "Trends"property is a HMI object and defines the trends of the "Trends" tab. To
edit the trends, select the "Trends" property, the trends editor is opened using the
displayed "" button.
Figure 4-3

Copyright Siemens AG 2010 All rights reserved

Figure 4-4

4.3.2

Label
The properties of this group are used to label the faceplate window.

Text
The "Text" property is a text string and displayed in the left half of the title bar. For
example, the higher level definition (HID) or the location can be displayed here.
Figure 4-5

Unit
The "Unit" property is a text string and is used in the tabs "Limits" and "Parameter"
to display the physical units.

24

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.3.3

UserManagement
The properties of this group are used to assign the user rights.

Service
The "Service" property is a HMI object and is used as access protection for the
"Service" tab.

NOTE

In the application the "Service" group and the "Service" user is used as
authorization. The password is preset to "100" and can be changed in the
user administration of WinCC flexible.

Copyright Siemens AG 2010 All rights reserved

When you create a new instance of the faceplate window and do not enable
the "Service" property, the "Service" tab has no access protection.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

25

Function Mechanisms

4.4

Interfaces of the faceplate icons

Copyright Siemens AG 2010 All rights reserved

Figure 4-6

Basically, the interface of a faceplate differentiates between dynamic and static


properties:

26

A dynamic property is always connected to a tag via the interface; in Runtime,


the tag supplies the property with values.

Static properties are configured either directly in the screen editor, the
properties are then saved together with the faceplate, or at the faceplate
interface. Static properties cannot be changed in Runtime.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.5

Dynamic properties of the faceplate icon

4.5.1

Process
The tags of this group feature a process connection and are the basic interface
between controller and operating device.

State
The "State" property is used to display the different states in the WinCC flexible
faceplate.
Table 4-30

Symbolic Name

PIDCtrlDB.QdwState

Data type

DWord

Address

DB 670 DBD 98

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

The following table illustrates the structure of the tags.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

D_PART_ON
I_PART_ON
P_PART_ON

PERIPHERY_ON
INTEGRAL_HOLD
INIT_I_ON

QREMOTE
QMAN_AUT
ALARM_HIGH
WARNING_HIGH
WARNING_LOW
ALARM_LOW
AH_ACTIVE
WH_ACTIVE
WL_ACTIVE
AL_ACTIVE

LOCK
QLOCK
QERR_EXT
QERR

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

Table 4-31

Signal

Copyright Siemens AG 2010 All rights reserved

Tag used

27

Function Mechanisms

Visibility
The "Visibility" property is used to influence the display properties of the faceplate
window during runtime.
The following properties are influenced:

Note

opening

closing

minimizing

maximizing

selection of individual tabs

When clicking the faceplate icon, the "OP_VISIBILITY" tag is always loaded with
value "1". This results in the respective faceplate window being displayed with
tab 1.
Table 4-32

Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.OP_VISIBILITY

Data type

byte

Address

DB 670 DBB 346

Length

1 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

Bits 0..6 are used for opening or selecting the individual tabs of the faceplate
window (maximized display). If more than one bit is set, only the background of the
faceplate window is displayed. If bit 7 is set, only the faceplate window title bar is
displayed (minimized display) irrespective of the status of the remaining bits. If
none of the bits are set, the faceplate window is closed.
The following table illustrates the structure of the tags.
Table 4-33
Bit

Select

Minimize

Note

Tab 6

Tab 5

Tab 4

Tab 3

Tab 2

Tab 1

The tag can also be defined as an internal tag without PLC connection if only a
limited number of control tags are available.
Read and write access from the controller is possible if the tag has a PLC
connection. Aside from the known screen selection, the respective faceplate
window can also be opened from the controller and a specific tab can be
selected.

28

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Value
The "Value" property is is used to acquire the effectively acting process variable at
the block output. When reading the process variable as peripherial value it is
previously normed according to the input parameters "PV_FACTOR" and
"PV_OFFSET".
Table 4-34
Tag used
Symbolic Name

PIDCtrlDB.QPV

Data type

Real

Address

DB 670 DBD 134

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

ManValue
The "ManValue" property is used to assign a manual value in the "Remote" mode.
The control loop is interrupted when a manual value is set and only the parameters
"LMN_HLM", "LMN_LLM", "LMN_FACTOR" and "LMN_OFFSET" apply.
Copyright Siemens AG 2010 All rights reserved

Table 4-35
Tag used
Symbolic Name

PIDCtrlDB.OP_MAN_VALUE

Data type

Real

Address

DB 670 DBD 282

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclic when used

SetPoint
The "SetPoint" property is used to assign an internal setpoint in the "Remote"
mode.
Table 4-36
Tag used
Symbolic Name

PIDCtrlDB.OP_SP_INTERNAL

Data type

Real

Address

DB 670 DBD 278

Length

4 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

29

Function Mechanisms

4.6

Static properties of the faceplate icon


Static properties cannot be changed during runtime, this is why they never have a
process interface.

Unit

Copyright Siemens AG 2010 All rights reserved

The "Unit" property is a text string and is used to display the physical unit.

30

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.7

Alarms and messages


This application uses the discrete alarm procedure to display messages in
WinCC flexible. The messages have to be configured in the WinCC flexible alarm
management as discrete alarms.
In the sample configuration, all discrete alarms for the used faceplate instances
have already been created, just like their trigger tags.

4.7.1

Message tag
Table 4-37

Copyright Siemens AG 2010 All rights reserved

Tag used
Symbolic Name

PIDCtrlDB.QwAlarm

Data type

WORD

Address

DB 670 DBW 144

Length

2 bytes

Reading cycle

100 ms

Acquisition mode

Cyclically continued

The following table illustrates the structure of the tags. The message texts are
prefixed with the "PIDCtrl_001" filter attribute for the first instance of the PID control
faceplate window.
Table 4-38
Bit

Signal

Message text

ALARM_LOW

PIDCtrl_001: Alarm lower limit undercut1

ALARM_HIGH

PIDCtrl_001: Alarm upper limit exceeded1

PIDCtrl_001:

PIDCtrl_001:

QLOCK

PIDCtrl_001: Lock, value locked


PIDCtrl_001:

5
6

QERR_EXT

PIDCtrl_001: External error

QERR

WARN_LOW

PIDCtrl_001: Warning lower limit undercut

WARN_HIGH

PIDCtrl_001: Warning upper limit undercut1

PIDCtrl_001: Group error


1

PIDCtrl_001:

10
11

PIDCtrl_001:

12

LOCAL

PIDCtrl_001: Mode => LOCAL

13

REMOTE

PIDCtrl_001: Mode => REMOTE

14

MANUAL

PIDCtrl_001: Signal processing => MANUAL

15

PROCESS

PIDCtrl_001: Signal processing => PROCESS

1) Message includes the associated value of the limit that was up to date when the message was
generated.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

31

Function Mechanisms

4.8

Control and status signals

4.8.1

Processing of switching commands in the controller


The WinCC flexible "OPdwCmd" control tag of a block is used to transmit
commands from WinCC flexible to the controller. The block in the controller
evaluates the control command, executes the desired action if necessary and
subsequently resets all pending control commands. For this purpose the value of
the control tag is set to value "0".
Further notes for the use in WinCC flexible can be found unter the "Command"
property.
The following table illustrates the structure of the tags.

32

D_SEL
I_SEL
P_SEL

ALARM_HIGH
WARNING_HIGH
WARNING_LOW
ALARM_LOW
EXTERN
PERIPHERY
INTEGRAL_HOLD
INIT_I_ON

REMOTE
LOCAL
PROCESS
MANUAL

RESET

Signal

Copyright Siemens AG 2010 All rights reserved

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

Table 4-39

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Abbildung 4-7

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

33

Function Mechanisms

4.8.2

Evaluating process states and displaying them in WinCC flexible


The technology block of this application uses the "QdwState" (DWORD) output to
show the different states in the WinCC flexible process screen.
Further notes for the use in WinCC flexible can be found unter the "State" property.
The following table illustrates the structure of the tags.

D_PART_ON
I_PART_ON
P_PART_ON

PERIPHERY_ON
INTEGRAL_HOLD
INIT_I_ON

QREMOTE
QMAN_AUT
ALARM_HIGH
WARNING_HIGH
WARNING_LOW
ALARM_LOW
AH_ACTIVE
WH_ACTIVE
WL_ACTIVE
AL_ACTIVE

LOCK
QLOCK
QERR_EXT
QERR

Copyright Siemens AG 2010 All rights reserved

Signal

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

Table 4-40

34

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-8

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN
QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

35

Function Mechanisms

4.8.3

Local / remote mode


In the "local" mode the control commands of the operator are directly effective on
the device. In the "remote" mode, the control signals of the WinCC flexible Runtime
operation are enabled.

"LIOP_SEL"
If the "LIOP_SEL" input is set, the mode is specified by the "L_REMOTE"
control input.
If the "LIOP_SEL" input is not set, the mode is specified by the operator
("OPdwCmd" [Bit 18 and 19]).

L_REMOTE"
The "L_REMOTE" input is only effective when 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 "OPdwCmd" control word is only effective if the
"LIOP_SEL" input is not set.

Copyright Siemens AG 2010 All rights reserved

"LIOP_SEL" = 0 AND "OPdwCmd [Bit 18]" = 1 local


"LIOP_SEL" = 0 AND "OPdwCmd [Bit 19]" = 1 remote

"QREMOTE"
The mode is displayed on the "QREMOTE" block output.
"QREMOTE" = 0 local
"QREMOTE" = 1 remote

36

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-9

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN
QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET
PVPER_ON

QLMN_LLM
QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

37

Function Mechanisms

4.8.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 "SP_INTERNAL" setpoint.
If the manual value specification (QMAN_AUT = 0) is configured, the value
"MAN_VALUE" is written as manipulated variable on output "QLMN".

"LIOP_SEL"
If the "LIOP_SEL" input is set, the mode is specified by the "L_AUT" control
input.
If the "LIOP_SEL" input is not set, the mode is specified by the operator
("OP_dwCmd" [Bit 16 and 17]).

"L_AUT"
The "L_REMOTE" input is only effective when the "LIOP_SEL" input is set.
"LIOP_SEL" = 1 AND "L_AUT " = 0 manual value specification
"LIOP_SEL" = 1 AND "L_ AUT " = 1 setpoint value specification

Copyright Siemens AG 2010 All rights reserved

"OP_dwCmd"
The operator commands in the "OPdwCmd" control word are only effective if
the "LIOP_SEL" input is not set.
"LIOP_SEL" = 0 AND "OPdwCmd [Bit 16]" = 1 manual value specification
"LIOP_SEL" = 0 AND "OPdwCmd [Bit 17]" = 1 setpoint value specification

"QMAN_AUT"
The mode is displayed on the "QMAN_AUT" block output.
"QMAN_AUT" = 0 manual value specification "MAN_VALUE" active
"QMAN_AUT" = 1 setpoint value specification "SP_INTERNAL" active

38

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-10

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE
L_RESET

QLMN_LWN
QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_IN
PV_PER
MAN_VALUE
GAIN
TI

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

39

Function Mechanisms

4.8.5

Process variable real value/S7 periphery


The process variable can be linked in a peripheral format (WORD) or as an
external value in floating point format (REAL).

"PVPER_ON"
The "PVPER_ON" input is only effective when the "LIOP_SEL" input is set.
When the "PVPER_ON" input is active, the interconnection in the peripheral
format at "PV_PER" applies, otherwise the external value "PV_IN" applies.
"LIOP_SEL" = 1 AND "PVPER_ON " = 0 QPERIPH" = 0
"LIOP_SEL" = 1 AND "PVPER_ON " = 1 "QPERIPH" = 1

"OP_dwCmd"
The operator commands in the "OPdwCmd" control word are only effective 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"

Copyright Siemens AG 2010 All rights reserved

The mode is displayed on the "QPERIPH" output:


"QPERIPH" = 0 "PV_IN" is active
"QPERIPH" = 1 "PV_ PER" is active

40

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-11

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT
L_REMOTE

QLMN_HWN
QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL
I_SEL

QLMN_I
QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable
SAMPLE_T

QMAN_OUT
QREMOTE

SP_INTERNAL
Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_IN
PV_PER
MAN_VALUE
GAIN

QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

41

Function Mechanisms

4.8.6

Enabling/disabling of PID components


The proportional, integral und derivative components can be separately switched
on and off.

"P_SEL", "I_SEL" and "D_SEL"


The inputs "P_SEL", "I_SEL" and "D_SEL" are only effective when the
"LIOP_SEL" input is set. The current value of the respective controller
component is displayed on the outputs "QLMN_P", "QLMN_I" and "QLMN_D".

"LIOP_SEL" = 1 AND "P_SEL" = 1

"QLMN_P" = 1

"LIOP_SEL" = 1 AND "I_SEL" = 1

"QLMN_P" = 1

"LIOP_SEL" = 1 AND "D_SEL" = 1

"QLMN_D" = 1

"OPdwCmd"
The operator commands in the "OPdwCmd" control word are only effective if
the "LIOP_SEL" input is not set. The current value of the respective controller
component is displayed on the outputs "QLMN_P", "QLMN_I" and "QLMN_D".
"LIOP_SEL" = 0 AND "OPdwCmd [Bit 0]" = 1 "QLMN_P" = 1

Copyright Siemens AG 2010 All rights reserved

"LIOP_SEL" = 0 AND "OPdwCmd [Bit 1]" = 1 "QLMN_I" = 1


"LIOP_SEL" = 0 AND "OPdwCmd [Bit 2]" = 1 "QLMN_D" = 1

"INT_HOLD"
If the "INT_HOLD" input is set the "QLMN_I" I component is frozen.
The "INT_HOLD " input is only effective when the "LIOP_SEL" input is set.
The integrator is frozen via the HMI system via the "OPdwCmd" tag. The
operator commands in the "OPdwCmd" control word are only effective if the
"LIOP_SEL" input is not set.

"LIOP_SEL" = 1 AND "INT_HOLD" = 1


frozen.

Integral component is

"LIOP_SEL" = 0 AND "OPdwCmd [Bit 5]" = 1


frozen.

Integral component is

"I_ITL_ON"
If the "I_ITL_ON" input is set, the value to "I_ITLVAL" is used as initialization
value for the integral component. The "I_ITL_ON" input is only effective when
the "LIOP_SEL" input is set.
The integrator is initialized via the HMI system via the "OPdwCmd" tag. The
operator commands in the "OPdwCmd" control word are only effective if the
"LIOP_SEL" input is not set.

42

"LIOP_SEL" = 1 AND "I_ITL_ON " = 1

"I_ITLVAL" is active.

"LIOP_SEL" = 0 AND "OPdwCmd [Bit 4]" = 1

"I_ITLVAL" is active.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-12

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT
L_REMOTE

QLMN_HWN
QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable
LIM_ULW_Enable

QPV
QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

43

Function Mechanisms

4.8.7

Controller configuration
The following inputs are available for the configuration of the controller:

"GAIN" proportional gain


The "GAIN" input indicates the controller gain.

"TI" reset time


The "TI" input specifies the response time of the integrator.

"TD" derivative time


The "TD" input specifies the response time of the derivative action element.

"TM_LAG" time lag of the derivative component


The "TM_LAG" input specifies the time lag of the derivative component.

"DEADB_W" dead band width

Copyright Siemens AG 2010 All rights reserved

The error signal is lead over a dead band. Within the dead band there is no
further control of the process value. The DEADB_W" input specifies the
variable of the dead zone.

44

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-13

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

45

Function Mechanisms

4.8.8

Manipulated variable adjustment


The following inputs are available for the adjustment of the manipulated variable:

"LMN_FACTOR" manipulated value factor


The "LMN_FACTOR" input is multiplied with the manipulated value. The input
is used to adjust the manipulated variable range.

"LMN_OFFSET" manipulated value offset

Copyright Siemens AG 2010 All rights reserved

The "LMN_OFFSET" input is added to the manipulated value. The input is


used to adjust the manipulated value range.

46

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-14

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN

Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

47

Function Mechanisms

4.8.9

Manipulated variable limit


You can set an upper and a lower limit for the manipulated variable. In addition to
this, you can specify a threshold value at which the block sends a warning to the
HMI system.
The upper or lower manipulated variable limit is configured on the inputs
"LMN_HLM" and LMN_LLM". When the upper or lower limit is reached the outputs
"QLMN_HLM" or "QLMN_LLM" are active.
An upper or a lower warning value can be configured on the inputs "LMN_HWN"
and "LMN_LWN". When the upper warning value is exceeded or the lower warning
value is fallen short of, then the outputs "QLMN_HWN" or "QLMN_LWN" are
active.

Copyright Siemens AG 2010 All rights reserved

Note

"LMN" = "LMN_HLM"

"QLMN_HLM" = 1

"LMN" = "LMN_HLM"

"QLMN_HWN"= 1

"LMN" < "LMN_LWN"

"QLMN_LWN" = 1

"LMN" = "LMN_LLM"

"QLMN_LLM" = 1

The parameters to limit the manipulated variable and to trigger a message when
a threshold value is reached are checked for plausibility and are set accordingly.
In the HMI system or on the block outputs the respective process variables of the
parameters can be read. The inputs on the blocks are not overwritten.

48

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

Figure 4-15

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT

QLMN_HWN

L_REMOTE

QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON
P_SEL

QLMN_P
QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

PV_IN
PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

49

Function Mechanisms

4.8.10

Disturbance variable compensation


A disturbance variable can be cumulatively fed forward in floating point format
on the "DIST_VALUE" input. The "DIST_VALUE " input is only effective when
the "LIOP_SEL" input is set.
Figure 4-16

PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT
L_REMOTE

QLMN_HWN
QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON

QLMN_P

P_SEL

QLMN_I

I_SEL

QLMN_D

D_SEL

Copyright Siemens AG 2010 All rights reserved

QdwState
QLMN

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
PV_IN
PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

50

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Function Mechanisms

4.8.11

External error / block locked


Operating the block is not possible if a signal is pending on the "LOCK" input. All
process values at the outputs are frozen. When the signal goes to "LOCK" the
block is back in normal mode, possibly changed input states are readjusted. The
state is displayed on the "QLOCK " output:
"LOCK" = 0

"QLOCK" = 0

"LOCK" = 1

"QLOCK" = 1

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


input. All process values on the outputs receive value ,0. When the
"ERR_EXTERN"signal disappears again, the block continues to be in an incorrect
state until it is reset with "L_RESET" or the HMI operation. The state is displayed
on the output "QLOCK" and "QERR":
"ERR_EXTERN" = 1

"QERR_EXT" = 1

"QERR" = 1

"L_RESET"

Copyright Siemens AG 2010 All rights reserved

When setting the "LIOP_SEL" input parameter and a positive edge on the
"L_RESET" input, the "QERR" output is reset.
"LIOP_SEL" = 1 AND "L_RESET" = 1

"QERR" = 0

"OP_dwCmd"
By pressing the "RESET" button in the faceplate window, the bit 24 is set in
controlword "OP_dwCmd". The controller evaluates this bit and resets the
"QERR" output. The "LIOP_SEL"input parameter must not be set when doing
this.
"LIOP_SEL" = 0 AND "OPdwCmd [Bit 24] = 1 "QERR" = 0

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

51

Function Mechanisms

Figure 4-17

"PIDCtrl" (FB 670)


EN
LOCK
ERR_EXTERN

QLMN
QLMN_PER

LIOP_SEL

QLMN_HLM

L_AUT
L_REMOTE

QLMN_HWN
QLMN_LWN

L_RESET

QLMN_LLM

PVPER_ON
P_SEL

QLMN_P
QLMN_I

I_SEL

QLMN_D

D_SEL

QSP

INT_HOLD

QHLM

I_ITL_ON

QLLM

LIM_ULA_Enable

QPV

LIM_ULW_Enable

QER

LIM_LLW_Enable

QPERIPH

LIM_LLA_Enable

QMAN_OUT

SAMPLE_T
SP_INTERNAL
Copyright Siemens AG 2010 All rights reserved

QdwState

PV_IN
PV_PER
MAN_VALUE
GAIN

QREMOTE
QLOCK
QERR
QERR_EXT
QwAlarm
ENO

TI
TD
TM_LAG
DEADB_W
LMN_HLM
LMN_HWN
LMN_LWN
LMN_LLM
PV_FACTOR
PV_OFFSET
LMN_FACTOR
LMN_OFFSET
I_ITLVAL
DIST_VALUE
INSTANCE
RESTART
VISIBILITY
OPdwCmd

52

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Configuration Process

Configuration Process

Here you will find out


how the faceplates of the application are structured. This information is necessary
if you want to adapt the faceplates to your specific requirements.
Principle of layer technique
For the faceplates of this application, the principle of layer technology was used.
The layer technique enables differentiated editing of the faceplate objects.
The faceplate editor as well as the picture editor has 32 layers, however, the layers
of the faceplate are only available within the faceplate editor.
After inserting a faceplate from the library into the screen editor (creating a
faceplate instance), it can only be assigned one layer within the screen editor, just
like any other screen object.
However, the hierarchic layers within the faceplate remain.

Copyright Siemens AG 2010 All rights reserved

Hierarchic layer structure


Objects of "layer 0" are in the background of the pictures, objects of "layer 31" are
in the front. The objects of a single layer are also arranged hierarchically. When
you create a screen or a faceplate, the object that is inserted first is placed at the
back within the layer. Each additional object is inserted one position ahead. Within
a layer, you can move the objects forward and backward.
Editing faceplates
Changes on faceplate blocks can be made centrally.
There are two options for changing a faceplate and its instances:

Changing the faceplate block via an instance (location)


Mark the faceplate in the workspace of the picture editor and select the
command "Faceplates > Edit faceplates" via the menu bar. Alternatively the
command "Edit faceplate" can also be selected via the context menu of the
instance.

Changing of faceplate in the library


Open the project library and select the faceplate. Via the context menu of the
faceplate select the command "Edit faceplate".

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

53

Configuration Process

Working with layers


One of the 32 layers is always active. When you insert objects into a screen or a
faceplate, they are assigned to the active layer by default. The number of the active
layer is displayed in the "Layer" toolbar and in the properties window of the screen,
the active layer is highlighted in color.

Copyright Siemens AG 2010 All rights reserved

Figure 5-18

When you open a picture or edit a faceplate, all 32 layers are always displayed. In
the icon bar "Layer" you can hide all layers except the active layer. You then
specifically edit the objects of the active layer.

54

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Configuration Process

5.1

Configuring the faceplate window


The faceplate window is divided into several layers. Since neither the layers of a
faceplate nor the layers of a screen can be accessed during runtime, the
application uses the "Visibility" animation type of each object. For this purpose,
the "Visibility" property is connected in the faceplates.

5.1.1

Layer 0 frames
"Layer 0" contains all objects that are absolutely necessary for displaying the
faceplate window. These objects represent the faceplate window frame.

Copyright Siemens AG 2010 All rights reserved

Figure 5-19

The following different screen modes exist:

opening

closing

minimizing

maximizing

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

55

Configuration Process

Opening and maximizing


The display types "opening" and "maximizing" do not differ in "layer 0", the full
faceplate window is always displayed.
When "opening", "layer 1" (tab 1) is always additionally displayed, when
"maximizing", the tab last active ("layer 1", "layer 2", "layer 3", "layer 4", "layer 5" or
"layer 6") is displayed.
All objects of "layer 0", apart from the title bar, have the following settings for
visibility:
Table 5-41
Tags

State

Visibility

Field

Visible

From 1 to 127

The table below provides information on the status of the "Visibility" tag when
"opening" the faceplate window.

Copyright Siemens AG 2010 All rights reserved

Table 5-42
Bit

Value

Note

When clicking the faceplate icon, the "Visiblity" tag is always loaded with the
value "1". This results in the respective faceplate window being displayed with
tab 1.

The table below provides information on the status of the "Visibility" tag when
"maximizing" the faceplate window. Depending which tab was selected before
"minimizing", one of the bits will be 0 .. 5 when "maximizing" "bit 7" must not be
set.
Table 5-43

56

Bit

Value

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Configuration Process

Minimizing
The "Minimize" screen mode displays only the title bar of the faceplate window
and thus shows the screen objects that are located behind it.
Figure 5-20

All objects of the title bar have the following visibility settings:
Table 5-44
Tags

State

Visibility

Field

Hidden

From 0 to 0

The table below provides information on the status of the "Visibility" tag when
"minimizing" the faceplate window. As soon as "bit 7" is set, only the title bar of the
faceplate window is shown, irrespective of the rest of the status.

Copyright Siemens AG 2010 All rights reserved

Table 5-45
Bit

Value

Closing
The "Close" screen mode hides all objects of the faceplate.
The table below provides information on the status of the "Visibility" tag when
"closing" the faceplate window.
Table 5-46
Bit

Value

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

57

Configuration Process

5.1.2

Layer 1 tab 1
The screen below shows "layer 0" and "layer 1".

Copyright Siemens AG 2010 All rights reserved

Figure 5-21

All objects of "layer 1" have the following visibility settings:


Table 5-47
Tags

State

Visibility

Field

Visible

From 1 to 1

The table below provides information on the status of the "Visibility" tag when
displaying "layer 1" (tab 1) of the faceplate window.
Table 5-48

58

Bit

Value

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Configuration Process

5.1.3

Layer 2 tab 2
All objects of "layer 2" have the following visibility settings:
Table 5-49
Tags

State

Visibility

Field

Visible

From 2 to 2

The table below provides information on the status of the "Visibility" tag when
displaying "layer 2" (tab 2) of the faceplate window.
Table 5-50
Bit

Value

5.1.4

Layer 3 tab 3

Copyright Siemens AG 2010 All rights reserved

All objects of "layer 3" have the following visibility settings:


Table 5-51
Tags

State

Visibility

Field

Visible

From 4 to 4

The table below provides information on the status of the "Visibility" tag when
displaying "layer 3" (tab 3) of the faceplate window.
Table 5-52
Bit

Value

5.1.5

Layer 4 tab 4
All objects of "layer 4" have the following visibility settings:
Table 5-53
Tags

State

Visibility

Field

Visible

From 8 to 8

The table below provides information on the status of the "Visibility" tag when
displaying "layer 4" (tab 4) of the faceplate window.
Table 5-54
Bit

Value

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

59

Configuration Process

5.1.6

Level 5 Tab 5
All objects of "layer 5" have the following visibility settings:
Table 5-55
Tags

State

Visibility

Field

Visible

From 16 to 16

The table below provides information on the status of the "Visibility" tag when
displaying "layer 5" (tab 5) of the faceplate window.
Table 5-56
Bit

Value

5.1.7

Layer 6 tab 6
All objects of "layer 6" have the following visibility settings:

Copyright Siemens AG 2010 All rights reserved

Table 5-57
Tags

State

Visibility

Field

Visible

From 32 to 32

The table below provides information on the status of the "Visibility" tag when
displaying "layer 6" (tab 6) of the faceplate window.
Table 5-58

60

Bit

Value

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Starting up the Application

Starting up the Application

Here you will find out


how to integrate the STEP 7 block "PIDCtrl" (FB 670) and the respective
WinCC flexible faceplates into an empty or existing project.
This example uses the non-interconnected STEP 7 block, the "PIDCtrlIcon"
faceplate icon and the "PIDCtrl" faceplate window.

Note

The application provides an executable project. You only need to perform the
steps explained in this chapter if you wish to integrate the blocks into your own
project.
If you only want to get an idea about the principle of operation of this application,
then it is sufficient to open the file "36435784_S7_WCF_Blocks_CODE.zip" in
the SIMATIC Manager via the command "File > Retrieve".

Copyright Siemens AG 2010 All rights reserved

Save the blocks to a S7 controller of your choice and start the HMI station
(WinCC flexible RT) integrated in the project on a connected PC.

NOTE

Process interfacing was configured for Industrial Ethernet. If necessary


adjust your CPU settings, the "HMI station" and the "PG/PC interface".

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

61

Starting up the Application

6.1

Configuring the STEP 7 block


Table 6-59

Copyright Siemens AG 2010 All rights reserved

Action

Description

1.

Creating a new project

Create a new STEP 7 project with a S7 controller and a HMI station


(WinCC flexible) or open an existing project.

If you are using an existing project, it is advisable to create a backup


before performing the following steps.

2.

Inserting blocks

Open the project of this application with the Simatic Manager.

Copy the FB670 block to the respective directory of the S7 program.

The block uses the "CONT_C" (FB 41) standard block, it also has to be
added to the project.

If you are using a new project, also insert the calling block OB35 and the
DB670 instance data block to your project.

3.

Completing icon table

If the project is empty, copy the icon table of the application to the
relevant directory of the S7 program.

If you are using an existing project, complete the existing icon table with
the entries of the application.

4.

Calling the blocks

If you are using an existing project, you have to include the FB670 block
in OB35. The required instance data block is generated automatically.

5.

Checking block consistency

After intergrating the blocks into an existing project it is recommended to


check the block consistency. To do this select the command "Check
block consistency" in the context menu of the block container.

NOTE

The block call of the FB670 has to be cyclically. If you are using a CPU with
timed alarms other than the OB35, you can also connect integrate the
FB670 there. However, you have to tell the block the clock cycle of the
timed alarm in ms via the "SAMPLE_T" input.

Note

In network 2 of OB35 a PT1 element for the simulation of the controlled system
was planned. In normal mode this is superfluous and can be deleted.
If you want to enable the simulation, the inputs and outputs of the block have to
be interconnected accordingly. Further notes can be found in the comment of
network 2 in OB35.

62

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Starting up the Application

6.2

Configuring the WinCC flexible faceplates

Table 6-60

Copyright Siemens AG 2010 All rights reserved

Step

Instruction

1.

Opening project

Open the WinCC flexible project via the context menu of the SIMATIC Manager.

2.

Selecting library

Open "Screen_1".

Select the project library in the Tools window.

3.

Creating a new library

Via the context menu "Library > New library" select the dialog to create a global
library.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

63

Starting up the Application

Step
4.

Instruction
Creating a global library

Create a new global library in a folder of your choice.

Copyright Siemens AG 2010 All rights reserved

Note
A global file library can be accessed from several configuration computers. It is thus advisable
to store the library on a network drive with shared access.

5.

64

Integrating the global file library

Open your WinCC flexible project.

Select the project library in the Tools window.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Starting up the Application

Step

Copyright Siemens AG 2010 All rights reserved

6.

7.

Instruction
Creating the project library

Open the previously created global library in your project

**

Integrating the faceplates

Within the library select the "PIDCTRL" category.

Move the faceplate objects included in this category to your project using drag & drop.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

65

Starting up the Application

Step
8.

Instruction
Integrating the messages and tags

Via Drag&Drop move the "PIDCtrlTags" tags to the "Communication > Tags" file and the
"PIDCtrlAlarms" messages to the "Messages > Bit messages" file.

Copyright Siemens AG 2010 All rights reserved

Attention:
The message numbers of this application occupy the number range starting at 10001.
Before integrating the messages, check your existing project and, if occupied, release this
area.
Furthermore, check the symbolic connection of the tags and restore it if necessary.

9.

66

Interconnecting the faceplates

Interconnect the dynamic properties of the faceplate window. More information can be
found in Chapter 4.2

Interconnect the static properties of the faceplate window. More information can be found
in Chapter 4.3.

Interconnect the dynamic properties of the faceplate icon. More information can be found
in Chapter 4.5

Interconnect the static properties of the faceplate icon. More information can be found in
Chapter 4.6.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Operating the Application

Operating the Application

Here you will find out


how to operate the faceplates in WinCC flexible and which options the blocks offer
to intervene in the process.

7.1

Faceplate icon
Figure 7-22

Copyright Siemens AG 2010 All rights reserved

The faceplate icon has the following properties:

Simplified status display

Opens the relevant faceplate by mouse click

The block icon offers the following functionality:

Displayed modes:

Setpoint value

Process variable

Manual value

Enabled variable component

Modification of integral component

Signal processing

Operating mode

Interlock

Displayed error:

General error

Operation:

Call of the assigned faceplate window

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

67

Operating the Application

The table below shows the possible modes:


Table 7-61
Mode

QdwState

Icon

Flashing

Normal

Bit 24 = 0

no

Error

Bit 24 = 1

Yes

The table below shows the possible status displays:


Table 7-62
State

Symbol

P component OFF
P component ON
I component OFF
I component ON
D component OFF
D component ON
Copyright Siemens AG 2010 All rights reserved

I component hold OFF


I component hold ON
Set I component OFF
Set I component ON
Signal processing manual value
Signal processing process value
Mode REMOTE
Mode LOCAL
Interlock OFF
Interlock triggered
No error
Error pending

68

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Operating the Application

7.2

Faceplate window
The faceplate window has the following properties:

Tab selection (also via the controller)

Opening, closing, minimizing, maximizing (also via the controller)

Detailed status display

Provides the option to intervene in the process

Contains language-dependent objects (German-DE / English-US)

Shows relevant messages (filtered)

Permits changes for service personnel (protected call)

Overview

Copyright Siemens AG 2010 All rights reserved

Figure 7-23

Here you can perform the following actions:

Specifying a setpoint (only in "REMOTE" mode).

Specifying a manual value (only in "REMOTE" mode).

Resetting of error states.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

69

Operating the Application

The table below shows the possible modes:


Table 7-63
Mode

QdwState

Icon

Flashin
g

Normal

Bit 12 = 0 and
Bit 15 = 0

no

Alarm
(limit violated)

Bit 12 = 1 or bit
15 = 1

no

The table below shows the possible status displays:


Table 7-64

Copyright Siemens AG 2010 All rights reserved

State

70

Icon
Off

Icon
On

Flashing

P component

no

I component

no

D component

no

hold I component

no

Initialize I
component

no

Real value

no

Manual value

no

Remote controlled

no

External error

no

Interlock

no

General error

no

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Operating the Application

Messages

Copyright Siemens AG 2010 All rights reserved

Figure 7-24

Here you can perform the following actions:

Display of block-related alarms and messages.

Acknowledge alarms

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

71

Operating the Application

Trends

Copyright Siemens AG 2010 All rights reserved

Figure 7-25

Here you can perform the following actions:

72

Display limits

Display setpoint

Display process variable

Display P component

Display I component

Display D component

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Operating the Application

Limits

Copyright Siemens AG 2010 All rights reserved

Figure 7-26

Here you can perform the following actions:

Note

Enable / disable the limit messages

Define the limits

Write access to the values of this tab is only possible in the "REMOTE" mode.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

73

Operating the Application

Parameters

Copyright Siemens AG 2010 All rights reserved

Figure 7-27

Here you can perform the following actions:

Note

74

Activate / deactivate P , I and D component

Setting of proportional gain

Setting of reset time

Setting a value for the initialization of the I component

Enable / disable I component lock

Enable / disable the initialization of the I component

Setting of derivative time

Setting of time lag D component

Setting of dead band width

Setting of factor for manipulated value

Setting manipulated value offset

Monitoring of current P , I and D component

Write access to the values of this tab is only possible in the "REMOTE" mode.

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Operating the Application

Service

Copyright Siemens AG 2010 All rights reserved

Figure 7-28

The "Service" tab is protected and requests the authorization of the


"Service" group to be selected.

NOTE

"Service" is entered as user and the password "100" is the default setting.
When you create a new instance of the faceplate window and do not enable
the "Service" property, the "Service" tab has no access protection.

Here you can perform the following actions:

Toggle S7 Periphery / Real Value.

Toggle manual value/process value specification.

Toggle remote/local mode.

The table below shows the possible status displays:


Table 7-65
State

Icon OFF

Icon ON

Process input (real value)


Signal processing
Operating mode

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

75

Block Diagram

Block Diagram

The figure below shows the block diagram of the "CONT_C" (FB41) controller
block used.

Copyright Siemens AG 2010 All rights reserved

Figure 8-29

76

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Block Connectors

Block Connectors
9.1

Input parameters
Table 9-66

Copyright Siemens AG 2010 All rights reserved

Parameters

Data type

Default setting

Description

EN

BOOL

FALSE

Enable

LOCK

BOOL

FALSE

1 = Interlock pending

ERR_EXTERN

BOOL

FALSE

1= external error

LIOP_SEL

BOOL

FALSE

0= Operator, 1= Interconnection

L_AUT

BOOL

TRUE

0= manual value, 1= process


value

L_REMOTE

BOOL

FALSE

0= Local, 1= Remote

L_RESET

BOOL

FALSE

1 = Resets the errors (Pos.


edge)

PVPER_ON

BOOL

FALSE

0= real value, 1= S7 periphery

P_SEL

BOOL

TRUE

1 = P component on

I_SEL

BOOL

TRUE

1 = I component on

D_SEL

BOOL

FALSE

1 = D component on

INT_HOLD

BOOL

FALSE

1 = I component hold

I_ITL_ON

BOOL

FALSE

1 = initialize I component

LIM_ULA_Enable

BOOL

FALSE

1= upper alarm limit active

LIM_ULW_Enable

BOOL

FALSE

1= upper warning limit active

LIM_LLW_Enable

BOOL

FALSE

1= lower warning limit active

LIM_LLA_Enable

BOOL

FALSE

1= lower alarm limit active

SAMPLE_T

INT

Sampling time

SP_INTERNAL

REAL

0.0

Setpoint

PV_IN

REAL

0.0

Process variable (output


unchanged to PV)

PV_PER

WORD

W#16#0

Process variable periphery

MAN_VALUE

REAL

0.0

Manual value

GAIN

REAL

2.0

Proportional gain

TI

TIME

T#20s

Reset time

TD

TIME

T#10s

Derivative time

TM_LAG

TIME

T#2s

Time lag of D component

DEADB_W

REAL

0.0

Dead band width

LMN_HLM

REAL

100.0

Manipulated value upper limit

LMN_HWN

REAL

90.0

Warning value upper

LMN_LWN

REAL

10.0

Warning value lower

LMN_LLM

REAL

0.0

Manipulated value lower limit

PV_FACTOR

REAL

1.0

Process variable factor

PV_OFFSET

REAL

0.0

Process variable offset

LMN_FACTOR

REAL

1.0

Manipulated value factor

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

77

Block Connectors

Parameters

9.2

Data type

Default setting

Description

LMN_OFFSET

REAL

0.0

Manipulated value offset

I_ITLVAL

REAL

0.0

Initialization value I component

DIST_VALUE

REAL

0.0

Disturbance variable

INSTANCE

STRING[16]

PIDCtrl_001

Filter attribute for messages,


labeling of title bar

RESTART

BOOL

FALSE

Initializing at restart

VISIBILITY

BYTE

B#16#0

Display of the
faceplate window

OPdwCmd

DWORD

DW#16#0

HMI control tag

Output parameters
Table 9-67

Copyright Siemens AG 2010 All rights reserved

Parameters

78

Data type

Default setting

Description

QdwState

DWORD

DW#16#0

HMI status tag

QLMN

REAL

0.0

Manipulated variable

QLMN_PER

WORD

W#16#0

Manipulated variable
periphery

QLMN_HLM

BOOL

FALSE

1 = Upper limit manipulated


variable active

QLMN_HWN

BOOL

FALSE

1 = Warning upper
manipulated variable active

QLMN_LWN

BOOL

FALSE

1 = Warning lower
manipulated variable active

QLMN_LLM

BOOL

FALSE

1 = Lower limit manipulated


variable active

QLMN_P

REAL

0.0

P component

QLMN_I

REAL

0.0

I component

QLMN_D

REAL

0.0

D component

QSP

REAL

0.0

Current manipulated variable

QHLM

REAL

0.0

Current upper correcting


variable

QLLM

REAL

0.0

Current lower correcting


variable

QPV

REAL

0.0

Process variable

QER

REAL

0.0

Error signal

QPERIPH

BOOL

FALSE

0= External, 1= Peripherial

QMAN_AUT

BOOL

FALSE

0= Manual value, 1= Process

QREMOTE

BOOL

FALSE

0= Local, 1= Remote

QLOCK

BOOL

FALSE

1= Block locked

QERR

BOOL

FALSE

1= error active

QERR_EXT

BOOL

FALSE

1= external error active

QwAlarm

WORD

W#16#0

Alarm tag

ENO

BOOL

FALSE

Enable

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

Further Notes

10

Further Notes
Further blocks for this application

This document is part of an application that describes other technology blocks.


Within the scope of this application, the number of technology blocks is
successively expanded.
The table below shows the roadmap:

Copyright Siemens AG 2010 All rights reserved

Table 10-68
Block

Description

MOTOR

Visualization and operation of a motor with fixed speed and fixed direction
of rotation.

VALVE

Visualization and operation of a binary valve.

DIGITAL

Visualization and operation of digital signals.

ANALOGUE

Visualization and operation of analog signals.

PIDCTRL

Visualization and operation of a software PID controller to control technical


variables with continuous input and output variables.

MM440

Visualization and control of the MICROMASTER 440 frequency converter.

SIMODIR

Visualization and control of the SIMOCODE pro motor management


system as a direct starter.

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.

Faceplates included in the scope of delivery of WinCC flexible


The WinCC flexible system library offers you ready-to-use faceplates. For more
information on the system library, please refer to the WinCC flexible Information
System (online help) in:
"Working with WinCC flexible > Create pictures> Working with libraries > Working
with system libraries > Use system library".
The "System Library"
library faceplates.

link stored there, takes you to a description of the system

Faceplates for WinCC


For information on the structure of faceplates in WinCC, please refer to the
following document:
Sample blocks for STEP 7 and WinCC.
http://support.automation.siemens.com/WW/view/en/31624179
In this document, the following software is used:
S7-SCL, CFC, STEP 7, WinCC

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

79

Literature

11

Literature
11.1

Bibliography
This list is by no means complete and only presents a selection of suitable
literature.
Table 11-69 Bibliographic references

Copyright Siemens AG 2010 All rights reserved

Subject

11.2

Title

/1/

Control technology

Controlling with SIMATIC


Mller, Jrgen
Publicis Corporate Publishing
ISBN 3895782556

/2/

Control technology

Controlling with SIMATIC


Mller, Jrgen-Klaus; Pfeiffer, Bernd-Markus; Wieser, Roland
Publicis Corporate Publishing
Not yet published

Internet Link Specifications


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

Table 11-70
Subject

Title

\1\

Reference to the entry

http://support.automation.siemens.com/WW/view/en/36435784

\2\

Siemens I IA/DT
Customer Support

http://support.automation.siemens.com

\3\

WinCC flexible Getting


Started Power User

http://support.automation.siemens.com/WW/view/en/18656980

\4\

Creating faceplates

http://support.automation.siemens.com/WW/view/en/23425423

80

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

History

12

History
Table 12-71 History
Version

14.12.2009

Modification
First edition

Copyright Siemens AG 2010 All rights reserved

V1.0

Date

WCF_BLOCKS_PIDCtrl (FB670)
V 1.0, Entry-ID: 36435784

81

You might also like