Basic Process Library for WinCC V7 - Siemens AG · Basic Process Library for WinCC V7 ... 2.1 FB...
Transcript of Basic Process Library for WinCC V7 - Siemens AG · Basic Process Library for WinCC V7 ... 2.1 FB...
Basic Process Library for WinCC V7
WinCC 7.3 / TIA Portal V13 SP1 / S7-1200 / S7-1500
https://support.industry.siemens.com/cs/ww/en/view/109749508
Siemens Industry Online Support
Warranty and liability
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 2
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Warranty and liability
Note The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These Application Examples do not relieve you of the responsibility to use safe practices in application, installation, operation and maintenance. When using these Application Examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications – e.g. Catalogs – the contents of the other documents have priority.
We do not accept any liability for the information contained in this document. Any claims against us – based on whatever legal reason – resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG.
Security informa-tion
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 only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens’ guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://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 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 http://www.siemens.com/industrialsecurity.
Table of contents
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 3
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table of contents Warranty and liability ................................................................................................... 2
1 Library Overview ................................................................................................ 4
1.1 Hardware and software requirements .................................................. 4 1.2 Library resources .................................................................................. 4 1.3 General Functions ................................................................................ 6 1.3.1 General Functions ................................................................................ 6 1.3.2 General Faceplate functions ................................................................ 6
2 Explanation of the blocks ................................................................................. 9
2.1 FB 2001 LibDCP_Mtr ........................................................................... 9 2.2 FB 2002 LibDCP_MtrDS .................................................................... 16 2.3 FB 2003 LibDCP_MtrF ....................................................................... 22 2.4 FB 2004 LibDCP_Vlv ......................................................................... 27 2.5 FB 2005 LibDCP_VlvA ....................................................................... 33 2.6 FB 2008 LibDCP_AnaRead ............................................................... 39 2.7 FB 2010 LibDCP_AnaAvg .................................................................. 46 2.8 FB 2032 LibDCP_CntrP (pulses) ....................................................... 50 2.9 FB 2033 LibDCP_CntrA (integrator) .................................................. 52 2.10 FB 2034 LibDCP_CntrD (differentiator) ............................................. 54 2.11 FB 2014 LibDCP_HMI_Cntr ............................................................... 56 2.12 FB 2015 LibDCP_SetCrv ................................................................... 62 2.13 FB 2115 LibDCP_HMI_SetCrv ........................................................... 64 2.14 FB 2012 LibDCP_CtrlPID ................................................................... 68 2.15 FB 2013 LibDCP_CtrlStp ................................................................... 75 2.16 FB 2021 LibDCP_ClctVal ................................................................... 84 2.17 FB 2031 LibDCP_Msg8...................................................................... 86 2.18 FB 2020 LibDCP_Aggr8 ..................................................................... 91 2.19 FB 2018 LibDCP_OpAna ................................................................... 97 2.20 FB 2019 LibDCP_OpDig .................................................................. 100 2.21 FB 2017 LibDCP_TimeSw ............................................................... 103 2.22 FB 2117 LibDCP_HMI_TimeSw ....................................................... 105 2.23 FB 2016 LibDCP_Select .................................................................. 108 2.24 FB 2116 LibDCP_HMI_Select .......................................................... 110 2.25 FB 2011 LibDCP_Polygon ............................................................... 113 2.26 FB 2022 LibDCP_PU1 ..................................................................... 118 2.27 Additional Functions ......................................................................... 124 2.27.1 FC 2099 DCPLib_GetEditData ........................................................ 124 2.27.2 FC 2084 DCPLib_SetStreamDWord ................................................ 126 2.27.3 FC 2082 DCPLib_SetStreamReal .................................................... 127 2.27.4 FC 2081 DCPLib_SetStreamString .................................................. 128 2.27.5 FC 2083 DCPLib_SetStreamWord .................................................. 129 2.27.6 FB 2099 DCPLib_Log15 .................................................................. 130
3 Working with the Library............................................................................... 131
3.1 Integrating the library into STEP 7 and WinCC ................................ 131 3.1.1 Creating new object .......................................................................... 131 3.1.2 Creating Message Logging .............................................................. 136
4 Notes and Support ......................................................................................... 139
4.1 Version of the blocks ........................................................................ 139 4.2 Version of the faceplate.................................................................... 140
5 Related Literature .......................................................................................... 141
6 History............................................................................................................. 141
1 Library Overview
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 4
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
1 Library Overview
What you get
This document describes the DCPLib block library. The block library provides you with the tested code with clearly defined interfaces. They can be used as a basis for your task to be implemented.
A key concern of the document is to describe
all blocks of the block library
the functionality implemented through these blocks.
Furthermore, this documentation shows possible fields of application and helps you integrate the library into your STEP 7 project using step-by-step instructions.
1.1 Hardware and software requirements
Requirements for this library
To be able to use the functionality of the library described in this document, the following hardware and software requirements must be met:
Hardware
Table 1-1
No. Component Article number Quantity
1. S7-1200/1500 1
Software
Table 1-2
No. Component Article number Quantity
2. WinCC V7.3 Upd8 1
3. TIA V13 SP1 1
Note Alternatively, similar components can also be used for the components listed in chapter 1-2.
1.2 Library resources
What will you find in this section?
The following section gives you an overview of the size of the blocks of the Basic process Library in the main memory.
1 Library Overview
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 5
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Size of the individual blocks
The blocks using the parameterized block number displayed in the following table. The block numbers can be changed.
Table 1-3
Block Symbol Size in main memory
FB 2001 LibDCP_Mtr 55 Kbytes
FB 2002 LibDCP_MtrDS 70 Kbytes
FB 2003 LibDCP_MtrF 53 Kbytes
FB 2004 LibDCP_Vlv 56 Kbytes
FB 2005 LibDCP_VlvA 53 Kbytes
FB 2008 LibDCP_AnaRead 52 Kbytes
FB 2010 LibDCP_AnaAvg 49 Kbytes
FB 2032 LibDCP_CntrP 19 Kbytes
FB 2033 LibDCP_CntrA 22 Kbytes
FB 2034 LibDCP_CntrD 20 Kbytes
FB 2014 LibDCP_HMI_Cntr 35 Kbytes
FB 2015 LibDCP_SetCrv 43 Kbytes
FB 2115 LibDCP_HMI_SetCrv 45 Kbytes
FB 2012 LibDCP_CtrlPID 60 Kbytes
FB 2013 LibDCP_CtrlStp 65 Kbytes
FB 2021 LibDCP_ClctVal 16 Kbytes
FB 2031 LibDCP_Msg8 26 Kbytes
FB 2020 LibDCP_Aggr8 96 Kbytes
FB 2018 LibDCP_OpAna 22 Kbytes
FB 2019 LibDCP_OpDig 17 Kbytes
FB 2017 LibDCP_TimeSw 22 Kbytes
FB 2117 LibDCP_HMI_TimeSw 55 Kbytes
FB 2016 LibDCP_Select 75 Kbytes
FB 2116 LibDCP_HMI_Select 29 Kbytes
FB 2011 LibDCP_Polygon 53 Kbytes
FB 2022 LibDCP_PU1 108 Kbytes
FC 2099 LibDCP_GetEditData 10 Kbytes
FC 2081 LibDCP_SetStreamString 6 Kbytes
FC 2082 LibDCP_SetStreamReal 6 Kbytes
FC 2083 LibDCP_SetStreamWord 6 Kbytes
FC 2084 LibDCP_SetStreamDWord 6 Kbytes
FB 2099 LibDCP_Log15 16 Kbytes
1 Library Overview
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 6
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
1.3 General Functions
1.3.1 General Functions
Multiple Control Room Concept
This concept applies to all blocks containing a faceplate. With an icon the functionality to lock the other stations can be used. So it is possible to control the technological function only by the currently selected faceplate. Also the locked operator access for the other stations can be unlocked by the faceplate.
Authorization Levels
For controlling the faceplates 4 authorization levels are defined as shown in Table 1. With a higher priority the functions of the lower level can be used.
Table 1: Authorization Levels
Level Description
Operator technical control
lock and unlock operator access for the other stations at the local station
Superuser lock and unlock operator access from all stations
Engineer change parameters
Aministrator full access
Central Alarm and Acknowledgment
This concept applies to all functions including acknowledgeable messages. Any function with reporting capability gets internal variables in WinCC: one for the status and a second for the acknowledgement. The variables have the same prefix like the name of the process followed by _MsgStatus and _MsgAck. So it is possible to display and acknowledge the states of each function directly out of the faceplates.
1.3.2 General Faceplate functions
Each faceplate has a toolbar at the top. The toolbar can be used to select between four areas to set up the parameters for the technological object behind the faceplate.
Figure 1: Faceplate Toolbar
Status View (1)
Displays an overview and provides the general functions of the technological object.
1 2 3 4 5
1 Library Overview
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 7
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Message View (2)
In combination with the Msg8 block all alerts and warnings can be displayed.
Figure 2: Message View
The stored faults and warnings are displayed in the message view and with the upper bar some functions can be used. Messages can be filtered whether they are warnings or errors. Additional the messages can be printed, exported and sorted. Stored short and long time archive lists can be opened.
Parameter View (3)
Settings of the faceplate and the technical objects can be made.
1 Library Overview
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 8
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Lock Operations for other Stations (4)
The user can lock and release operations on other stations.
Figure 3: Lock operations
Close Faceplate (5)
The faceplate can be closed.
As operator the operational mode by other stations can be locked and unlocked. The service lock can only be unlocked as Superuser. The service lock refers only to the faceplates. All relevant views at the locked stations are semi translucent and can’t be controlled.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 9
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2 Explanation of the blocks The following chapter explains all blocks of the Basic Process Library.
2.1 FB 2001 LibDCP_Mtr
Figure
Figure 4: LibDCP_Mtr
Principle of Operation
The functional block Mtr can be used to control a motor with one direction and single speed.
The motor can be used in the following operational modes:
Manual mode: motor is controlled by the HMI
Automatic mode: motor is controlled by an automatic input which is generated by a remote station
Local mode: motor is controlled directly by the motor (local mode has highest priority)
Repair mode: indRepair is set; no controlling and no fault monitoring!
The functional block monitors the response time when the motor will be switched ON or OFF. Error messages and status messages are generated automatically and can be displayed by using the Msg8 block from the library. Additional the PLC log can be displayed in the HMI.
Switching ON is only possible if the motor is enabled by indRelease.
For maintenance the following functions can be used:
Elapsed hour meter with limit check
Counter for the operating cycles with limit check
Parametrization of the monitoring time
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 10
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-1
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indOff bool Feedback motor true: motor is OFF
indOn bool Feedback motor true: motor is ON
indTrip bool true: OK false: Emergency OFF
indErr bool true: external Error (e.g. motor protection) false: OK
indWarn bool true: external warning (e.g high temperature) fals: OK
indRelease bool true: motor can be activate false: motor is locked
indRepair bool feedback repair mode (motor only can be controlled externally; No fault monitoring and controlling by faceplate)
indLocal bool true: motor is in local mode and can only be activated by cmdLocOn
cmdLocOn bool true: activate motor in local mode
cmdAut bool external mode command positive edge -> automatic mode
cmdAutoOn bool true: motor will be controlled by remote station in combination with AUTO mode of internal HMI log
cmdReset bool resets internal errors
timeout time parameter for time monitoring
Output parameters
Table 2-2
Parameter Data type Description
on bool activates the motor
collectError bool group error
collectMaintenance bool group maintenance report
modeAut bool automatic mode is active
collectWarning bool group warning
reset bool reset output for Msg8 block
intError word internal error
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 11
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Status and error displays
Table 2-3
Status Meaning
16#0001 error reading system time
16#0002 error writing parameter string “LibDCPMtr”
16#0003 error writing parameter string “PlcHMI”
Table 2-4: Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN
external error
16#0103 ERR TIMEOUT
time monitoring fault
16#0104 ERR PLAUS plausibility error
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0204 CMD LOC ON local ON
16#0205 CMD LOC OFF
local OFF
16#0206 CMD MAN ON
manual ON
16#0207 CMD MAN OFF
manual OFF
16#0208 AUT ON remote ON
16#0209 AUT OFF remote OFF
16#020A NO RELEASE enabling signal missing
16#020B [CHECK] test message via faceplate activated
16#020C REPAIR OFF repair mode OFF
16#020D REPAIR ON repair mode ON
Table 2-5: warnings / errors “HMI_msg_errWrn”
Bit type Description
0 error Emergency OFF
1 error external error
2 error time monitoring fault
3 error plausibility error
4 maintenance limit operating hours
5 maintenance limit switching on
6 maintenance external warning
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 12
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-6: Status “HMI_msg_status”
Bit Description
0 on
1 off
2 true: manual mode false: automatic mode
3 local mode
4 enable
5 power off
6 power on
7 automatic command (true = ON, false = OFF)
8 stored message “Emergency off”
9 stored message “external error”
12 repair mode
13 collection message maintenance
14 collection message warning
15 collection message errors
16 message “emergency off”
17 message “error extern”
18 message “timeout”
19 message “plausibility”
20 message “limit operating hours
21 message “limit switching on”
Table 2-7: External tags for HMI communication
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPMtr string[150] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI string[200] stream for PLC parameters
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 13
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
For controlling a motor a faceplate can be used. It displays the status and faults of the controlled motor. Additional parameters like operating hours, response time and a limit for operating cycles can be set.
Status View
Figure 5: Control Mtr
All Faults are saved and displayed in the lower part of the faceplate. All of them must be reset to restart the motor.
Fault monitoring:
- Emergency off (indTrip)
- External fault (indErr)
- Timout (feedback monitoring)
- Plausibility
If a fault occurs the Motor is switching off and Additional the automatic mode changes to manual mode.
The messages “external error” and “external warning” can be defined and visualized by using the LibDCP_Msg8 block. In that case the Msg8 block must have the same symbolic name like the Mtr block added by the suffix “_ErrExt” or “_WrnExt”.
The values of the parameter “identName” at the Mtr and Msg8 block should be the same to display it on the faceplate.
The ouput parameters of the Msg8 block must be connected to the indErr- or indWarn inputs of the Mtr block. For realizing the reset function the reset input must
be connected to the reset output of the Mtr block.
Representation status
ON
fault
power up
power down
ON in automatic mode
motor in repair mode
Motor in local mode
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 14
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
The following table shows the different states of displaying faults.
Table 2-8: States and faults
An error is present. Error is displayed with a red dot and a red flashing frame. Error must be Acknowledged and reset.
Error no longer exists but must be reset.
Error no longer exists but and is acknowledged.
By connecting the input indErr of the functional block with the Msg8 block external faults can be specified and displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 15
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter View
Figure 6: Parameter view page 1
Figure 7: Parameter view page 2
Operating Hours Displays the current runtime.of the motor. If a limit is set a warning will appear. Counter switches Counts the operating cycles of the motor. If a limit is set a warning will appear. Timeout There are two possibilities to set a time for the monitoring time. Normally the time will set by PLC. If the value should be overwritten a time can be set by using the slider. Commant A comment can be set which is displayed in the upper area under the name of the instance.
PLC Log On this page the commands of the plc log will be displayed. Generate Check Item For testing a test message can be created.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 16
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.2 FB 2002 LibDCP_MtrDS
Figure
Figure 8: LibDCP_MtrDS
Principle of operation
That function block controls a motor with two directions and two speeds. The motor can be used in the following operational modes:
Manual mode: motor is controlled by the HMI
Automatic mode: motor is controlled by an automatic input witch is generated by a remote station
Local mode: motor is controlled directly by the motor
Repair mode: indRepair is set; no controlling and no fault monitoring!
The functional block monitors the response time when the motor will be switched ON or OFF. Error messages and status messages are generated automatically and can be displayed by using the Msg8 block from the library. Additional the PLC log can be displayed in the HMI.
For maintenance the following functions can be used:
Elapsed hour meter with limit check
Counter for the operating cycles with limit check
Parametrization of the monitoring time
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 17
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-9
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indOff bool Feedback motor true: motor is OFF
indOn bool Feedback motor true: motor is ON
indSpeed2 bool Feedback speed true:
indReverse bool Feedback directional reversal true:
indTrip bool true: OK false: Emergency OFF
indErr bool true: external Error (e.g. motor protection) false: OK
indWarn bool true: external warning (e.g high temperature) fals: OK
indRelease bool true: motor can be activate false: motor is locked
indRepair bool feedback repair mode (motor only can be controlled externally; No fault monitoring and controlling by faceplate)
indLocal bool true: motor is in local mode and can only be activated by cmdLocOn
cmdLocOn bool true: activate motor in local mode
cmdLocSpeed2 bool true: local mode speed 2
cmdLocReverse bool true: local mode directional reversal
cmdAut bool external mode command positive edge -> reset
cmdAutoOn bool true: motor will be controlled by remote station in combination with AUTO mode of internal HMI log
cmdAutSpeed2 bool true: automatic mode -> speed2
cmdAutReverse bool true: automatic mode -> directional reversal
cmdReset bool resets internal errors
timeout time parameter for time monitoring;
timeSpeed1 time time that the motor must run in speed1 before speed2 can be switched
timeChangeDir time time that the motor must stop before change direction
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 18
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-10
Parameter Data type Description
on bool activates the motor
speed2 bool activate speed2
reverse bool activate directional reversal
collectError group fault
collectWarning bool group warning
collectMaintenance bool group maintenance report
modeAut bool activate automatic mode
reset bool reset output for Msg8 block
intError word internal error.
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Status and error displays
Table 2-11
Status Meaning
16#0001 error reading system time
16#0002 error writing parameter string “LibDCPMtrDS”
16#0003 error writing parameter string “PlcHMI”
Table 2-12 Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN external error
16#0103 ERR TIMEOUT time monitoring fault
16#0104 ERR PLAUS plausibility fault
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0204 RELEASE ON Mtr enable
16#0205 RELEASE OFF MTR disable
16#0206 MODE LOC ON local ON
16#0207 MODE LOCAL OFF local OFF
16#0208 OFF controlling disabled
16#0209 ON1 speed1 activated
16#020A ON2 speed2 activated
16#020B ON1R speed1 reversal activated
16#020C ON2R speed2 reversal activated
16#020D NO RELEASE no release
16#020E [CHECK] test message via faceplate activated
16#020F WAIT_SPEED waiting time to enable speed2
16#0210 WAIT_DIR waiting time to change direction
16#0211 REPAIR OFF repair mode OFF
16#0212 REPAIR ON repair mode ON
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 19
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-13: warnings / errors “HMI_msg_errWrn”
Bit type Description
0 error Emergency OFF
1 error external error
2 error time monitoring fault
3 error plausibility error
4 maintenance limit operating hours
5 maintenance limit switching on
6 maintenance external warning
Table 2-14: Status “HMI_msg_status”
Bit Description
0 OFF
1 ON
2 Automatic mode
3 local mode
4 Enable
5 ON -> OFF
6 OFF -> ON
7 automatic mode -> ON
12 repair mode
13 collective message maintenance
14 collective message warning
15 collective message alarm
24 speed 2 active
25 reverse mode active
26 automatic mode -> speed 2
27 automatic mode -> reverse
Table 2-15 External logs for HMI communications
Parameter Data type Description
HMI_cmd word Interface
HMI_LicDCPMtrDS string[160] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[100] stream for PLC parameters
instFBLog15_dataHMI string[210] log data (optional)
Table 2-16 Internal tags for HMI communications
Parameter Data type Description
MsgAck byte acknowledge
MsgStatus word status messages
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 20
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
For controlling a motor with two directions and reverse mode a faceplate can be used. It displays the status and faults of the controlled motor. Additional parameters like operating hours, response time and a limit for operating cycles can be set.
Status view
Figure 9: Controle MtrDS
All Faults are saved and displayed in the lower part of the faceplate. All of them must be reset to restart the motor. The following table shows the different states of displaying faults. The states of fault are described in Table 2-8: States and faults.
Representation status
ON
fault
power up
power down
Automatic mode ON
motor in repair mode
Motor in local mode
speed 2 is activated
reverse is activated
activate speed2 or reverse direction
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 21
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Page 1 and 3 are similar to the parameter view of Mtr.
Time Start Speed level 2 Time can be set that the motor must run in speed1 before speed2 can be activated. Time Power Off befor Change Direction Time can be set what the motor must be stopped bevor change direction. In the lower area it can be activated if speed change and/or direction change can be done.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 22
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.3 FB 2003 LibDCP_MtrF
Figure
Figure 10: LibDCP_MtrF
Principle of operation
Activation of a motor with a variable speed (FU) and an analogue speed value feedback. The motor will be switched on and off, additionally its speed is given. Via faceplate virtual stop positions from a speed value parameter can be set. Analog set point for the local operating mode and an adjustable set point for the manual mode can be set by faceplate.
The motor can be used in the following operational modes:
Manual mode: motor is controlled by the HMI
Automatic mode: motor is controlled by an automatic input witch is generated by a remote station
Local mode: motor is controlled directly by the motor
Repair mode: indRepair is set; no controlling and no fault monitoring!
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 23
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-17
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
inSpeed real rotation speed [0…100%]
indOff bool feedback “OFF”
indOn bool feedback “ON”
indTrip bool false: emergency OFF
indErr bool external error
indWarn bool external warning
indRepair bool feedback repair mode (motor only can be controlled externally; No fault monitoring and controlling by faceplate)
indLocal bool true: motor is in local mode and can only be activated by cmdLocOn
cmdLocSpeed real rpm set point for local mode [0…100%]
cmdAut bool external mode command positive edge -> automatic mode
cmdAutSpeed real rpm set point for automatic mode [0…100%]
cmdReset bool external reset command positive edge -> reset
timeout time monitoring time for “timeout” and “plausibility”
tolerance real parameter tolerance for feedback monitoring
Output parameters
Table 2-18
Parameter Data type Description
speed real rotation speed [0…100%]
collectError bool group fault
collectWarning bool group warning
collectMaintenance bool group maintenance report
modeAut bool activate automatic mode
reset bool reset output for Msg8 block
intError word internal error
Status and error displays
Table 2-19
Status Meaning
16#0001 error reading system time
16#0002 error writing parameter string “LibDCPMtr”
16#0003 error writing parameter string “PlcHMI”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 24
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
Table 2-20: Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN external error
16#0103 ERR TIMEOUT time monitoring fault
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0204 MODE LOC ON local ON
16#0205 MODE LOCAL OFF
local OFF
16#0206 [CHECK] test message via faceplate activated
16#0207 REPAIR OFF repair mode OFF
16#0208 REPAIR ON repair mode ON
Table 2-21: warnings / errors “HMI_msg_errWrn”
Bit type Description
0 alarm Emergency OFF
1 alarm external error
2 alarm time monitoring fault
4 maintenance limit operating hours
Table 2-22: Status “HMI_msg_status”
Bit Description
0 OFF
1 ON
2 Automatic mode
3 local mode
5 ON -> OFF
6 OFF -> ON
12 repair mode
14 external warning
15 collective message alarm
Table 2-23: External tags for HMI communication
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPMtrF string[170] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[100] stream for PLC parameters
HMI_speed real rotation speed [0…100%]
instFBLog15_dataHMI string[210] log data (optional)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 25
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-24: Internal tags for HMI communication
Name Datatype Description
MsgAck byte acknowledge
MsgStatus word status messages
Faceplate
For controlling a motor controlled by a frequency converter a faceplate can be used. It displays the status and faults of the controlled motor. Additional parameters like operating hours, response time and a limit for operating cycles can be set.
Status view
Figure 11: Control MtrF
All Faults are saved and displayed in the lower part of the faceplate. All of them must be reset to restart the motor. The following table shows the different states of displaying faults. The states of fault are described in Table 2-8: States and faults.
Representation status
ON manual mode
OFF manual mode
fault
automatic mode
motor in local mode OFF
motor in local mode ON
motor in repair mode
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 26
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 12: Parameter view page 1
Figure 13: Parameter view page 2
Timout Set and parametrized by PLC or HMI Tolerance Set and parametrized by PLC or HMI Command A command can be set and will be displayed at the status line.
Operating hours The operating hours will be shown and a limit can be set. Use speed limit “OFF” & Use speed limit “ON” A speed limit can be activated and a tolerance can be set
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 27
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.4 FB 2004 LibDCP_Vlv
Figure
Figure 14: LibDCP_Vlv
Principle of operation
The function can be used for controlling valves with 2 control inputs (open / close). The rest position can be set as close or open. The both feedback signals of the valve (open / close) can be monitored.
The valve can be used in the following operational modes:
Manual mode: valve is controlled by the HMI
Automatic mode: valve is controlled by an automatic input witch is generated by a remote station
Local mode: valve is controlled directly by the valve via an external input
Repair mode: indRepair is set; no controlling and no fault monitoring!
For monitoring the valve error messages, status messages (changes of operating conditions) and collective messages for evaluate the confirmation status will be created.
For maintenance the following functions can be used:
Parametrization of the monitoring time
Counter for the operating cycles with limit check
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 28
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-25
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indClosed bool Feedback valve true: valve is closed
indOpened bool Feedback valve true: valve is open
indTrip bool true: OK false: Emergency OFF
indErr bool true: external Error (e.g. motor protection) false: OK
indWarn bool true: external warning (e.g high temperature) fals: OK
indRepair bool feedback repair mode (valve only can be controlled externally; No fault monitoring and controlling by faceplate)
indLocal bool true: valve is in local mode and can only be activated by cmdLocOn
cmdLocOn bool true: activate motor in local mode
cmdAut bool external mode command positive edge -> automatic mode
cmdReset bool resets internal errors
timeout time parameter for time monitoring
Output parameters
Table 2-26
Parameter Data type Description
close bool close valve
open bool open valve
collectError bool group fault
collectWarning bool group warning
collectMaintenance bool group maintenance report
modeAut bool activate automatic mode
reset bool reset output for Msg8 block
intError word internal error
Table 2-27
Status Meaning
16#0001 error reading system time
16#0002 error writing parameter string “LibDCPVlv”
16#0003 error writing parameter string “PlcHMI”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 29
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
Table 2-28: Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN
external error
16#0103 ERR TIMEOUT
time monitoring fault
16#0104 ERR PLAUS plausibility fault
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0206 MODE LOC ON
local ON
16#0207 MODE LOCAL OFF
local OFF
16#0208 CLOSE close valve
16#0209 OPEN open valve
16#020B [CHECK] test message via faceplate activated
16#020C REPAIR OFF repair mode OFF
16#020D REPAIR ON repair mode ON
Table 2-29: warnings / errors “HMI_msg_errWrn”
Bit type Description
0 alarm Emergency OFF
1 alarm external error
2 alarm time monitoring fault
3 alarm plausibility fault
4 maintenance limit operating hours
5 maintenance limit switching on
6 warning external warning
Table 2-30: Status “HMI_msg_status”
Bit Description
0 CLOSED
1 OPENED
2 Automatic mode
3 local mode
5 OPEN -> CLOSE
6 CLOSE -> OPEN
7 automatic mode -> OPEN
12 repair mode
13 collective message maintenance
14 collective message warning
15 collective message alarm
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 30
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-31: External tags for HMI communicationValues for internal log
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPVlv string[160] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit
string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[100] stream for PLC parameters
instFBLog15_dataHMI
string[210] log data (optional)
Table 2-32: External tags for HMI communicationValues for internal log
Name Datatype Description
MsgAck byte acknowledge
MsgStatus word status messages
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 31
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
For controlling a digital valve a faceplate can be used. It displays the status and faults of the controlled valve. Additional parameters like operating hours, response time and a limit for operating cycles can be set.
Status view
Figure 15: Controle Vlv
All Faults are saved and displayed in the lower part of the faceplate. All of them must be reset to restart the motor. The following table shows the different states of displaying faults. The states of fault are described in
Table 2-8: States and faults.
Representation status
open
close
fault
automatic mode
Valve in local mode and closed
Valve in local mode and open
Valve in repair mode
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 32
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 16: Parameter view page 1
Figure 17: Parameter view page 2
Command A command can be set and will be displayed at the status line. Timout Set and parametrized by PLC or HMI Reset command by indications If set command will be reset if vault is in final position
Operating hours The operating hours will be shown and a limit can be set. Counter switches The counted changeover will be displayed and a limit can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 33
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.5 FB 2005 LibDCP_VlvA
Figure
Figure 18: LibDCP_VlvA
Principle of operation
Activation of a valve (a flap/a slide) with an analogue control value and an analogue feedback signal. An analog value can be set and is monitored whether the value is reached. Additional a feedback time can be set.
The valve can be used in the following operational modes:
Manual mode: valve is controlled by the HMI
Automatic mode: valve is controlled by an automatic input which is generated by a remote station
Local mode: valve is controlled directly by the motor (local mode has highest priority)
Repair mode: indRepair is set; no controlling and no fault monitoring!
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 34
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-33
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
inPosition real position feedback [0…100%]
indClosed bool Feedback valve true: valve is closed
indOpened bool Feedback valve true: valve is open
indTrip bool true: OK false: Emergency OFF
indErr bool true: external Error (e.g. motor protection) false: OK
indWarn bool true: external warning (e.g high temperature) fals: OK
indRepair bool feedback repair mode (valve only can be controlled externally; No fault monitoring and controlling by faceplate)
indLocal bool true: valve is in local mode and can only be activated by cmdLocOn
cmdLocPosition real set value for local mode [0…100%]
cmdAut bool external mode execution 0 -> 1 change to automatic mode
cmdAutPosition real set value for automatic mode [0…100%]
cmdReset bool external reset execution 0 -> 1 reset
timeout time parameter for time monitoring
tolerance real tolerance for set value feedback
Output parameters
Table 2-34
Parameter Data type Description
position real set value [0…100%]
collectError bool group fault
collectWarning bool group warning
collectMaintenance bool group maintenance report
modeAut bool activate automatic mode
reset bool reset output for Msg8 block
intError word internal error
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 35
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-35
Status Meaning
16#0001 error reading system time
16#0002 error writing parameter string “LibDCPVlvA”
16#0003 error writing parameter string “PlcHMI”
Communication between PLC and HMI
Table 2-36: Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN external error
16#0103 ERR TIMEOUT time monitoring fault
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0206 MODE LOC ON local ON
16#0207 MODE LOCAL OFF local OFF
16#020B [CHECK] test message via faceplate activated
16#020C REPAIR OFF repair mode OFF
16#020D REPAIR ON repair mode ON
Table 2-37: warnings / errors “HMI_msg_errWrn”
Bit type Description
0 alarm Emergency OFF
1 alarm external error
2 alarm time monitoring fault
4 warning external warning
Table 2-38: Status “HMI_msg_status”
Bit Description
0 CLOSED
1 OPENED
2 Automatic mode
3 local mode
5 OPEN -> CLOSE
6 CLOSE -> OPEN
7 automatic mode -> OPEN
12 repair mode
14 external warning
15 collective message alarm
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 36
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-39: External tags for HMI communication
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPVlv string[170] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI string[100] stream for PLC parameters
HMI_position real position of flap
instFBLog15_dataHMI string[210] log data (optional)
Table 2-40: Internal tags for HMI communication
Name Datatype Description
MsgAck byte acknowledge
MsgStatus word status messages
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 37
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
For controlling an analog valve a faceplate can be used. It displays the status and faults of the controlled valve. Additional parameters like operating hours, response time and a limit for operating cycles can be set.
Status view
Figure 19: Control Vlv
All Faults are saved and displayed in the lower part of the faceplate. All of them must be reset to restart the motor. The following table shows the different states of displaying faults. The states of fault are described in Table 2-8: States and faults.
Representation status
open
close
fault
Valve in local mode and closed
Valve in local mode and open
Valve in automatic mode
Valve in repair mode
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 38
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Abbildung 2-1: Parameter view page 1
Abbildung 2-2: Parameter view page 2
Timout Set and parametrized by PLC or HMI Tolerance Set and parametrized by PLC or HMI Command A command can be set and will be displayed at the status line.
Operating hours The operating hours will be shown and a limit can be set. Use Position Limit “Closed” / “Opened” A position tolerance can be activated at which point the flap is displayed as opend or closed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 39
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.6 FB 2008 LibDCP_AnaRead
Figure
Figure 20: LibDCP_AnaRead
Principle of operation
The block handles an analogue value and displays it graphically. The hardware input will be scaled to his physical value. The limit areas can be parameterized by 4 values. If the value reaches the limit areas a warning or an alarm will appear.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2083 DCPLib_SetStreamWord
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 40
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-41
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
mode int Sets the scaling of the input valuePer or the using of the alternate input valueAlt. 0: alternate value (valueAlt) 1: peripherie value unipolar 2: peripherie value bipolar 3: factor 0.1 4: factor 0.01 5: factor 1 6: factor 10 7: factor 100
valuePer int mode > 0: analog value of the peripheral input
rangeBegin real mode > 0: Start value for scaling of the input value
rangeEnd real mode > 0: End value for scaling of the input value
limitAH real limit for high alarm
limitWH real limit for high warning
limitWL real limit for low warning
limitAL real limit for low alarm
timeout time value of the time hysteresis: limit errors and limit warnings are reset earliest after the expiry of the time
hysteresis real value of the absolut hysteresis: limit errors and limit warnings are reset earliest after leaving the limit areas +/- the hysteresis
valueAlt real mode = 0: this value is used unscaled
Output parameters
Table 2-42
Parameter Data type Description
qAH bool alarm high
qWH bool warning high
qWL bool warning low
qAL bool alarm low
qErrorHigh bool measurement error: Exceedance
qErrorLow bool measurement error: below / wire break
qValue real mode = 0: valueAlt mode > 0: scaled value
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 41
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Status and error displays
Table 2-43
Status Meaning
16#0101 ERROR HIGH
16#0102 ERROR LOW
16#0201 ALARM HIGH
16#0202 WARNING HIGH
16#0203 WARNING LOW
16#0204 ALARM LOW
Table 2-44: warnings / errors “HMI_status”
Bit type Description
0 alarm limit max2 exceeded
1 warning limit max1 exceeded
2 alarm limit min1 exceeded
3 warning limit min2 exceeded
4 alarm measurement error (high)
5 alarm measurement error (low)
Table 2-45: External tags for HMI communication
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPMtr string[150] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[200] stream for PLC parameters
Table 2-46: Internal tags for HMI communication
Name Datatype Description
HMI_cmd word Interface
HMI_LicDCPMtr string[150] stream consists: Version / identName / comment / opStation / overwrite
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_msg_status dword status messages
HMI_param_values_edit
string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[200] stream for PLC parameters
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 42
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
The faceplate graphically displays the processed value and parameters like output format, the unit, range areas, warning and alarm areas can be set.
Status View
Figure 21: Control AnaRead
If an measurement error appears and it is not acknowledged a red dot with a red frame is displayed. If the error is acknowledged only the red dot is displayed.
Representation Descrition
Yellow, if a warning is upcomming
Red, if an alarm is upcoming
Representation Descrition
no low alarm pending but not acknowledged; red frame is flashing
alarm pending and not acknowledged
alarm pending but acknowledged
warning pending and acknowledged
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 43
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter View
Figure 22: Parameter View, page 1
Figure 23: Parameter View, page 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Mode The mode can manually set by the faceplate:
alternate value
peripherie value unipolar
peripherie value bipolar
factor 0.1
factor 0.01
factor 1
factor 10
factor 100 Alternate value An alternate value can be set which is displayed at the main view.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 44
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 24: Parameter View, page 3
Figure 25: Parameter View, page 4
The first value of each parameter displays the value which is set by the PLC. By using the slider the parameters alternatively can be set by faceplate.
The warning and alarm areas can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 45
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 26: Parameter View, page 5
PLC Log On this page the commands of the plc log will be displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 46
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.7 FB 2010 LibDCP_AnaAvg
Figure
Abbildung 2-3: LibDCP_AnaAvg
Principle of operation
The function calculates the average from up to three input values. An accepted deviation can be set and an error message will be given if an input undercuts the acceptable deviation.
A plausibility check is performed only with the used values.
Parameter for the fault correction (masking if the value is not plausible)
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-47
Parameter Data type Description
identName string[30] name of instance
mode int 0 – off 1 – value1 2 – value1 and value2 3 – value1, value2 and value3
time Time cycle of calculation
indVal1 dint Value1
indVal2 dint Value2
indVal3 dint Value3
devValue real permissible deviation in percent
reset bool reset
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 47
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-48
Parameter Data type Description
midValAct real Avarage of the three input values
midValArch real Archived Avarage of the three input values
midValArch 1 bool Archived Avarage of indVal1
midValArch 2 bool Archived Avarage of indVal2
midValArch 3 bool Archived Avarage of indVal3
status word Bit 0…2 – plausibility report of inputs value1…value3
intError word internal error
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Status and error displays
Table 2-49
Status Meaning
16#0100 error writing parameter string “LibDCPAnaAvg”
16#0200 error writing parameter string “plcHMI”
Table 2-50: warnings / errors “HMI_status”
Bit type Description
0 alarm plausibility value 1
1 alarm plausibility value 2
2 alarm plausibility value 3
Table 2-51
Parameter Data type Description
HMI_LicDCPAnaAvg
string[190] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[100] stream for PLC parameters
HMI_midValAct real actual Avarage
HMI_midValArch real archived Avarage
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 48
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
The faceplate graphically displays the calculated average and parameters like output format, the unit, range areas, warning and alarm areas can be set.
Status view
Figure 27: Control AnaAvg
Average Values Actual: Actual average value of the parameterized inputs. (1 to 3 values) Historical: Average value of all stored values (up to 96 values) Individually Actual and historical average value of each single channel
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 49
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 28: Parameter view page 2
Figure 29: Parameter view page 2
Mode Displays the current mode configured in the PLC. Additional a mode can set manually.
- off - 1 values - 2 values
- 3 values Time Cycle for calculating average value Deviation Allowed deviation Reset Deletes all stored values
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set Output format An output format can be parameterized Range Range can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 50
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.8 FB 2032 LibDCP_CntrP (pulses)
Figure
Figure 30: LibDCP_CntrP
Principle of operation
That function can be used as a counter for counting up and down. For example it can be used in a fast OB for counting pulses. For connection to the HMI the LibDCP_Cntr block can be called.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
Input parameters
Table 2-52
Parameter Data type Description
indInc bool count up
indDec bool count down
factor real value of the impulse
enInput bool enable calculation value
cmdInit bool reset of internal residual value
cmdReset bool external reset command
In/Out parameters
Table 2-53
Parameter Data type Description
dataHMI variant If block should be connected with HMI a connection to the LibDCP_Cntr must be realized.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 51
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-54
Parameter Data type Description
counterVal dint counter
intError word internal error
Status and error displays
Table 2-55
Status Meaning
16#0004 error reading dataHMI
16#0005 error writing dataHMI
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 52
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.9 FB 2033 LibDCP_CntrA (integrator)
Figure
Figure 31: LibDCP_CntrA
Principle of operation
That function can be used as a counter for integration of an analogue value. Additional it can be used for counting up- and down (negative analogue values).
For connection to the HMI the LibDCP_Cntr block can be called.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
Input parameters
Table 2-56
Parameter Data type Description
indAnalogue real analogue value for integration
factor real factor for calculating the count value difference
time real time interval of the difference calculation e.g. for a m³ counter out of an analogue value like m³/h: factor = 0.0001, time = 3600 ms
enInput bool enable calculation value
cmdInit bool reset of internal residual value
cmdReset bool external reset command
In/Out parameters
Table 2-57
Parameter Data type Description
dataHMI variant If block should be connected with HMI a connection to the LibDCP_Cntr must be realized.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 53
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-58
Parameter Data type Description
counterVal dint counter
intError word internal error
Status and error displays
Table 2-59
Status Meaning
16#0001 error reading system time
16#0004 error reading dataHMI
16#0005 error writing dataHMI
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 54
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.10 FB 2034 LibDCP_CntrD (differentiator)
Figure
Figure 32: LibDCP_CntrD
Principle of operation
That function creates a count value by subtraction of an input counter value. Forward- and backward counting (decreasing input value) is possible.
For connection to the HMI the LibDCP_Cntr block can be called.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
Input parameters
Table 2-60
Parameter Data type Description
indCounter dint input count value from which the output count value is to be derived
factor real factor for calculating the count difference
limit dint If a value > 0 is parameterized a negative difference is interpreted as overflow from indCounter. In this case the calculation of the new output value takes the limit as the max value of the input counter.
enInput bool enable calculation value
cmdInit bool reset of internal residual value
cmdReset bool external reset command
In/Out parameters
Table 2-61
Parameter Data type Description
dataHMI variant If block should be connected with HMI a connection to the LibDCP_Cntr must be realized.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 55
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-62
Parameter Data type Description
counterVal dint counter
intError word internal error
Status and error displays
Table 2-63
Status Meaning
16#0004 error reading dataHMI
16#0005 error writing dataHMI
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 56
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.11 FB 2014 LibDCP_HMI_Cntr
Figure
Abbildung 2-4: LibDCP_Cntr
Principle of operation
This function allows it to display and parameterize a block of type LibDCP_CntrP, LibDCP_CntrA or LibDCP_CntrD. The parameter dataHMI must be connected to the instance variable preData of LibDCP_Cntr.
The function detects automatically which kind of counter is connected and creates the corresponding views and editing possibilities.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-64
Parameter Data type Description
indentName string[30] Unique name of the instance and displayed in the HMI as technical short description.
reset bool external reset command (sends a reset command to the preconnected counter)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 57
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-65
Parameter Data type Description
counterVal dint counter value of the pre connected counter
enInput bool enable calculation value
correction byte recognition for last correction: Bit 0 – initialization Bit 1 – reset Bit 2 – correction counter Bit 3 – correction residual value
lastCounter dint counter value bevor correction
lastRest real residual value bevor correction
intError word internal error
Static parameters
Table 2-66
Parameter Data type Description
preData UDT LibDCP_Data_Cntr data of pre connected counter
Status and error displays
Table 2-67
Status Meaning
16#0001 CntrA: Error reading system time
16#0002 Error writing parameter string “LibDCPCntr”
16#0003 Error writing parameter string “plcHMI”
16#0004 error reading dataHMI
16#0005 error writing dataHMI
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-68: External tags for HMI communication
Parameter Data type Description
HMI_LicDCPCntr string[170] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] stream for changes of HMI parameters
HMI_param_values_plcHMI
string[70] stream for PLC parameters
HMI_counter dint counter value
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 58
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
For displaying a counter value a faceplate can be used.
Status view
Figure 33: LibDCP_Cntr
Counter value View depends on the pre connected counter:
- Impulse counter - Integrating counter - Difference counter
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 59
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 34: Parameter view page 1
Figure 35: Parameter view page 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Enable Counter Can be enabled (checked) or disabled (unchecked) by PLC or HMI Last correction Information about the last correction Previous values Information about the values bevor last correction Initialize Internal values will be reset Reset Counter will be reset
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 60
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 36: Parameter view Impulse Counter page 3
Figure 37: Parameter view Integrating Counter page 3
Parameterization of the counter View for an Impulse Counter
Parameterization of the counter View for an Integrating Counter
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 61
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 38: Parameter view Difference Counter page 3
Parameterization of the counter View for an Difference Counter
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 62
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.12 FB 2015 LibDCP_SetCrv
Figure
Figure 39: LibDCP_SetCrv
Principle of operation
A curve can be defined by setting coordinate pairs. At the output the matching value corresponding to the input value will be displayed. Via faceplate the values can be set.
Input parameters
Table 2-69
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
cmd word Command: Bit 0 – deactivate Bit 1 – Activate with a percentage time setpoint Bit 2 – Start after absolute time (parameter startTime) Bit 3 – Interpolation Bit 8 … 15 – percentage time value for activation (0…100%)
startTime Time_of_Day start time (Bit 2 = true)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 63
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter Data type Description
valueDefault real default value; displayed if setpoint curve is inactive
value1 … value8 real
time1 … time 8 time
In/Out parameters
Table 2-70
Parameter Data type Description
dataHMI variant If the block should be connected to the HMI a connection to the block LibDCP_HMI_Select must parametrized.
Output parameters
Table 2-71
Parameter Data type Description
status word status word: Bit 0: active Bit 1: last time value reached Bit 2: waiting for starttime active Bit 3: interpolation active Bit 8 … 15: Percentage time value
value real current value
intErrot word
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 64
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.13 FB 2115 LibDCP_HMI_SetCrv
Figure
Figure 40: LibDCP_HMI_SetCrv
Principle of operation
This function allows it to display and parameterize a block of type SetCrv. The parameter dataHMI must be connected to the instance variable dataHMI of LibDCP_Cntr.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Output parameters
Table 2-72
Parameter Data type Description
indentName string[30] Unique name of the instance and displayed in the HMI as technical short description.
intError word internal error
Static parameters
Table 2-73
Parameter Data type Description
dataHmi UDT LibDCP_UDT_SetCrv
Data connection to LibDCP_SetCrv
Status and error displays
Table 2-74
Status Meaning
16#0100 error writing parameter string “LibDCPSetCrv”
16#0200 error writing parameter string “plc”
16#0300 error writing parameter string “hmi”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 65
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-75: External tags for HMI communication
Parameter Data type Description
HMI_LicDCPSetCrv string[170] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] stream for changes of HMI parameters
HMI_param_values_plc
string[200] stream for PLC parameters
HMI_param_values_hmi
string[170] stream for hmi parameters
HMI_status word status LibDCP_SetCrv
HMI_timeRemain dint Current remaining time
HMI_value real Current output value
Faceplate
For displaying a curve created by using the SetCurve block a faceplate can be used. Additional parameters like the starting time, activation or deactivation of starting time or interpolation can be set.
Status view
Figure 41: LibDCP_SetCrv
Representation status
parametrized time and remaining time
manual switching ON or OFF Relative time will be displayed and the actual output value
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 66
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter View
Figure 42: Parameter view page 1
Figure 43: Parameter view page 2
Commant A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output formate The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Default value A default value can be set by PLC or HMI Start by absolute time Start time can be set by PLC or manually by HMI Interpolate Interpolation can be activated by PLC or manually by HMI
Allow switch by operator Operator can switch ON or OFF the timer
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 67
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 44: Parameter view page 3 - 6
Eight points can be set by PLC or manually by HMI.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 68
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.14 FB 2012 LibDCP_CtrlPID
Figure
Figure 45: LibDCP_CtrlPID
Principle of operation
It’s a continuously adjustable PID controller. The important control parameters are adjustable via HMI. The controller can be used in manual and automatic mode.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 69
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-76
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
input real Tag of the user program is used as the source of the process value.
setpoint real Setpoint of the PID controller in automatic mode
disturbance real Disturbance tag or precontrol value
manualValue real This value is used as the output value in manual mode.
KP real KP value
TN real TN value
TV real TV value
modeAut bool automatic mode
cmdAck bool acknowledge command
cmdReset bool reset command
Output parameters
Table 2-77
Parameter Data type Description
output real Output value
outpurPWM bool Pulse-width-modulated output value
setpointLimit_H bool If SetpointLimit_H = TRUE, the absolute setpoint high limit is reached
setpointLimit_L bool If SetpointLimit_L = TRUE, the absolute setpoint low limit has been reached
state int staue parameter: State = 0: Inactive State = 1: Pretuning State = 2: Fine tuning State = 3: Automatic mode State = 4: Manual mode State = 5: Substitute output value with error monitoring
error bool error if true
errorBits dword error Bits
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 70
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-78: Values for internal log
Value HMI Description
16#0101 ERR TRIP Emergency OFF
16#0102 ERR EXTERN
external error
16#0103 ERR TIMEOUT
time monitoring fault
16#0104 ERR PLAUS plausibility error
16#0201 CMD RESET command reset
16#0202 CMD AUT switch to automatic mode
16#0203 CMD MAN switch to manual mode
16#0204 CMD LOC ON local ON
16#0205 CMD LOC OFF
local OFF
16#0206 CMD MAN ON
manual ON
16#0207 CMD MAN OFF
manual OFF
16#0208 AUT ON remote ON
16#0209 AUT OFF remote OFF
16#020A MAN ON manual mode ON
16#020B MAN OFF manual mode OFF
16#020C RELEASE ON unlocked
16#020D RELEASE OFF
locked
Table 2-79: External tags for HMI communication
Value HMI Description
HMI_LibDCPMtr string[150] stream consists: Version / identName / comment / opStation / overwrite
HMI_cmd word Interface
HMI_msg_status dword status messages
HMI_msg_errWrn word Messages: alerts/warnings (e.g. maintenance)
HMI_param_values_plcHMI
string[200] stream for changes of HMI parameters
HMI_param_values_edit
string[100] stream for PLC parameters
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 71
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
To adjust and display a PID Controller a faceplate can be used.
Status View
Figure 46: Controle PID
Figure 47: Fault table
Actual actual value Setpoint setpoint value Manual Value which is set for manual mode. Output Output Value for the controlled system.
Manual Mode
A manual output value can be set. The switchover from manual mode to automatic mode is bumbles. Manual mode is also possible when an error is pending.
Automatic Mode
In automatic mode, PID corrects the controlled system in accordance with the parameters specified.
Fault table Fault table can be used for finding faults.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 72
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter View
Figure 48: Parameter View, page 1
Figure 49: Parameter View, page 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Mode operations PID is controlled by PLC or faceplate Initial Optimization The pretuning determines the process to the jump change of the output value and searches for the point of inflection. The PID parameters are calculated from the maximum rate of rise and dead time of the controlled system. The best PID parameters will be obtained when the pretuning will be performed. Re-Optimization Fine tuning generates a constant, limited oscillation of the process value. The PID parameters are recalculated based on the amplitude and frequency of this oscillation. PID parameters from fine tuning usually have Reset Control The PID controller can be reset to his initialized values.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 73
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 50: Parameter View, page 3
Figure 51: Parameter View, page 4
The displayed values manually can be set directly in the faceplate. By setting the value and using the slide the values will be overwritten in the PLC. Input value actual value Setpoint value setpoint value Disturbance A disturbance / precontrol value can be set. Manual Value A manual value can be set.
Range Begin Low limit of the process value can be set. Range End High limit of the process value can be set. Tuning level Acceptable fluctuation during optimization.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 74
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 52: Parameter View, page 5
Figure 53: Parameter View, page 5
The PID parameters gain, TI and TD can be set and uploaded into the controller from PLC or faceplate. gain Proportional gain TI Integral action time [s] TD derivative action time [s] Upload PLC parameters to control Upload HMI parameters to control Download actual values to HMI
1
2 3 3
2
1
PLC Log On this page the commands of the plc log will be displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 75
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.15 FB 2013 LibDCP_CtrlStp
Figure
Figure 54: LibDCP_CtrlStp
Principle of operation
This function realizes a step-by-step three point controller for valves or flaps. Using of a position feedback is optional.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 76
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-80
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
input real Tag of the user program is used as the source of the process value.
setpoint real Setpoint of the PID controller in automatic mode
disturbance real Disturbance tag or precontrol value
manualValue real In manual mode, the absolute position of the valve is specified. ManualValue is only evaluated if you are using Output_PER, or if position feedback is available.
KP real KP value
TN real TN value
TV real TV value
feedback real Feedback of the controlled equipment Only activ if feedbackOn = TRUE.
feedbackOn bool FALSE: feedback disabled TRUE: feedback activated
actuatorH bool Digital position feedback of the valve for the high endstop. If actuator_H = TRUE, the valve is at the high endstop and is no longer moved towards this direction.
actuatorL bool Digital position feedback of the valve for the low endstop. If actuator_L = TRUE, the valve is at the low endstop and is no longer moved towards this direction.
modeAut bool FALSE: Controller is in manual mode TRUE: Controller is in automatic mode
cmdAck bool ErrorBits and Warnings are reset.
cmdReset bool Restarts the controller. As long as Reset = TRUE, PID_3Step remains in “Inactive” mode.
cmdManUp bool Manually open the valve.
cmdManDown bool Manually close the valve.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 77
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-81
Parameter Data type Description
outputUp bool Open the valve
outputDown bool Close the valve
setpointLimit_H bool High endstop is reached
setpointLimit_L bool Low endstop is reached
state int Actual mode: 0 – inactiv 1 – Pretuning 2 – Fine tuning 3 – Automatic mode 4 – Manual mode
error bool error if true
errorBits dword error Bits
intError word internal error
Status and error displays
Table 2-82: Error codes of the controller “errorBits”
Status Meaning
0x00000000 There is no error
0x00000001 The input parameter is outside the process value limits.
0x00000002 Invalid value at „Input_PER” parameter. Check whether an error is pending at the analog input.
0x00000004 Error during fine tuning.
0x00000010 The setpoint was changed during tuning.
0x00000020 Pretuning is not permitted during fine tuning.
0x00000080 Error during pretuning. Incorrect configuration of output value limits.
0x00000100 Error during fine tuning resulted in invalid parameters.
0x00000200 Invalid value at input parameter. Value has an invalid number format.
0x00000400 Calculation of ouptut value failed. Check the PID parameters.
0x00000800 Sampling time error. PID_3Step is not called within the sampling time of the cyclic interrupt OB.
0x00001000 Invalid value at setpoint parameter. Value has an invalid number format.
0x00002000 Invalid value at Feedback_PER parameter. Value has an invalid number format.
0x00004000 Invalid value at feedback parameter. Value has an invalid number parameter.
0x00008000 Error during digital position feedback. Actuator_H = TRUE and Actuator_L = TRUE
0x00010000 Invalid Value at ManuakValue parameter. Value has an invalid number format.
0x00040000 Invalid value at Disturbance parameter. Value has an invalid number format.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 78
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-83: “intError”
Status Meaning
0x0001 Error writing parameter strings „plc“
0x0002 Error writing parameter strings „config“
0x0004 Error writing parameter strings „hmi“
0x0008 Error writing parameter strings „LibDCPCtrlStp“
Table 2-84: LogData
PLC HMI Description
0x0101 ERR INP 1 (0001) The input parameter is outside the process value limits.
0x0102 ERR INP 2 (0002) Invalid value at „Input_PER” parameter.
0x0103 ERR OPTR 1 (0003) Error during fine tuning.
0x0104 ERR OPTI 1 (0008) Error during pretuning. Actual value is too close to the setpoint.
0x0105 ERR OPT SP (0010) The setpoint was changed during tuning.
0x0106 ERR OPTI 2 (0020) Pretuning is not allowed during finetuning.
0x0107 ERR OPTI 3 (0080) Error during pretuning. Incorrect configuration of output value limits.
0x0108 ERR OPTR 2 (0100) Error during fine tuning resulted in invalid parameters.
0x0109 ERR INP 3 (0200) Invalid value at input parameter. Value has an invalid number format.
0x010A ERR OUTPUT (0400) Calculation of ouptut value failed. Check the PID parameters.
0x010B ERR CYCLE (0800) Sampling time error
0x010C ERR SETP (1000) Invalid value at setpoint parameter
0x010D ERR MANVAL (10000) Invalid value at Manual Value parameter
0x010E ERR SUBST (20000) Invalid value at SavePosition parameter
0x010F ERR DISTURB (40000) Invalid value at Disturbance parameter
0x0201 CMD OFF Controller OFF
0x0202 CMD OPT INI Controller pretuning
0x0203 CMD OPT RE Controller finetuning
0x0204 CMD AUT Controller automatic mode
0x0205 CMD MAN Controller manual mode
0x0206 MODE OFF mode: OFF
0x0207 MODE OPTI mode: pretuning
0x0208 MODE OPTR mode: finetuning
0x0209 MODE AUT mode: automatic
0x020A MODE MAN mode: manual mode
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 79
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-85: HMI external variables
Variable data type Description
HMI_LibDCPCtrlStp String[200] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit String[100] parameter edit string
HMI_param_values_plc String[80] parameter string
HMI_param_values_hmi String[80] parameter string
HMI_param_values_config String[50] parameter string
HMI_status Word modes: 0 – inactive 1 – Pretuning 2 – Finetuning 3 – Automatic mode 4 – Manual mode
HMI_cmd Word Command
HMI_msg DWord Error bits
HMI_value_feedback Real valve position feedback
HMI_value_input Real Actual value
HMI_value_setpoint Real Setpoint
HMI_intError Word internel errors
instFBLog15_dataHMI String[210] log data (optional)
Faceplate
For controlling a valve or a flap controlled by a 3-Step-Controller a faceplate can be used. It displays the status and faults of the controller. Additional parameters can be set.
Status View
Figure 55: Control CtrlStep
Actual actual value Setpoint setpoint value Manual Value which is set for manual mode. Feedback Output Value for the controlled system.
Manual Mode
A manual output value can be set. The switchover from manual mode to automatic mode is bumbles. Manual mode is also possible when an error is pending.
Automatic Mode
In automatic mode, PID corrects the controlled system in accordance with the parameters specified.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 80
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 56: Parameter View, page 1
Figure 57: Parameter view, page 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Mode operations PID is controlled by PLC or faceplate Initial Optimization The pretuning determines the process to the jump change of the output value and searches for the point of inflection. The PID parameters are calculated from the maximum rate of rise and dead time of the controlled system. The best PID parameters will be obtained when the pretuning will be performed. Re-Optimization Fine tuning generates a constant, limited oscillation of the process value. The PID parameters are recalculated based on the amplitude and frequency of this oscillation. PID parameters from fine tuning usually have Reset Control The PID controller can be reset to his initialized values.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 81
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 58: Parameter view, page 3
Figure 59: Parameter view, page 4
Range Begin Low limit of the process value can be set. Range End High limit of the process value can be set. Tuning level Acceptable fluctuation during optimization.
The displayed values manually can be set directly in the faceplate. By setting the value and using the slide the values will be overwritten in the PLC. Input value actual value Setpoint value setpoint value Disturbance A disturbance / precontrol value can be set. Manual Value A manual value can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 82
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 60: Parameter view, page 5
The PID parameters gain, TI and TD can be set and uploaded into the controller from PLC or faceplate. gain Proportional gain TI Integral action time [s] TD derivative action time [s]
Upload PLC parameters to control
Upload HMI parameters to control
Download actual values to HMI
1
2
3
1
2 3
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 83
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 61: Parameter view, page 6
PLC Log On this page the commands of the plc log will be displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 84
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.16 FB 2021 LibDCP_ClctVal
Figure
Figure 62: LibDCP_ClctVal
Principle of operation
This function block creates a collective message for the HMI. By using the input prevClctVal it is possible to create collective messages. If there is an appropriate interconnection to the HMI (AlarmLogging) the status of the acknowledgement can be displayed.
Input parameters
Table 2-86
Parameter Data type Description
collectBitPos uInt position of the alarm bit in the collective message (0…15)
message bool actual alarm status
ack bool Acknowledge command (rising edge)
statusHMI variant By using a dword or word it will be used as the WinCC Alarmlogging and the acknowledge state will be derived. Instead the internal acknowledge state is used.
HMIBitPos uint Using parameter statusHMI and/or ackHMIthe actual position of the bit is indicated
prevClctVal dword Additional to the sequential abstract of more collective messages the previouse collective message can be added. The output collectValue is the result of the connection of the actual collective message with prevClctVal.
In/Out parameters
Table 2-87
Parameter Data type Description
ackHMI variant position of the alarm bit in the collective message (0…15)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 85
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-88
Parameter Data type Description
collectValue dword collective message
intError word internal error
Status and error displays
Table 2-89
Status Meaning
16#0001 Illegal bit position for statusHMI in HMIBitPos
16#0002 Illegal bit position for ackHMI in HMIBitPos
16#0003 Illegal bit position for collectValue in collectBitPos
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 86
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.17 FB 2031 LibDCP_Msg8
Figure
Figure 63: LibDCP_Msg8
Principle of operation
This function block creates a message, based on an 8 digit binary code. It creates massages based on an 8 digit binary code.
Parameter for negation for every input
Time parameter for every input with two possible processing steps
o Time will extend the signal
o Time will delay the signal
Output of the extended/delayed signal for additional processing
Messages on the HMI
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 87
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-90
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
cmdReset bool reset of stored messages
in1 bool message 1
in2 bool message 2
in3 bool message 3
in4 bool message 4
in5 bool message 5
in6 bool message 6
in7 bool message 7
in8 bool message 8
name1 string[28] message 1 for visualization in faceplate
name2 string[28] message 2 for visualization in faceplate
name3 string[28] message 3 for visualization in faceplate
name4 string[28] message 4 for visualization in faceplate
name5 string[28] message 5 for visualization in faceplate
name6 string[28] message 6 for visualization in faceplate
name7 string[28] message 7 for visualization in faceplate
name8 string[28] message 8 for visualization in faceplate
Output parameters
Table 2-91
Parameter Data type Description
collectSave bool Collective message of the stored messages
cmdReset bool Collective message of the upcoming messages
intError Word internal Error
Status and error displays
Table 2-92
Status Meaning
16#0100 error writing parameter string “LibDCPMsg8”
16#0200 error writing parameter string “plcHMI”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 88
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-93: Status “HMI_msg_status”
Bit Description
0 stored message 1
1 stored message 2
2 stored message 3
3 stored message 4
4 stored message 5
5 stored message 6
6 stored message 7
7 stored message 8
8 actual message 1
9 actual message 2
10 actual message 3
11 actual message 4
12 actual message 5
13 actual message 6
14 actual message 7
15 actual message 8
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-94: External tags for HMI communication
Parameter Data type Description
HMI_LibDCPMsg8 string[150] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_plcHMI
string[250] stream for changes of HMI parameters
HMI_param_values_edit
string[100] stream for PLC parameters
HMI_values word bit 0…8 – stored messages bit 9…15 – actual messages
Table 2-95: Internal tags HMI tags
Parameter Data type Description
MsgAck byte Acknowledge (optional)
MsgStatus dword Message status (optional)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 89
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
The faceplate shows upcoming messages. Via the faceplate the messages can be reset or acknowledged.
status view
Figure 64: Msg8 e.g. Mtr block
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 90
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 65: Parameter view page 1
Figure 66: Parameter view page 2
Text Messages The messages can be activated and simulated.
Comment A comment can be set and is displayed under the name of the faceplate. Message Types The message types can be set as shown yellow or red
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 91
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.18 FB 2020 LibDCP_Aggr8
Figure
Figure 67: LibDCP_Aggr8
Principle of operation
This function block supports a switchover or switch on/off for up to 8 aggregates, depending on the parameters. There is a priority parameter for every aggregate (1 to 8); in addition there is an approval input for every aggregate. The priorities can be managed automatically (circulation procedure). There is an input option to change the priorities; this input can be forced by time, for example.
In the switchover mode each aggregate with a defined priority will be switched on (all the other will be switched off). In the connection mode there will be a switch on scenario by priority and defined number of aggregates.
The following modes are possible:
- Staggered switching
o switching ON: Released aggregate with highest priority
o switching OFF: Running aggregate with lowest priority
Priority driven mode is activated if different priorities are set.
- Switching by operating hours (parSwitchbyTime = true)
o switching ON: Released aggregate with lowest operating hours
o switching OFF: Running aggregate with highest operating hours
- Switching by Cycle time (parSwitchbyTime = true)
o switching ON: Released aggregate with lowest last cycle time
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 92
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
o switching OFF: Running aggregate with highest cycle time
- Switching after reaching a time limit (limitSecs = 0)
o Switching OFF: After reaching the time limit.
About the input request is set how much aggregates must run (0…8). If possible with a rising edge on switchCmd one aggregate will be switched over. The feedbacks and the controlling by the block will be compared. If they are not equal to the parameterized delayTime the will be locked. With input restTime a sleeptime
can be set. Aggregates can’t be switched on until the time has elapsed.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-96
Parameter Data type Description
identName String[30] Unique name of the instance and displayed in the HMI as technical short description.
switchCmd Bool Löst bei steigender Flanke eine Umschaltung aus.
parSwitchByTimes Bool false – Switching ON and OFF depends on the runtime of the last/actual cycle. true – Switching ON and OFF depends on the total runtime
request UInt Number of the requested aggregates (0…8)
indAggr1 … indAggr8
Byte For definition of the actual state and priority Bit 0 – Aggregate is ready Bit 1 – Aggregate is ON Bit 4…7 – Priority (0…8)
delayTime Time monitoring time
limitSecs DInt Time limit for automatic switching [s]
restTime Time sleep time after switching OFF
reset Bool Reset of the faults and sleep times
Output parameters
Table 2-97
Parameter Data type Description
on Byte Switching on aggregate 1…8 (Bit 0…7)
errNoSwitch Bool TRUE: no switching possible
errAggr Byte error bits aggregate 1..8 (Bit 0…7)
switchEnable Bool TRUE: switching allowed
switchActive Bool TRUE: Switching on/over active
intError Word internal error
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 93
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Status and error displays
Table 2-98
Status Meaning
0x0001 Error reading system time
0x0002 Error writing parameter string „LibDCPAggr8“
0x0004 Error writing parameter string „plc“
Table 2-99: Status “HMI_msg”
Bit type Description
0 alarm time monitoring aggregate 1
1 alarm time monitoring aggregate 2
2 alarm time monitoring aggregate 3
3 alarm time monitoring aggregate 4
4 alarm time monitoring aggregate 5
5 alarm time monitoring aggregate 6
6 alarm time monitoring aggregate 7
7 alarm time monitoring aggregate 8
8 warning no switching possible
9 status switching active
10 status switching possible
Table 2-100: Status “HMI_status”
Bit type Description
0 status control aggregate 1
1 status control aggregate 2
2 status control aggregate 3
3 status control aggregate 4
4 status control aggregate 5
5 status control aggregate 6
6 status control aggregate 7
7 status control aggregate 8
8 status aggregate 1 ready
9 status aggregate 2 ready
10 status aggregate 3 ready
11 status aggregate 4 ready
12 status aggregate 5 ready
13 status aggregate 6 ready
14 status aggregate 7 ready
15 status aggregate 8 ready
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 94
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-101: External tags for HMI communication
Parameter Data type Description
HMI_LibDCPAggr8 String[230] Parameter-String
HMI_param_values_edit
String[100] Parameter-Editier-String
HMI_param_values_plc
String[250] Parameter-String
HMI_msg Word Messages: Bit 0…7 – Error aggregat 1 … 8 Bit 8 – warning: no switching possible Bit 9 – Switching active Bit 10 – Switching allowed
HMI_request UInt Number of requested aggregates
HMI_status Word Status word: Bit 0…7 – aggregat 1 … 8 OFF (FALSE)/ON (TRUE) Bit 8…15 – Aggregat 1 … 8 ready (TRUE)
Faceplate
Figure 68: Controle Aggr8 page 1
Number of requested aggregates Number of requested aggregates are displayed Overview of the connected aggregates Ready – Aggregate is ready Error – an error is displayed ON – Aggregate is ON
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 95
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 69: Controle Aggr8 page 1
Parameter view
Figure 70: Parameter view page 1
Number of requested aggregates Set by PLC or HMI Switch controle It can be set if the switch control is set by PLC or HMI. If it is by HMI one aggregate can be switched. Additional it can be set if it is switched by time. Operating Times Operating times of each aggregate are displayed Next aggregate to switch Next aggregate to switch is displayed
Comment A comment can be set and is displayed under the name of the faceplate. Delay Time Rest Time Time aggregate must be rest Limit Time Time for automatically switching
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 96
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 71: Parameter view page 2
Figure 72: Parameter view page 3
Priorites Priority for each aggregate can be set.
Operating times Operating times of each aggregate can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 97
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.19 FB 2018 LibDCP_OpAna
Figure
Figure 73: LibDCP_OpAna
Principle of operation
That block can be used to trip an analogue set point. The value will be monitored by defined limits. It is only allowed to trip the value between the upper and lower defined limits. Instead of the given value a connected process value can be connected and monitored.
If the value exceeds the parameterized limits warning and alarm messages will be created.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-102
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indValue real input value
limitMin real lower limit
limitMax real higher limit
Output parameters
Table 2-103
Parameter Data type Description
value real output value
intError word internal error
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 98
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Status and error displays
Table 2-104
Status Meaning
16#0100 error writing parameter string “LibDCPOpAna”
16#0200 error writing parameter string “plcHMI”
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-105: External tags for HMI communication
Parameter Data type Description
HMI_LibDCPOpAna string[210] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] stream for PLC parameters
HMI_param_values_plcHMI
string[250] stream for changes of HMI parameters
HMI_value real output value
Faceplate
To trip an analogue set point a faceplate can be used. It displays the set values and an analogue value manually can be set.
Status view
Figure 74: Control OpAna
The actual analogue set point is displayed. Additional a set point can set and switched on.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 99
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 75: Parameter view page 1
Figure 76: Parameter view page 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Caption A captain can be set which is displayed at the main view. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
Input Range A input range can be set by PLC or manually by HMI. Tracking HMI value by overwrite By switching from PLC to HMI the value provided by the PLC will be used. (Shock-free switching)
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 100
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.20 FB 2019 LibDCP_OpDig
Figure
Figure 77: LibDCP_OpDig
Principle of operation
This function can be used to trip a digital set point. It works like a digital flip-flop which is controlled by the faceplate.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-106
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indOn bool input value
Output parameters
Table 2-107
Parameter Data type Description
on real output value
intError word internal error
Status and error displays
Table 2-108
Status Meaning
16#0100 error writing parameter string “LibDCPOpAna”
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 101
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Table 2-109: External tags for HMI communication
Parameter Data type Description
HMI_LibDCPOpDig string[190] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] stream for PLC parameters
HMI_status word status
Faceplate
Figure 78: Controle OpDig
Switched automatically by PLC or manually by HMI
If (1) is switched to HMI digital trigger can be set or reset here.
1
2
1
2
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 102
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 79: Parameter view page 1
Comment A comment can be set which is displayed in the upper area under the name of the instance. Caption A captain can be set which is displayed at the main view. Input type Static: Works like a ON/OFF switch Rising edge Block works like a push button. The Output is null until it is pressed. false -> true Falling edge It works like an opening push button. Default value is true until it is pushed. true -> false
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 103
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.21 FB 2017 LibDCP_TimeSw
Figure
Figure 80: LibDCP_TimeSwW
Principle of operation
There can be defined up to 8 different time points for one week. The parameters for the switching points will be given by the HMI. The reference for the time function is the system clock of the PLC.
Input parameters
Table 2-110
Parameter Data type Description
typeCycle char Type of switching point: “1” … “7” – Sunday … Saturday (weekday) “D” – daily “H” – every hour “M” – every minute
timeOn time_of_day switching point “H” – only minutes and seconds will be considered “M” – minutes and seconds will not be considered
duration time switching period
indexHMI int For displaying block can be connected eight times with LibDCP_HMI_TimeSw. In that case an index (1…8) must be set.
In/Out parameters
Table 2-111
Parameter Data type Description
dataHMI bool If block should be connected with LibDCP_HMI_TimeSw it must be parametrized with input dataHMI.
Output parameters
Table 2-112
Parameter Data type Description
on bool activates the motor
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 104
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter Data type Description
intError word internal error.
Status and error displays
Table 2-113
Status Meaning
16#0001 error reading dataHMI
16#0002 error writing parameter string “dataHMI”
16#0003 error reading local time
16#0004 error at parameterization of type cycle
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 105
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.22 FB 2117 LibDCP_HMI_TimeSw
Figure
Figure 81: LibDCP_HMI_Time_Sw
Principle of operation
This function allows it to display and parameterize a block of type Time_Sw. The parameter dataHMI must be connected to the instance variable dataHMI of LibDCP_TimeSw.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-114
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
Output parameters
Table 2-115
Parameter Data type Description
intError word internal error.
Static parameters
Table 2-116
Parameter Data type Description
dataHMI UDT LibDCP_UDT_TimeSw Data connection to LibDCP_TimeSw
Status and error displays
Table 2-117
Status Meaning
16#0100 error writing parameter string “LibDCPTimeSw”
16#0200 error writing parameter string “plc”
16#0300 error writing parameter string “hmi”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 106
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
For communication between PLC and HMI some hexadecimal values und tags are defined.
Table 2-118: External tags for HMI communication
Parameter Data type Description
HMI_LicDCPTimeSw string[190] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit string[100] stream for changes of HMI parameters
HMI_param_values_plc string[190] stream for PLC parameters
HMI_param_values_hmi string[190] stream for HMI parameters
HMI_status word status word: Bit 0…7 – current switching conditions Bit 8…15 – internal states
Faceplate
For controlling a timer a faceplate can be used. It displays the clock time and additional the parameterized time points.
Figure 82: Control HMI_TimeSw
Scheduler
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 107
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 83: Parameter view page 1
Figure 84: Parameter view page 2 - 5
Comment A comment can be set which is displayed in the upper area under the name of the instance. By Time
- disable overwrite value - enable overwrite value
Overwrite
- set overwrite value to ON - set overwrite value to OFF
------------------------------------------------
Output set by PLC ------------------------------------------------
Output by HMI: OFF ------------------------------------------------
Output by HMI: ON
Time Switch 1 - 8 Every timer can be set manually by faceplate
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 108
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.23 FB 2016 LibDCP_Select
Figure
Figure 85: LibDCP_Select
Principle of operation
The functional block can be used to switch between 2 different values. As input values all data types with the format bit, byte, int, word, dword, real and string are allowed. Both input values must have the same format. If the function detects a not allowed or two different data types the output “outFail” = true.
Different modes can be used seen in the table Table 2-123.
Input parameters
Table 2-119: Modes
Parameter Data type Description
mode string[3] function “SEL”, “MIN” or “MAX”
select bool only mode = “SEL” false: select value0 true: select value1
value0 variant value 1 possible data types: bool, byte, int, dint, word, dword, real and lreal.
value1 variant value 1 possible data types: bool, byte, int, dint, word, dword, real and lreal.
valueSel variant selected value value 1 possible data types: bool, byte, int, dint, word, dword, real and lreal. The datatype of this input declares the datatypes of the inputs value0 and value1
In/Out parameters
Table 2-120
Parameter Data type Description
dataHMI variant If the block should be connected to the HMI a connection to the block LibDCP_HMI_Select must parametrized.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 109
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Output parameters
Table 2-121
Parameter Data type Description
result bool true: value0 is selected false: value1 is selected
intError word internal error
Status and error displays
Table 2-122
Status Meaning
16#0001 wrong datatype at value0
16#0002 wrong datatype at value1
16#0003 wrong datatype at valueSel
16#0004 wrong value for mode
Modes
Table 2-123
Function Mode Description
Selection by switch SEL select == false -> valueSel = value0 select == true -> valueSel = value1
Determination of the smaller value
MIN Smaller value is output
Determination of the greater value
MAX Larger value is output
Monitoring to lower limit
MIN value0 – limit value1 – monitoring value result – true if monitored value was exceeded
Monitoring to higher limit
MAX value0 – limit value1 – monitoring value result – true if monitored value was exceeded
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 110
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.24 FB 2116 LibDCP_HMI_Select
Figure 86: HMI_Select
HMI_Select creates a connection between the block LibDCP_Select and the HMI.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-124
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
Output parameters
Table 2-125
Parameter Data type Description
intError bool internal error
Table 2-126: Errors “IntError”
Value Description
16#0100 error writing parameter string “LibDCPSelect”
16#0200 error writing parameter string “plc”
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 111
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
Table 2-127: External tags for HMI communication
Parameter Data type Description
HMI_LicDCPSelect string[200] stream consists: Version / identName / comment / opStation / overwrite
HMI_param_values_edit
string[100] parameter edit string
HMI_param_values_plc
string[50] parameter string
HMI_value lreal selected value
Faceplate
A faceplate can be used for displaying the values and parameterize the function.
Status view
Figure 87: Controle Select
At the top of the faceplate the mode is displayed. At the lower area it is displayed the unit of the values and which value will be used at the output.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 112
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter view
Figure 88: Parameter view page 1
Result Flag
Enable overwrite value by PLC or HMI
set overwrite value to true/false Selected value Set value automatically by PLC or manually by HMI
1
2 1 2
Comment A comment can be set which is displayed in the upper area under the name of the instance. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 113
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.25 FB 2011 LibDCP_Polygon
Figure
Figure 89: LibDCP_Polygon
Principle of operation
Based on 8 defined coordinate pairs the function creates a linear interpolation for the input value. The supporting points can be defined as input parameters of the function block or they can be overwritten by the HMI.
Figure 90: Explanation of Polygon
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 114
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FB 2099 DCPLib_Log15
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2099 DCPLib_GetEditData
Input parameters
Table 2-128
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
U real Actual input value
U1 real Fulcrum U1 of the curve
U2 real Fulcrum U2 of the curve
U3 real Fulcrum U3 of the curve
U4 real Fulcrum U4 of the curve
U5 real Fulcrum U5 of the curve
U6 real Fulcrum U6 of the curve
U7 real Fulcrum U7 of the curve
U8 real Fulcrum U8 of the curve
V1 real Fulcrum U1 of the curve
V2 real Fulcrum U2 of the curve
V3 real Fulcrum U3 of the curve
V4 real Fulcrum U4 of the curve
V5 real Fulcrum U5 of the curve
V6 real Fulcrum U6 of the curve
V7 real Fulcrum U7 of the curve
V8 real Fulcrum U8 of the curve
Output parameters
Table 2-129
Parameter Data type Description
V real Output value
Communication between PLC and HMI
Table 2-130: Internal HMI tags
Parameter Data type Description
HMI_LicDCPPolygon
string[200] stream consists: Version / identName / comment / opStation / overwrite
HMI_status word status messages
HMI_valueIn real
HMI_valueOut real
HMI_param_plc string[170] stream for PLC parameters
HMI_param_hmi string[170] stream for HMI parameters
HMI_param_edit string[100] stream for edit parameters
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 115
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Faceplate
The faceplate only can be used to display the curve set by the coordinate pairs. Additional the supporting points can be overwritten by the faceplate too. This faceplate does not include a massage view.
Status view
Figure 91: Polygon
The cross in the coordinate system marks the current value. In the area below the accurate values with the unit of measurement are be displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 116
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Parameter View
Figure 92: Polygon Parameter 1
Figure 93: Input / Output Parameter
Commant A comment can be set which is displayed in the upper area under the name of the instance. Input & Output The actual value can be overwritten by using the slide.
Pages 2 and 3 can be used to set the measurement unit and the output format of the values. Unit A unit can be set and is displayed at the control view Output format The output format can be set. The number of digits and decimal places can be set. Additional it can be set if it is a signed or an unsigned value.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 117
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 94: Coordinate Pairs
Page 4 to 7 can be used to overwrite the values of the coordinate pairs. In the first line the values configured by the PLC are displayed. In the second line alternative values can be set and activated by the slider.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 118
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.26 FB 2022 LibDCP_PU1
Figure
Figure 95: LibDCP_PU1
Principle of operation
The PU1 function block can be used for package units like a chiller, which is used in District Cooling Plants. It can be parameterized if the package unit is only controlled by a switching ON/OFF signal or by an analog value. Additional alarm and warning messages can be parametrized. On the second side of the faceplate up to 8 values can be parametrized which are displayed.
NOTE This function needs the following function blocks out of the library and they have to be added to the project.
FC 2081 DCPLib_SetStreamString
FC 2082 DCPLib_SetStreamReal
FC 2084 DCPLib_SetStreamDWord
FC 2099 DCPLib_GetEditData
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 119
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-131
Parameter Data type Description
identName string[30] Unique name of the instance and displayed in the HMI as technical short description.
indValue Real Analog feedback (0 … 100 %)
indOn Bool Digital feedback „ON“
indStatusFlags Byte
Status bits 0 … 7
statusMask Byte
Bit mask to set which status bits should be displayed e.g. 00110101 (1 is displayed)
indMsgFlags Byte alarm and warning bits 0 … 7
msgMask Byte Bit mask so set which message bits should be displayed e.g. 00110101 (1 is displayed)
msgTypes Byte bit mask to set if it’s a warning or an error: FALSE – alarm TRUE - warning
cmdAut Bool external command for automatice mode
cmdAutValue Real analog automatic setpoint
cmdReset Bool external reset command Is it set static true the stored messages are the current reporting
valueExt1 … valueExt8
Variant analoge / boolean values 1 … 8 All parametrized values will be displayed in the faceplate. (Bool, Int, DInt or Real)
Output parameters
Table 2-132
Parameter Data type Description
value Real analog setpoint
on Bool digital command „ON“
collectError Bool group error
collectWarning Bool group warning
modeAut Bool mode: FALSE – manual mode TRUE – automatic mode
intError Word internal error
Status and error displays
Table 2-133
Status Meaning
0x0001 error writing parameter string „LibDCPPU1“
0x0002 error writing parameter string „hmi1“
0x0004 error writing parameter string „hmi2“
0x0008 error writing parameter string „hmi3“
0x0010 error converting external tags
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 120
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Communication between PLC and HMI
Table 2-134: External HMI tags
Parameter Data type Description
HMI_LibDCPPU1 String[220] Parameter string
HMI_param_values_edit String[100] Parameter string
HMI_param_values_hmi1 String[250] Parameter string
HMI_param_values_hmi2 String[190] Parameter string
HMI_param_values_hmi3 String[190] Parameter string
HMI_status Word Bit 0 – Unit OFF (FALSE) Unit ON (TRUE) Bit 1 – manual mode (FALSE) automatic mode (TRUE)
HMI_value Real actual value / feedback (0 … 100 %)
HMI_msg_errWrn Word Bit 0 … 7 – stored alarms / warnings Bit 8 … 15 – actual alarms / warnings
HMI_msg_status Word Bit 0 … 7 – status messages
Table 2-135: Internal HMI tags
Parameter Data type Description
MsgStatus DWord acknowledge
MsgAck word status messages
Faceplate
The faceplate only can be used to display the messages and the system values set by the user.
Status view
Figure 96: PUnit page 1
The package unit can be controlled by this area of the faceplate. The package unit can be set OFF/ON and into automatic mode or a setpoint can be set.
It displays the current state of the package unit. Additional the picture which is displayed in this area can be changed. To change the picture replace the graphic @LibDCP_FP_PU1.png in the GraCS folder of the WinCC Project. …LibDCP_Test1\GraCS\@LibDCP_FP_PU1.png
The parametrized messages and status will be displayed.
Open page 2
1
2
3
4
1 2
3
4
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 121
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 97: PUnit page 2
Parameter View
Figure 98: PUnit Parameter 1
Commant A comment can be set which is displayed in the upper area under the name of the instance. ignore errors If its set errors will not shut down the package unit.
Up to 8 parametrized values, tags and unist will be displayed.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 122
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 99: PUnit Parameter 2
Figure 100: PUnit Parameter 3
The displayed messages for errors / warnings can be set here.
The displayed status messages can be set here.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 123
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 101: Coordinate Pairs 4 to 11
Page 4 to 11 the displayed comment, the unit and the output format of the external values can be set.
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 124
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27 Additional Functions
Additional Functions are used in the main functions of the library. When you are using a function block from the library you have to add the listed functions to the TIA Portal project.
2.27.1 FC 2099 DCPLib_GetEditData
Figure
Figure 102: GetEditData FC
Principle of operation
The Function extracts parameters which are transferred from the HMI to the PLC. The function is used in the following blocks of the library:
Aggr8
AnaAvg
AnaRead
CtrPID
CtrStp
Msg8
Mtr
MtrDS
MtrF
OpAna
OpDig
Polygon
Vlv
VlvA
HMI_Cntr
HMI_Select
HMI_SetCrv
HMI_TimeSw
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 125
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Input parameters
Table 2-136
Parameter Data type Description
editIndex char
editValue string
paramIndex char
In/Out parameters
Table 2-137
Parameter Data type Description
paramValue variant
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 126
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27.2 FC 2084 DCPLib_SetStreamDWord
Figure
Figure 103: FC SetStreamDWord
Principle of operation
The function codes the data stream from the PLC to the HMI. The function is used in the following blocks of the library:
Aggr8
AnaAvg
AnaRead
Mtr
MtrDS
MtrF
OpDig
Vlv
VlvA
HMI_Cntr
HMI_Select
HMI_SetCrv
HMI_TimeSw
Input parameters
Table 2-138
Parameter Data type Description
value variant
In/Out parameters
Table 2-139
Parameter Data type Description
stream string
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 127
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27.3 FC 2082 DCPLib_SetStreamReal
Figure
Figure 104: FC SetStreamReal
Principle of operation
The function codes the data stream from the PLC to the HMI. The function is used in the following blocks of the library:
AnaAvg
AnaRead
CtrlPID
CtrlStp
MtrF
OpAna
Polygon
VlvA
HMI_Cntr
HMI_Select
HMI_SetCrv
Input parameters
Table 2-140
Parameter Data type Description
value variant
In/Out parameters
Table 2-141
Parameter Data type Description
stream string
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 128
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27.4 FC 2081 DCPLib_SetStreamString
Figure
Figure 105: FC SetStreamString
Principle of operation
The function codes the data stream from the PLC to the HMI. The function is used in the following blocks of the library:
Aggr8
AnaAvg
AnaRead
CtrlPID
CtrlStp
Msg8
Mtr
MtrDS
MtrF
OpAna
OpDig
Polygon
Vlv
VlvA
HMI_Cntr
HMI_Select
HMI_SetCrv
HMI_TimeSw
Input parameters
Table 2-142
Parameter Data type Description
value variant
In/Out parameters
Table 2-143
Parameter Data type Description
stream string
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 129
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27.5 FC 2083 DCPLib_SetStreamWord
Figure
Figure 106: FC SetStreamWord
Principle of operation
The function codes the data stream from the PLC to the HMI. The function is used in the following blocks of the library:
Aggr8
AnaAvg
AnaRead
CtrlPID
CtrlStp
Msg8
Mtr
MtrDS
MtrF
OpAna
OpDig
Polygon
Vlv
VlvA
HMI_Cntr
HMI_Select
HMI_SetCrv
HMI_TimeSw
Input parameters
Table 2-144
Parameter Data type Description
value variant
In/Out parameters
Table 2-145
Parameter Data type Description
stream string
2 Explanation of the blocks
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 130
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
2.27.6 FB 2099 DCPLib_Log15
Figure
Figure 107: Log15 FB
Principle of operation
The function writes and reads up to 15 log data. For traceability of events the function is integrated in each block and the time stamps and the identifier are written into a circulating memory. The log data can be evaluated by using the observation function in TIA Portal or directly by the faceplates. To use the faceplate for evaluation the data are sent via string to the HMI.
Input parameters
Table 2-146
Parameter Data type Description
codeWrite word code to log
Communication between PLC and HMI
Table 2-147
Parameter Data type Description
dataHMI string[210]
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 131
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
3 Working with the Library This chapter consists of instructions for integrating the Basic Process Library into your STEP 7 project and instructions for using the library blocks.
There are two possibilities to use the library.
1. Use the delivered example project and creating new objects per copy & paste.
2. Create a new project and copy the objects you need into it.
We recommend using the example project. This chapter will describe step by step how to create a new object by an example.
3.1 Integrating the library into STEP 7 and WinCC
The table below lists the steps for integrating the Basic Process Library into your STEP 7 (TIA Portal) project and the WinCC V7.3 project. Subsequently, you can use the blocks of the Basic Process Library.
Note The following section assumes that a STEP 7 project exists.
3.1.1 Creating new object
Table 3-1
No. Action Note
1.
Start WinCCExplorer and open the delivered project.
2.
The demo project appears.
In this example we want to add an additional motor.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 132
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
No. Action Note
3.
In the WinCC Explorer mark the graphic designer and search for the “Demo1.pdl” entry on the right side of the window and make a double click on it.
Now the graphic designer appears.
4.
Make a right click on the object you want to use and the context menu appears.
5.
Slide it to the position you want.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 133
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
No. Action Note
6.
Open the TIA Portal project.
Drag & Drop the FB you want in you project.
In our example we need the FB2003 LibDCP_MtrF.
7.
The call option appears and asks you if you want to create a single or a multi instance.
8.
Download the project into the PLC.
9.
Set an identName. Use every identName in your project only one time.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 134
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
No. Action Note
10.
Go online and verify that download was successful.
11.
Open the “Tag Management”.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 135
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
No. Action Note
12.
Make a right click on the PLC you are using and go to -> “AS Symbols” -> “Load from file”.
13.
Search for the added motor that you can recognize on the instance name. Check the checkboxes in front of it as seen on the screenshot.
14.
Now go back to the graphics designer, make a right klick on the object you added and verify the “Properties” are selected.
15.
In the area below now you can see the “Properties”. Go to “Status”.
16.
Now you have to set the new variables for each attribute. Make a right click on each variable and choose “Tag…”
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 136
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
No. Action Note
17.
In the new window you can find the variables in the projected PLC.
Select the variable you want.
Repeat that with al Attributes in the window “Object Properties”.
Save and close the window.
18.
Go to the Graphics Designer and open the “Object Properties” of the added object. Go to the Attributes of the duplicated object and change the object name to the same name you set for the name of the instance in step 7. Verify that the prefix of the object name must be the name of the calling instance DB in TIA Portal e.g.:
prefix: Demo_1_1_ (DB of FB_Demo_1)
suffix: LibDCP_MtrF_Manual (Name of the single instance)
19.
Now you can open the faceplate of the added object in the runtime.
3.1.2 Creating Message Logging
General
It must be distinguished between messages with or without acknowledgment. Messages of the class alarms, warnings and maintenance should be acknowledgeable. Status messages don’t need an acknowledgment.
Each message needs a register variable. Messages which are displayed in the faceplates need a state variable. Messages which should be acknowledgeable out of the faceplate additional need an acknowledgment variable.
The register variable must be of type external, that means that it is taken over by the PLC.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 137
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Creating state variable
If the state of the acknowledgment should be displayed at the faceplate a state variable must be set and connected to the alarm logging in WinCC. The state variable must have the double bit width as the acknowledgement variable.
Table 3-2
Type of message variable Type of state variable
byte word
word dword
The name of the state variable corresponds to the name of the instance of the block extended by _MsgStatus.
Figure 108: Acknowledgment variable
Figure 109: State variable
Creating acknowledgement variable
If messages must be acknowledged in the faceplate an acknowledgement variable is necessary. The acknowledgement variable must be connected to the alarm logging in WinCC. The datatype of the acknowledgment variable must be the same datatype like the message variable.
The name of the acknowledgement variable corresponds to the name of the instance of the block extended by _MsgAck.
3 Working with the Library
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 138
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
Figure 110: Register variable
Figure 111: Acknowledgement variable
Parameterizing Alarm Logging
Some blocks have messages thy can be displayed in the faceplate. If they are to be used they must be added to the alarm logging and connected to the variables created in the chapter bevor.
The blocks which have alarms they can be set have a table included in the description chapter. Add that messages displayed in the following table:
4 Notes and Support
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 139
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
4 Notes and Support
What will you find in this section?
This chapter provides further support in handling the described Basic Process Library.
4.1 Version of the blocks
The following table lists the version of each block
Table 4-1
Bibliothek FB 2001
FB 2002
FB 2003
FB 2004
FB 2005
FB 2008
FB 2010
FB 2011
FB 2012
FB 2014
FB 2016
FB 2017
FB 2018
FB 2019
Comment
1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 approved
Table 4-2
FB 2021
FB 2031
FB 2032
FB 2033
FB 2034
FB 2098
FB 2099
FB 2115
FB 2117
FC 2099
FC 2098
Comment
1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 approved
4 Notes and Support
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 140
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
4.2 Version of the faceplate
The following table lists the version of each faceplate
Table 4-3
Bibliothek FB 2001
FB 2002
FB 2003
FB 2004
FB 2005
FB 2008
FB 2010
FB 2011
FB 2012
FB 2014
FB 2016
FB 2017
FB 2018
FB 2019
Comment
1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 approved
Table 4-4
FB 2021
FB 2031
FB 2032
FB 2033
FB 2034
FB 2098
FB 2099
FB 2115
FB 2117
FC 2081
FC 2082
FC 2083
FC 2084
FC 2099
FB 2022
Comment
1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 1.0.0 approved
5 Related Literature
BasicProcessLibrary Entry-ID: 109749508, V1.0, 08/2017 141
S
iem
en
s A
G 2
01
7 A
ll ri
gh
ts r
ese
rve
d
5 Related Literature
Table 5-1
Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of this entry https://support.industry.siemens.com/cs/ww/en/view/109749508
\3\
6 History
Table 6-1
Version Date Modifications
V1.0 06/2017 First version