LBP V2.0 Implementation DOC en
LBP V2.0 Implementation DOC en
LBP V2.0 Implementation DOC en
Processes (LBP) -
Implementation
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 3
Table of contents
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 4
Table of contents
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 - Implementation
Entry ID: 109749508, V2.0, 08/2019 6
1 Introduction
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 7
2 Integration of the PLC function blocks
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
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
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 11
2 Integration of the PLC function blocks
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 12
2 Integration of the PLC function blocks
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
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
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
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
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
Input parameters
Table 2-6
© Siemens AG 2019 All rights reserved
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
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
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
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
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
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
settingsPLC
Table 2-14
© 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).
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)
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
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
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
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 28
2 Integration of the PLC function blocks
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
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
Input/output parameters
See 2.1.4 Input/output for panel communication
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 31
2 Integration of the PLC function blocks
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
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
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
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 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
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
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
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
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
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".
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
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.
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 44
2 Integration of the PLC function blocks
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 47
2 Integration of the PLC function blocks
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
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
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 50
2 Integration of the PLC function blocks
"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)
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
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
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
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
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
Block
Figure 2-15: LBP_MtrF
FB LBP_MtrF
BOOL EN ENO BOOL
STRING[30] identName speed REAL
© Siemens AG 2019 All rights reserved
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 56
2 Integration of the PLC function blocks
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
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
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
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
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
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
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
"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
"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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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.
"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
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
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
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
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 75
2 Integration of the PLC function blocks
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
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
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
Input/output parameters
See 2.1.4 Input/output for panel 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
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
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
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
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
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
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
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
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
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
Position 1
Position 2
Position 0 (closed)
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 84
2 Integration of the PLC function blocks
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
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 87
2 Integration of the PLC function blocks
LBP_typeLog15MHIData
Table 2-117
© Siemens AG 2019 All rights reserved
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
Input parameters
Table 2-118
Parameter Data type Description
codeWrite Word Identification error depending on block
"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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 90
3 Integration of the HMI faceplates
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.
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.
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.
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.
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 93
3 Integration of the HMI faceplates
HMIRuntime.DataSet(ActiveScreenItem.Parent.ObjectName &
"array_" & counter & "_parentScreen").Value = 0
ActiveScreenItem.Parent.ScreenItems("swLBPScreen_" &
counter).Visible = False
Next
End If
End If
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
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.
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.
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.
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
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".
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
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.
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.
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.
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.
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.
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
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
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").
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 106
3 Integration of the HMI faceplates
Note Additional information on the topic is available in the SIOS Portal under the entry
ID 109748955, SIMATIC SCADA Export for TIA Portal.
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 107
3 Integration of the HMI faceplates
Figure 3-9
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
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.
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
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
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
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
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.
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".
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.
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 114
3 Integration of the HMI faceplates
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 116
3 Integration of the HMI faceplates
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
3.4.3 Engineering
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.
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
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
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.
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.
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 122
3 Integration of the HMI faceplates
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.
SetCrv / Select
Table 4-2
Deleted inputs Added inputs Deleted outputs Added outputs
dataHMI identName - -
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 126
5 Creating of own blocks
Note Information on the creation of the STEP 7 program code is available at:
https://support.industry.siemens.com/cs/ww/en/view/81318674.
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
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.
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
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.
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
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.
Figure 5-2
For buttons for which the double confirmation is relevant, a script is stored with the
"Click" event. Example:
Figure 5-3
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.
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
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
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
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 134
6 Appendix
LBP - Implementation
Entry ID: 109749508, V2.0, 08/2019 135