LBP V2.0 Implementation DOC en

You are on page 1of 135

Library of Basic

Processes (LBP) -
Implementation

STEP 7 Basic / Professional V15, WinCC Comfort /


Advanced V15, WinCC Runtime Advanced V15,
WinCC Runtime Professional V15, WinCC V7.5,
Siemens
WinCC Open Architecture 3.16 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109749508 Support
Legal information

Legal information
Use of the application examples
The application examples represent example solutions of automation tasks combined with
multiple components in the form of text, graphics and/or software modules. The application
examples are a cost-free service of Siemens AG and/or a subsidiary company of Siemens AG
("Siemens"). They are not binding and do not claim to be complete or functional with regard to
configuration or equipment. The application examples do not represent customer-specific
solutions, but rather only provide help for typical tasks. You yourself are responsible for the proper
and safe operation of products in compliance with the applicable regulations. You must check the
function of the respective application example and adapt it specifically to your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right of use of the
application examples by professionally trained personnel. Any change to the application examples
is made at your own risk. Transfer to third parties or duplication of the application examples or
extracts thereof is only permitted in combination with your own products. The application
examples do not necessarily undergo the usual tests and quality checks of a paid product, may
contain functional and performance defects and may be subject to errors. You are responsible for
ensuring that the application examples are used in such a way that any defective functions do not
lead to property damage or bodily injury.
Disclaimer of liability
Siemens excludes its liability, irrespective of the legal ground, in particular for the usability,
availability, completeness and freedom from defects of the application examples, as well as
associated notes, configuration data and performance data and any damage caused by these.
This does not apply if Siemens is compulsorily liable, e.g. under product liability law, in cases of
intent, gross negligence, culpable injury to life, body or health, failure to comply with a guarantee,
fraudulent concealment of a defect or culpable breach of essential contractual obligations. The
claims for compensation for the breach of essential contractual obligations 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 in the
© Siemens AG 2019 All rights reserved

burden of proof to your detriment. You exempt Siemens from any third-party claims that may exist
or arise in this connection, unless Siemens is compulsorily liable by law.
By using the application examples, you agree that Siemens cannot be made liable for any
possible damage beyond the liability provisions described.
Additional information
We reserve the right to make changes to these Application Examples at any time without prior
notice. If there are any discrepancies between the recommendations provided in these application
examples and other Siemens publications – e.g. catalogs – the contents of the other documents
have priority.
In addition, the Siemens Terms of Use shall apply. (https://support.industry.siemens.com).
Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
The customer is responsible to prevent unauthorized access to its plants, systems, machines and
networks. Such systems, machines and components should only be connected to an enterprise
network or the Internet if and to the extent such a connection is necessary and only when
appropriate security measures (for example firewalls and network segmentation) are in place.
Additionally, Siemens’ guidance on appropriate security measures should be taken into account.
For more information about Industrial Security, please visit:
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends to apply product updates as soon as available and to always use
the latest product versions. Use of product versions that are no longer supported, and failure to
apply the latest updates may increase customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
under: https://www.siemens.com/industrialsecurity.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 6
1.1 Overview............................................................................................... 6
1.2 Hardware and software requirements .................................................. 7
2 Integration of the PLC function blocks ........................................................... 8
2.1 Structure of the PLC function blocks .................................................... 8
2.1.1 Cross-block input "identName"............................................................. 8
2.1.2 User-defined data types for communication with the
visualization system ............................................................................. 8
2.1.3 Global constant "PANELS_NO" ........................................................... 9
2.1.4 Input/output for panel communication .................................................. 9
2.2 LBP_Aggr8 – Control of up to 8 aggregates ...................................... 13
2.2.1 Interface description of the PLC block ............................................... 14
2.2.2 Interface description for HMI communication ..................................... 15
2.3 LBP_Aggr8 – Average calculation with plausibility check .................. 16
2.3.1 Interface description of the PLC block ............................................... 17
2.3.2 Interface description for HMI communication ..................................... 18
2.4 LBP_AnaRead – Analog value processing ........................................ 19
2.4.1 Interface description of the PLC block ............................................... 20
2.4.2 Interface description for HMI communication ..................................... 21
2.5 LBP_ClctVal – Collective display (without WinCC display) ................ 23
© Siemens AG 2019 All rights reserved

2.5.1 Interface description of the PLC block ............................................... 24


2.6 LBP_CntrA – Integrating counter ....................................................... 25
2.6.1 Interface description of the PLC block ............................................... 25
2.6.2 Interface description for HMI communication ..................................... 26
2.7 LBP_CntrD – Derivative counter ........................................................ 29
2.7.1 Interface description of the PLC block ............................................... 29
2.7.2 Interface description for HMI communication ..................................... 30
2.8 LBP_CntrP – Pulse counter ............................................................... 30
2.8.1 Interface description of the PLC block ............................................... 30
2.8.2 Interface description for HMI communication ..................................... 31
2.9 LBP_CtrlPID – Continuous PID controller .......................................... 32
2.9.1 Interface description of the PLC block ............................................... 32
2.9.2 Interface description for HMI communication ..................................... 33
2.10 LBP_CtrlStp – Step controller ............................................................ 36
2.10.1 Interface description of the PLC block ............................................... 36
2.10.2 Interface description for HMI communication ..................................... 37
2.11 LBP_Intlk8 – Interlock for up to 8 signals ........................................... 41
2.11.1 Interface description of the PLC block ............................................... 42
2.11.2 Interface description for HMI communication ..................................... 42
2.12 LBP_Msg8 – Message block for 8 messages .................................... 45
2.12.1 Interface description of the PLC block ............................................... 46
2.12.2 Interface description for HMI communication ..................................... 46
2.13 LBP_Mtr – Simple motor .................................................................... 47
2.13.1 Interface description of the PLC block ............................................... 48
2.13.2 Interface description for HMI communication ..................................... 49
2.14 LBP_MtrDS - Motor with two speeds and two directions of
rotation................................................................................................ 51
2.14.1 Interface description of the PLC block ............................................... 52
2.14.2 Interface description for HMI communication ..................................... 54
2.15 LBP_MtrF – Speed-controlled motor .................................................. 56
2.15.1 Interface description of the PLC block ............................................... 57
2.15.2 Interface description for HMI communication ..................................... 58
2.16 LBP_OpAna – Switch analog values ................................................. 60

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 3
Table of contents

2.16.1 Interface description of the PLC block ............................................... 60


2.16.2 Interface description for HMI communication ..................................... 61
2.17 LBP_OpDig – Switch digital signal ..................................................... 62
2.17.1 Interface description of the PLC block ............................................... 62
2.17.2 Interface description for HMI communication ..................................... 63
2.18 LBP_Polygon – Conversion of values over 8 interpolation points ..... 64
2.18.1 Interface description of the PLC block ............................................... 64
2.18.2 Interface description for HMI communication ..................................... 65
2.19 LBP_Select – Selection of values ...................................................... 66
2.19.1 Interface description of the PLC block ............................................... 67
2.19.2 Interface description for HMI communication ..................................... 68
2.20 LBP_SetCrv – Time-dependent setpoint curve .................................. 69
2.20.1 Interface description of the PLC block ............................................... 70
2.20.2 Interface description for HMI communication ..................................... 70
2.21 LBP_TimeSw – Time switch............................................................... 72
2.21.1 Interface description of the PLC block ............................................... 72
2.21.2 Interface description for HMI communication ..................................... 73
2.22 LBP_Vlv – Simple valve ..................................................................... 75
2.22.1 Interface description of the PLC block ............................................... 76
2.22.2 Interface description for HMI communication ..................................... 77
2.23 LBP_VlvA – Analog controlled valve .................................................. 79
2.23.1 Interface description of the PLC block ............................................... 80
2.23.2 Interface description for HMI communication ..................................... 81
2.24 LBP_3wVlv - Three-way valve ........................................................... 83
2.24.1 Interface description of the PLC block ............................................... 85
© Siemens AG 2019 All rights reserved

2.24.2 Interface description for HMI communication ..................................... 86


2.25 LBP_Log15 – Logging of data ............................................................ 88
2.25.1 Interface description of the PLC block ............................................... 89
2.25.2 Interface description for HMI communication ..................................... 89
2.25.3 Cross-block error codes ..................................................................... 89
3 Integration of the HMI faceplates ................................................................... 91
3.1 WinCC (Runtime) Professional .......................................................... 91
3.1.1 General steps ..................................................................................... 91
3.1.2 Continue with SiVArc .......................................................................... 94
3.1.3 Continuing manually ........................................................................... 96
3.1.4 Function of the script "Screenhandling" ............................................. 97
Setting options via general settings ................................................... 97
Setting options within the script .......................................................... 97
Nesting levels of pictures ................................................................... 98
3.1.5 Working with multiple screens ............................................................ 98
3.2 WinCC Comfort/Advanced ................................................................. 99
3.2.1 General steps ..................................................................................... 99
3.2.2 Continue with SiVArc ........................................................................ 102
3.2.3 Continuing manually ......................................................................... 103
3.3 WinCC V7.5 ...................................................................................... 105
3.3.1 Preparing the WinCC project ........................................................... 105
3.3.2 Integration of the block-specific data ................................................ 107
3.4 WinCC Open Architecture ................................................................ 112
3.4.1 Scope of delivery .............................................................................. 112
3.4.2 Installation ........................................................................................ 112
3.4.3 Engineering ...................................................................................... 118
3.4.4 Creating pictures .............................................................................. 123
4 Changes in V2.0 ............................................................................................. 125
4.1 STEP 7 blocks .................................................................................. 125
5 Creating of own blocks ................................................................................. 127

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 4
Table of contents

5.1 Creation of the PLC program ........................................................... 127


5.1.1 Variables management of LBP blocks ............................................. 127
5.2 Creating the visualization in WinCC Professional ............................ 128
5.2.1 Naming of elements ......................................................................... 128
5.2.2 Adaptations to the background picture (LBP_Xyz) .......................... 129
5.2.3 Adaptations to Home picture (LBP_Xyz1) ........................................ 129
5.2.4 Adaptation of the setting pages (LBP_XyzP1) ................................. 130
5.2.5 Adaptations when using the Double Confirmation (LBP_XyzC) ...... 130
5.2.6 Creation of messages ...................................................................... 131
5.2.7 Script for switching the operability and colors .................................. 131
5.2.8 Evaluation of the status variable (.settingsHMI.alarmsInfo) ............. 133
6 Appendix ........................................................................................................ 134
6.1 Service and Support ......................................................................... 134
6.2 Links and Literature .......................................................................... 135
6.3 Version history .................................................................................. 135
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 5
1 Introduction

1 Introduction
1.1 Overview
Die Library of Basic Processes provides support in visualizing various functions.
Advantages of the library:
• Uniform design
• Less engineering work
Many projects have the same elements that have to be visualized. Examples are
motors, analog values and valves. The following blocks are contained in the library:
Table 1-1
Block Brief description
LBP_Aggr8 Control of up to 8 aggregates
LBP_Aggr8 Average calculation with plausibility check
LBP_AnaRead Analog value processing
LBP_ClctVal Group display
LBP_CntrA Integrating counter
LBP_CntrD Difference counter
LBP_CntrP Pulse counter
© Siemens AG 2019 All rights reserved

LBP_CtrlPID Continuous PID controller


LBP_CtrlStp Step controller
LBP_Intlk8 Interlock for up to 8 signals
LBP_Msg8 Message block for 8 messages
LBP_Mtr Simple motor
LBP_MtrDS Motor with 2 speeds and directions of rotation
LBP_MtrF Speed-controlled motor
LBP_opAna Switching of analog values
LBP_OpDig Switching of a digital signal
LBP_Polygon Conversion of values over 8 interpolation points
LBP_Select Selection of values
LBP_SetCrv Time-dependent setpoint curve
LBP_TimeSw Time switch
LBP_Vlv Simple valve
LBP_VlvA Analog controlled valve
LBP_3wVlv 3-way valve

Innovations with V2.0


You obtain a fundamentally revised library with V2.0.
Aims of the revision
• Performance improvement
• Improvement of usability during configuration
• Improvement for more intuitive operation
• Sustainable programming and configuration of the library

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 6
1 Introduction

1.2 Hardware and software requirements


Requirements for this library
In order to use the functionality of the library described here, the following hardware
and software requirements must be met.

Hardware
All blocks (FB, FC, DB, etc.) in the library can be used universally with the following
controllers:
• S7-1200 and S7-1200 F product family
• S7-1500 and S7-1500 F product family
• Simulation with S7 PLCSIM (as of V14)
• Comfort Panels
When using WinCC Professional, WinCC V7.5 or WinCC Open Architecture a
computer is required.

Software
• STEP 7 (TIA Portal) Basic or Professional V15
© Siemens AG 2019 All rights reserved

At least one of the following WinCC versions is required:


• WinCC Professional and Runtime Professional V15
• WinCC Comfort / Advanced V15 and Comfort Panels
• WinCC Advanced V15 and WinCC Runtime Advanced V15
• Minimum WinCC V7.5 Update 3
• WinCC Open Architecture 3.16

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 7
2 Integration of the PLC function blocks

2 Integration of the PLC function blocks


2.1 Structure of the PLC function blocks
2.1.1 Cross-block input "identName"

The identification name ("identName") is displayed as a header in the visualization.


This is also used to filter the messages in the block-specific message windows. For
this reason each identification name should only exist once.

Note You save lots of engineering work during the SiVArc generation of symbols and
alarms in WinCC Comfort if you name the instance of the LBP block according to
its "identName". You have the following naming options:
• instIdentName
• InstIdentName
• IdentName

2.1.2 User-defined data types for communication with the visualization


system

settingsHMI
© Siemens AG 2019 All rights reserved

The user-defined data type "settingsHMI" only contains variables that can be written
by the HMI system.
The following variables are included cross-block:
• "note": This variable contains the comment which is displayed below the header.
• "opStation": This variable contains the operating station and is used for locking
the control. If you want to be the only one on the HMI system who can currently
operate, the station name of the HMI system is stored here.
• "overwrite": The HMI system can be used to determine for some values whether
the value at the input of the block in the PLC program should be used or the
value which can be written from the HMI system. Some bits of the "overwrite"
variable specify for a value whether the PLC value or the HMI value is active.
Other bits are commands such as "run" and "stop". The following section
describes, among others, the bit assignment of the "overwrite" variables. Bits
that determine whether a PLC or HMI value is active are marked with "over".
"True" means here that the HMI value is active. Bits that are commands are
marked with "cmd"

settingsPLC
The user-defined data type "settingsPLC" contains the values of the variables that
were interconnected as the input at the block in the PLC program.
It always contains the "identName" input.

statusHMI
The user-defined data type "statusHMI" contains the values with which the block
currently works and the values that the block outputs at the outputs in the PLC
program.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 8
2 Integration of the PLC function blocks

2.1.3 Global constant "PANELS_NO"

The global constant "PANELS_NO" has to be created so that the function blocks of
the LBP function. With this constant you determine how many Comfort Panels are
connected to your control system to visualize LBP blocks. If you do not use any
Comfort Panels, specify "0" as the static value.

Figure 2-1

2.1.4 Input/output for panel communication

The following input/output parameter is used so that only one data record must be
integrated into the HMI variables per panel for each LBP block - even if the block is
called up more often in the program.
© Siemens AG 2019 All rights reserved

Table 2-2
Parameter Data type Description
panels Array [*] of Array for all Panels that are connected. For each
UDT connected panel, the array index of the connected array
has to be increased by 1.
identName String[30] Identification name of the instance that was called up at
the panel
opStation String[16] Operating station name
note String[80] Comment that is shown below the header
log15 UDT Log data for HMI
3wVlv UDT Currently called-up instance of 3wVlv
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced
Aggr8 Currently called-up instance of LBP_Aggr8
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 9
2 Integration of the PLC function blocks

Parameter Data type Description


anaAvg Currently called-up instance of anaAvg
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program.
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced
anaRead Currently called-up instance of anaRead
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
Cntr UDT Currently called-up instance of Cntr
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
© Siemens AG 2019 All rights reserved

statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
crtlPID UDT Currently called-up instance of ctrlPID
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
crtlStp UDT Currently called-up instance of ctrlStp
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
intlk8 UDT Currently called-up instance of intlk8
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
msg8 UDT Currently called-up instance of msg8
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 10
2 Integration of the PLC function blocks

Parameter Data type Description


values that the block outputs at the outputs in the PLC
program
mtr UDT Currently called-up instance of mtr
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced
mtrDS UDT Currently called-up instance of mtrDS
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced
mtrF UDT Currently called-up instance of mtrF
© Siemens AG 2019 All rights reserved

settingsPLC UDT Values of the variables that were connected as an input at


the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
opAna UDT Currently called-up instance of opAna
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
opDig UDT Currently called-up instance of opDig
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
polygon UDT Currently called-up instance of polygon
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
select UDT Currently called-up instance of select

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 11
2 Integration of the PLC function blocks

Parameter Data type Description


settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
setCvr UDT Currently called-up instance of setCvr
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
timeSw UDT Currently called-up instance of timeSw
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
vlv UDT Currently called-up instance of vlv
© Siemens AG 2019 All rights reserved

settingsPLC UDT Values of the variables that were connected as an input at


the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced
vlvA UDT Currently called-up instance of vlvA
settingsPLC UDT Values of the variables that were connected as an input at
the block in the PLC program
settingsHMI UDT Variables that can be written by the HMI system
statusHMI UDT Values with which the block currently operates and the
values that the block outputs at the outputs in the PLC
program
alarms1 Word Bit alarm list for Comfort / Advanced
alarms2 Word Bit alarm list for Comfort / Advanced

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 12
2 Integration of the PLC function blocks

2.2 LBP_Aggr8 – Control of up to 8 aggregates


Brief description
The block manages the automatic on/off and switching over of up to eight units.
The following modes are possible:
• Sequential switching according to priority
– Switching on: The released aggregate with the highest priority
– Switching off: The aggregate in operation with the lowest priority
Priority-controlled control is active as soon as different priorities are
parameterized.
• Changeover taking into account the operating hours
– Switching on: The released aggregate with the shortest total runtime
– Switching off: The aggregate in operation with the longest total running time
This operating mode is active if the input "parSwitchByTime" is TRUE and only
applies for the aggregates that have the same priority.
• Changeover taking into account the cycle times
– Switching on: The released aggregate with the shortest last cycle time
– Switching off: The aggregate in operation with the longest current cycle time
© Siemens AG 2019 All rights reserved

Block
Figure 2-2: LBP_Aggr8
FB LBP_Aggr8
BOOL EN ENO BOOL
STRING[30] identName on BYTE
BOOL switchCmd errNoSwitch BOOL
BOOL parSwitchByTimes errAggr BYTE
UINT request switchEnable BOOL
BYTE indAggr1 switchActive BOOL
BYTE indAggr2 intError WORD
BYTE indAggr3
BYTE indAggr4
BYTE indAggr5
BYTE indAggr6
BYTE indAggr7
BYTE indAggr8
TIME delayTime
DINT limitSecs
TIME restTime
BOOL reset
Array[*] panels

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 13
2 Integration of the PLC function blocks

2.2.1 Interface description of the PLC block

Input parameters
Table 2-1
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName).
switchCmd Bool Switching is carried out to each rising edge
parSwitchByTimes Bool true: It is switched time-controlled (see parameter limitSecs)
request UInt Number of requested aggregates (0 to 8)
indAggr1 Byte Status Aggregate 1
Bit 0 – true: Aggregate is ready
Bit 1 – true: Aggregate is switched on
Bit 4 to 7 - Position in the switch-on sequence (priority)
indAggr2 Byte Status aggregate 2 (bit assignment see indAggr1)
indAggr3 Byte Status aggregate 3 (bit assignment see indAggr1)
indAggr4 Byte Status aggregate 4 (bit assignment see indAggr1)
indAggr5 Byte Status aggregate 5 (bit assignment see indAggr1)
indAggr6 Byte Status aggregate 6 (bit assignment see indAggr1)
indAggr7 Byte Status aggregate 7 (bit assignment see indAggr1)
indAggr8 Byte Status aggregate 8 (bit assignment see indAggr1)
© Siemens AG 2019 All rights reserved

delayTime Time Delay time (idle time until switching on again is possible)
limitSecs DInt Maximum run time for time-controlled switching (if
parSwitchByTimes = true)
restTime Time Remaining run time until the next switchover (if
parSwitchByTimes = true)
reset Bool Reset the errors

Output parameters
Table 2-2
Parameter Data type Description
on Byte Bit 0 … 7 – Command to switch on (true) or off (false) for
aggregates 1 … 8
errNoSwitch Bool true: No aggregate available
errAggr Byte Error at one or more aggregates
switchEnable Bool true: Switching operation possible
switchActive Bool true: Switching operation active
intError Word Bit 0 – true: System error (reading the system time has
failed)

Input/output parameters
See 2.1.4 Input/output for panel communication

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 14
2 Integration of the PLC function blocks

2.2.2 Interface description for HMI communication

settingsHMI
Table 2-3
Parameter Data type Description
parSwitchByTimes Bool true: Switch time-controlled
request UInt Number of aggregates required
prios Array[0..7] of Position in the switch-on sequence for the aggregates 1 to 8
UInt
delayTime Time Delay time (idle time until switching on again is possible)
limitSecs Time Maximum execution time for time-controlled switching
restTime Time Remaining run time for time-controlled switchover
note String[80] See "note
reset Bool Resetting the errors, switching commands and remaining
times
opStation String[16] See "opStation
overwrite Word See "overwrite
Bit assignment:
Bit 0 – switch command/switch by time/switch all ("over")
Bit 1 – switch command ("cmd")
Bit 2 – switch by time ("cmd")
© Siemens AG 2019 All rights reserved

Bit 3 – request ("over")


Bit 4 – delay time ("over")
Bit 5 – rest time ("over")

Bit 7 – Limit time ("over")
Bit 8 - Positions in the switch-on sequence ("over")
opSecs Array[0..7] of Operating times for the aggregates 1 to 8
Time
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-4
Parameter Data type Description
parSwitchByTimes Bool true: Switch time-controlled.
request UInt Number of aggregates required.
prios Array[0..7] of Position in the switch-on sequence for the aggregates 1 to 8.
UInt
delayTime Time Delay time (idle time until switching on again is possible).
limitSecs Time Maximum execution time for time-controlled switching.
restTime Time Time remaining after switching off.

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 15
2 Integration of the PLC function blocks

statusHMI
Table 2-5
Parameter Data type Description
identName String[30] Identification name (see 2.1.1 Cross-block input "identName)
nextUp Int Number of the aggregate to be switched on next
nextDown Int Number of the aggregate to be switched on next
diffLimit Time Difference between execution time and maximum execution time
cycleSecs Array[0..7] of Time Run times of the aggregates 1 to 8 (Array field 0 corresponds to
Aggregate 1)
restTimes Array[0..7] of Time Remaining times of the aggregates 1 to 8 (Array field 0
corresponds to Aggregate 1)
readys Array[0..7] of Bool true: Aggregate is ready to start (Array field 0 corresponds to
Aggregate 1)
errors Array[0..7] of Bool true: Aggregate is interrupted (Array field 0 corresponds to
Aggregate 1)
runCmds Array[0..7] of Bool Switching on commands at the Aggregates 1 to 8 (Array field 0
corresponds to Aggregate 1)
ons Array[0..7] of Bool true: Aggregate is switched on (Array field 0 corresponds to
Aggregate 1)
request UInt Number of requested aggregates
errNoSwitch Bool true: No aggregate available
© Siemens AG 2019 All rights reserved

runUpDown Bool Aggregate(s) are started up or shut down


switchenable Bool true: Switching operation possible

2.3 LBP_AnaAvg – Average calculation with plausibility


check
Brief description
The function calculates an average of up to three input values. An accepted
deviation can be parameterized. Error messages are generated if a value exceeds
the acceptable deviation.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 16
2 Integration of the PLC function blocks

Block
Figure 2-3: LBP_AnaAvg
FB LBP_AnaAvg
BOOL EN ENO BOOL
STRING[30] identName midValAct REAL
INT mode midValArch REAL
TIME time midValArch1 REAL
REAL value1 midValArch2 REAL
REAL value2 midValArch3 REAL
REAL value3 status WORD
REAL devVal
BOOL reset
Array[*] panels

2.3.1 Interface description of the PLC block

Input parameters
Table 2-6
© Siemens AG 2019 All rights reserved

Parameter Data type Description


identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
mode Int Mode:
"0" – Block is inactive
"1" – "value1" is active
"2" – "value1" and "value2" are active
"3" – "value1", "value2" and "value3" are active
time Time Time over which the historic mean value is formed
value1 Real Value 1
value2 Real Value 2
value3 Real Value 3
devVal Real Permitted deviation in per cent
reset Bool true: All values are reset

Output parameters
Table 2-7
Parameter Data type Description
midValAct Real Current average value for all parameterized inputs
midValArch Real Historic average value for all parameterized inputs
midValArch1 Real Historic mean value of "value1"
midValArch2 Real Historic mean value of "value2"
midValArch3 Real Historic mean value of "value3"
status Word Status
Bit assignment:

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 17
2 Integration of the PLC function blocks

Parameter Data type Description


Bit 0 – true: Mode 1, 2 or 3 is active and "value1" is not
plausible
Bit 1 – true: Mode 2 or 3 is active and "value2" is not
plausible
Bit 2 – 2 – true: Mode 3 is active and "value3" is not
plausible

Input/output parameters
See 2.1.4 Input/output for panel communication

2.3.2 Interface description for HMI communication

settingsHMI
Table 2-8
Parameter Data type Description
mode Int Mode:
"0" – Block is inactive
"1" – "value1" is active
"2" – "value1" and "value2" are active
"3" – "value1", "value2" and "value3" are active
time Time Time over which the historic mean value is formed
© Siemens AG 2019 All rights reserved

devVal Real Deviation in percent


rangeMin Real Start of the measuring range (for scaling the displays)
rangeMax Real End of the measuring range (for scaling the displays)
overwrite Word See "overwrite
Bit assignment:
Bit 0 – mode ("over")
Bit 1 – time ("over")
Bit 2 – reset ("cmd")
Bit 3 – devVal ("over")
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example: s9999.999)
(is automatically modified for WinCC Professional, however,
not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
alarmsInfo UDInt Alarm information
AlarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-9
Parameter Data type Description
mode Int Mode:
"0" – Block is inactive
"1" – "value1" is active
"2" – "value1" and "value2" are active
"3" – "value1", "value2" and "value3" are active
time Time Time over which the historic mean value is formed

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 18
2 Integration of the PLC function blocks

Parameter Data type Description


devVal Real Deviation in percent
value1 Real Value 1
value2 Real Value 2
value3 Real Value 3

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-10
Parameter Data type Description
identName String[30] Identification name (see 2.1.1 Cross-block input
"identName)
status Array[0..2] of Array field 0 – true: Mode 1, 2 or 3 is active and "value1" is
Bool not plausible
Array field 1 – true: Mode 2 or 3 is active and "value2" is
not plausible
Array field 2 – true: Mode 3 is active and "value3" is not
© Siemens AG 2019 All rights reserved

plausible
midValArch1 Real Historic mean value of "value1"
midValArch2 Real Historic mean value of "value2"
midValArch3 Real Historic mean value of "value3"
midValAct Real Current average value for all parameterized inputs
midValArch Real Historic average value for all parameterized inputs

2.4 LBP_AnaRead – Analog value processing


Brief description
The block processes an analog value and displays it graphically. The value coming
from the input module is displayed scaled. The limit ranges for warning and alarm
can be parameterized.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 19
2 Integration of the PLC function blocks

Block
Figure 2-4: LBP_AnaRead
FB LBP_AnaRead
BOOL EN ENO BOOL
STRING[30] identName AH BOOL
INT mode WH BOOL
INT valuePer WL BOOL
REAL rangeBegin AL BOOL
REAL rangeEnd ErrorHigh BOOL
REAL limitAH ErrorLow BOOL
REAL limitWH Value REAL
REAL limitWL
REAL limitAL
TIME timeout
REAL hysteresis
REAL valueAlt
Array[*] panels
© Siemens AG 2019 All rights reserved

2.4.1 Interface description of the PLC block

Input parameters
Table 2-11
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
mode Int Mode:
"0" – Alternative value
"1" – Peripherals value unipolar
"2" – Peripherals value bipolar
"3" – Peripherals value with factor 0.1
"4" – Peripherals value with factor 0.01
"5" – Peripherals value with factor 1
"6" – Peripherals value with factor 10
"7" – Peripherals value with factor 100
valuePer Int Peripherals value
rangeBegin Real Start of the measuring range
rangeEnd Real End of the measuring range
limitAH Real Alarm limit high
limiWH Real High warning threshold
limitWL Real Low warning threshold
limitAL Real Alarm low limit
timeout Time Tolerance time before an error is generated when an error
occurs
hysteresis Real Value for the absolute hysteresis: Limit alarms / warnings
are only reset when the measured value falls below/exceeds
the limit value plus/minus hysteresis.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 20
2 Integration of the PLC function blocks

Parameter Data type Description


valueAlt Real Alternative value

Output parameters
Table 2-12
Parameter Data type Description
AH Bool Alarm active for high limit violated
WH Bool Warning active for high limit violated
WL Bool Warning active for low limit violated
AL Bool Alarm active for low limit violated
ErrorHigh Bool Measurement error in high range (measuring range of the
peripherals exceeded)
ErrorLow Bool Measurement error in the low range (measuring range of
the peripherals undershot or wire break)
Value Real Current analog value

Input/output parameters
See 2.1.4 Input/output for panel communication
© Siemens AG 2019 All rights reserved

2.4.2 Interface description for HMI communication

settingsHMI
Table 2-13
Parameter Data type Description
mode Int Mode:
"0" – Alternative value
"1" – Peripherals value unipolar
"2" – Peripherals value bipolar
"3" – Peripherals value with factor 0.1
"4" – Peripherals value with factor 0.01
"5" – Peripherals value with factor 1
"6" – Peripherals value with factor 10
"7" – Peripherals value with factor 100
rangeBegin Real Start of the measuring range
rangeEnd Real End of the measuring range
limitAH Real Alarm limit high
limiWH Real High warning threshold
limitWL Real Low warning threshold
limitAL Real Alarm low limit
timeout Time Tolerance time before an error is generated when an error
occurs
Hysteresis Real Hysteresis
valueAlt Real If mode "0 – alternative value" is active, this is the alternative
value that is used as measuring value without scaling.
Overwrite Word See "overwrite
Bit assignment:
Bit 0 – mode ("over")

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 21
2 Integration of the PLC function blocks

Parameter Data type Description


Bit 1 – rangeBegin ("over")
Bit 2 – rangeEnd ("over")
Bit 3 – limitAH ("over")
Bit 4 – limitWH ("over")
Bit 5 – limitWL ("over")
Bit 6 – limitAL ("over")
Bit 7 – timeout ("over")
Bit 8 – hysteresis ("over")
Bit 9 – valueAlt ("over")
Bit 15 – Creation of a test entry for the log ("cmd")
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example: s9999.999)
(is automatically modified for WinCC Professional, however,
not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-14
© Siemens AG 2019 All rights reserved

Parameter Data type Description


mode Int Mode:
"0" – Alternative value
"1" – Peripherals value unipolar
"2" – Peripherals value bipolar
"3" – Peripherals value with factor 0.1
"4" – Peripherals value with factor 0.01
"5" – Peripherals value with factor 1
"6" – Peripherals value with factor 10
"7" – Peripherals value with factor 100
rangeBegin Real Start of the measuring range
rangeEnd Real End of the measuring range
limitAH Real Alarm limit high
limiWH Real High warning threshold
limitWL Real Low warning threshold
limitAL Real Alarm low limit
timeout Time Tolerance time before an error is generated when an error
occurs
hysteresis Real Hysteresis
valueAlt Real Alternative value

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 22
2 Integration of the PLC function blocks

statusHMI
Table 2-15
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
status UDT
AH Bool Alarm active for high limit violated
WH Bool Warning active for high limit violated
WL Bool Warning active for low limit violated
AL Bool Alarm active for low limit violated
errorHigh Bool Measurement error in the high range
errorLow Bool Measurement error in the low range
value Real Current analog value
rangeBegin Real Start of the measuring range
rangeEnd Real End of the measuring range
limitAH Real Alarm limit high
limiWH Real High warning threshold
limitWL Real Low warning threshold
limitAL Real Alarm low limit
© Siemens AG 2019 All rights reserved

LBP_typeLog15MHIData
Table 2-16
Parameter Data type Description
data Array[0..14]
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

2.5 LBP_ClctVal – Collective display (without WinCC


display)
Brief description
The block generates a WinCC-compliant collective display. It is possible to combine
collective displays via corresponding interconnection at the "prevClctVal" input.
The acknowledgement status of the message from WinCC alarm logging can be
processed via the statusHMI input. The circuiting of the ackHMI parameter enables a
forwarding of acknowledgements to WinCC.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 23
2 Integration of the PLC function blocks

Block
Figure 2-5: LBP_ClctVal
FB LBP_ClctVal
BOOL EN ENO BOOL
UINT collectBitPos collectValue DWORD
BOOL message intError WORD
BOOL ack
VARIANT statusHMI
UINT HMIBitPos
DWORD prevClctVal
VARIANT ackHMI

2.5.1 Interface description of the PLC block

Input parameters
Table 2-17
Parameter Data type Description
© Siemens AG 2019 All rights reserved

collectBitPos UInt Position of the message bit in the collective display (0 ...15).
message Bool Current message status (true = active)
ack Bool Acknowledge command (rising edge)
statusHMI Variant When circuited with a DWORD or WORD variable, this is
interpreted as a status variable linked with WinCC
AlarmLogging and the acknowledgement status is derived
from this.
Otherwise, the block's own acknowledgement status is used.
HMIBitPos UInt When using the "statusHMI" parameter, the corresponding
bit position is specified here.
prevClctVal DWord For sequential grouping of several collective displays, the
"Predecessor" collective display can be switched on here.
The output "collectValue" is then the result of linking the
current collective display with "prevClctVal".

Output parameters
Table 2-18
Parameter Data type Description
collectValue DWord Collective message generated
intError Word Error detection of the block

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 24
2 Integration of the PLC function blocks

2.6 LBP_CntrA – Integrating counter


Brief description
The block forms a counter value through the integration of an analog value. Both up
and down counting (with negative analog value) is possible.

Block
Figure 2-6: LBP_CntrA
FB LBP_CntrA
BOOL EN ENO BOOL
STRING[30] identName counterVal DINT
REAL indAnalogue intError WORD
REAL factor enInp BOOL
TIME time correction BYTE
BOOL enInput lastCounter DINT
BOOL cmdIni lastReset REAL
BOOL cmdReset
Array[*] panels
© Siemens AG 2019 All rights reserved

2.6.1 Interface description of the PLC block

Input parameters
Table 2-19
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indAnalogue Real Analog value from which the counter value is derived
factor Real Factor for pulse value determination
time Time Time interval for deviation calculation
enInput Bool Enable calculation of meter reading
cmdIni Bool true: Initialize the counter (reset the internal values)
cmdReset Bool true: Reset the counter value

Output parameters
Table 2-20
Parameter Data type Description
counterVal DInt Current counter value
intError Error code
Bit assignment:
Bit 0 – true: System error (error when reading the system
Word time)
enInp Bool Enable for calculation of the meter reading active
correction Byte Last correction:

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 25
2 Integration of the PLC function blocks

Parameter Data type Description


"0": Initialization
"1": Reset
"2": Change of counter
"3": Change of residual value
lastCounter DInt Counter value before correction
lastReset Real Residual value before correction

Input/output parameters
See 2.1.4 Input/output for panel communication

2.6.2 Interface description for HMI communication

The following user-defined data types are the same for all counters. However, not
each variable is required for each counter.

settingsHMI
Table 2-21
Parameter Data type Description
enInp Bool Enable calculation of meter reading
note String[80] See "note
© Siemens AG 2019 All rights reserved

opStation String[16] See "opStation


format String[10] Display format on the HMI system (example:
s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system.
overwrite Word See "overwrite
Bit assignment:
Bit 0 – factor ("over") (applies to CntrA, CntrD, CntrP)
Bit 1 – time ("over") (applies to CntrA)
Bit 2 – limit ("over") (applies to CntrD)
Bit 3 – EnInput ("over") (applies to CntrA, CntrD, CntrP)
Bit 4 – EnInput ("cmd") (applies to CntrA, CntrD,
CntrP)
factor Real Factor for pulse value determination
time (CntrA) Time Time interval for deviation calculation
limit (CntrD) DInt Overflow value
counter DInt Current counter value
rest Real Current residual value
cmds UDT -
reset Bool true: Reset the counter value.
takeOvEditCounterValue Bool Overwrite preceding count value with the current
count value
takeOvEditRestValue Bool Overwrite preceding residual value with the current
residual value
initialize Bool true: Initialize the counter (reset the internal values)
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 26
2 Integration of the PLC function blocks

settingsPLC
Table 2-22
Parameter Data type Description
factor Real Factor for pulse value determination
time (CntrA) Time Time interval for deviation calculation
limit (CntrD) DInt Overflow value
enInput Bool true: Count upwards

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 27
2 Integration of the PLC function blocks

statusHMI
Table 2-23
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
status Word Status word
Bit assignment:
Bit 0: Initialization was active
Bit 1: Reset
Bit 2: "takeOvEditCounterValue" was active (the previous
counter value was overwritten)
Bit 3: "takeOvEditRestValue" was active (the previous
residual value was overwritten)
Bit 4: Newer differential value is calculated (CntrD)
Bit 5: enInput is active
Bit 8: enInput at the block input is active
statusHMI Word Status in the preceding cycle (bit assignment see "status")
counterHMI Dint Current counter value
dataType Int Type of counter
rest Real Alarm limit high
correction UDT High warning threshold
© Siemens AG 2019 All rights reserved

timeStamp DTL Time stamp of last correction


flags Byte Last correction:
"1": Initialization
"2": Reset
"3": "takeOvEditCounterValue" was active (the previous
counter value was overwritten)
"4": "takeOvEditRestValue" was active (the previous residual
value was overwritten)
counter Dint Previous counter value
rest Real Previous residual value

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 28
2 Integration of the PLC function blocks

2.7 LBP_CntrD – Derivative counter


Brief description
The block forms a counter value by forming a difference from an input counter value.
Both up and down counting (decreasing input value) is possible.

Block
Figure 2-7: LBP_CntrD
FB LBP_CntrD
BOOL EN ENO BOOL
STRING[30] identName counterVal DINT
DINT indCounter intError WORD
REAL factor enInp BOOL
DINT limit correction BYTE
BOOL enInput lastCounter DINT
BOOL cmdIni lastReset REAL
BOOL cmdReset
Array[*] panels
© Siemens AG 2019 All rights reserved

2.7.1 Interface description of the PLC block

Input parameters
Table 2-24
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
DInt Input counter value from which the output counter value is to
indCounter be derived
factor Real Factor for pulse value determination
DInt If a value > 0 is parameterized here, a negative difference is
evaluated as an overflow of "indCounter". In this case, the
calculation of the new output counter value takes "limit" into
limit account as the maximum value of the input counter.
enInput Bool Enable calculation of meter reading
cmdIni Bool true: Initialize the counter (reset the internal values)
cmdReset Bool true: Reset the counter value

Output parameters
Table 2-25
Parameter Data type Description
counterVal DInt Current counter value
Error code
Bit assignment:
Bit 0 – true: System error (error when reading the system
intError Word time)
enInp Bool Enable for calculation of the meter reading active

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 29
2 Integration of the PLC function blocks

Parameter Data type Description


Last correction:
"0": Initialization
"1": Reset
"2": Change of counter
correction Byte "3": Change of residual value
lastCounter DInt Counter value before correction
lastReset Real Residual value before correction

Input/output parameters
See 2.1.4 Input/output for panel communication

2.7.2 Interface description for HMI communication

See 2.6.2 Interface description for HMI communication

2.8 LBP_CntrP – Pulse counter


Brief description

This function can be used to count forward or backward. This block can be used e.g. in a fast
OB for counting pulses.
© Siemens AG 2019 All rights reserved

Block
Figure 2-8: LBP_CntrP
FB LBP_CntrP
BOOL EN ENO BOOL
STRING[30] identName counterVal DINT
BOOL indInc intError WORD
BOOL indDec enInp BOOL
REAL factor correction BYTE
BOOL enInput lastCounter DINT
BOOL cmdIni lastReset REAL
BOOL cmdReset
Array[*] panels

2.8.1 Interface description of the PLC block

Input parameters
Table 2-26
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indInc Bool Count pulse forwards
indDec Bool Count pulse downwards.
factor Real Factor for pulse value determination (pulse valency)
enInput Bool Enable calculation of meter reading

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 30
2 Integration of the PLC function blocks

Parameter Data type Description


cmdIni Bool true: Initialize the counter (reset the internal values)
cmdReset Bool true: Reset the counter value

Output parameters
Table 2-27
Parameter Data type Description
counterVal DInt Current counter value
Error code
Bit assignment:
Bit 0 – true: System error (error when reading the system
intError Word time)
enInp Bool Enable for calculation of the meter reading active
Last correction:
"0": Initialization
"1": Reset
"2": Change of counter
correction Byte "3": Change of residual value
lastCounter DInt Counter value before correction
lastReset Real Residual value before correction
© Siemens AG 2019 All rights reserved

Input/output parameters
See 2.1.4 Input/output for panel communication

2.8.2 Interface description for HMI communication

See 2.6.2 Interface description for HMI communication

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 31
2 Integration of the PLC function blocks

2.9 LBP_CtrlPID – Continuous PID controller


Brief description
It is a configurable PID controller. The important parameters of the controller can be
parameterized via faceplate. The controller can be used in manual and automatic
mode.

Block
Figure 2-9: LBP_CtrlPID
FB LBP_CtrlPID
BOOL EN ENO BOOL
STRING[30] identName output REAL
REAL input outputPWM BOOL
REAL setpoint setpointLimit_H BOOL
REAL disturbance setpointLimit_L BOOL
REAL manualValue state INT
REAL KP error BOOL
REAL TN errorBits DWORD
REAL TV
BOOL modeAut
© Siemens AG 2019 All rights reserved

BOOL cmdAck
BOOL cmdReset
Array[*] panels

2.9.1 Interface description of the PLC block

Input parameters
Table 2-28
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode
KP Real Proportional gain
TN Real Integration time
TV Real Derivative time
modeAut Bool true: Automatic mode
false: Manual mode
cmdAck Bool Acknowledgment of the errors at the PID controller (STEP 7
block PID_Compact)
cmdReset Bool Resetting the PID controller (STEP 7 block PID_Compact)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 32
2 Integration of the PLC function blocks

Output parameters
Table 2-29
Parameter Data type Description
output Real Output value in the REAL format
outputPWM Bool Pulse width modulated output value
setpointLimit_H Bool true: Absolute upper limit of the setpoint has been reached
setpointLimit_L Bool true: Absolute lower limit of the setpoint has been reached
state Int Operating mode:
"0": Idle
"1": Initial optimization
"2": Post-optimization
"3": Automatic mode
"4": Manual mode
"5": Substitute output value with error monitoring
error Bool Error detected
Error code of PID_Compact
Bit assignment, see TIA Portal help under
errorBits DWord PID_Compact V2 → Parameter ErrorBits

Input/output parameters
See 2.1.4 Input/output for panel communication
© Siemens AG 2019 All rights reserved

2.9.2 Interface description for HMI communication

settingsHMI
Table 2-30
Parameter Data type Description
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode.
KP Real Proportional gain
TN Real Integration time
TV Real Derivative time
rangeBegin Real Low limit
rangeEnd Real Limit value high
output Real Output value
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Allows the operation of mode, acknowledgment
and reset with the HMI system
Bit 1 – input ("over")
Bit 2 – setpoint ("over")
Bit 3 – disturbance ("over")
Bit 4 – manualValue ("over")
Bit 15 – Creation of a test entry for the log ("cmd")
cmd Word Commands:
Bit 0 – Deactivate
Bit 1 – Initial optimization

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 33
2 Integration of the PLC function blocks

Parameter Data type Description


Bit 2 – Reoptimize
Bit 3 – Setting the automatic mode
Bit 4 – Setting the manual mode
Bit 5 – Acknowledgment of the PID controller
Bit 6 – Resetting of the PID controller
Bit 7 – Apply the values of the block inputs for KP, TN
and TV
Bit 8 – Apply the values from "settingsHMI" for KP, TN
and TV
Bit 9 – Save the current values for KP, TN and TV in
"settingsHMI"
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example:
s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
CancelTuningLevel Real Parameters for self-optimization
The higher the value, the longer and more exactly it is
optimized.
alarmsInfo UDInt Alarm information
© Siemens AG 2019 All rights reserved

alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-31
Parameter Data type Description
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode.
KP Real KP value (proportional factor)
TN Real TN value (integration time constant)
TV Real TV value (differentiation constant)

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-32
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
status Word Operating mode:
"0": Idle
"1": Initial optimization

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 34
2 Integration of the PLC function blocks

Parameter Data type Description


"2": Post-optimization
"3": Automatic mode
"4": Manual mode
"5": Substitute output value with error monitoring
PIDCompactTeil UDT -
Progress Real Progress of the optimization as a percentage (0.0 - 100.0)
Gain Real Active proportional gain,
Gain is retentive
Ti Real r_Ti > 0.0: Active integration time
r_Ti = 0.0: I-component is switched off
r_Ti is retentive
Td Real r_Td > 0.0: Active differentiation time
r_Td = 0.0: D component is switched off
r_Td is retentive
value UDT -
valInput Real Input value
setpoint Real Setpoint
feedback Real Feedback
msg DWord Error code of PID_Compact
Bit assignment, see TIA Portal help under PID_Compact V2
© Siemens AG 2019 All rights reserved

→ Parameter ErrorBits

LBP_typeLog15MHIData
Table 2-33
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 35
2 Integration of the PLC function blocks

2.10 LBP_CtrlStp – Step controller


Brief description
The block implements a PID controller with self-optimization for valves or actuators
with integrating behavior. The controller can be operated with or without position
feedback.

Block
Figure 2-10: LBP_CtrlStp
FB LBP_CtrlStp
BOOL EN ENO BOOL
STRING[30] identName outputUp BOOL
REAL input outputDown BOOL
REAL setpoint setpointLimit_H BOOL
REAL disturbance setpointLimit_L BOOL
REAL manualValue state INT
REAL KP error BOOL
REAL TN errorBits DWORD
REAL TV
REAL feedback
© Siemens AG 2019 All rights reserved

BOOL feedbackOn
BOOL actuatorH
BOOL actuatorL
BOOL modeAut
BOOL cmdAck
BOOL cmdReset
BOOL cmdManUp
BOOL cmdManDown
Array[*] panels

2.10.1 Interface description of the PLC block

Input parameters
Table 2-34
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode
KP Real Proportional gain
TN Real Integration time
TV Real Derivative time
feedback Real Position feedback

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 36
2 Integration of the PLC function blocks

Parameter Data type Description


feedbackOn Bool Position feedback should be used
actuatorH Bool Upper stop of the control position reached
actuatorL Bool Lower stop of the control position reached
modeAut Bool true: Automatic mode
false: Manual mode
cmdAck Bool Acknowledgment of the errors at the PID controller (STEP 7
block PID_3Step)
cmdReset Bool Resetting the PID controller (STEP 7 block PID_3Step)
cmdManUp Bool Command for opening actuator (manual mode)
cmdManDown Bool Command for closing actuator (manual mode)

Output parameters
Table 2-35
Parameter Data type Description
outputUp Bool Actuation command for opening the actuator
outputDown Bool Actuation command for closing the actuator
setpointLimit_H Bool true: Absolute upper limit of the setpoint has been reached
setpointLimit_L Bool true: Absolute lower limit of the setpoint has been reached
© Siemens AG 2019 All rights reserved

state Int Operating mode:


"0": Idle
"1": Initial optimization
"2": Post-optimization
"3": Automatic mode
"4": Manual mode
"5": Substitute output value with error monitoring
error Bool Error detected
Error code of PID_Compact
Bit assignment, see TIA Portal help under PID_3Step
errorBits DWord → Parameter ErrorBits

Input/output parameters
See 2.1.4 Input/output for panel communication

2.10.2 Interface description for HMI communication

settingsHMI
Table 2-36
Parameter Data type Description
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode
KP Real KP value (proportional factor)
TN Real TN value (integration time constant)
TV Real TV value (differentiation constant)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 37
2 Integration of the PLC function blocks

Parameter Data type Description


rangeBegin Real Low limit
rangeEnd Real Limit value high
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Allows the operation of mode, acknowledgment
and reset with the HMI system
Bit 1 – input ("over")
Bit 2 – setpoint ("over")
Bit 3 – disturbance ("over")
Bit 4 – manualValue ("over")
Bit 15 – Creation of a test entry for the log ("cmd")
cmd Word Commands:
Bit 0 – Deactivate
Bit 1 – Initial optimization
Bit 2 – Reoptimize
Bit 3 – Setting the automatic mode
Bit 4 – Setting the manual mode
Bit 5 – Acknowledgment of the PID controller
Bit 6 – Resetting of the PID controller
Bit 7 – Apply the values of the block inputs for KP, TN
and TV
Bit 8 – Apply the values from "settingsHMI" for KP, TN
© Siemens AG 2019 All rights reserved

and TV
Bit 9 – Save the current values for KP, TN and TV in
"settingsHMI"
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example:
s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
CancelTuningLevel Real Parameters for self-optimization
The higher the value, the longer and more exactly it is
optimized.
alarmsInfo1 UDInt Alarm information 1
alarmsInfo2 UDInt Alarm information 2
alarmsAck UDInt Alarm acknowledgment

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 38
2 Integration of the PLC function blocks

settingsPLC
Table 2-37
Parameter Data type Description
input Real Current value
setpoint Real Setpoint for PID controller in automatic mode
disturbance Real Disturbance variable or pilot control value
manualValue Real This value is used as an output value in manual mode
KP Real Proportional gain
TN Real Integration time
TV Real Derivative time

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-38
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
© Siemens AG 2019 All rights reserved

"identName)
status Word Operating mode:
"0": Idle
"1": Initial optimization
"2": Post-optimization
"3": Automatic mode
"4": Manual mode
"5": Substitute output value with error monitoring
PID3StepPart UDT -
Progress Real Progress of the current phase as a percentage (for
optimization)
Actuator_H Bool Digital position feedback of the valve for the upper stop.
If "Actuator_H" = TRUE, the position of the valve is at the
upper stop and the valve is not moved further in this
direction.
Actuator_L Bool Digital position feedback of the valve for the lower stop.
If "Actuator_L" = TRUE, the position of the valve is at the
lower stop and the valve is not moved further in this
direction.
Output_UP Bool Digital output value for opening the valve.
If "Config.OutputPerOn" (parameter of the block PID_3Step)
= FALSE, the parameter "Output_UP" is used.
Output_DN Bool Digital output value for closing the valve.
If "Config.OutputPerOn" (parameter of the block PID_3Step)
= FALSE, the parameter "Output_DN" is used.
Gain Real Active proportional gain
Gain is retentive
Ti Real Ti > 0.0: Active integration time
Ti = 0.0: I-component is switched off
Ti is retentive

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 39
2 Integration of the PLC function blocks

Parameter Data type Description


Td Real Td > 0.0: Active differentiation time
Td = 0.0: D component is switched off
Td is retentive
value UDT -
valInput Real Input value
setpoint Real Setpoint
feedback Real Feedback
msg DWord Error code "of PID_3Step"
Bit assignment, see TIA Portal help under PID_3Step
→ Parameter ErrorBits

LBP_typeLog15MHIData
Table 2-39
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 40
2 Integration of the PLC function blocks

2.11 LBP_Intlk8 – Interlock for up to 8 signals


Brief description
The block generates an output signal from up to eight binary inputs from a
programmable logic.

Block
Figure 2-11: LBP_Intlk8
FB LBP_Intlk8
BOOL EN ENO BOOL
STRING[30] identName result BOOL
BOOL in1
BOOL in2
BOOL in3
BOOL in4
BOOL in5
BOOL in6
BOOL in7
BOOL in8
INT logic1
© Siemens AG 2019 All rights reserved

INT logic2
INT logic3
INT logic4
INT logic5
INT logic6
INT logic7
STRING[20] text1
STRING[20] text2
STRING[20] text3
STRING[20] text4
STRING[20] text5
STRING[20] text6
STRING[20] text7
STRING[20] text8
Array[*] panels

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 41
2 Integration of the PLC function blocks

Note Observe the following naming conventions for the Intlk8 to interlock a motor or a
valve and open the Intlk8 window directly in WinCC from the motor window:
When using WinCC Professional or WinCC V7, name the instance in accordance
with the scheme "Instance name of the motor or valve" and "LockOn". Example:
"instMtrLockOn".
When using WinCC Comfort, name the "identName" in accordance with the
scheme "identName of the motor or valve" and "LockOn". Example:
"instMtrLockOn".
If you are using the interlock to assign a release to a motor or valve, use "RelOn"
instead of "LockOn".

2.11.1 Interface description of the PLC block

Input parameters
Table 2-40
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
in 1 to 8 Bool Inputs 1 – 8
logic1 to 7 Int Logics:
© Siemens AG 2019 All rights reserved

logic1 – Logic between in1 and in2


logic2 – Logic between the result of logic1 and in3, etc.
text1 to 8 Int Default texts/title of the inputs 1-8

Output parameters
Table 2-41
Parameter Data type Description
result Bool Result of the logic

Input/output parameters
See 2.1.4 Input/output for panel communication.

2.11.2 Interface description for HMI communication

settingsHMI
Table 2-42
Parameter Data type Description
input Byte Inputs
Bit assignment:
Bit 0 – in1
Bit 1 – in2, etc.
logics Array[0..6] of Int Logics:
logic1 – Logic between in1 and in2
logic2 – Logic between the result of logic1 and in3,
etc.
texts Array[0..7] of Texts/titles of inputs 1-8
String[20]

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 42
2 Integration of the PLC function blocks

Parameter Data type Description


note String[80] See "note
opStation String[16] See "opStation
overwrite Word See "overwrite
Bit assignment:
Bit 0 – in1 ("over")
Bit 1 – in2 ("over")
Bit 2 – in3 ("over")
Bit 3 – in4 ("over")
Bit 4 – in5 ("over")
Bit 5 – in6 ("over")
Bit 6 – in7 ("over")
Bit 7 – in8 ("over")
Bit 8 – logic1 ("over")
Bit 9 – logic2 ("over")
Bit 10 – logic3 ("over")
Bit 11 – logic4 ("over")
Bit 12 – logic5 ("over")
Bit 13 – logic6 ("over")
Bit 14 – logic7 ("over")
colors UDT Colors
resultBulbOn Int Color of the result light in the activated status.
© Siemens AG 2019 All rights reserved

"0": Light blue


"1": Green
"2": Yellow
"3": Red
resultBulbOff Int Color of the result light in the deactivated status:
"0": Light blue
"1": Green
"2": Yellow
"3": Red
signalColorOn DInt Color of the logical connections if the preceding logic
results in "true":
"9069843": Dark blue
"0": Black
"5026082": Light green
"2366701": Light red
"62207": Yellow
"2588671": Orange
signalColorOff DInt Color of the logical connections if the preceding logic
results in "false":
"14997947": Light blue
"12829635": Light gray
"27648": Dark green
"133": Dark red
"45493: Dark yellow
"1657769": Brown

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 43
2 Integration of the PLC function blocks

settingsPLC
Table 2-43
Parameter Data type Description
input Byte Inputs
Bit assignment:
Bit 0 – in1
Bit 1 – in2, etc.
logics Array[0..6] of Logics:
Int logic1 – Logic between in1 and in2m
logic2 – Logic between the result of logic1 and in3, etc.
texts Array[0..7] of Default texts/titles of the inputs 1-8
String[20]

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-44
Parameter Data type Description
© Siemens AG 2019 All rights reserved

identName String[30] Identification name (see chapter 2.1.1 Cross-block input


"identName)
status Word Status of the inputs and results
Bit assignment:
Bit 0 – in1
Bit 1 – in2
Bit 2 – in3
Bit 3 – in4
Bit 4 – in5
Bit 5 – in6
Bit 6 – in7
Bit 7 – in8
Bit 8 – Result logic1
Bit 9 – Result logic2
Bit 10 – Result logic3
Bit 11 – Result logic4
Bit 12 – Result logic5
Bit 13 – Result logic6
Bit 14 – Result logic7
Bit 15 – Output

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 44
2 Integration of the PLC function blocks

2.12 LBP_Msg8 – Message block for 8 messages


Brief description
The block creates messages based on an eight-digit binary code and stores a
maximum of eight messages. Gone messages can be reset via "reset". If the
messages are not to be saved, "reset" can be set to "True".

Block
Figure 2-12: LBP_Msg8
FB LBP_Msg8
BOOL EN ENO BOOL
STRING[30] identName collectSave BOOL
BOOL cmdReset collectAct BOOL
BOOL in1
BOOL in2
BOOL in3
BOOL in4
BOOL in5
BOOL in6
BOOL in7
© Siemens AG 2019 All rights reserved

BOOL in8
STRING[28] name1
STRING[28] name2
STRING[28] name3
STRING[28] name4
STRING[28] name5
STRING[28] name6
STRING[28] name7
STRING[28] name8
Array[*] panels

Note Observe the following naming conventions for the Msg8 if you to want visualize
the faults of a motor or valve and want to open the Msg8 window in WinCC
directly from the motor window.
When using WinCC Professional or WinCC V7, name the instance in accordance
with the scheme "Instance name of the motor or valve" and "ErrExt". Example:
"instMtrErrExt".
When using WinCC Comfort, name the "identName" in accordance with the
scheme "identName of the motor or valve" and "ErrExt". Example:
"instMtrErrExt".
If you are using the Msg8 to visualize warnings of a motor or valve, use
"WarnExt" instead of "ErrExt".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 45
2 Integration of the PLC function blocks

2.12.1 Interface description of the PLC block

Input parameters
Table 2-45
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
cmdReset Bool Reset the messages
in 1 to 8 Bool Inputs for messages 1 to 8
name1 to 8 String[28] Name of the messages 1 to 8

Output parameters
Table 2-46
Parameter Data type Description
collectSave Bool Collective message of the stored messages
collectAct Bool Collective message of the current. messages

Input/output parameters
See 2.1.4 Input/output for panel communication.
© Siemens AG 2019 All rights reserved

2.12.2 Interface description for HMI communication

settingsHMI
Table 2-47
Parameter Data type Description
command Byte Commands
Bit assignment:
Bit 0 – Resetting the stored messages
note String[80] See "note
opStation String[16] See "opStation
msgTest Byte Bits for testing the messages
Bit assignment:
Bit 0 – Message 1 (in1)
Bit 1 – Message 2 (in2)
Bit 2 – Message 3 (in3)
Bit 3 – Message 4 (in4)
Bit 4 – Message 5 (in5)
Bit 5 – Message 6 (in6)
Bit 6 – Message 7 (in7)
Bit 7 – Message 8 (in8)
msgTypes Byte Types or colors of the lights for the messages.
Bit assignment:
Bit 0 – true: The light for message 1 is orange in the
activated status (false: red)
Bit 1 – true: The light for message 2 is orange in the
activated status (false: red)
etc.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 46
2 Integration of the PLC function blocks

settingsPLC
Table 2-48
Parameter Data type Description
names Array[0..7] of Name of the messages.
String[28]

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-49
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
values Word Status of the messages
Bit assignment:
Bit 0 - Message1 is or was active

Bit 7 - Message8 is or was active
© Siemens AG 2019 All rights reserved

Bit 8 – Message1 is active



Bit15 – Message 8 is active

2.13 LBP_Mtr – Simple motor


Brief description
The block "Mtr" can be used to operate motors with one direction of rotation and one
speed.
The motor can be used in the following modes:
• Manual mode: The motor is operated via the HMI
• Automatic mode: Motor is controlled via the "cmdAutOn" input
• Local mode: Motor is controlled via the "cmdLocOpen" input (local operation has
the highest priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings
The block controls the reaction of the motor to a switch-over from ON or OFF. Error
and status messages are automatically generated. Detailed information can be
displayed through interconnection with blocks of the type "Msg8" and "Intlk8". In
addition, diagnostics entries of the block can be displayed in the HMI (log).
In all operating modes, the motor can only be switched on if the switch-on enable
("indRelease") is set. If the motor is switched on, a missing switch-on enable does
not result in a switch-off.
The following functions can be used for maintenance:
• Operating hours counter
• Limit for operating hours (monitoring with limit greater than zero)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 47
2 Integration of the PLC function blocks

• Counter Change Controls


• Limit counter actuations (monitoring with limit greater than zero)

Block
Figure 2-13: LBP_Mtr
FB LBP_Mtr
BOOL EN ENO BOOL
STRING[30] identName on BOOL
BOOL indOff collectErro BOOL
BOOL indOn collectWarning BOOL
BOOL indTripOk collectMaintenance BOOL
BOOL indErr modeAut BOOL
BOOL indWarn reset BOOL
BOOL indRelease intError WORD
BOOL indInterlock
BOOL indRepair
BOOL indLocal
BOOL cmdLocOn
BOOL cmdAut
cmdAutOn
© Siemens AG 2019 All rights reserved

BOOL
BOOL cmdReset
TIME timeout
Array[*] panels

2.13.1 Interface description of the PLC block

Input parameters
Table 2-50
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indOff Bool Feedback motor
true: Motor is off
indOn Bool Feedback motor
true: Motor is On
indTripOk Bool true: OK, false: Emergency off
indErr Bool External error
indWarn Bool External warning
indRelease Bool Switch on release for the motor.
indInterlock Bool Interlocking active (switches the motor off or prevents it
from being switched on)
indRepair Bool Activate repair mode (motor can only be controlled
externally; errors and warnings are not displayed via
faceplate)
indLocal Bool Activate local mode (motor is in local mode and can only
be activated via cmdLocOpen)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 48
2 Integration of the PLC function blocks

Parameter Data type Description


cmdLocOn Bool Control command for local operation
cmdAut Bool Switching in external mode. At a positive edge the
automatic mode is set.
cmdAutOn Bool Switching on the motor in automatic mode
cmdReset Bool Reset the errors
timeout Time Monitoring time for the messages "timeout" and
"plausibility"

Output parameters
Table 2-51
Parameter Data type Description
on Bool Activation of the motor.
collectErro Bool Collective error.
collectWarning Bool Collective warning.
collectMaintenance Bool Collective maintenance message.
modeAut Bool Automatic mode active.
reset Bool "Reset" active.
intError Word Internal error in the block.
Bit assignment:
© Siemens AG 2019 All rights reserved

Bit 0 – System error (error when reading the system time).

Input/output parameters
See 2.1.4 Input/output for panel communication.

2.13.2 Interface description for HMI communication

settingsHMI
Table 2-52
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
note String[80] See "note
opStation String[16] See "opStation
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Timeout ("over")
Bit 7 – Disabling the input cmdAut
Bit 15 – Creation of a test entry for the log ("cmd")
switches DInt Maximum number of switching operations
opHours Time Maximum operating time
cmd Word Commands
Bit assignment:
Bit 0 – Off
Bit 1 – On
Bit 2 – Manual mode
Bit 3 - Automatic mode
Bit 4 – Reset

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 49
2 Integration of the PLC function blocks

Parameter Data type Description


maintenance UDT Relevant values for a maintenance
switches DInt Current number of switching operations
opHours Time Operating time in hours
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-53
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-54
© Siemens AG 2019 All rights reserved

Parameter Data type Description


identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus UDT Status messages
off Bool Switched off
on Bool Turned on
auto Bool Automatic mode activated
local Bool Local operation activated
release Bool Enable
runDown Bool Shut down
runUp Bool Startup
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
interlock Bool Interlocking
repair Bool Repair mode
collectMaintenance Bool Collective message for maintenance messages
collectWarning Bool Collective message for warnings
collectErro Bool Collective message for errors
errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Switching time exceeded.
errorPlaus Bool Activation not plausible (switched on or switched
off at the same time or neither switched on nor
switched off)
opHoursLimitReached Bool Maximum operating time exceeded
switchCounterLimitReached Bool Maximum number of switching procedures
exceeded

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 50
2 Integration of the PLC function blocks

Parameter Data type Description


warningExt Bool External warning active
autoCommand Bool Control for automatic mode active

"LBP_typeLog15MHIData"
Table 2-55
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

2.14 LBP_MtrDS - Motor with two speeds and two directions


of rotation
Brief description
This module controls a motor with two directions and two speeds. The motor can be
used in the following operating modes:
• Manual mode: The motor is operated via the HMI
© Siemens AG 2019 All rights reserved

• Automatic mode: Motor is controlled via the inputs "cmdAutOn",


"cmdAutSpeed2" and "cmdAutReverse".
• Local mode: The motor is controlled via the inputs "cmdLocOn",
"cmdLocSpeed2" and "cmdLocReverse" (local operation has the highest
priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings
The block controls the response time when the motor is switched to ON or OFF.
Error and status messages are automatically generated. Detailed information can be
displayed through interconnection with blocks of the type "Msg8" and "Intlk8". In
addition, diagnostics entries of the block can be displayed in the HMI (log).
The following functions can be used for maintenance:
• Operating hours counter
• Limit for operating hours (monitoring with limit greater than zero)
• Counter Change Controls
• Limit counter actuations (monitoring with limit greater than zero)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 51
2 Integration of the PLC function blocks

Block
Figure 2-14: LBP_MtrDS
FB LBP_MtrDS
BOOL EN ENO BOOL
STRING[30] identName on BOOL
BOOL indOff speed2 BOOL
BOOL indOn reverse BOOL
BOOL indSpeed2 collectErro BOOL
BOOL indReverse collectWarning BOOL
BOOL indTripOk collectMaintenance BOOL
BOOL indErr modeAut BOOL
BOOL indWarn reset BOOL
BOOL indRelease intError WORD
BOOL indInterlock
BOOL indRepair
BOOL indLocal
BOOL cmdLocOn
BOOL cmdLocSpeed2
BOOL cmdLocReverse
© Siemens AG 2019 All rights reserved

BOOL cmdAut
BOOL cmdAutOn
BOOL cmdAutSpeed2
BOOL cmdAutReverse
BOOL cmdReset
TIME timeout
TIME timeSpeed1
TIME timeChangeDir
Array[*] panels

2.14.1 Interface description of the PLC block

Input parameters
Table 2-56
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indOff Bool Feedback motor:
true: Motor is off
indOn Bool Feedback motor:
true: Motor is On
indSpeed2 Bool Second speed is active
indReverse Bool Motor runs in the opposite direction of rotation.
indTripOk Bool Emergency off
indErr Bool Error active

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 52
2 Integration of the PLC function blocks

Parameter Data type Description


indWarn Bool Warning active
indRelease Bool Release for activation
indInterlock Bool Interlocking
indRepair Bool Repair mode active
indLocal Bool Local operation active
cmdLocOn Bool Switching on the local operation
cmdLocSpeed2 Bool With the local mode switch to velocity 2
cmdLocReverse Bool With the local mode change the direction of rotation
cmdAut Bool Activate automatic mode
cmdAutOn Bool Switch on via automatic mode
cmdAutSpeed2 Bool Switching to velocity 2 via automatic mode
cmdAutReverse Bool With the automatic mode change the direction of rotation
cmdReset Bool Reset motor
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
timeSpeed1 Time Time during which the motor must have run in speed 1
before the command for speed 2 becomes effective. A
step-by-step run-up can be realized by means of a value
>0.
timeChangeDir Time When the direction of rotation is switched over, the motor
© Siemens AG 2019 All rights reserved

is initially switched off. The parameter indicates the time


after which the motor starts up in the opposite direction of
rotation.

Output parameters
Table 2-57
Parameter Data type Description
on Bool Switching on:
speed2 Bool Switch to speed 2
reverse Bool Reverse direction of rotation
collectErro Bool Collective error
collectWarning Bool Collective warning
collectMaintenance Bool Maintenance required
modeAut Bool Automatic mode active
reset Bool Reset motor
intError Word Error code

Input/output parameters
See 2.1.4 Input/output for panel communication.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 53
2 Integration of the PLC function blocks

2.14.2 Interface description for HMI communication

settingsHMI
Table 2-58
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
switches DInt Maximum number of switching operations
opHours Time Maximum number of operating hours
maintenance UDT -
switches DInt Current number of switching operations
opHours Time Operating time in hours
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Timeout ("over")
Bit 1 – timeLevel ("over")
Bit 2 – timeDirection ("over")
Bit 15 – Creation of a test entry for the log ("cmd")
note String[80] See "note
opStation String[16] See "opStation
cmd Word Commands
© Siemens AG 2019 All rights reserved

Bit assignment:
Bit 0 – Switching off motor in manual mode
Bit 1 – Switching on motor in manual mode
Bit 2 – Switching in manual operation
Bit 3 – Switching to automatic mode
Bit 4 – Resetting of the motor
Bit 5 - Switching of velocity 1 to 2 or vice versa
Bit 6 – Changing of the direction of rotation
timeLevel Time See "timeSpeed1" input
timeDirection Time See "timeChangeDir" input
config Byte Is only used at the HMI end
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-59
Parameter Data type Description
timeout Time Monitoring time (time after which there is a check as to
whether the activation of the motor has functioned)
timeSpeed1 Time See "timeSpeed1" input
timeChangeDir Time See "timeChangeDir" input

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 54
2 Integration of the PLC function blocks

statusHMI
Table 2-60
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus UDT -
off Bool Motor off
on Bool Motor on
auto Bool Automatic mode active
local Bool Local operation active
release Bool Enable for activation given
runDown Bool Startup active
runUp Bool Motor is shut down
autoCommand Bool Control for automatic mode active
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
interlock Bool Interlocking
repair Bool Repair mode
collectMaintenance Bool Collective message for maintenance messages
collectWarning Bool Collective message for warnings
© Siemens AG 2019 All rights reserved

collectErro Bool Collective message for errors


errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Switching time exceeded
errorPlaus Bool Activation not plausible (switched on or switched
off at the same time or neither switched on nor
switched off)
opHoursLimitReached Bool Maximum operating time exceeded
switchCounterLimitReached Bool Maximum switching procedures exceeded
speedLevel2 Bool Speed level 2 active.
reverseDirection Bool Motor runs in reverse
autoSpeedLevel2 Bool The speed level 2 is actuated in automatic mode
autoReverseDirection Bool A change of the direction of rotation is actuated in
automatic mode
warningExt Bool An external warning is active
waitDirection Bool Waiting for direction of rotation change

LBP_typeLog15MHIData
Table 2-61
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 55
2 Integration of the PLC function blocks

2.15 LBP_MtrF – Speed-controlled motor


Brief description
This block is used to control a motor with variable speed (frequency converter) and
analog speed feedback. The motor can be switched on and off. In addition, a speed
value is also transferred. The faceplate can also be used to define a value after
which the motor is considered to have stopped.
The motor can be used in the following modes:
• Manual mode: The motor is operated via the HMI
• Automatic mode: Motor is controlled via the "cmdAutSpeed" input
• Local mode: Motor is controlled via the "cmdLocSpeed" input (local operation
has the highest priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings

Block
Figure 2-15: LBP_MtrF
FB LBP_MtrF
BOOL EN ENO BOOL
STRING[30] identName speed REAL
© Siemens AG 2019 All rights reserved

REAL indSpeed collectErro BOOL


BOOL indOff collectWarning BOOL
BOOL indOn collectMaintenance BOOL
BOOL indTripOk modeAut BOOL
BOOL indErr reset BOOL
BOOL indWarn intError WORD
BOOL indInterlock
BOOL indRepair
BOOL indLocal
REAL cmdLocSpeed
BOOL cmdAut
REAL cmdAutSpeed
BOOL cmdReset
TIME timeout
REAL tolerance
Array[*] panels

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 56
2 Integration of the PLC function blocks

2.15.1 Interface description of the PLC block

Input parameters
Table 2-62
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indSpeed Real Current motor speed
indOff Bool Feedback motor:
True: Motor is off
indOn Bool Feedback motor:
True: Motor is On
indTripOk Bool true: OK, false: Emergency off
indErr Bool External error
indWarn Bool External warning
indInterlock Bool Interlocking active (switches the motor off or prevents it
from being switched on)
indRepair Bool Activate repair mode (motor can only be controlled
externally; errors and warnings are not displayed via
faceplate)
indLocal Bool Feedback "On-site operation"
© Siemens AG 2019 All rights reserved

cmdLocSpeed Real Velocity specification for local actuation


cmdAut Bool Activate automatic mode
cmdAutSpeed Real Velocity specification in automatic mode
cmdReset Bool Reset the motor
timeout Time Monitoring time. In the case of a difference between set
speed and actual speed that lies outside the tolerance,
"errorTimeout" is set after this time.
tolerance Real Permissible tolerance of the deviation between setpoint
and actual speed

Output parameters
Table 2-63
Parameter Data type Description
speed Real Velocity specification for motor
collectErro Bool Collective error
collectWarning Bool Collective warning
collectMaintenance Bool Maintenance necessary
modeAut Bool Automatic mode active
reset Bool Reset active
intError Word Error code

Input/output parameters
See 2.1.4 Input/output for panel communication.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 57
2 Integration of the PLC function blocks

2.15.2 Interface description for HMI communication

settingsHMI
Table 2-64
Parameter Data type Description
timeout Time Monitoring time. In the case of a difference between
set speed and actual speed that lies outside the
tolerance, "errorTimeout" is set after this time.
cmd Word Command byte:
Bit 2 – Operating mode "Manual"
Bit 3 – "Automatic" operating mode
Bit 4 – Reset
speedTolerance Real Permissible tolerance of the deviation between
setpoint and actual speed
limitOff Real Speed value below which the motor is to be displayed
in the "Off" status on the HMI. (See overwrite Bit 2)
limitOn Real Speed value above which the motor is to be
displayed in the "On" status on the HMI. (See
overwrite Bit 3)
opHours Time Maximum operating hours
note String[80] See "note
opStation String[16] See "opStation
© Siemens AG 2019 All rights reserved

overwrite Word See "overwrite


Bit assignment:
Bit 0 – Timeout ("over")
Bit 1 – Speed tolerance ("over")
Bit 2 – Activate limit Off ("cmd")
Bit 3 – Activate limit On ("cmd")
Bit 7 – Disabling the input "cmdAut"
Bit 15 – Creation of a test entry for the log ("cmd")
maintenance - -
opMsecs Time OpMsecs of the current hour
opHours Time Current operating hours
speed Real Velocity specification in manual mode
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-65
Parameter Data type Description
timeout Time Monitoring time. In the case of a difference between set
speed and actual speed that lies outside the tolerance,
"errorTimeout" is set after this time.
tolerance Real Permissible tolerance of the deviation between setpoint
and actual speed
off Bool Motor is to be switched off
on Bool Motor is to be switched on

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 58
2 Integration of the PLC function blocks

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-66
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus - -
off Bool Motor is switched off
on Bool Motor is switched on
auto Bool Automatic mode is active
local Bool Local operation is active
runDown Bool Motor is shut down
runUp Bool Motor is booted
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
interlock Bool Interlocking
© Siemens AG 2019 All rights reserved

repair Bool Repair mode


opHoursLimitReached Bool Collective message for maintenance messages
warningExt Bool Collective message for warnings
collectErro Bool Collective message for errors
errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Monitoring time for impermissible difference between
reference speed and actual speed has expired.
cmdAutSpeed Real Velocity specification in automatic mode
speed Real Current velocity

LBP_typeLog15MHIData
Table 2-67
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 59
2 Integration of the PLC function blocks

2.16 LBP_OpAna – Switch analog values


Brief description
This function can be used to switch analog values. This value can be monitored via
defined limits. A value is only switched through if it lies between the defined limits.
Instead of a specified value, a process value can also be connected and
monitored. If the parameterized value violates the ranges, warnings and errors are
generated.

Block
Figure 2-16: LBP_OpAna
FB LBP_OpAna
BOOL EN ENO BOOL
STRING[30] identName value REAL
REAL indValue
REAL limitMin
REAL limitMax
Array[*] panels
© Siemens AG 2019 All rights reserved

2.16.1 Interface description of the PLC block

Input parameters
Table 2-68
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indValue Real Current analog value
limitMin Real Minimum value of the analog value
limitMax Real Maximum value of the analog value

Output parameters
Table 2-69
Parameter Data type Description
value Real Analog value.

Input/output parameters
See 2.1.4 Input/output for panel communication.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 60
2 Integration of the PLC function blocks

2.16.2 Interface description for HMI communication

"settingsHMI
Table 2-70
Parameter Data type Description
Overwrite Word See "overwrite
Bit assignment:
Bit 0 – Value ("over")
Bit 1 – limitMin ("over")
Bit 2 – limitMax ("over")
Bit 3 – Track HMI value ("cmd") ("true": If
overwrite-Bit 0 is set, the PLC value is transferred into
the HMI value a single time)
value Real Analog value from HMI
limitMin Real Minimum of the analog value
limitMax Real Maximum of the analog value.
note String[80] See "note
caption String[30] Name
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example:
"s9999.999)
(is automatically modified for WinCC Professional,
© Siemens AG 2019 All rights reserved

however, not for WinCC Comfort)


unit String[10] Unit that is to be displayed on the HMI system

"settingsPLC
Table 2-71
Parameter Data type Description
value Real Analog value
limitMin Real Minimum of the analog value
limitMax Real Maximum of the analog value

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

"statusHMI"
Table 2-72
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
value Real Current analog value

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 61
2 Integration of the PLC function blocks

2.17 LBP_OpDig – Switch digital signal


Brief description
The block allows the switching over of a digital signal. Three operating modes are
possible:
• Static: The module operates like an on/off switch
• Rising pulse: The block operates like a closing pushbutton, i.e. a pulse is
output when actuated, otherwise the output is FALSE.
• Falling pulse: The block operates like an opening pushbutton, i.e. one cycle is
output FALSE otherwise the output is on TRUE.

Block
Figure 2-17: LBP_OpDig
FB LBP_OpDig
BOOL EN ENO BOOL
STRING[30] identName on BOOL
BOOL indOn
Array[*] panels
© Siemens AG 2019 All rights reserved

2.17.1 Interface description of the PLC block

Input parameters
Table 2-73
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indOn Bool Current digital value

Output parameters
Table 2-74
Parameter Data type Description
On Bool Specified digital value

Input/output parameters
See 2.1.4 Input/output for panel communication.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 62
2 Integration of the PLC function blocks

2.17.2 Interface description for HMI communication

settingsHMI
Table 2-75
Parameter Data type Description
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Value ("over")
Bit 1 – Value ("cmd")
on Bool Overwritten digital value from HMI
note String[80] See "note
opStation String[16] See "opStation
caption String[30] Name
pulseTime Time Switch-on time (applies to the types Positive edge
and Negative edge)
type Int Type:
"0": Static
"1": Rising edge
"2": Falling edge

settingsPLC
© Siemens AG 2019 All rights reserved

Table 2-76
Parameter Data type Description
on Bool Digital value.

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-77
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
status Word Status
Bit assignment:
Bit 0 – Output value
Bit 1 – Current PLC value (value at input of the STEP 7
block)
Bit 2 – Current HMI value (Overwrite bit 1)
Bit 3 – overwrite Bit 0 ("true": You are currently working
with the PLC value, "false": You are currently working with
the HMI value)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 63
2 Integration of the PLC function blocks

2.18 LBP_Polygon – Conversion of values over 8


interpolation points
Brief description
The block creates a graph with 8 coordinates. The input value is converted to the
output value by means of the graph. The block lends itself for the calculation of
units.

Block
Figure 2-18: LBP_Polygon
FB LBP_Polygon
BOOL EN ENO BOOL
STRING[30] identName V REAL
REAL U
REAL U1
REAL U2
REAL U3
REAL U4
REAL U5
REAL U6
© Siemens AG 2019 All rights reserved

REAL U7
REAL U8
REAL V1
REAL V2
REAL V3
REAL V4
REAL V5
REAL V6
REAL V7
REAL V8
Array[*] panels

2.18.1 Interface description of the PLC block

Input parameters
Table 2-78
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
U Real Input value
U1 to 8 Real U/V coordinate system
U1 to 8 represent the U-values of the 8 coordinates from
which the graph is formed.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 64
2 Integration of the PLC function blocks

Parameter Data type Description


V1 to 8 Real U/V coordinate system
V1 to 8 represent the V-values of the 8 coordinates, from
which the graph is formed.

Output parameters
Table 2-79
Parameter Data type Description
V Real Output value (calculated V-value for the input value U)

Input/output parameters
See 2.1.4 Input/output for panel communication.

2.18.2 Interface description for HMI communication

settingsHMI
Table 2-80
Parameter Data type Description
overwrite Word See "overwrite
Bit assignment:
Bit 0 – U(input) ("over")
© Siemens AG 2019 All rights reserved

Bit 1 bit 8 – U1 to 8 ("over")


Bit 9 to 16 – V1 to 8 ("over")
Bit 17 – V(output) ("over")
note String[80] See "note
formatU String[10] Display format on the HMI system (example:
"s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
formatV String[10] Display format on the HMI system (example:
"s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unitU String[10] Unit that is to be displayed on the HMI system
unitV String[10] Unit that is to be displayed on the HMI system
coordinates - Coordinates
U Real Value to be converted (U)
U1 to 8 Real U/V coordinate system
U1 to 8 represent the U-values of the 8 coordinates
from which the graph is formed.
V1 to 8 Real U/V coordinate system
V1 to 8 represent the V-values of the 8 coordinates,
from which the graph is formed.
V Real Converted value (V)
opStation String[16] See "opStation

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 65
2 Integration of the PLC function blocks

settingsPLC
Table 2-81
Parameter Data type Description
U Real Input value
U1 to 8 Real U/V coordinate system
U1 to 8 represent the U-values of the 8 coordinates from
which the graph is formed.
V1 to 8 Real U/V coordinate system
V1 to 8 represent the V-values of the 8 coordinates, from
which the graph is formed.

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-82
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
status Word Status
© Siemens AG 2019 All rights reserved

Bit assignment:
Bit 0 – "true": The HMI value is used for U (input)
Bit 1 – "true": The HMI value is used for V (output)
valueIn Real Current input value
valueOut Real Current output value

2.19 LBP_Select – Selection of values


Brief description
The block reads in two values and outputs one of them according to the following
possible selection criteria:
• mode = "SEL": The value is determined by the "select" input (select=FALSE:
valueSel = value0, select = TRUE: valueSel = value1)
• mode = "MIN": The smaller value is output
• mode = "MAX": The greater value is output
The output "result" indicates which value is selected (result = FALSE: value0, result
= TRUE: value1).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 66
2 Integration of the PLC function blocks

Block
Figure 2-19: LBP_Select
FB LBP_Select
BOOL EN ENO BOOL
STRING[30] identName result BOOL
INT mode intError WORD
BOOL select
VARIANT value0
VARIANT value1
VARIANT valueSel
Array[*] panels

2.19.1 Interface description of the PLC block

Input parameters
Table 2-83
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
© Siemens AG 2019 All rights reserved

mode Int Selection mode:


"1": Selection via switch
"2": Selection of the greater value
"3": Selection of the lesser value
select Bool Switch (affects mode 1)
value0 Variant Value 1
value1 Variant Value 2

Output parameters
Table 2-84
Parameter Data type Description
Result Bool Selected value
intError Word Error code

Input/output parameters
Table 2-85
Parameter Data type Description
panels Array [*] of UDT See 2.1.4 Input/output for panel
communication
valueSel Variant Selected value. The data types
Bool, Byte, Int, DInt, Word,
DWord, Real and LReal are
possible.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 67
2 Integration of the PLC function blocks

2.19.2 Interface description for HMI communication

settingsHMI
Table 2-86
Parameter Data type Description
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example:
"s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Result ("over")
Bit 1 – Result ("cmd")
Bit 2 – Selected value ("over")
resultDWord DWord Selected value for the used data type DWord
resultReal Real Selected value for the used data type Real

settingsPLC
© Siemens AG 2019 All rights reserved

Table 2-87
Parameter Data type Description
mode Int Selection mode:
"1": Selection via switch
"2": Selection of the greater value
"3": Selection of the lesser value
dataType Int Data type
resultPlc Bool Result when using the PLC values
result Bool Effective result

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-88
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
value LReal Value
dataReals UDT -
dataRealValue0 Real Value 1 for data type Real
dataRealValue1 Real Value 2 for data type Real
dataRealResultValue Real Selected value for the used data type Real

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 68
2 Integration of the PLC function blocks

Parameter Data type Description


dataDWords UDT -
dataDWordValue0 DWord Value 1 for data type DWord
dataDWordValue1 DWord Value 2 for data type DWord
dataDWordResultValue DWord Selected value for the used data type DWord

2.20 LBP_SetCrv – Time-dependent setpoint curve


Brief description
This block can be used to create a time-dependent setpoint curve.

Block
Figure 2-20: LBP_SetCrv
FB LBP_SetCrv
BOOL EN ENO BOOL
STRING[30] identName status WORD
WORD cmd value REAL
INT perTimeVal intError WORD
TIME_OF_DAY startTime
© Siemens AG 2019 All rights reserved

REAL valueDefault
REAL value1
REAL value2
REAL value3
REAL value4
REAL value5
REAL value6
REAL value7
REAL value8
TIME time1
TIME time2
TIME time3
TIME time4
TIME time5
TIME time6
TIME time7
TIME time8
Array[*] panels

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 69
2 Integration of the PLC function blocks

2.20.1 Interface description of the PLC block

Input parameters
Table 2-89
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
cmd Word Command word:
Bit 0 – Hold (freeze value)
Bit 1 – Start with percentage time value (see perTimeVal)
Bit 2 – Start time-independent (see startTime)
Bit 3 – Interpolation
Bit 8 ... 15 - Percentage time value for the activation (1...
100)
perTimeVal Int Percentage time value for start
startTime Time_Of_Day Time to start
valueDefault Real Start or default value
value1 to 8 Real Values of the 8 coordinates on the basis of which the
curve is created
time1 to 8 Time Times for the 8 values of the 8 coordinates which were
used to create the curve
© Siemens AG 2019 All rights reserved

Output parameters
Table 2-90
Parameter Data type Description
status Word Status word:
Bit 0 – Execution of the curve is active
Bit 2 – Start time reached (for time-dependent start)
The high byte contains the current percentage time value.
value Real Output value V
intError Word Error code:
Unequal 0 - error when reading the system time

Input/output parameters
See 2.1.4 Input/output for panel communication.

2.20.2 Interface description for HMI communication

"settingsHMI
Table 2-91
Parameter Data type Description
note String[80] See "note
opStation String[16] See "opStation
format String[10] Display format on the HMI system (example:
"s9999.999)
(is automatically modified for WinCC Professional,
however, not for WinCC Comfort)
unit String[10] Unit that is to be displayed on the HMI system
overwrite Word See "overwrite

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 70
2 Integration of the PLC function blocks

Parameter Data type Description


Bit assignment:
Bit 0 – Allow switch by operator
Bit 1..8 – value and time 1..8 ("over")
Bit 9 – start by time("over")
Bit 10 – start by time ("value")
Bit 11 – start time("over")
Bit 12 – interpolation ("over")
Bit 13 – interpolation ("value")
Bit 14 – value Default ("value")
cmd UDT -
deactivate Bool Holding processing
actPercerntSetpoint Bool Starting with percentage time value
strByTime Bool Activate time-dependent actuation
interpolation Bool The curve is to be interpolated
perTimeVal Int Percentage time value for start
startTime Time_Of_Day Time to start
valueDefault Real Start or default value
values Array[0..7] of Values of the 8 coordinates on the basis of which the
Real curve is created
times Array[0..7] of Times for the 8 coordinates on the basis of which the
Time curve is created
© Siemens AG 2019 All rights reserved

settingsPLC
Table 2-92
Parameter Data type Description
cmd UDT -
deactivate Bool Holding processing
actPercerntSetpoint Bool Starting with percentage time value
strByTime Bool Activate time-dependent actuation
interpolation Bool The curve is to be interpolated
perTimeVal Int Percentage time value for start
startTime Time_Of_Day Time to start
valueDefault Real Start or default value
values Array[0..7] of Values of the 8 coordinates on the basis of which the
Real curve is created
times Array[0..7] of Times for the 8 coordinates on the basis of which the
Time curve is created

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 71
2 Integration of the PLC function blocks

statusHMI
Table 2-93
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
value Real Output value V
actualTime Time Current time value
actualTimeMax Time Full-scale value of the time axis
actualTmeStart Time Start value of the time axis
actualTimeRemain Time Current remaining time
actualStatus Int See "status" output
cmd UDT -
deactivate Holding processing
actPercerntSetpoint Starting with percentage time value
strByTime Activate time-dependent actuation
interpolation Bool The curve is to be interpolated
perTimeVal Int Percentage time value for start

2.21 LBP_TimeSw – Time switch


© Siemens AG 2019 All rights reserved

Brief description
The block realizes a time switch for different parameterizable cycles. For connection
to the HMI, the block can be connected with "LibLBP_HMI_TimeSw".

Block
Figure 2-21: LBP_TimeSw
FB LBP_TimeSw
BOOL EN ENO BOOL
ons ARRAY[0..7] OF
STRING[30] identName BOOL
"LBP_type intErrors ARRAY[0..7] OF
TimeSwInStruct" timeSwData WORD
Array[*] panels

2.21.1 Interface description of the PLC block

Input parameters
Table 2-94
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
timeSwData UDT Data of the time switches
timeSwDatas Array[0..7] of -
UDT

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 72
2 Integration of the PLC function blocks

Parameter Data type Description


typeCycle Char Type of time switch:
"1": Every week on Sunday
"2": Every week on Monday
"3": Every week on Tuesday
"4": Every week on Wednesday
"5": Every week on Thursday
"6": Every week on Friday
"7": Every week on Saturday
"D": Daily
"H": Hourly
"M": Once every minute
timeOn Time_Of_Day Switch-on time (time)
duration Time Run time

Output parameters
Table 2-95
Parameter Data type Description
ons Array[0..7] of Output signals for the 8 time switches
Bool
intErrors Array[0..7] of Internal error in the block:
Word 56 – Error when reading the system time
© Siemens AG 2019 All rights reserved

57 – Invalid value for type

Input/output parameters
See 2.1.4 Input/output for panel communication

2.21.2 Interface description for HMI communication

settingsHMI
Table 2-96
Parameter Data type Description
note String[80] See "note
opStation String[16] See "opStation
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Type, start time and run time for time switch
with index 0 ("over")
Bit 1 – Type, start time and run time for time switch
with index 1 ("over")
Bit 2 – Type, start time and run time for time switch
with index 2 ("over")
Bit 3 – Type, start time and run time for time switch
with index 3 ("over")
Bit 4 – Type, start time and run time for time switch
with index 4 ("over")
Bit 5 – Type, start time and run time for time switch
with index 5 ("over")
Bit 6 – Type, start time and run time for time switch
with index 6 ("over")
Bit 7 – Type, start time and run time for time switch
with index 7 ("over")

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 73
2 Integration of the PLC function blocks

Parameter Data type Description


Bit 8 to 15 – Overwrite the output signal with the
value from the HMI system (overwrite Bit 16-23)
("over")
Bit 16 to 23 - Setting the output signal via the HMI
system ("cmd")
startTimes Array[0..7] of Switch-on times (time)
Time_Of_Day
typeCycles Array[0..7] of Types of time switches:
Byte "1": Every week on Sunday
"2": Every week on Monday
"3": Every week on Tuesday
"4": Every week on Wednesday
"5": Every week on Thursday
"6": Every week on Friday
"7": Every week on Saturday
"D": Daily
"H": Hourly
"M": Once every minute
durationTimes Array[0..7] of Run times of the time switches
Time

settingsPLC
© Siemens AG 2019 All rights reserved

Table 2-97
Parameter Data type Description
typeCycles Array[0..7] of Types of time switches:
Byte "1": Every week on Sunday
"2": Every week on Monday
"3": Every week on Tuesday
"4": Every week on Wednesday
"5": Every week on Thursday
"6": Every week on Friday
"7": Every week on Saturday
"D": Daily
"H": Hourly
"M": Once every minute
durationTimes Array[0..7] of Run times of the time switches
Time
startTimes Array[0..7] of Switch-on times (time)
Time_Of_Day
Ons Array[0..7] of Output signals of the time switches using the input values
Bool at the STEP 7 block

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 74
2 Integration of the PLC function blocks

statusHMI
Table 2-98
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
typeCycles Array[0..7] of Types of time switches:
Byte "1": Every week on Sunday
"2": Every week on Monday
"3": Every week on Tuesday
"4": Every week on Wednesday
"5": Every week on Thursday
"6": Every week on Friday
"7": Every week on Saturday
"D": Daily
"H": Hourly
"M": Once every minute
startTimes Array[0..7] of Switch-on times (time)
Time_Of_Day
durationTimes Array[0..7] of Run times of the time switches
Time
ons Array[0..7] of Outputs of the time switches
Bool
© Siemens AG 2019 All rights reserved

intErrors Array[0..7] of 0 – no error


Word 56 – Error when reading the system time
57 – Invalid value for type

2.22 LBP_Vlv – Simple valve


Brief description
This block can be used to control valves with 2 position feedback signals
(open / closed). The starting position can be declared as open or closed. Both
feedback signals can be monitored.
The valve can be used in the following modes:
• Manual mode: Valve is operated via the HMI
• Automatic mode: Valve is controlled via the "cmdAutOpen" input
• Local mode: Valve is controlled via the "cmdLocOpen" input (local operation
has the highest priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings
Error messages, status messages and collective messages can be generated to
monitor the valve.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 75
2 Integration of the PLC function blocks

The following functions can be used for maintenance:


• Operating hours counter
• Counter Change Controls
• Limit counter actuations (monitoring with limit greater than zero)

Block
Figure 2-22: LBP_Vlv
FB LBP_Vlv
BOOL EN ENO BOOL
STRING[30] identName close BOOL
BOOL indClosed open BOOL
BOOL indOpened collectErro BOOL
BOOL indTripOk collectWarning BOOL
BOOL indErr collectMaintenance BOOL
BOOL indWarn modeAut BOOL
BOOL indInterlock reset BOOL
BOOL indRepair intError WORD
BOOL indLocal
BOOL cmdLocOpen
© Siemens AG 2019 All rights reserved

BOOL cmdAut
BOOL cmdAutOpen
BOOL cmdReset
TIME timeout
BOOL lockClose
Array[*] panels

2.22.1 Interface description of the PLC block

Input parameters
Table 2-99
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indClosed Bool Feedback valve:
true: Valve is closed
indOpened Bool Feedback valve:
true: Valve is open
indTripOk Bool true: OK, false: Emergency off
indErr Bool External error
indWarn Bool External warning.
indInterlock Bool Interlocking active (switches the valve off or prevents it
from being switched on)
indRepair Bool Activate repair mode (valve can only be controlled
externally; errors and warnings are not displayed via
faceplate)

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 76
2 Integration of the PLC function blocks

Parameter Data type Description


indLocal Bool Activate on-site operation (valve is in local mode and can
only be activated via cmdLocOpen)
cmdLocOpen Bool The valve is to be opened in local mode
cmdAut Bool Switching in external mode. At a positive edge the
automatic mode is set.
cmdAutOpen Bool Open in automatic mode
cmdReset Bool Reset the errors
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
lockClose Bool "false": Valve closes at interlocking
"true": Valve opens at interlocking

Output parameters
Table 2-100
Parameter Data type Description
close Bool Control command "Close"
open Bool Control command "Open"
collectErro Bool Collective error pending
collectWarning Bool Group warning pending
© Siemens AG 2019 All rights reserved

collectMaintenance Bool Maintenance required


modeAut Bool Automatic mode active
reset Bool Reset active
intError Word 1: Error when reading the system time

Input/output parameters
See 2.1.4 Input/output for panel communication.

2.22.2 Interface description for HMI communication

settingsHMI
Table 2-101
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Timeout ("over")
Bit 7 – Disabling the input "cmdAut"
Bit 15 – Creation of a test entry for the log ("cmd")
note String[80] See "note
opStation String[16] See "opStation

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 77
2 Integration of the PLC function blocks

Parameter Data type Description


cmd Word Commands
Bit assignment:
Bit 0 – Close
Bit 1 – Open
Bit 2 – Manual mode
Bit 3 - Automatic mode
Bit 4 – Reset
opHours Time Maximum operating time
switches DInt Maximum number of switching operations
maintenance UDT Relevant values for a maintenance
switches DInt Current number of switching operations
opHours Time Operating time in hours
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-102
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
© Siemens AG 2019 All rights reserved

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

statusHMI
Table 2-103
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus UDT -
closed Bool Valve is closed
opened Bool Valve is opened
auto Bool Automatic mode
local Bool Local operation activated
closing Bool Valve just closing
opening Bool Valve just opening
cmdAutOpen Bool The command for opening is pending for
automatic operation
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
interlock Bool Interlocking
repair Bool Repair mode
collectMaintenance Bool Collective message for maintenance messages
collectWarning Bool Collective message for warnings

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 78
2 Integration of the PLC function blocks

Parameter Data type Description


collectErro Bool Collective message for errors
errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Switching time exceeded
errorPlaus Bool Feedback messages not plausible (closed and
open at the same time, or neither closed nor open)
opHoursLimitReached Bool Maximum operating time exceeded
switchCounterLimitReached Bool Maximum switching procedures exceeded
lockClose Bool "false": Valve closes at interlocking
"true": Valve opens at interlocking
warningExt Bool External warning is active

LBP_typeLog15MHIData
Table 2-104
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)
© Siemens AG 2019 All rights reserved

2.23 LBP_VlvA – Analog controlled valve


Brief description
This block can be used to control an analog valve (damper) with an analog control
and feedback signal. An analog actuation command can be set and is monitored. In
addition, a monitoring time can be parameterized.
The valve can be used in the following modes:
• Manual mode: Valve is operated via the HMI
• Automatic mode: Valve is controlled via the "cmdAutPosition" input
• Local mode: Valve is controlled via the "cmdLocPosition" input (local operation
has the highest priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 79
2 Integration of the PLC function blocks

Block
Figure 2-23: LBP_VlvA
FB LBP_VlvA
BOOL EN ENO BOOL
STRING[30] identName position REAL
REAL indPosition collectErro BOOL
BOOL indClosed collectWarning BOOL
BOOL indOpened collectMaintenance BOOL
BOOL indTripOk modeAut BOOL
BOOL indErr reset BOOL
BOOL indWarn intError WORD
BOOL indInterlock
BOOL indRepair
BOOL indLocal
BOOL cmdLocPosition
BOOL cmdAut
BOOL cmdAutPosition
BOOL cmdReset
TIME timeout
© Siemens AG 2019 All rights reserved

REAL tolerance
BOOL lockClose
Array[*] panels

2.23.1 Interface description of the PLC block

Input parameters
Table 2-105
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indPosition Real Position feedback [0 … 100 %]
indClosed Bool "true": Currently closed
indOpened Bool "true": Currently opened
indTripOk Bool "true": OK, "False": Emergency off
indErr Bool External error
indWarn Bool External warning
indInterlock Bool Interlock active (see "lockClose" input)
indRepair Bool Activated repair mode (valve can only be controlled
externally; errors and warnings are not generated)
indLocal Bool On-site operation activated (valve is in local mode and can
only be activated via "cmdLocOpen")
cmdLocPosition Real Position setting in local mode
cmdAut Bool Activate automatic operation (positive edge)
cmdAutPosition Real Position setting in automatic mode
cmdReset Bool The valve is to be reset

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 80
2 Integration of the PLC function blocks

Parameter Data type Description


timeout Time Monitoring time. In the case of a difference between set
position and actual position that lies outside the tolerance,
"errorTimeout" is set after this time.
Tolerance Real Permissible tolerance of the deviation between setpoint
and actual position
lockClose Bool "false": Valve closes at interlocking
"true": Valve opens at interlocking

Output parameters
Table 2-106
Parameter Data type Description
position Real Setpoint for controlling the valve [0 … 100 %]
collectErro Bool Collective error
collectWarning Bool Collective warning
collectMaintenance Bool Maintenance necessary
modeAut Bool Automatic mode active
reset Bool Reset active
intError Word 1 – Error when reading the system time

Input/output parameters
© Siemens AG 2019 All rights reserved

See 2.1.4 Input/output for panel communication.

2.23.2 Interface description for HMI communication

settingsHMI
Table 2-107
Parameter Data type Description
timeout Time Monitoring time. In the case of a difference between set
position and actual position that lies outside the tolerance,
"errorTimeout" is set after this time. Monitoring time for the
messages "timeout" and "plausibility"
posTolerance Real Permissible tolerance of the deviation between setpoint
and actual position
limitClosed Real Specification from when the valve is considered to be
closed (for display on HMI)
limitOpened Real Specification from when the valve is considered to be open
(for display on HMI)
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Timeout ("over")
Bit 1 – Tolerance ("over")
Bit 2 – Position limit for closed is to be used ("cmd")
Bit 3 – Position limit for opened is to be used ("over")
Bit 7 – Block the input "cmdAut" ("cmd")
Bit 15 – Creation of a test entry for the log ("cmd")

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 81
2 Integration of the PLC function blocks

Parameter Data type Description


cmd Word Commands
Bit assignment:
Bit "2": Activate manual mode
Bit "3": Activate automatic mode
Bit "4": Reset valve
opHours Time Maximum operating time
maintenance - Relevant values for a maintenance
switches DInt Current number of switching operations
opHours Time Operating time in hours
note String[80] See "note
opStation String[16] See "opStation
position Real Position
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-108
Parameter Data type Description
timeout Time Monitoring time. In the case of a difference between set
© Siemens AG 2019 All rights reserved

position and actual position that lies outside the tolerance,


"errorTimeout" is set after this time.
Tolerance Real Permissible tolerance of the deviation between setpoint
and actual position
closed Bool Closed
opened Bool Opened

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values)

statusHMI
Table 2-109
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus - -
closed Bool Valve is closed
opened Bool Valve is opened
auto Bool Valve is in automatic mode
local Bool Valve is in local operation
closing Bool Valve closing
opening Bool Valve opening
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
interlock Bool Interlocking
repair Bool Repair mode

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 82
2 Integration of the PLC function blocks

Parameter Data type Description


opHoursLimitReached Bool Maximum operating time exceeded
warningExt Bool External warning active
collectErro Bool Collective error active
errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Switching time exceeded
lockClose Bool "false": Valve closes at interlocking
"true": Valve opens at interlocking
cmdAutPosition Real Position setting in automatic mode
position Real Current position

LBP_typeLog15MHIData
Table 2-110
Parameter Data type Description
data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)
© Siemens AG 2019 All rights reserved

2.24 LBP_3wVlv - Three-way valve


Brief description
This block can be used to control three-way valves. The starting position can be
declared. The feedback signal for the position can be monitored.
The valve can take on the following positions:
Table 2-111
Positions

Position 1

Position 2

Position 3 (everything open)

Position 0 (closed)

The valve can be used in the following modes:


• Manual mode: Valve is operated via the HMI
• Automatic mode: Valve is controlled via the "cmdAutOpen" input

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 83
2 Integration of the PLC function blocks

• Local mode: Valve is controlled via the "cmdLocOpen" input (local operation
has the highest priority)
• Repair operation: Input "indRepair" is set. No control is possible and no display
of errors and warnings
Error messages, status messages and collective messages can be generated to
monitor the valve.
The following functions can be used for maintenance:
• Operating hours counter
• Counter Change Controls
• Limit counter actuations (monitoring with limit greater than zero)

Block
Figure 2-24: LBP_3wVlv
FB LBP_3wVlv
BOOL EN ENO BOOL
STRING[30] identName pos0 BOOL
BYTE indPos pos1 BOOL
BOOL indTripOk pos2 BOOL
BOOL indErr pos3 BOOL
© Siemens AG 2019 All rights reserved

BOOL indWarn collectErro BOOL


BOOL indInterlock collectWarning BOOL
BOOL indRepair collectMaintenance BOOL
BOOL indLocal modeAut BOOL
BOOL cmdAut reset BOOL
BOOL cmdLocPos0 intError WORD
BOOL cmdAutPos0
BOOL cmdLocPos1
BOOL cmdAutPos1
BOOL cmdLocPos2
BOOL cmdAutPos2
BOOL cmdLocPos3
BOOL cmdAutPos3
BOOL cmdReset
TIME timeout
INT lockPos
Array[*] panels

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 84
2 Integration of the PLC function blocks

2.24.1 Interface description of the PLC block

Input parameters
Table 2-112
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block input
"identName)
indPos Byte Current position
indTripOk Bool Emergency off pending
indErr Bool Error active
indWarn Bool Warning active
indInterlock Bool Interlock active
indRepair Bool Repair mode active
indLocal Bool Local operation active
cmdAut Bool Automatic mode is actuated
cmdLocPos0 Bool Position 0 is to be actuated in local mode
cmdAutPos0 Bool Position 0 is to be actuated in automatic mode
cmdLocPos1 Bool Position 1 is to be actuated in local mode
cmdAutPos1 Bool Position 1 is to be actuated in automatic mode
cmdLocPos2 Bool Position 2 is to be actuated in local mode
© Siemens AG 2019 All rights reserved

cmdAutPos2 Bool Position 2 is to be actuated in automatic mode


cmdLocPos3 Bool Position 3 is to be actuated in local mode
cmdAutPos3 Bool Position 3 is to be actuated in automatic mode
cmdReset Bool The valve is to be reset
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
lockPos Int "0": Pos3 becomes active at interlocking
"1": Pos0 becomes active at interlocking
"2": Pos1 becomes active at interlocking
"3": Pos2 becomes active at interlocking

Output parameters
Table 2-113
Parameter Data type Description
pos0 Bool Position 0 is actuated
pos1 Bool Position 1 is actuated
pos2 Bool Position 2 is actuated
pos3 Bool Position 3 is actuated
collectErro Bool Collective error active
collectWarning Bool Collective warning active
collectMaintenance Bool Maintenance required
modeAut Bool Automatic mode is actuated
reset Bool Valve is to be reset
intError Word Bit 0 – true: System error (reading the system time has failed)

Input/output parameters
See 2.1.4 Input/output for panel communication.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 85
2 Integration of the PLC function blocks

2.24.2 Interface description for HMI communication

settingsHMI
Table 2-114
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"
overwrite Word See "overwrite
Bit assignment:
Bit 0 – Timeout ("over")
Bit 7 – Block the input "cmdAut" ("cmd")
Bit 15 – Creation of a test entry for the log ("cmd")
note String[80] See "note
opStation String[16] See "opStation
cmd Word Commands
Bit assignment:
Bit 0 – Position 0 is set
Bit 1 – Position 1 is set
Bit 2 – Position 2 is set
Bit 3 – Position 3 is set
Bit 4 – Manual mode is activated
Bit 5 - Automatic mode is activated
© Siemens AG 2019 All rights reserved

Bit 6 – Reset is performed


opHours Time Maximum number of switching operations
switches DInt Relevant values for a maintenance
maintenance UDT -
switches DInt Current number of switching operations
opHours Time Operating time in hours
alarmsInfo UDInt Alarm information
alarmsAck UDInt Alarm acknowledgment

settingsPLC
Table 2-115
Parameter Data type Description
timeout Time Monitoring time for the messages "timeout" and
"plausibility"

Note All variables of "settingsPLC" are used for the transmission of input values to the
HMI system (same variable name and values).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 86
2 Integration of the PLC function blocks

statusHMI
Table 2-116
Parameter Data type Description
identName String[30] Identification name (see chapter 2.1.1 Cross-block
input "identName)
msgStatus UDT -
pos0 Bool Position 0 active
pos1 Bool Position 1 active
pos2 Bool Position 2 active
pos3 Bool Position 3 active
auto Bool Automatic mode active
local Bool Local operation active
positioning0 Bool Positioning to Position 0
positioning1 Bool Positioning to Position 1
positioning2 Bool Positioning to Position 2
positioning3 Bool Positioning to Position 3
cmdAutOpen Bool The command for opening is pending for automatic
operation
errorTrip Bool Emergency off is or was active
errorExt Bool Error is or was active
© Siemens AG 2019 All rights reserved

interlock Bool Interlocking


repair Bool Repair mode
collectMaintenance Bool Collective message for maintenance messages
collectWarning Bool Collective message for warnings
collectErro Bool Collective message for errors
errorFlagTrip Bool Emergency off is active
errorFlagExt Bool Error/Fault is active
errorTimeout Bool Switching time exceeded
errorPlaus Bool Feedback messages not plausible (closed and open
at the same time, or neither closed nor open)
opHoursLimitReached Bool Maximum operating time exceeded
switchCounterLimitReached Bool Maximum number of switching procedures exceeded
lockClose Bool "false": Valve closes at interlocking
"true": Valve opens at interlocking
warningExt Bool External warning is active
status UDT -
ctrl UDT Current control signals
pos0 Bool Control of position 0
pos1 Bool Control of position 1
pos2 Bool Control of position 2
pos3 Bool Control of position 3
ctrlMan UDT Control signals in manual mode
pos0 Bool Control of position 0
pos1 Bool Control of position 1
pos2 Bool Control of position 2
pos3 Bool Control of position 3

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 87
2 Integration of the PLC function blocks

Parameter Data type Description


ctrlAut UDT Control signals in automatic mode
pos0 Bool Control of position 0
pos1 Bool Control of position 1
pos2 Bool Control of position 2
pos3 Bool Control of position 3
ctrlLoc UDT Control signals in local mode
pos0 Bool Control of position 0
pos1 Bool Control of position 1
pos2 Bool Control of position 2
pos3 Bool Control of position 3
commands UDT -
manual Bool Activate manual operation
auto Bool Activation of the automatic mode
reset Bool Reset the errors
resetRepeat Bool Repeats resetting

LBP_typeLog15MHIData
Table 2-117
© Siemens AG 2019 All rights reserved

Parameter Data type Description


data Array[0..14] -
of "UDT"
ts DTL Time stamp (local date and time)
code Word Error code (see 2.25.3 Cross-block error codes)

2.25 LBP_Log15 – Logging of data


Function description
This function saves errors in a log. The log corresponds to a ring buffer with a max.
of 15 entries. This function is integrated in each module for the traceability of events.

Block
Figure 2-25: LBP_Log15
FB LBP_Log15
BOOL EN ENO BOOL
Word codeWrite

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 88
2 Integration of the PLC function blocks

2.25.1 Interface description of the PLC block

Input parameters
Table 2-118
Parameter Data type Description
codeWrite Word Identification error depending on block

2.25.2 Interface description for HMI communication

"statData"
Table 2-119
Parameter Data type Description
statData UDT -
data Array[0..14] Current number of switching operations
of UDT
ts DTL Current date and time
code Word Identification number for error description

2.25.3 Cross-block error codes


© Siemens AG 2019 All rights reserved

Table 2-120
Error code Abbrev. Description
1 < CHECK > Check item
2 CMD MAN Manual mode was activated
3 CMD AUT Automatic mode was activated
4 CMD RESET Block was reset
5 REPAIR OFF Repair mode was deactivated
6 REPAIR ON Repair mode was activated
7 LOCAL ON Local mode was activated
8 LOCAL OFF Local mode was deactivated
9 INTLK OFF Interlock was released
10 INTLK ON Interlock was activated
11 ERR TRIP Emergency off was triggered
12 ERR EXT External error was triggered
13 ERR TIMEOUT Actuation has not been executed in the specified time
14 ERR PLAUS Plausibility error
15 OFF Was switched off
16 ON Was switched on
17 NO RELEASE Switch-on command but no switch-on release
18 RELEASE OFF Switch-on release Off
19 RELEASE ON Switch-on release On
20 WAIT SPEED Waiting time for speed changeover is running
WAIT
21 DIRECTION Waiting time for change of rotation direction is running
22 ON2 Second speed is activated

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 89
2 Integration of the PLC function blocks

Error code Abbrev. Description


23 ON1R Speed 1 active in reverse mode
24 ON2R Speed 2 active in reverse mode
25 CLOSE Was closed
26 OPEN Was opened
Measurement error in high range (peripheral measuring
27 ERR HIGH range not observed)
Measurement error in low range (peripheral measuring range
28 ERR LOW not observed)
29 ALARM HIGH Alarm limit high violated
30 WARNING HIGH High warning threshold violated
31 WARNING LOW Low warning threshold
32 ALARM LOW Alarm limit low violated
33 CMD OFF Switch-off command
34 CMD OPTI Should be initially optimized
35 CMD OPTA Should be re-optimized
36 ERR INP Input value lies outside the process value limits
Error at "Input_PER" input of the "PID_Compact" block called
37 ERR PER in the BPL block.
38 ERR NOPT Error during re-optimization
© Siemens AG 2019 All rights reserved

39 ERR EOPT Initial optimization / initialization could not be started


40 ERR SOPT The setpoint was changed during an optimization.
An initial optimization/initialization was started during the re-
41 ERR ENOPT optimization.
42 ERR FEOPT Error during initial optimization / initialization
43 ERR FNP Error during re-optimization
44 ERR UWPI Incorrect value for "Input". Check variable format
Calculation of the output value failed. PID parameters have
45 ERR AWF to be checked
Sampling time error has occurred. The block was not called
46 ERR ATZF within the sampling time of the cyclic interrupt OB.
47 ERR UWSP Incorrect value as setpoint. Check variable format
Incorrect value as manual value ("ManualValue"). Check
48 ERR UWM variable format.
49 ERR UWSO Incorrect value for "SubstituteOutput". Check variable format.
50 ERR UWD Incorrect value for "Disturbance". Check variable format.
51 MOD OFF Was deactivated
52 MOD OPTI Was optimized
53 MOD OPTA Was reoptimized
54 MOD AUT Was in automatic mode
55 MOD MAN Was in manual mode

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 90
3 Integration of the HMI faceplates

3 Integration of the HMI faceplates


3.1 WinCC (Runtime) Professional
3.1.1 General steps

1. Open the library.


a. A tab with the "Libraries" name is located at the left-hand edge in TIA
Portal. Select this object.
b. Expand the "Global libraries" tab.
c. To open the LBP, click the symbol with the book and the green arrow.
Figure 3-1

d. In the opening select the file "LibraryOfBasicProcesses" with the type


"Siemens TIA Portal V15 library".
2. Copy the LBP into the project library.

Note When using SiVArc it is important that the library structure of the Library of Basic
© Siemens AG 2019 All rights reserved

Processes is mapped exactly in the project library. To this purpose follow the
steps listed below.

a. Expand the "Project library" tab in a way that you can see the project
library on top and the global libraries below.
b. Expand the "LibraryOfBasicProcesses" library.
c. Expand the "Types" folder in the "LBasicProcessLibrary".
d. Select all the folders under "Types" and drag them into the project library
into the "Types" folder.
e. Repeat the two preceding steps for the "Master copies" folder.
3. Creation of the PLC program with the STEP 7 blocks from the library.
The STEP 7 blocks are located under "Types > PLC > BlocksAndDatatypes". If
you drag a block into your program, the data types are automatically copied as
well.

Note You can find additional information on the individual blocks in section 2
Integration of the PLC function blocks.

4. Adapt the "Runtime settings".


a. The project navigation contains the item "Runtime settings" under your
HMI Runtime. Open it by double-clicking it.
b. You can find the "Use default design" point under "General > "Screen".
Remove the associated check mark and select "WinCC Dark" as the design.
These design settings were used during the development of the LBP.
5. Copy the "Screenhandling" script.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 91
3 Integration of the HMI faceplates

Note It is important that the "Screenhandling" script is copied before the screens are
copied. Otherwise an "_1" is attached to the name which means the script call
ups lead nowhere.

a. The folder "LBP_Skripts" is located in the project library under "Types" >
"HMI" > "WinCCProfessional". Drag this folder into the project navigator
under your HMI Runtime into the "Scripts" folder.
b. Expand the "LBP_Skripts" folder in the project navigator. If "_1" was added
to a script name, delete this extension.
c. Open the "Screenhandling" script.
d. If you use a different navigation than the navigation from the demonstration
project, settings in the "Param-Area" of the script may be required. You
can find more information on this under 3.1.4 Function of the script
"Screenhandling.
6. Copy all tags from LBP_GeneralTags.
a. All the general HMI variables which are required for the use of the LBP in
the project library under "Master copies" > "HMI" > "WinCCProfessional" >
"GeneralTags".
b. Select these variables and drag them into any variable table in the project
navigation under "HMI variables".
c. Select the "LBP_StationName" variable.
© Siemens AG 2019 All rights reserved

d. You can find the "Properties" tab at the lower edge of TIA Portal. Select
these and select the "Properties" sub-tab.
e. Click "Value" and specify the HMI station name as the start value. Each
HMI station should have its own station name since this is used to locking
the windows.
f. Then select the "LBP_DoubleConfirmation" variable and as a start value
assign a "1" if you want to be asked once again at important control
elements whether you really want to control them.
g. Then select the "LBP_LimitFaceplates" variable and assign the maximum
number of faceplates which may be opened at the same time as a start
value.

Note The number for "LBP_LimitFaceplates" may not exceed the number of empty
picture windows that are stored on the start screen. In the demonstration project
this is 16.

7. Implement the user administration.


a. The folders "Authorizations" and "Usergroups" are located in the project
library under "Master copies" > "HMI" > "WinCCProfessional" >
"Usermanagement". Select these two folders and drag them into the
project navigation under your Runtime onto the "User administration" item.
b. Create any users and assign them to a group.
The following groups exist:

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 92
3 Integration of the HMI faceplates

Table 3-1
User group Authorization Operator input options
LibLBP Administrator Authorization_101 – LibLBP Operator Administrators are allowed to
Authorization_102 – LibLBP Engineer operate everything.
Authorization_104 – LibLBP Administrator
LibLBP Engineer Authorization_101 – LibLBP Operator Engineers are allowed to
Authorization_102 – LibLBP Engineer operate everything with the
exception of changing the
station names or depriving other
users the exclusive operation
possibility.
LibLBP Operator Authorization_101 – LibLBP Operator Operators are only authorized
to operate the "Home" screens.

Note It is also possible to configure your own user groups with the respective
authorizations.

8. Copy the message classes.


a. The project library contains all the alarm classes that you require for
working with the LBP under "Master copies" > "HMI" >
"WinCCProfessional" > "Alarming" > "Alarmclasses".
© Siemens AG 2019 All rights reserved

b. Select all alarm classes and drag them into the project navigation under
your HMI Runtime onto "HMI alarms".
9. Copy the screens.

Note It is important that the background pictures are copied last since otherwise an
"_1" is attached to some element names during copying - which can lead to the
referencing not working anymore within the screen. Therefore, proceed as
follows.

a. The folders "FirstScreens(CopyAtTheEnd)" and "LBP_PopUpScreens" are


contained in the folder "HMI" > "WinCCProfessional" > "Screens" in the
project library under "Types".
b. Copy the "LBP_PopUpScreens" folder in the project navigator under your
HMI runtime into the folder "Screens".
c. In the project library expand the "FirstScreens(CopyAtTheEnd)" folder and
select all subfolders and drag these in the project navigation onto the
previously copied folder "LBP_PopUpScreens".
10. Copy the variables.
a. Open the instances of the LBP blocks.
b. Drag all variables (user-defined data types on the whole) that are visible for
HMI systems into a variable table.
11. Create the background picture
a. The "Main" screen is contained in the project library under "Master copies"
> "WinCCProfessional" > "DemoScreens". Copy it to your project. This
screen corresponds to the start screen of the demonstration project.
b. If you like the start screen of the demonstration project, you can keep
working with it. Otherwise, proceed as follows:

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 93
3 Integration of the HMI faceplates

i. Create a background picture as you like.


ii. Copy the empty picture windows from the start screen of the
demonstration project into your background picture.
iii. Your specific pictures with the LBP symbols can be displayed
within a picture window on this background screen. To switch
between the pictures, create a navigation (integration of the
symbols in "Images" is effected later).
iv. With the navigation interfaces, the following script must be
stored at the "Event" so that - depending on the setting - all pop
ups are closed or opened during the display selection:
Table 3-2
Code for navigation
If HMIRuntime.DataSet("settingCloseByScreenchange").Value = 1
Then
If HMIRuntime.DataSet(ActiveScreenItem.Parent.ObjectName &
"array_1_screen") Is Nothing Then
Exit Sub
Else
Dim counter
For counter = 1 To
SmartTags("@NOTP::LBP_LimitFaceplates").Value
HMIRuntime.DataSet(ActiveScreenItem.Parent.ObjectName &
"array_" & counter & "_screen").Value = 0
© Siemens AG 2019 All rights reserved

HMIRuntime.DataSet(ActiveScreenItem.Parent.ObjectName &
"array_" & counter & "_parentScreen").Value = 0
ActiveScreenItem.Parent.ScreenItems("swLBPScreen_" &
counter).Visible = False
Next
End If
End If

v. Create a button to open the pop-up for the general settings.


This must call up the "Screenhandling" script as an event as
follows.
Table 3-3
Call up of the general settings
Screenhandling ", "LBP_Config"

3.1.2 Continue with SiVArc

Note At this library SiVArc is used to reduce the configuration work during the
implementation of the symbols and alarms.
You can find general information on SiVArc in the manual under:
https://support.industry.siemens.com/cs/ww/en/view/109755214

Steps for the integration with SiVArC


12. Generate the alarms.
a. The "SiVArc" folder is located in the project navigation in your project in the
"Shared data" folder. Open the list for "Message rules" from the folder.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 94
3 Integration of the HMI faceplates

b. All the SiVArc rules that are required for the generation of alarms are
summarized in one group in your project library under "Master copies" >
"WinCCProfessional" > "SiVArc" > "SiVArcAlarmrules".
c. Drag these into the list for "Message rules".
d. In the project navigation right-click your HMI Runtime and then select
"Generation of the visualization (SiVArc)" > "Generation of the visualization
(SiVArc)".
e. Open the "HMI messages" in the project navigation under your HMI
Runtime. The generated bit messages open directly.
f. Open the "HMI messages" again. However, this time instead of the "Bit
messages" tab select the "Message groups" tab and then the subordinate
tab "Class groups".
g. Status variables and acknowledgment variables were also created for the
LBP class groups. If you want to report globally whether an LBPP warning
or an LBP alarm is pending, supplement the variables marked in red in
your variable table. If not, delete these here.

Note The status variable is structured as follows:


The first half of the bits of the status variable indicates whether the message or
class group is active.
The second half of the bits of the status variable indicates whether the message
has to be acknowledged.
© Siemens AG 2019 All rights reserved

Example:
Status variable = xyz with data type UINT
Status bit = 3
Bit 3 of the variable xyz indicates whether the message is active pending.
Bit 11 of the variable xyz indicates whether the message has been
acknowledged.
You can find more information on the status variable in the online help of
TIA Portal.

13. Generate the symbols.


a. The "SiVArc" folder is located in the project navigation in your project in the
"Shared data" folder. Open the list for "Picture rules" from the folder.
b. The rule group "Professional_BPLSymbols" is located in your project
library under "Master copies > WinCCProfessional > SiVArc >
SiVArcScreenrules".

Note These rules generate the "Symbols" screen with which you are familiar from your
demonstration project in your project. Only with the difference that only symbols
are generated for which the associated PLC blocks are available in your STEP 7
code. After the generation, you can drag or copy the symbols to the right
positions in your project.

c. Select the "Professional_LBPSymbols" rule group and drag it in the list for
"Picture rules".
d. In the project navigation right-click your HMI runtime and then select
"Generation of the visualization (SiVArc)" > "Generation of the visualization
(SiVArc)".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 95
3 Integration of the HMI faceplates

Note So that the symbols function, your background screen, in which the empty
picture windows are stored, must be named "Main".
During the symbol generation, symbols for the "Msg8" and "Intlk8" blocks are
also generated, even if they belong to another block.

e. Create pictures that you call up via the navigation in the background and
drag or copy the symbols from the "DemoSymbols" screen onto your own
pictures.

3.1.3 Continuing manually

14. Create the alarms


a. Open the demonstration project next to your own project.
b. Open the "HMI messages" in the project navigation of the demonstration
project under the HMI Runtime.
c. Copy all the bit messages in which "Aggr8" is contained in the name to
your own project. If you do not use the "Aggr8" block in your project, take
the messages of another block and observe the following note.
© Siemens AG 2019 All rights reserved

Note In the case of blocks that are used more than once in the demonstration project,
you have to ensure that only one set of messages is copied.
To achieve this copy all messages that contain the block name ("Aggr8") and
have the same instance stored in the name.
The search function can help with this (selecting a message and pressing
<Ctrl+F>)

d. Right-click "ID" and click "Show/Hide". Subsequently set the check mark
for "Status variable" and "Status bit".
e. From the first message copy the message name of the instance name, for
example "LBP_Aggr8_26_InstDemo_2_1_instAggr8" → instance name:
"InstDemo_2_1_instAggr8".
f. On your keyboard press the keys "<Ctrl+F>". A search window opens on
the right-hand side of TIA Portal.
g. Insert the copied instance name in the entry field under "Find" and in the
entry field enter the instance name that you use for this block in your own
project under "Replace". Subsequently the trigger variable, the status
variable and the acknowledgment variable should be known.
15. Interconnect the symbols.
a. Open a screen (not the background picture or the start picture but a
picture on which you want LBP symbols displayed) in the project
navigation under your HMI runtime in the "Pictures" folder.
b. All the symbols of the LBP are located in your project library under
"Types > HMI > WinCCProfessional > Symbols".
Drag the desired symbols onto your screen.
c. Select a symbol and open the "Properties" tab at the lower edge of TIA
Portal.
d. Select the subordinate "Interface" tab.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 96
3 Integration of the HMI faceplates

e. At the parameter you have to connect the variable by the same name
(UDT) of the PLC interface.
f. Then select the "Events" tab.
g. Here under "Click", call up the "Screenhandling" VB script.
h. Interconnect the parameters as follows:
Table 3-4
Screenhandling parameter Interconnection
Prefix Enter the name of the instance of the associated LBP
block as a string.
screenName Here specify the LBP screen that is to open in the pop-
up. This is the screen that you have copied from the
library to the "FirstScreens" folder.
Example:
Figure 3-2
© Siemens AG 2019 All rights reserved

3.1.4 Function of the script "Screenhandling"

The "Screenhandling" function is responsible for opening the pop-up.

Note The function can only switch picture windows visible. However, it cannot
generate new windows for the run time. For this reason the empty picture
windows must already be stored on the "Startscreen".

Setting options via general settings


The following setting options of the general settings determine how the pop-ups are
opened or closed:
• Limit: Maximum number of opened picture windows
• Close faceplates at screen change
• Extd. Faceplates close with the "Home" faceplate. If the regular faceplate is
closed, all windows that were opened by this faceplate close automatically as
well, for example the message window.
• Opening faceplates within the user interface
• Prevention of the opening of multiple faceplates with the same instance

Setting options within the script


When you open the script, you will find a description of the parameters at the
beginning of the script and then a "Param-Area" in which you can make settings if
necessary.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 97
3 Integration of the HMI faceplates

If you work with the navigation of the demonstration project you must not make any
changes here.
The following variables to which static values are assigned are located in the Param-
Area:
• "offsetLeftOptional"
• "offsetTopOptional"
The start screen in which the empty screen windows for the LBP are stored is
located in your project.
This screen includes a picture window that represents the operating area and in
which the screens are displayed on which the symbols are also displayed. The
position of this picture window has to be stored in "offsetLeftOptional" and
"offsetTopOptional" relative to the start screen so that the position of the pop-up can
be calculated correctly.
Figure 3-3

Nesting levels of pictures


Important for the functionality of the "Screenhandling" script is that the empty picture
© Siemens AG 2019 All rights reserved

windows are stored on the start screen and that they are always shown as the
background.
It is possible to nest pictures that contain symbols into other pictures.

3.1.5 Working with multiple screens

An FAQ that covers two variants for configuring multiple screens is available in the
SIOS Portal under the URL
"https://support.industry.siemens.com/cs/ww/de/view/109744837". If you work with
the LBP, you use the second variant "Distribution of a picture on multiple monitors".
Store the empty picture windows for the LBP on the background picture.
Since you now have several picture windows for the display of further screens with
symbols, the position of the pop-up is calculated incorrectly. To prevent this
dynamically interconnect the variables in the "Param-Area" section in the
"Screenhandling" script. The reason for this is that each picture window has another
position with regard to the background picture. Calculate the offsets according to the
picture window in which the symbols are clicked.
The following example queries on which screen the clicked symbol is located. Based
on the assumption that the screen is always opened in the same picture window, you
can adjust the screen handling function as follows:
Figure 3-4

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 98
3 Integration of the HMI faceplates

Note When the "Screenhandling" script is updated, this information is lost and it must
be subsequently added again.

3.2 WinCC Comfort/Advanced


3.2.1 General steps

1. Open the library.


a. A tab with the "Libraries" name is located at the left-hand edge in TIA
Portal. Select this object.
b. Expand the "Global libraries" tab.
c. To open the LBP, click the symbol with the book and the green arrow.
d. In the window select the file "LibraryOfBasicProcesses" with the type
"Siemens TIA Portal V15 library".
2. Copy the LBP into the project library.

Note When using SiVArc it is important that the library structure of the
BasicProcessLibrary is mapped in the same way as the project library. To this
purpose follow the steps listed below.
© Siemens AG 2019 All rights reserved

a. Expand the "Project library" tab in a way that you can see the project
library on top and the global libraries below.
b. Expand the "LibraryOfBasicProcesses" library.
c. Expand the "Types" folder in the "LibraryOfBasicProcesses".
d. Select all the folders under "Types" and drag them into the project library
into the "Types" folder.
e. Repeat the two preceding steps for the "Master copies" folder.
3. Create the PLC program with the STEP 7 blocks from the library.
a. The STEP 7 blocks are located under "Types" > "PLC" >
"BlocksAndDatatypes". If you drag a block into your program, the data
types are automatically copied as well.
b. "PanelsBlock" is copied from the "Master copies\PLC" folder.

Note You can find additional information on the individual blocks in section 2
Integration of the PLC function blocks.

4. Create a clock bit for triggering WinCC Comfort scripts of the blocks "SetCrv",
"Polygon", "Intlk8" und "Msg8".
a. The function "LGF_Impulse" from the "Library of general functions" is
located in the project library under "Types" > "PLC" > "LGF" > "7 signal
generators".
b. Call up the function cyclically in your PLC program.
c. At the "frequency" input enter a frequency of "0.5" and connect a static
variable to the "Impulse" output that you then transfer per "Drag & Drop"
into an HMI variable table.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 99
3 Integration of the HMI faceplates

Figure 3-5

d. "Select the variable in the HMI variable table and open the "Properties" of
the variable at the lower edge in TIA Portal.
e. If you want to visualize the functions on your Comfort Panel, select the
"Events" tab and call up the LBP scripts "LBP_SetCrv", "LBP_Polygon",
"LBP_Intlk8" and "LBP_Msg8".
5. Apply all scripts from the library (project library).
a. All scripts that are required for the use of the LBP are located in the project
library under "Types > HMI > WinCC Comfort > Scripts".
b. Select these folders and drag them in the project navigation under "Scripts
> VB scripts".
6. Copy the HMI variables from the copy template (master copies).
a. All HMI variables that are required for the use of the LBP are located in the
© Siemens AG 2019 All rights reserved

project library under "Master copies" > "HMI" > "WinCC Comfort" > HMI
Tags".
b. Select this variable table and drag them in the project navigation under
"HMI variables".
c. Under "HMI variable" open the variable tables and if necessary modify the
connection.
d. If your data block is not called "PanelsBlock" or if you have to access
"Panel[2]" with your panel to be configured, modify the "PLC" variable. The
fastest way to do this is via the "Find & Replace" function with the key
combination <Ctrl+F>.
e. Then select the "LBP_DoubleConfirmation" variable and as a start value
assign a "1" if you want to be asked once again at important control
elements whether you really want to control them.
7. Transfer the symbol UDTs with drag-and-drop into the HMI variables.
a. The instances of the LBP blocks contain an UDT with the name
"statSymbolXxxxx" in the static area. Drag this UDT into one of your
variable tables. Repeat this procedure for all of the LBP block instances
that you want to visualize on this panel.
8. Adapt the HMI to the "Runtime settings".
a. The project navigation contains the item "Runtime settings" under your
HMI Runtime. Open it by double-clicking it.
b. Select the "HMI Template Suite" under "General > Picture" as design.
These design settings were used during the development of the LBP.
9. Apply the screens from the library.
a. All pictures that are required for the use of the LBP are located in the
project library under "Types > HMI > WinCC Comfort > Screens".
b. Select these folders and drag them in the project navigator under
"Screens".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 100
3 Integration of the HMI faceplates

c. For motors and valves "Intlk8" and "Msg8" must be available if this is
parameterized in the PLC program.
10. Accept the "Screen management" from the "Master copies".
a. The folders "Pop-up" and "Templates" are located in the project library
under "Master copies > HMI > WinCC Comfort >
ScreenManagementComfort". Copy these into the picture management
under the folder by the same name.
b. The same applies to slide-in screens.
11. Harmonize the project.

Note After all types from the project library has been transferred, it is necessary to
perform a harmonization of the project with the library. All instance names are
set right so that the internal access can take place correctly.

a. In the project library right-click on the "Types" folder and select "Library
management".
b. Click the button for "Harmonize project".
Figure 3-6
© Siemens AG 2019 All rights reserved

c. In the opening window you remove the check mark for the PLC and select
the option "Harmonize paths between project and library". Do not activate
"Harmonize names between project and library".

Note This point many not be omitted, the names of pictures and scripts are otherwise
not created correctly. As a result the pictures and functions are not referenced
correctly anymore. This means that the function of the LBP would no longer
exist.

12. Implementation of the user administration


a. The folders "Authorizations" and "Usergroups" are located in the project
library under "Master copies > HMI > WinCC Comfort > User
management". Select these two folders and drag them into the project
navigation under your Runtime onto the "User administration" item.
b. Create any users and assign them to one of the following groups:

Table 3-5
User group Authorization Operator input options
LBP Administrator Authorization_101 – LBP Operator Administrators are allowed to
Authorization_102 – LBP Engineer operate everything.
Authorization_104 – LBP Administrator
LBP Engineer Authorization_101 – LBP Operator Engineers have all rights with
Authorization_102 – LBP Engineer the exception of changing the
station names or depriving other
users of the exclusive operation
possibility.
LBP Operator Authorization_101 – LBP Operator Operators are only authorized
to operate the Home screens.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 101
3 Integration of the HMI faceplates

Note It is also possible to configure your own user groups with the respective
authorizations.

13. Copy the message classes.


a. The project library contains all the alarm classes that you require for
working with the LBP under "Master copies" > "HMI" >
"WinCCProfessional" > "Alarming" > "Alarmclasses".
b. Select all alarm classes and drag them into the project navigation under
your HMI Runtime onto the "HMI alarms" item.

3.2.2 Continue with SiVArc

Note At this library SiVArc is used to reduce the configuration work during the
implementation of the symbols and alarms.
You can find general information on SiVArc in the manual under:
https://support.industry.siemens.com/cs/document/109755214.

Steps for the integration with SiVArC


© Siemens AG 2019 All rights reserved

14. Generate the alarms.


a. The "SiVArc" folder is located in the project navigation in your project in the
"Shared data" folder. Open the list for "Message rules" from the folder.
b. All the SiVArc rules that are required for the generation of alarms are
summarized in one group in your project library under "Master copies" >
"WinCCProfessional" > "SiVArc" > "SiVArcAlarmrules".
Drag these into the list for "Message rules".
c. Right-click in the project navigation on your HMI Runtime and then select
"Generation of the visualization (SiVArc)" > "Generation of the visualization
(SiVArc)".
d. Open the "HMI messages" in the project navigation under your HMI
Runtime. The generated bit messages open directly.

Note If you have not given the same name to your instance DB as the "identName"
(possible would be "InstIdentName", "instIdentName" or "IdentName"), the
message text must be adapted. In this case replace the instance name in your
message text through the IdentName or directly through a variable reference to
the "statSymbolXxxx.identName" variable.
With the messages of the "Msg8" function block, it is advisable to modify the
message text after the generation. Replace "Message x" by a variable reference
to the "statSymbolMsg8.names[x]" variable. Proceed as follows:
1. Delete the "Message x" text.
2. Right-click and select "Insert dynamic parameter (variable)...".
3. Select the "statSymbolMsg8.names[x]" variable of the respective instance.
The name of the bit message was named after the instance during the
generation.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 102
3 Integration of the HMI faceplates

15. Generate the symbols.


a. The "SiVArc" folder is located in the project navigation in your project in the
"Shared data" folder. Open the list for "Picture rules" from the folder.
b. The rule group "Comfort_BPLSymbols" is located in your project library
under "Master copies > WinCCComfort > SiVArc > SiVArcScreenrules".

Note These rules generate the "Symbols" screen with which you are familiar from your
demonstration project in your project. Only with the difference that only symbols
are generated for which the associated PLC blocks are available in your STEP 7
code. After the generation, you can drag or copy the symbols to the right
positions in your project.

c. Select the "Comfort_BPLSymbols" rule group and drag it in the list for
"Picture rules".
d. Right-click in the project navigation on your HMI Runtime and then select
"Generation of the visualization (SiVArc)" > "Generation of the visualization
(SiVArc)".

Note So that the symbols function, your background screen, on which the symbols are
stored, must be named "Main". If this is not the case, the event for setting the
"LBP_PlantScreen" variable has to be adapted. The name of the background
picture has to be stored here.
If you have not given the same name to your instance DB as the "identName"
© Siemens AG 2019 All rights reserved

(possible would be "InstIdentName", "instIdentName" or "IdentName"), the event


for setting the variable "LBP_identName" must be adapted to the identName
defined in your PLC program.
During the symbol generation, symbols for the "Msg8" and "Intlk8" blocks are
also generated, even if they belong to another block.

e. Drag or copy the symbols from the "Symbols" screen onto their own
pictures (in the ideal case to a screen with the name "Main").

3.2.3 Continuing manually

16. Create the alarms.


a. Open the demonstration project next to your own project.
b. Open the "HMI messages" in the project navigation of the demonstration
project under the HMI Runtime.
c. Copy all the bit messages in which "Aggr8" is contained in the name to
your own project. If you do not use the "Aggr8" block in your project, take
the messages of another block and observe the following note.

Note In the case of blocks that are used more than once in the demonstration project,
only one set of messages has to be copied.
Support:
Copy all messages that contain the block name ("Aggr8") and that have stored
the same instance in the name.
The search function can help with this (selecting a message and pressing <Ctrl+F>)

d. From the first message copy the message name of the instance name, for
example "LBP_Aggr8_26_InstDemo_2_1_instAggr8" → instance name:
"InstDemo_2_1_instAggr8".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 103
3 Integration of the HMI faceplates

e. On your keyboard, press the keys "<Ctrl+F> and a search window opens
on the right-hand side in TIA Portal.
f. Insert the copied instance name in the entry field under "Find" and in the
entry field enter the instance name that you use for this block in your own
project under "Replace". Subsequently the trigger and acknowledgment
variables are known.
g. In the "Message text" column replace the text before "–" through the stored
identName at the associated FB or directly through a variable reference to
the "statSymbolXxxx.identName" variable.
h. At the messages of the function block "Msg8" you adapt the variable
reference to the "statSymbolMsg8.names[x]" variable from the
corresponding instance.
17. Interconnect the symbols.
a. In the project navigation under your HMI Runtime → Images open a screen
on which you want to display the LBP symbols.
b. All the symbols of the LBP are located in your project library under "Types"
→ "HMI" → "WinCCComfort" → "Symbols".
c. Drag the desired symbols onto your screen.
d. Select a symbol. Open the "Properties" tab at the lower edge in TIA Portal.
e. Select the subordinate "Interface" tab.
f. At the parameter connect the variable by the same name (UDT) of the PLC
interface.
© Siemens AG 2019 All rights reserved

g. Then select the "Events" tab.


h. Add the following events:
(i) "SetTag", to write the screen name of the background picture to the
"LBP_PlantScreen" variable.
(ii) "SetTag" to write the ident name of the block associated with the
symbol to the "LBP_identName" variable. This is necessary to request
the correct data when the symbol is clicked. The name must be
statically stored.
(iii) "ActivateScreen" to open the respective screen when you click the
symbol.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 104
3 Integration of the HMI faceplates

Example:
Figure 3-7

3
© Siemens AG 2019 All rights reserved

3.3 WinCC V7.5


3.3.1 Preparing the WinCC project

1. Open your own WinCC project and the "LBP_WinCCV75MasterCopies" folder


in separate Windows Explorer windows. The "LBP_WinCCV75MasterCopies"
folder is available for download in the same SIOS entry.
2. Copy the screens.
a. In the "LBP_WinCCV75MasterCopies" folder navigate to the subfolder
"00_ProcessPictures", select the content and press the key combination
"<Ctrl+C>."
b. Navigate in your WinCC project folder to the folder "GraCS" and press the
key combination "<Ctrl+V>".
3. Copy the scripts.
a. In the "LBP_WinCCV75MasterCopies" folder navigate to the folder
"01_Scripts", select the "ScriptLib" folder and press the key combination
"<Ctrl+C>."
b. Navigate back from the "GraCS" folder into your higher-level project folder
and press the key combination "<CTRL+V>".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 105
3 Integration of the HMI faceplates

Figure 3-8
© Siemens AG 2019 All rights reserved

4. Import the texts.


a. Open your own project in the WinCC Explorer.
a. Open the "Text Library".
b. Click "Edit" and select "Import".
c. In the opened window navigate to the folder
"LBP_WinCCV75MasterCopies > 02_Texts".
d. Check whether the "*.txt" format type is selected on the right.
e. Select the file "LBP_TextLibrary.txt".
5. Import the "Text and graphics lists".
a. Open "Text and graphics lists" in WinCC Explorer.
b. Click "Edit" and select "Import".
c. In the opened window navigate to the folder
"LBP_WinCCV75MasterCopies > 02_Texts".
d. Select the "LBP_TextList.txt" file.
e. Repeat the procedure for the "LBP_GraphicList.txt" file.
6. Import the user administration.
a. Open "User administrator" in WinCC Explorer.
b. Click "Edit" and select "Import".
c. In the window that opens navigate to the folder
"LBP_WinCCV75MasterCopies > 03_UserAdministration".
d. Select the "LBP_UserAdministration.txt" file.
e. Through the import a user is already created in each group as an example.
If you want to use these users, adapt the passwords of the users. If you do
not want to use them, delete them and create your own users.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 106
3 Integration of the HMI faceplates

7. Import the internal variables.


a. Open "Tag Management" in WinCC Explorer.
b. Click "Edit" and select "Import".
c. In the opened window navigate to the folder
"LBP_WinCCV75MasterCopies" → "04_InternalTags".
d. Select the "LBP_ InternalTags.txt" file.

3.3.2 Integration of the block-specific data

1. Export the variables from TIA Portal.


a. Open your TIA Portal project in which the control system with the LBP
blocks is located.
b. Right-click the PLC and select "Export to SIMATIC SCADA".
c. Export the data.

Note Additional information on the topic is available in the SIOS Portal under the entry
ID 109748955, SIMATIC SCADA Export for TIA Portal.

2. Create an S7-1500 driver.


a. Open "Tag Management" in WinCC Explorer.
© Siemens AG 2019 All rights reserved

b. In the navigation area right-click "Tag Management", select "Add new


driver" and click "SIMATIC S7-1200, S7-1500 Channel".
c. Expand the structure of the driver, right-click "OMS+" and select the "New
Connection".
d. Right-click your newly created connection and click "Connection
Parameters".
e. Set the connection parameters.
3. Import the AS symbols from TIA Portal.
a. Right-click "Tag Management" in the navigation area on your added
connection, go to "AS symbols" and click "Load from file".
b. In the window opening at the bottom right select "TIA Portal Export File
(*.zip)" in the file format selection and navigate to the zip file previously
exported from TIA Portal.
c. The "Symbols" open after the import. Select the work sheet "AS structures"
(see Figure 3-9).
d. Select all lines whose name ends with "Data".
e. Right-click into the first column (Number) of a selected line and click
"Create structure".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 107
3 Integration of the HMI faceplates

Figure 3-9

f. In the navigation select an instance that is to be visualized on your WinCC


system.
© Siemens AG 2019 All rights reserved

g. Set the check mark for "Access" for the structure with the name
"statDataXxxx".
Figure 3-10

h. Repeat the procedure for all instances that you want to visualize.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 108
3 Integration of the HMI faceplates

4. Grouping of the variables for better clarity (optional)


a. Switch from "Symbols" back to "Tag Management"
Figure 3-11

b. Right-click your connection and click "New Group".


c. Name the group as you want (example: "3wVlv").
d. Select a structure under "structure tags".
e. Assign a group to the displayed structures in the "Group" column.
5. Create the messages.
© Siemens AG 2019 All rights reserved

a. In the Windows Explorer navigate to the folder


"LBP_WinCCV75MasterCopies > 05_AlarmLogging" and open the
"LBP_Messages.xlsx" file with Microsoft Excel.
b. A set of messages for each block is contained in the file. Adapt it to your
program by opening the search via the key combination "<Ctrl+F>".
c. Select the "Replace" tab in the search.
d. Under "Find what" enter the currently used instance name (for example:
"instMtr") and under "Replace with" the instance name that you assigned in
the STEP 7 program.
e. If you use a block more regularly, copy the set of messages and insert it
again below. The messages must then be adapted to the respective
instance name again.
Make sure that each number is only assigned once in the "Number"
column.
f. Open "Alarm Logging" in WinCC Explorer.
g. Click "Edit" and select "Import".
h. In the opening window select the file format "Excel Workbook (*.xslx)" in
the bottom right.
i. Navigate to the previously edited Excel file.
j. Click "Import".
6. Change/create the background picture.
a. In WinCC Explorer select the "Graphics Designer" and with a double-click
open the "Main.Pdl" picture.
b. Optional: To change the background picture of the demonstration project,
proceed as follows:
i. Create a background picture as you like.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 109
3 Integration of the HMI faceplates

ii. Copy all the empty picture windows and the Config picture
window from the background of the demonstration project into
your background.
iii. Your specific pictures with the LBP symbols can be displayed
within a picture window on this background screen. Create this
picture window.
iv. To switch between the pictures, create a navigation (integration
of the symbols is effected later).
v. The "LBP_SetScreen" script must be called up as follows for the
navigation buttons:
LBP_SetScreen ", "
Finally configure the action for the switchover of the screen.

Note The "LBP_SetScreen" script is comparable to the "Screenhandling" script from


WinCC Professional.

vi. Create a button to open the general settings. Switch the Config
picture window to visible with this button.
7. Integrate and interconnect the symbols.
a. Open or create a picture in WinCC Explorer which is opened via the
navigation in the background screen and is to show symbols. If you work
with the background picture of the demonstration project, you can use the
© Siemens AG 2019 All rights reserved

pictures "Demo1" or "Demo2" to this purpose.


b. The right-hand side of the "Graphic Designer" contains the symbols
("LBP_SymXxxx.FPT") in the "Process Pictures" tab.
c. Drag the symbol on your screen.
d. Open the "Properties" of the faceplate.
e. Integrate the respective "statDataXxxx" structure under "Faceplate
instance > UserDefined3".
Figure 3-12

f. Open the "Events" tab and select "Mouse" under "Faceplate instance".
g. Connect the "Mouse Click" event to "VBS action…".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 110
3 Integration of the HMI faceplates

Figure 3-13

h. Insert the following code line into the VBS action:


LBP_SetScreen "Instance name", "Screen to be opened"
Example:
LBP_SetScreen "instAggr8", "LBP\Aggr8\LBP_Aggr8"

Note Before a new import of the AS symbols, delete the structure variables that
change.
Multi-instances are not supported by WinCC V7.5.
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 111
3 Integration of the HMI faceplates

3.4 WinCC Open Architecture


3.4.1 Scope of delivery

The "Library of Basic Processes" (LBP) for WinCC OA includes the following three
packets:
1. LBP_3.16
The folder contains all the information required for the engineering and the
operation of a project. This includes the LBP symbols, their associated
faceplates as well as files through whose import the LBP data model is
generated. The integration of the library, also referred to as "subproject", is
described later on.
2. LBP_template
This package represents an executable template for an LBP project. It has to
be registered for the operation with WinCC OA. By means of a wizard you can
then both parameterize projects from the connection(s) and generate the data
points (devices) existing in the control system. You can then easily begin wit
the picture creation on this basis.
3. LBP_DemoProject
A complete WinCC OA example project including the associated TIA project
can be found in this package. The PLC project can be transferred to a PLC
(PLCSim / Advanced). After registration of the WinCC OA project, starting and
corresponding connection configuration, the simulation can be viewed and
© Siemens AG 2019 All rights reserved

operated.

3.4.2 Installation

At this position an existing installation of WinCC OA 3.16 is assumed. Necessary


basics such as licensing, project generation or registration, dealing with so called
"managers" within the WinCC administrator panel or the console are required and
can be found in the online help of WinCC OA.

Note During the installation of WinCC OA, the S7plus driver responsible for the
communication with the control units of the CPU type 15xx and 12xx has to be
selected and installed.

Registration of the library


For the further steps the "LBP_3.16" folder structure has to be located on the local
hard disk of the WinCC OA computer.

Restart the WinCC OA project administration via the start menu.


There the library "LBP_3.16", as shown in the following figure, is first registered.
Open the associated dialog box either with a mouse click on the icon selected in
the picture or by right-clicking the project list and selecting the corresponding menu
items in the shortcut menu.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 112
3 Integration of the HMI faceplates

Figure 3-14

This way it is now possible to integrate the library into own projects or - as
described below - in the template project "LBP_template" or the demonstration
project "LBP_Demoproject".

Registration of the template or demonstration project


Also register the actual executable project (template/demo).
Then select this project and use "Change project properties" (1) to select the function
"Integrate subproject" (2). In the dialog that opens select the library "LBP_3.16" (3)
© Siemens AG 2019 All rights reserved

and move it into the list of sub projects by clicking the "Arrow to the right" (4).
Figure 3-15

Frei verwendbar

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 113
3 Integration of the HMI faceplates

The selected project can only be started via the WinCC OA administration or the
WinCC OA console. All required drivers and control managers are already
available in the two projects provided.
It is, of course, also possible to create a new project according to your own
requirements.

Creating a new project

Note In order to deal with own projects profound knowledge of WinCC OA is required,
which can be gained by attending the respective training courses.

You create a new project with the corresponding function of the WinCC OA
Administration.

Note When creating a new project, the following three project languages must always
be selected:
• de_AT.utf8
• en_US.utf8
• ru_RU.utf8
© Siemens AG 2019 All rights reserved

Connect the library as described above. In contrast to the template or demonstration


project you must add and parameterize further managers in the WinCC OA console.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 114
3 Integration of the HMI faceplates

Figure 3-16 WinCC OA Console


© Siemens AG 2019 All rights reserved

1. Click the icon using the left-hand mouse button to allow changes at the
properties of the selected manager.
2. Click the icon using the left-hand mouse button to add a new manager type.
3. Right-click the manager or the list respectively. A shortcut menu with the
following functions opens:

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 115
3 Integration of the HMI faceplates

Figure 3-17

Using these functions perform the next steps:


1. Set the "Start Mode" manager property of the "Simulation Driver" to "Manual".
This ensures that the manager is not started. Alternatively, the manager can
also be deleted.
Figure 3-18
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 116
3 Integration of the HMI faceplates

2. Add a new Control Manager with the following settings:


Figure 3-19 Control Manager properties

3. Add a new user interface manager with the following settings:


Figure 3-20 User interface properties
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 117
3 Integration of the HMI faceplates

4. Add a new driver manager of the "S7Plus driver" type with the following
settings:
Figure 3-21 S7+ driver properties

The manager number (-num X) can deviate depending on the desired


constellation. However, it must be unique in each case.

3.4.3 Engineering

WinCC Open Architecture is an independent SCADA system and not an integral


© Siemens AG 2019 All rights reserved

component of TIA Portal. As a result they are not immediately available for the
communication with the project data required for the PLC and have to be
generated separately. To this purpose the so-called mass parameter assignment of
data is made easier through a tool that supplies all the required parameter
assignment data from the PLC to WinCC Open Architecture. The installation path
of WinCC Open Architecture contains installation files that install this tool in TIA
Portal. The next steps describe the procedure for the installation of the TIA Export
Tool in TIA Portal and the export of the parameter file.

Step 1: Creating an export file in TIA Portal


All control data of the TIA project that the driver is to access must also be available
as a TIA export file for the runtime. To do this export the project data from TIA
Portal via the TIA Export Tool into a zip file that for its part has to be copied into the
WinCC Open Architecture project directory.
The export tool is stored during the installation of the S7Plus component (optional,
can be selected from the WinCC Open Architecture A–installation) in the
installation folder "<wincc_oa_path>/data/clsetup".
1. In the directory select the suitable installation file for your TIA Portal version.
Install the corresponding tool (V13SP1, V14 or V15) on the system of your
TIA Portal.
2. Start TIA Portal, right-click the project or a specific PLC and in the shortcut
menu select the "Export to SIMATIC SCADA" entry.
3. Place the exported project on the computer on which the driver runs into the
directory "<WinCC_OA_Proj>/data/TIA_Projects". In a redundant system this
also applies for the redundant driver.
This task, amongst others, is also taken over by the wizard in the LBP. This is
described from the next step (Figure 3-25 Import TIA file).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 118
3 Integration of the HMI faceplates

Figure 3-22

Figure 3-23
© Siemens AG 2019 All rights reserved

Step 2: Project start and data import


1. Start the project.
2. After the graphical editor of WinCC OA has been opened, start the system
management there.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 119
3 Integration of the HMI faceplates

Figure 3-24
© Siemens AG 2019 All rights reserved

By clicking the wizards a selection of existing wizards opens. Select the "LBP
configuration".
In the opened panel you are now offered four steps for generating your project.
Figure 3-25 Import TIA file

3. Select the export file of the TIA project in a file browser (1).
4. By clicking the "Copy to" (2) button this file is automatically copied into the
correct directory of the project.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 120
3 Integration of the HMI faceplates

Step 3: Configuring and establishing connection(s) to PLC


Select the "S7+" tab to open the following parameter picture.
Figure 3-26
© Siemens AG 2019 All rights reserved

Create and name a new connection and select the desired PLC type.
Specify the driver number (Figure 3-21 S7+ driver properties) and IP address of the
PLC and in the "Engineering" tab select the associated PLC data.
You can find detailed information on the driver parameter assignment in the section
"Configuration of the S7Plus driver" of the WinCC Open Architecture online help.

Note To edit the lower part of the dialog, use the side scroll bar.

Step 4: Creating device instances automatically (mass parameter assignment)


With the "make" dialog, all required device data can be generated automatically in
a short time.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 121
3 Integration of the HMI faceplates

Figure 3-27

3
1

4
6
7
8

2
5
© Siemens AG 2019 All rights reserved

1. From the drop-down list in the "Selection S7+ Connection" (1) select the
correct node from the control systems or configured connections.
After selecting a connection, the LBP devices configured in the control system
that are available for the visualization are automatically displayed and listed in
the lower table (2).
2. To avoid naming conflicts for multiple control systems with the same content, a
prefix is recommended. This is the control name as it is designated in
TIA Portal. Deactivate this option with "Use prefix" (3) to apply the original
name from the control unit or leave it activated to use the proposed name as a
prefix.
Alternatively, you can specify an own prefix with the "edit" (4) option.

Note Caution when using own prefixes: This way a multiple generation of devices is
possible that access the same address ranges of a control system - which
inevitably results in an error message.

3. After specifying a prefix for the equipment designation generate a selected


device via the "Create" interface in the table. Alternatively, all devices of the
connection can be generated with the "Create all Instances" (5) button.
Subsequently the data are available for selection in the graphical editor (GEDI).
Here you can also delete either selected devices (6), all devices (7) or the devices
of the currently selected connection (8) (take prefix into account!).

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 122
3 Integration of the HMI faceplates

Step 5: Project settings


Figure 3-28
© Siemens AG 2019 All rights reserved

4. Set a check mark at "DoubleConfirmation" to specify whether the operating


actions have to be confirmed in the running project via an additional request.
Otherwise the input may be carried out directly.
5. With "Station name" you can specify a station name that is required for the
interlocking of operating blockings. This name is displayed for other stations if
a blockade of this station is activated.

3.4.4 Creating pictures

The picture creation takes place via the graphical editor (GEDI) of WinCC OA and
is described in the online help.
The LBP objects are available in the "LBP" catalog and can be dragged via Drag &
Drop (1) from there onto the panel. After the placement a dialog opens
automatically in which a suitable data point is assigned to the graphical object.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 123
3 Integration of the HMI faceplates

Figure 3-29

A further possibility to drag objects on the graphical surface with Drag & Drag is the
database parameter assignment tool (PARA).
Figure 3-30
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 124
4 Changes in V2.0

4 Changes in V2.0
Since the interface between PLC and HMI has been completely revised, nothing
can be imported from V1.0 from the HMI point-of view. All symbols and screens
have to be implemented again.

4.1 STEP 7 blocks


The following section describes which interfaces have changed.
There are no additional HMI blocks anymore with V2.0. For this reason the
"dataHMI" input is not required anymore for some blocks. However, variables have
been added that were previously treated in the HMI block.
The "identName" has additionally been added everywhere.

CntrP, CntrA, CntrD


Table 4-1
Deleted inputs Added inputs Deleted outputs Added outputs
dataHMI identName - correction
- - - lastCounter
- - - lastReset
- - - enInp
© Siemens AG 2019 All rights reserved

SetCrv / Select
Table 4-2
Deleted inputs Added inputs Deleted outputs Added outputs
dataHMI identName - -

Msg8 / OpAna / OpDig


Table 4-3
Deleted inputs Added inputs Deleted outputs Added outputs
- identName intError -

TimeSw
Table 4-4
Deleted inputs Added inputs Deleted outputs Added outputs
- identName intError -

TimeSw
Table 4-5
Deleted inputs Added inputs Deleted outputs Added outputs
dataHMI identName - -
typeCycle timeSwData (this is - -
an UDT which
contains all the
deleted entries with
the exception of
dataHMI.)
timeOn - - -

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 125
4 Changes in V2.0

Deleted inputs Added inputs Deleted outputs Added outputs


duration - - -
indexHMI - - -

Mtr, MtrDS, MtrF, Vlv, VlvA, 3wVlv


Table 4-6
Changed inputs Replace at Reason
indTrip indTripOk The signals are "low active"
"0": Error Trip active
"1": Error trip not active
© Siemens AG 2019 All rights reserved

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 126
5 Creating of own blocks

5 Creating of own blocks


5.1 Creation of the PLC program

Note Information on the creation of the STEP 7 program code is available at:
https://support.industry.siemens.com/cs/ww/en/view/81318674.

5.1.1 Variables management of LBP blocks

Inputs
identName (String[30]) (see 2.1.1 Cross-block input "identName)

Static variables
statDataBlock name
This UDT has to be created once for each block. It represents the interface to the
HMI system and contains the following structures:
• settingsHMI
Contains all the variables that can be described from the HMI system.
The following variables are included in every or nearly every block:
– note (see 2.1.2 User-defined data types for communication with the
© Siemens AG 2019 All rights reserved

visualization system)
– opStation (see 2.1.2 User-defined data types for communication with the
visualization system)
– overwrite (see 2.1.2 User-defined data types for communication with the
visualization system)
– alarmsAck (see 2.1.2 User-defined data types for communication with the
visualization system)
– alarmsInfo (see 2.1.2 User-defined data types for communication with the
visualization system)
• settingsPLC
Contains all the inputs of the STEP 7 block that is to be visualized on the HMI
system (raw data).
• statusHMI
Contains the values that the STEP 7 block outputs after the editing.
This structure must contain the "identName" variable (see 2.1.1 Cross-block
input "identName).
If the status is visualized on the HMI page, an UDT can be created from
Boolean variables with the "msgStatus" name (for an example see 2.13.2
Interface description for HMI communication).
• log15 (optional)
This UDT is required if the "LBP_Log15" function block is used. This is used for
saving the status or error codes in a data buffer with 15 entries.
Application:
To create a new entry, write the new code on the input. Since the text is already
assigned by a text list from the HMI point-of-view, it is important that each code
only occurs once in the complete PLC program. The currently occupied codes
are configured in the HMI system in the "LBP_Log" text list under "Text and
graphics lists" (all values are occupied at least until 55).
To read out the entry, copy the "statData" UDT from the "LBP_Log15" instance

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 127
5 Creating of own blocks

into the "log15" UDT.


(Example: #statData3wVlv.statLog15 := #instFBLog15.statData)
See also: 2.25 LBP_Log15 – Logging of data.

Outputs
"intError" (Word) for output of error codes.
The usage makes sense if STEP 7 functions that output error codes are used in the
block.

5.2 Creating the visualization in WinCC Professional


Copy the folder with pictures of the LBP block that resembles your block the most.
Then adapt the folder names and picture names to the name of your block.

5.2.1 Naming of elements

Table 5-1
Object Labeling guideline
Entry field ioXxx
Frame/rectangle rectXxx
Button btnXxx
Texts txtXxx
© Siemens AG 2019 All rights reserved

Groups grpXxx
Circles cirXxx
Lines lineXxx
Picture picXxx

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 128
5 Creating of own blocks

5.2.2 Adaptations to the background picture (LBP_Xyz)

Your header functions with one of the following adaptations:


Figure 5-1
1
© Siemens AG 2019 All rights reserved

1. If your block does not have any own messages, the tab for messages can be
removed in the navigation. To do this, cancel the group of the tab and delete
the "Report" graphic.
If your block has messages, select the button, open the properties and modify
the "Click" event under "Events". Here "_statDataXyz" has to be replaced by
the name of your structure.
2. Select the lock, open the properties and then click "Property list". A script was
attached under "General > Process value". Adapt the SmartTag for
"activeStation" to the structure name of your block.
3. Click next to the picture into the gray area, right-click and select "Change
object references". Then replace the structure name of the variables by the
structure name of your block.
4. Switch all layers of the layout to visible.
You can find the "Layout" tab at the right-hand edge in TIA Portal. To switch
the layers to visible, click on the grayed-out eye next to the name of the layer.
5. The "Content" level contains all the screen windows that show the content of
the individual tabs. Select each picture window individually and adapt the
displayed picture to the picture of your block in its properties under "General".
Also adapt the variable prefix to the name of the structure of your block.
6. Adapt the skirting board to your block name.

5.2.3 Adaptations to Home picture (LBP_Xyz1)

Retain the line at the upper edge of the pictures. You can adapt the rest at will: You
can obtain ideas from other LBP pictures.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 129
5 Creating of own blocks

5.2.4 Adaptation of the setting pages (LBP_XyzP1)

The entry fields for Unit and Format can continue to be used without adaptation if
you have named the associated variables in your UDT by the same name as the
other LBP blocks.
A script is stored at the entry field for the comment which needs to be modified (see
5.2.7 Script for switching the operability and colors).

Note If you want to display the log picture ("General > LBP_Log"), it is important that
the last setting page is named "LBP_XyzPLast" and that you have supplemented
the "LBP_Log" text list with your error codes.

Adaptation of the internal navigation in the setting pages

Figure 5-2

1. Select the internal navigation and open its properties.


© Siemens AG 2019 All rights reserved

2. Select the "Events" tab.


3. Open the "Click" event of the "picSwitchPage1" element.
4. Adapt the "SetPropertyCurrentWindow" function to your picture frame.
5. Repeat steps 3 and 4 for the "picSwitchPage2" element.

5.2.5 Adaptations when using the Double Confirmation (LBP_XyzC)

For buttons for which the double confirmation is relevant, a script is stored with the
"Click" event. Example:
Figure 5-3

The "LBP_DoubleConfirmation" variable determines whether the Double


Confirmation is active or not. Subsequently a check is carried out whether the
dataset variable "txtDoubleConfirmation" already exists. If not, it is created. This
variable is handed over the number of the text list entry that is to be displayed as a
question. The number of the text list entry in this case also determines the number
of bits of the "cmd" variable that is to be set if the question is answered with "Yes".

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 130
5 Creating of own blocks

Figure 5-4

Create a text list with the questions that you require. If only different bits of the same
variable are to be set depending on the question, the numbers of the text list entries
should correspond with the bit numbers.
If you have to write different variables, you have the possibility of placing several
buttons on top of each other and showing and hiding them depending on the text list
entry.

5.2.6 Creation of messages

Observe the following points for creating messages:


• Assign the message class "LBP_Status", "LBP_Warning" or "LBP_Alarm" to
your messages. Warnings and alarms need to be acknowledged as a result.
• Select the "alarmsAck" variable from your "settingsHmi" UDT as an
acknowledgment variable. You can select the acknowledgment bit freely.
• As the status variable select the "alarmsInfo" variable from your "settingsHmi"
© Siemens AG 2019 All rights reserved

UDT. You can select the status bit freely.


• In order for the message filter functions the "identName" variable from the
"statusHMI" UDT must be selected as Parameter1.

5.2.7 Script for switching the operability and colors

The script for switching the operability and the colors is located behind the first
interface on your screen or behind the first element.
It usually starts with a query whether the operation is currently locked or not.
Table 5-2
Querying the operation release
Dim activeStation, thisStation, statelocked, stateLockedBool
activeStation = SmartTags("&".settingsHMI.opStation")
thisStation = SmartTags("@NOTP::LBP_StationName")
If (activeStation <> thisStation) And Not(activeStation = ") Then
statelocked = 0
stateLockedBool = False
Else
statelocked = 1
stateLockedBool = True
End If
ScreenItems("ioHmiTime").Enabled = stateLockedBool
ScreenItems("ioHmiMode").Enabled = stateLockedBool

The "stateLockedBool" variable is "true" when operating may be carried out. The
"Enabled" property must have the value of this variable at each button and each
entry field.
Then an array is defined in which the colors are determined depending on the
switch position, the operability and whether it is an HMI entry field or a PLC entry
field. This array is only required as a whole if there are typical settings that are

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 131
5 Creating of own blocks

described in the document for controlling the LBP in chapter "2.1.1.2 Control of the
setting pictures" under "Overwriting values".

Table 5-3
Color array
Dim colorArray(1,1,5)
Dim colorSwitch(1)
Const TXT_PLC = 1, TXT_HMI_BACK_PLC = 2, BACK_HMI = 3, BORDER_HMI
= 4, BORDER_PLC = 5
Const SWITCH_UP = 0, SWITCH_DOWN = 1
Const UNLOCKED = 1, LOCKED = 0
Dim LIGHT_GRAY, BLUE_GRAY, WHITE, BLUE, FRAME_GRAY
LIGHT_GRAY = RGB(223,223,223)
FRAME_GRAY = RGB(202,202,202)
BLUE_GRAY = RGB(167,188,197)
WHITE = RGB(255,255,255)
BLUE = RGB(85,160,185)

colorSwitch(UNLOCKED) = BLUE
colorSwitch(LOCKED) = BLUE_GRAY
colorArray(SWITCH_UP,UNLOCKED,TXT_PLC) = LIGHT_GRAY
colorArray(SWITCH_UP,UNLOCKED,TXT_HMI_BACK_PLC) = BLUE
colorArray(SWITCH_UP,UNLOCKED,BACK_HMI) = WHITE
© Siemens AG 2019 All rights reserved

colorArray(SWITCH_UP,UNLOCKED,BORDER_HMI) = FRAME_GRAY
colorArray(SWITCH_UP,UNLOCKED,BORDER_PLC) = BLUE
colorArray(SWITCH_UP,LOCKED,TXT_PLC) = LIGHT_GRAY
colorArray(SWITCH_UP,LOCKED,TXT_HMI_BACK_PLC) = BLUE_GRAY
colorArray(SWITCH_UP,LOCKED,BACK_HMI) = WHITE
colorArray(SWITCH_UP,LOCKED,BORDER_HMI) = FRAME_GRAY
colorArray(SWITCH_UP,LOCKED,BORDER_PLC) = BLUE_GRAY
colorArray(SWITCH_DOWN,UNLOCKED,TXT_PLC) = BLUE_GRAY
colorArray(SWITCH_DOWN,UNLOCKED,TXT_HMI_BACK_PLC) = WHITE
colorArray(SWITCH_DOWN,UNLOCKED,BACK_HMI) = BLUE
colorArray(SWITCH_DOWN,UNLOCKED,BORDER_HMI) = BLUE
colorArray(SWITCH_DOWN,UNLOCKED,BORDER_PLC) = FRAME_GRAY
colorArray(SWITCH_DOWN,LOCKED,TXT_PLC) = BLUE_GRAY
colorArray(SWITCH_DOWN,LOCKED,TXT_HMI_BACK_PLC) = WHITE
colorArray(SWITCH_DOWN,LOCKED,BACK_HMI) = BLUE_GRAY
colorArray(SWITCH_DOWN,LOCKED,BORDER_HMI) = BLUE_GRAY
colorArray(SWITCH_DOWN,LOCKED,BORDER_PLC) = FRAME_GRAY

Subsequently the colors are assigned to the picture elements. For a start, the
"overwrite" bit, that determines which position the switch has, is evaluated. This
takes the following form:
Table 5-4
Color assignment
Dim overwrite
overwrite = SmartTags("&".settingsHMI.overwrite").Value
Dim overBool, overInt

'Mode-------------------------------------------
overBool = CBool(overwrite And 2^0)' if overwrite bit 0 --> true

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 132
5 Creating of own blocks

Color assignment
overInt = (CInt(overBool))*(-1)

ScreenItems("picOnMode").Visible = overBool
ScreenItems("picOffMode").Visible = Not overBool
ScreenItems("picOnMode").ProcessValue = statelocked
ScreenItems("picOffMode").ProcessValue = statelocked
ScreenItems("rectSliderMode").BackColor =
colorSwitch(statelocked)
ScreenItems("rectSliderMode").BorderColor =
colorSwitch(statelocked)
ScreenItems("ioPlcMode").ForeColor = colorArray(overInt,
statelocked, TXT_PLC)
ScreenItems("ioHmiMode").ForeColor = colorArray(overInt,
statelocked, TXT_HMI_BACK_PLC)
ScreenItems("ioHmiMode").BackColor = colorArray(overInt,
statelocked, BACK_HMI)
ScreenItems("ioPlcMode").BackColor = colorArray(overInt,
statelocked, TXT_HMI_BACK_PLC)
ScreenItems("ioHmiMode").BorderColor = colorArray(overInt,
statelocked, BORDER_HMI)
ScreenItems("ioPlcMode").BorderColor = colorArray(overInt,
statelocked, BORDER_PLC)
© Siemens AG 2019 All rights reserved

5.2.8 Evaluation of the status variable (.settingsHMI.alarmsInfo)

The first half of the bits of the status variable indicates whether a message is
active. The second half of the bits indicates whether the message has been
acknowledged.
At the LPB the warning triangles pulsate at the symbols if messages of the block
are not yet acknowledged. The frames of fields flash when the error that they are
showing has not been acknowledged yet.
A field that is to show the acknowledgement status is superimposed with a
graphics list that represents the frame. This graphics list has the name
"ioFrame_x".
At the first frame on the picture a script is stored which evaluates the
acknowledgement status of all the messages.
To this purpose Bits 16 to 32 of the ".settingsHMI.alarmsInfo" variable are read out.
If the status bit "0" is specified in the HMI message, Bit 16 must be evaluated to
read out the acknowledgement status.

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 133
6 Appendix

6 Appendix
6.1 Service and Support
Industry Online Support
Do you have any questions or need support?
Siemens Industry Online Support provides access round the clock to our entire
Service and Support know-how and service offers.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, and application examples – all
the information you need is accessible with just a few mouse clicks at:
support.industry.siemens.com

Technical support
The Technical Support of Siemens Industry provides you with fast and competent
support for all your technical queries with many tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via the web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2019 All rights reserved

SITRAIN – Training for Industry


With our globally available training courses for Siemens products and solutions, we
support you in step with actual practice, with innovative learning methods and with
a customer-specific training concept.
You can find out more about the training courses offered as well as their locations
and dates at:
www.siemens.com/sitrain

Service offer
Our range of services includes the following:
• Plant Data Services
• Spare part services
• Repair services
• Field and maintenance services
• Retrofit and modernization services
• Service programs and agreements
You can find detailed information on our range of services in the service catalog:
support.industry.siemens.com/cs/sc

Industry Online Support App


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for Apple iOS and Android Phone:
support.industry.siemens.com/cs/ww/en/sc/2067

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 134
6 Appendix

6.2 Links and Literature


Table 6-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the entry of the application example
https://support.industry.siemens.com/cs/ww/en/view/109749508
\3\ SIMATIC Visualization Architect Manual
https://support.industry.siemens.com/cs/ww/en/view/109755214
\4\ How do you use multiple monitors simultaneously with WinCC (TIA Portal) Runtime
Professional?
https://support.industry.siemens.com/cs/ww/en/view/109744837
\5\ Programming Guide and Programming Style Guide for SIMATIC S7-1200 and S7-
1500
https://support.industry.siemens.com/cs/ww/en/view/81318674

6.3 Version history


Table 6-2
© Siemens AG 2019 All rights reserved

Version Date Change


V2.0 08/2019 Release for:
• STEP 7 Basic / Professional V15
• WinCC Comfort / Advanced V15
• Comfort Panel
• WinCC Runtime Advanced V15
• WinCC Runtime Professional V15
• WinCC V7.5
• WinCC Open Architecture 3.16

LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 135

You might also like