0% found this document useful (0 votes)
87 views61 pages

Application Example TIA PFL Silo V18 en

The document provides an overview of the SIMATIC Process Function Library (PFL) V3.0 and its application example for a silo project using TIA Portal. It outlines the usage, configuration, and components necessary for implementing the library, as well as legal disclaimers regarding its use and liability. Additionally, it emphasizes the importance of industrial security measures and provides links for further information on product updates and security practices.

Uploaded by

Armand Muteb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views61 pages

Application Example TIA PFL Silo V18 en

The document provides an overview of the SIMATIC Process Function Library (PFL) V3.0 and its application example for a silo project using TIA Portal. It outlines the usage, configuration, and components necessary for implementing the library, as well as legal disclaimers regarding its use and liability. Additionally, it emphasizes the importance of industrial security measures and provides links for further information on product updates and security practices.

Uploaded by

Armand Muteb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Siemens

Industry
Online
Support

APPLICATION EXAMPLE

SIMATIC MTP
Application Example
Silo
SIMATIC Process Function Library (PFL) V3.0
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several components in the form of text,
graphics and/or software modules. The application examples are a free service by Siemens AG and/or a subsidiary of Siemens AG
("Siemens"). They are non-binding and make no claim to completeness or functionality regarding configuration and equipment. The
application examples merely offer help with typical tasks; they do not constitute customer-specific solutions. You yourself are responsible
for the proper and safe operation of the products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the application examples used by technically
trained personnel. Any change to the application examples is your responsibility. Sharing the application examples with third parties or
copying the application examples or excerpts thereof is permitted only in combination with your own products. The application examples
are not required to undergo the customary tests and quality inspections of a chargeable product; they may have functional and
performance defects as well as errors. It is your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without limitation, liability for the usability,
availability, completeness and freedom from defects of the application examples as well as for related information, configuration and
performance data and any damage caused thereby. This shall not apply in cases of mandatory liability, for example under the German
Product Liability Act, or in cases of intent, gross negligence, or culpable loss of life, bodily injury or damage to health, non-compliance
with a guarantee, fraudulent non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for damages
arising from a breach of material contractual obligations shall however be limited to the foreseeable damage typical of the type of
agreement, unless liability arises from intent or gross negligence or is based on loss of life, bodily injury or damage to health. The
foregoing provisions do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens against existing or
future claims of third parties in this connection except where Siemens is mandatorily liable.
By using the application examples, you acknowledge that Siemens cannot be held liable for any damage beyond the liability provisions
described.

Other information
Siemens reserves the right to make changes to the application examples at any time without notice. In case of discrepancies b etween the
suggestions in the application examples and other Siemens publications such as catalogs, the content of the other documentation shall
have precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with Industrial Security functions that support the secure operation of plants, systems,
machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously
maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a
concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines and networks. Such systems, machines
and components should only be connected to an enterprise network or the Internet if and to the extent such a connection is necessary
and only when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure. Siemens strongly recommends that
product updates are applied as soon as they are available and that the latest product versions are used. Use of product versions that are
no longer supported, and failure to apply the latest updates may increase customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed at:
https://www.siemens.com/industrialsecurity.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 2


Table of contents
1. Introduction ...................................................................................................................................4

1.1. Overview ......................................................................................................................................................4


1.2. Mode of operation ........................................................................................................................................4
1.3. Components used .........................................................................................................................................4

2. How to use the SIMATIC Process Function Library V3.0 ....................................................................5

2.1. Library ..........................................................................................................................................................5


2.1.1. Library download and import.........................................................................................................................6
2.1.2. Usage of SIMATIC Process Function Library block/data types ............................................................................7
2.1.3. Usage of SIMATIC Process Function Library visualization ............................................................................... 11

3. TIA Portal V18 Application Example with SIMATIC Process Function Library ...................................25

3.1. Project Setup .............................................................................................................................................. 25


3.1.1. Hardware Configuration .............................................................................................................................. 26
3.1.2. Software..................................................................................................................................................... 27
3.1.3. Start PLCSIM ADV ........................................................................................................................................41
3.2. Panel Simulation ......................................................................................................................................... 42
3.3. Remarks: .................................................................................................................................................... 45
3.3.1. Setup Project Properties .............................................................................................................................. 45
3.3.2. Setup PG/PC Interface or Communication Settings ........................................................................................ 45
3.3.3. PLCSIM Virtual Ethernet adapter .................................................................................................................. 47

4. Services in the HMI .......................................................................................................................48

4.1. Explanation of the services .......................................................................................................................... 48


4.2. Start services .............................................................................................................................................. 48
4.3. Reset services ............................................................................................................................................. 50

5. Additional information .................................................................................................................51

5.1. Overview of all additional blocks.................................................................................................................. 51


5.1.1. General blocks ............................................................................................................................................ 52
5.2. "And04" and "Or04" from SIMATIC Process Function Library .......................................................................... 57
5.3. Instance DB "Raw_Scale" and "Scale" ............................................................................................................ 59

6. Appendix .....................................................................................................................................60

6.1. Service and support ....................................................................................................................................60


6.2. Industry Mall............................................................................................................................................... 61
6.3. Links and literature .....................................................................................................................................61
6.4. Change documentation ............................................................................................................................... 61

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 3


Introduction

1. Introduction
1.1. Overview
This documentation gives a small practical overview over the Process Function Library V3.0 and its components. It also
gives an overview and an explanation about the application example for the MTP TIA Portal project of the silo and how it
works.
With this project the SIMATIC Process Function Library is shown, how it works and how you can use it. You see how the
library needs to be configured in the Service Engineering Tool and what is necessary in the TIA Portal for its usage.

1.2. Mode of operation


The whole application example can be operated with MTP services. You only need to start these services via the HMI
runtime and the configured services will do the process of the small plant. You can start the process of a silo station,
which is the content of the project, in three different ways, which will be explained later in chapter "Services in the HMI".
For the implementation of all components the blocks from the SIMATIC Process Function Library are used.

1.3. Components used


This application example has been created with the following hardware and software components:
Component Note
Windows 10 Enterprise LTSC 2019

TIA V18 Upd2


WinCC Unified V18 Upd2 SR1
S7-PLCSIM Advanced V5.0 SP1

SIMATIC Process Function Library V3.0

(The update 2 of TIA V18 is mandatory, otherwise the project can’t be opened)

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 4


How to use the SIMATIC Process Function Library V3.0

2. How to use the SIMATIC


Process Function Library
V3.0
NOTE The software controller CPU 1507 is not supported. Please use hardware controller e.g. S7-1512C-1PN
or S7-1510SP-1PN.

2.1. Library
In the following chapter the general handling of the library is shown. Especially how the user can use the included objects
and bring them to visualization in runtime.
The description starts with a TIA project, which includes a PLC [CPU 1513-1 PN], an IO device_1 [ET 200SP] and a PC-
System [SIMATIC PC station]. All devices are connected via PN/IE and one HMI connection.

The following IP addresses are used:


Station IP address
IE general (HMI) 192.168.0.23

PLC (AS) 192.168.0.25


IO device 192.168.0.30
Host 192.168.0.2

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 5


How to use the SIMATIC Process Function Library V3.0

2.1.1. Library download and import


The following chapter describes how to import the SIMATIC Process Function Library into the project and how you can use
it.
1. Download and install the SIMATIC Process Function Library on your target system, which should fulfill the Software
and Hardware prerequisite.

You can find the software with the following link:


https://support.industry.siemens.com/cs/ww/en/view/109823440

After installation, the SIMATIC Process Function Library is located in the following folder:
C:\Program Files\Siemens\Automation\SIMATIC Process Function Library\V3.0.0.0

2. Open the two libraries "SIMATIC_Process_Function_Library_HW_PLC_V3.0.0.0" and


"SIMATIC_Process_Function_Library_Unified_V3.0.0.0" in your TIA Portal environment.
In order to achieve this, open the menu "Global libraries" on the right side. Open the explorer window with the "Open
global library" button. Choose the global library in the field "Files of type". Select the library and press "Open". Store
the library in a separate folder. Repeat this for the second library.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 6


How to use the SIMATIC Process Function Library V3.0

Afterwards, the menu "Global libraries" should look like this.

2.1.2. Usage of SIMATIC Process Function Library


block/data types
The following chapter describes how the library objects can be used in the PLC [CPU 1516-3 PN/DP].
1. Open the folders for the block types in the library on the right side. Select the PFL-block types "PIDConL", "MotL",
"MotSpdCL", "VlvL", "AccuS", "MonAnL" and "MonDiL" and drag them to the program blocks folder of the PLC using drag
& drop [CPU 1516-3 PN/DP].

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 7


How to use the SIMATIC Process Function Library V3.0

2. After the PFL-block types are copied to the program blocks folder, the functions "ChkREAL" and "SelST16" are copied
automatically into the program blocks folder, because these functions are used into the PFL-block types.

3. After the PFL-block types are copied to the program blocks folder, the CPU data types "AnaVal", "AnaValFF", "DigVal",
"DigValFF", "DigValT", "DigValTFF" and "ScaVal" are copied automatically to the PLC data types folder, because these
data types are also used into the PFL-block types.

4. After the PFL-block types are copied to the program blocks folder, the HMI data types "HMI_AccuS", "HMI_MonAnL",
"HMI_MonDiL", "HMI_MotL", "HMI_MotSpdCL", "HMI_PIDConL" and "HMI_VlvL" are copied automatically to the PLC data
types folder, because these data types are also used into the PFL-block types.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 8


How to use the SIMATIC Process Function Library V3.0

5. Add the PLC alarm text lists via drag & drop from the PFL to your project. Drag them into the folder "PLC_1 > PLC alarm
text lists"

6. Add all alarm classes via copy & paste from the PFL to your project. Copy them into the folder "Common data" > "Alarm
classes"

7. Right-click onto the folder "Program blocks" and select the option "Add new block" to add a new block.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 9


How to use the SIMATIC Process Function Library V3.0

8. Select "Cyclic interrupt" from the organization blocks, choose "FBD" as language and insert this block via the "Ok"
button.

9. Compile the program.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 10


How to use the SIMATIC Process Function Library V3.0

2.1.3. Usage of SIMATIC Process Function Library


visualization
The following chapter describes how the library objects are used in the PC system [SIMATIC PC station].
1. All faceplates from the library folder "PFL-Visualization" should be added to the project library over the context menu
of the "Visualization" folder in the global library.

2. Add the master copies from the SIMATIC Process Function Library via copy & paste to your project library.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 11


How to use the SIMATIC Process Function Library V3.0

3. All common HMI tables from the library folder "Common" should be copied via drag & drop to the folder "HMI tags"
under the HMI_RT of the PC station.

4. All screens from the library folder "Common" should be copied via drag & drop to the folder "Screens" under the
HMI_RT of the PC station.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 12


How to use the SIMATIC Process Function Library V3.0

5. The scheduled tasks "Tact500ms" from the library folder "Tact" should be copied via drag & drop to the "Scheduled
tasks" under the HMI_RT of the PC station. This task is used to toggle the internal HMI-Tag "tact500ms".

6. Copy the folder "HMITextLists" from the Project library to the "Text and graphic lists" under the HMI_RT of the PC
station.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 13


How to use the SIMATIC Process Function Library V3.0

7. Add a new tag table "PLCTags" with a click on the left mouse button.

8. Move the instance data blocks from the program blocks folder via drag & drop to the tag table. With that step all tags
from the PLC are configured because all tags are stored in a separate data structure.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 14


How to use the SIMATIC Process Function Library V3.0

9. Place the faceplate types with the ending "_Icon" into the "Screen" window.

10. Select the faceplate icon instance and go to the properties. Under the interface the first connection needs to be set to
the DataHMI-Tag of the corresponding instance. In this example, the faceplate icon instance is the "PIDConL".
Therefore it must be connected with "PIDConL_DB_DataHMI". Confirm that step with the green checkmark.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 15


How to use the SIMATIC Process Function Library V3.0

11. For the next interface tag an internal tag is required. Add a new tag table "TagNames" with a click on the left mouse
button.

12. Create an internal tag for every instance and set a unique tag name into the start value. It is important that there is a
"/" in the text string. Before the "/" there should be the PLC name where the instance is located. After the "/" it should
be the same name as the instance data block in the PLC. This is very important because this name is also used for the
message windows and to setup the corresponding message filter.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 16


How to use the SIMATIC Process Function Library V3.0

13. The "TagName" of the interface can now be connected to the internal tag. In this example it relates to
"PIDConL_Name". Confirm that step with the green checkmark.

14. For the next interface tag an internal tag is required. Add a new tag table "TagComments" with a click on the left
mouse button. This tag interface can also be set empty. In this case the default comment will be shown in the
faceplate.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 17


How to use the SIMATIC Process Function Library V3.0

15. Create an internal tag for every instance and set a comment.

16. The "TagComment" of the interface can now be connected to the internal tag. In this example it relates to
"PIDConL_Comment". Confirm that step with the green checkmark.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 18


How to use the SIMATIC Process Function Library V3.0

17. The interface tag "TagVisibilty" relates to the internal tag "TagVisibilty". This internal tag should be used for all
faceplate instances. This tag is used to hide & unhide the tag name of the block icon. Confirm that step with the green
checkmark.

18. The interface tag "MessageCmd" relates to the internal tag "MessageCmd". This internal tag should be used for all
faceplate instances. This tag is used to handle the call of the message window and to set the necessary message filter.
Confirm that step with the green checkmark.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 19


How to use the SIMATIC Process Function Library V3.0

19. A separate list is imported for each faceplate type. The corresponding operator messages for the faceplate type are
listed. The texts are multi-language capable.

20. The interface object "MessageText" relates to the corresponding text lists. This object is used to handle the operator
message from the faceplate window. In this example it relates to "PIDConL_3". Confirm that step with the green
checkmark.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 20


How to use the SIMATIC Process Function Library V3.0

21. Some of the faceplate types have got the interface tag "BlinkTact" in addition, which relates to the internal tag
"tact500ms". This internal tag should be used for all instances. This tag is used for blinking several objects in the
faceplate. Confirm that step with the green checkmark.

22. Open the screen window "HideTagObject" and copy the button with the text "Show/Hide Tag".

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 21


How to use the SIMATIC Process Function Library V3.0

23. Paste the button with the text "Show/Hide Tag" into all screen windows. With that button the tag names of all
faceplate block icon can be shown or hidden.

24. Open the screen window "MessagesObject" and copy the text field with the text "MessageCmd".

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 22


How to use the SIMATIC Process Function Library V3.0

25. Paste the text field with the text "MessageCmd" into all screen windows. With that text field the message window is
called and the setup of the corresponding message filter will be executed.

26. As the last step the HMI_RT of PC system [SIMATIC PC station] needs to be compiled.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 23


How to use the SIMATIC Process Function Library V3.0

27. Setup the Project languages

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 24


TIA Portal V18 Application Example with SIMATIC Process Function Library

3. TIA Portal V18 Application


Example with SIMATIC
Process Function Library

3.1. Project Setup


In this project, a Silo Station for a plant is configured. The process is simulated in the PLC, therefore a SIMIT installation is
not needed. The process is controlled by MTP services and fulfills the function to pump water from a tank to a reactor for
filling/producing purpose. It is also possible to refill the tank. Which procedures are available and how they work is
described in chapter 4 "Services in the HMI". Different components are in use for the process. There is a tank with level
measurements, one analog pump, two flow indicator, one inlet and one outlet valve and one analog monitor for the
pumped liters.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 25


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.1. Hardware Configuration


The hardware configuration consists of a CPU 1513-1 and an ET 200SP. For the HMI runtime WinCC Unified V18 is used.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 26


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2. Software
3.1.2.1. Program blocks
In total there are eleven main program blocks for the functionality. They are located in the folder "Silo". For each process
object, one function block is available. All of them are programmed in FBD.
In the functions, different networks are used for the different usages. The first network is always used for interlocks or
other functions for the main block. The second one contains the main block like the "MotL" for the pump. In the last
network, the MTP block is always included, which is connected to the SIMATIC Process Function Library block. This MTP
block is used as the interface directed outwards of the project to another DCS. All networks have been named according
to their usage.

Blockname Usage

FIC100 PID control


FIT100 Flow measure inlet
FIT100_Liters Pumped liters inlet

FIT101 Flow measure outlet


FIT101_Liters Pumped liters outlet
LAH100 High Level
LAL100 Low Level
LIT100 Level measure

P100 Pump

V100 Valve inlet


V101 Valve outlet

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 27


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.2. Simulation
For the simulation, four function blocks are available. These blocks are written in SCL.
Function block Usage

CalcDose Calculates the pumped water in liter


Level Calculates the fill level of the tank

PT1 Opens the valve with PT1 behavior

Volumeflow Calculates the volume flow in l/s

These blocks have their call in the corresponding simulation function in the folder "Simulation". In the first function
"Flow_Sim" everything for the simulation of the flow is located. For example, the function blocks "Volumeflow" and
"CalcDose" have their call there. The same applies for the function "Level_Sim". In the "Level_Sim" the function block
"Level" and the refill function are located.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 28


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.3. MTP Services


3.1.2.3.1. General
The Services are configured in two different tools, in the TIA Portal and in the Service Engineering Tool. For general
information about the Service Engineering Tool a manual is delivered with the installation package of the SIMATIC Process
Function Library. It is located in the following folder:
C:\Program Files\Siemens\Automation\SIMATIC Process Function Library\V3.0.0.0\Manuals\en-US
In the chapter 12 "Services" all parameters and settings/configurations of the tool are explained. In this document is only a
general overview over the tool and the explanation for the project specific configuration.
In the Service Engineering Tool, the general structure of the services is configured. There it is possible to define the global
service parameters, the control modules, the connection of the global parameter to the procedures, the steps, and the
procedures itself.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 29


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.3.2. Global parameter and values


For this project, only six global parameters and values are needed. One binary configuration parameter, two analog
procedure parameter, one process value input and one output and one report value. The configuration values for these
parameters are also defined here. After the export to TIA Portal, they get stored in the corresponding DB for the global
service parameters. They can only be changed in the Service Engineering Tool and need to be exported to the TIA Portal
afterwards. For example, the default value or the max and min values/limits.
The process value output is the dosed product. So, how many liters get pumped out of the tank. This is also the report
value.

Configuration parameter
The configuration parameter is called "PVconnected" and serves as the indicator if another PEA is connected. The default
value is true. So, if this parameter is false, the start command of the procedure "Dosing" is locked as well as the POs are
interlocked. You need to set it to true if you want to start it.

Procedure parameter
The first procedure parameter is "Pump speed". This parameter defines the speed of the pump during the dosing process.
The second parameter is "Dose liters", this one defines the number of liters, which should get pumped out of the tank. For
the "Pump speed" the default value is set to "1500 1/min", the high limit is "2500 1/min" and the low limit "0 1/min". For
"Dose liters" the default value is set to "1000 l", the limits are "3200 l" (high) and "0 l" (low). The high limit/max value is
defined by the maximum fill level of the tank which is 3200 l.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 30


TIA Portal V18 Application Example with SIMATIC Process Function Library

Process value input


As Process value input there is only the input "External level". This value shows the tank level of the other PEA. The unit of
"External level" is liter. The default value of this value is 5 l, the upper limit is 10 l and the lower one is 0 l.

Process value output


The process value output is defined as "Dosing speed". Via this value the pumped liters of the process are available for
other processes. Its unit is liter, and the upper scale limit is defined as 3200 liters. This is the maximum amount that can
fit in the tank.

Report value
To be able to store this process value output a report value was configured. This report value is called "Report dosed
product". The value of the process value outputs will be automatically mirrored in the report values, so there is no need to
connect anything. The configuration only needs to be set up as it has been done before. So, the upper scale needs to be
set to "3200" and the unit is liter.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 31


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.3.3. Service
For the process, four different control modules are available. These control modules are bits in the
ServiceControlBlockMedium, which are stored in the "CmCommand" array. With these bits it is possible to activate the
different states and conditions of the objects and to define the process. The first one "CM_P100" is responsible for the
pump P100. The second CM "CM_V100" is for the valve V100. The third one is used for the valve V101 and is called
"CM_V101. And the last one is for the controller FIC100 and is called "CM_FIC100". With these bits, each of the control
modules in the project can be controlled. Since version V3.0 of the SIMATIC PFL, it is possible to link the control modules
to their corresponding data blocks in TIA Portal. Therefore, the needed type of data blocks needs to be fetched and
following that, they can be linked. The "CM_P100" for example is linked to the "P100DB".

In the folder "Service parameter", the global parameters are connected to the procedures of the project, except from the
configuration parameter. The "Pump speed" and "Dose liters" are connected to the "Dosing" procedure.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 32


TIA Portal V18 Application Example with SIMATIC Process Function Library

The process value input "External level", the process value output "Dosing speed" and the report value "Report dosed
product" are all connected to the "Dosing" procedure.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 33


TIA Portal V18 Application Example with SIMATIC Process Function Library

The next folder "Steps" contains the configuration of the steps, which are being executed in the different states of the
procedure. In this project, there is one step for each control module. So, there are seven steps, "Step_SetToAuto",
"Step_ExecuteProcess", "Step_SetToMan", "Step_Unholding", "Step_Holding", "Step_Pausing", "Step_Resuming" and
"Step_Resetting". Each step is connected to one or more of the control modules and the options for "Command", "Force"
and "Check" are activated for all except from the step "Step_Resuming". This one does not have the check option.

The last point is the configuration of the procedures. In this project, two procedure configurations are present, "Filling and
"Dosing". In each procedure, all states are configured. The inserted steps in these states are almost the same for all
procedures. In the "Starting" state the step "Step_SetToAuto" is always present, in the three states "Completing",
"Aborting" and "Stopping" the step "Step_SetToMan" is configured. The "Restarting" state contains the step
"Step_Unholding", the state "Holding" contains the step "Step_Holding", "Resetting" contains the step "Step_Resetting",
"Pausing" contains the step "Step_Pausing" and the state "Resuming" contains the step "Step_Resuming". In the "Running"
state in both procedures the step "Step_ExecuteProcess" is configured.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 34


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.3.4. TIA Portal


In TIA Portal the procedures for the activation of the different control modules are defined. Also all DBs, where the
information for the configuration in the Service Engineering Tool is stored, need to be defined.
This project contains two main functions, in which almost the entire implementation for the MTP services is located.
These are the "CM_Interface" function block and the "Service" function. In the "Service" function all needed blocks and
functions are being called, like the function blocks for the parameters and values, the data block for the services, the
control module interface function, or the service command logic function block for the services. The blocks for the
parameters and values are used to store the information of the global and local parameters, which are configured in the
Service Engineering Tool.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 35


TIA Portal V18 Application Example with SIMATIC Process Function Library

These blocks, like "ConfigurationParameters" or "ProcedureParameters" are copied from the SIMATIC Process Function
Library. It is the same for the "Dose_Setup", this one is also copied from the SIMATIC Process Function Library and
renamed afterwards. Which other blocks need to be copied from the SIMATIC Process Function Library can be seen in the
following picture.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 36


TIA Portal V18 Application Example with SIMATIC Process Function Library

The "CM_Interface" function block contains the conversion of the array bits to its intended purpose. The block converts
the bool and real values to the datatypes "AnaVal" and "DigVal". The outputs are named after their purpose, e.g. the bit,
which is intended to switch the pump P100 to manual mode, is called "ManMode_P100". This block also gives the process
value output "DosedProduct" its value out of the process.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 37


TIA Portal V18 Application Example with SIMATIC Process Function Library

The usage of the outputs of the CM_Interface block is implemented as well as the rest of the program logic of each
process object in the specific function for the different components. In the picture below you can see the code for the
pump P100. If the step "Step_SetToAut" is activated, the pump should go in automatic mode. For the other components,
like the PID controller, the Valve, etc. the code looks similar. For each step from the Service Engineering Tool, a
implementation for the components has been incorporated.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 38


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.2.4. HMI Runtime


The HMI Runtime structured as follows. On the right side, the tank with its level indicators is located. On the left is the
valve, the pump, the PID controller and the flow indicator. The operating faceplate for refilling the tank is located in the
middle of the tank. And on the top left side, with the orange area with the text "idle", the service control faceplate is
placed.

This faceplate is also copied from the SIMATIC Process Function Library like the blocks in chapter 3.1.2.3 "MTP Services".

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 39


TIA Portal V18 Application Example with SIMATIC Process Function Library

With the button "Show/Hide Tag" it is possible to show or to hide the tags for all components.

"Hide Tags"

"Show Tags"

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 40


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.1.3. Start PLCSIM ADV


1. Start PLCSIM Adv with PLCSIM Virtual Eth. Adapter and add a S7-1500 PLC with the corresponding IP address of the
controller. Then start the controller.

2. Afterwards download all data via virtual Ethernet Adapter from the AS.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 41


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.2. Panel Simulation


Download the Panel
1. Click on the "Download" symbol

2. Select following settings during downloading to delete possible legacy settings from previous projects.

3. Download the panel to the Runtime Server

Start the project


4. Start your downloaded Project on Runtime Server

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 42


TIA Portal V18 Application Example with SIMATIC Process Function Library

Connect to the Runtime Server


5. Open Google Chrome.
6. To connect to the Runtime Server, you need to enter the computer name of your machine as URL. In this project it is
"tiav18".

7. If you want to change the name, you just need to execute the "WinCC Unified configuration" tool. On the first page,
you can configure these settings.

Afterwards you can login into "WinCC Unified RT".

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 43


TIA Portal V18 Application Example with SIMATIC Process Function Library

8. Login with the in TIA Portal created accounts.

For this project, two accounts are available:


• Username: Admin; Password: Admin!!1234
• Username: User; Password: Admin!!1234

Username Password Rights

1. Admin Admin!!1234 HMI Administrator

2. User Admin!!1234 HMI Administrator


HMI Operator

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 44


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.3. Remarks:
3.3.1. Setup Project Properties

3.3.2. Setup PG/PC Interface or Communication


Settings
1. Right-click on the windows button, select "control panel > communication settings".

2. After the installation of TIA Portal, the interface will look like this:

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 45


TIA Portal V18 Application Example with SIMATIC Process Function Library

3. Which Access point you need/use in the TIA Portal can be checked in the "Connections" folder.

4. To configure the PG/PC interface, select the interface "Intel® 82574L Gigabit Network Connection.TCPIP.3" for the
S7Online Access point.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 46


TIA Portal V18 Application Example with SIMATIC Process Function Library

3.3.3. PLCSIM Virtual Ethernet adapter


Usually, the PLCSIM Virtual Ethernet adapters IP address is not setup.
The IP address of the PLCSIM Virtual Ethernet adapter must be in the same subnet as the plant bus.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 47


Services in the HMI

4. Services in the HMI


4.1. Explanation of the services
Filling
This procedure fills the tank until the level of the tank reaches 9 meters. The configuration is done in the Service
Engineering Tool.

Dosing
This procedure doses the configured number of liters (1000 l) of the content of the tank with the configured pump speed
(1500 1/min). The configuration is done in the Service Engineering Tool.

4.2. Start services

NOTE It is only possible to start the "Dosing" procedure if "PVconnected" is true.

1. Open the Service Control Blocks faceplate

2. Click on the icon next to "Req. Procedure"


3. Select a Service (e.g. "Filling") and confirm with "OK"

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 48


Services in the HMI

4. Click the icon next to "Cur. Procedure"


5. Select "Start" and confirm with "OK"

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 49


Services in the HMI

4.3. Reset services


1. Open the Service Control Blocks faceplate

2. Click the icon next to "Cur. Procedure"


3. Select "Reset" and confirm with "OK"

4. Now, starting another service is possible

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 50


Additional information

5. Additional information
5.1. Overview of all additional blocks
In this project several blocks are used, which are not included in the SIMATIC Process Function Library. These blocks are
self-written and are responsible for either the simulation of the process or simplify the programming of the internal logic
of the project. In the following table, you can find a list of all these blocks and a short comment about their function. You
can also see, which block type was used and if they can be used in every project or just in this application example.

Block Blocktype Usage Comment

BoolToDigVal FC Global Converts datatype Bool to DigVal

RealToAnaVal FC Global Converts datatype Real to AnaVal

PIDCon_Config FC Global Configuration block for the PIDConL

MotSpdCL_Config FC Global Configuration block for the MotSpdCL

Sets names for all hex values of the states of the


State Global DB Global services

AccuS_Liter FC Global Counts the pumped liters

PEA_Stop FC Global Stops the plant

Additional blocks Already explained before

Project Converts signal bits from ServiceControlBlockMedium


CM_Interface FB specific to named object

Calculation of the MV_Ext for the valve and set value of


CalcDose FB Global pumped liters

Level FB Global Calculation of the tank level

Defines the opening and closing phase of the valve


PT1 FB Global with a PT1

VolumeFlow FB Global Calculates the volume flow of the process

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 51


Additional information

5.1.1. General blocks


In the section "Usage" you can distinguish between "General" and "Project specific blocks". This means that the blocks can
either be user in every project or just in this application example.
In this chapter the blocks which can be used in other projects are explained.

5.1.1.1. Convert blocks "BoolToDigVal" and "RealToAnaVal"


It is not possible to write integer or boolean directly to the block and input in TIA Portal with the SIMATIC Process Function
Library. The reason for this is, that in TIA Portal each parameter/input/output has its own status. This status must be set to
"16#80" that it can be written. Therefore, the project contains two self-written functions.
The first one is the "BoolToDigVal" (FC10). This block converts the input of datatype "Bool" and the given status to the
output with datatype "DigVal". The output can then be connected to other blocks in the project.
The second function "RealToAnaVal" (FC9) converts the input value with datatype "Real" and the given status to the
datatype "AnaVal".

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 52


Additional information

5.1.1.2. PIDCon_Config
Due to the same problem as in chapter 5.1, the function "PIDCon_Config" (FC16) was implemented. This block writes the
config parameters for the "PIDConL" block. Also, the inputs for the operating modes can be written. With this method it is
not possible to change the parameter during the runtime.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 53


Additional information

If you want to make it possible for the operator to change the parameters during runtime, you need to write them directly
into the instance DB as start values.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 54


Additional information

5.1.1.3. MotSpdCL_Config
Due to the same problem as in chapter 5.1, the function "MotSpdCL_Config" (FC5) was implemented. This block writes
the config parameters for the "MotSpdCL" block. Also, the inputs for the operating modes can be written. With this
method it is not possible to change the parameter during the runtime.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 55


Additional information

5.1.1.4. State DB
In this global DB, static variables are defined, which are related to the states of a service. Several hex values were assigned
to each state. In this DB, these values for all states are defined for better handling in the project. As a result, during
program execution, the state name can be asked directly without the need to handle the hex values.

5.1.1.5. AccuS_Liter
This block is responsible for the calculation of the pumped amount of liquid in liters. This block originates from the
SIMATIC Process Function Library and is called in the "CalcDose" function block. The calculation of the pumped liters
always gets restarted after the services set the components of the process to automatic mode.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 56


Additional information

5.2. "And04" and "Or04" from SIMATIC


Process Function Library
The SIMATIC Process Function Library also provides an "And04" and an "Or04" function. The reason for this is the same
issue from chapter 5.1, which is the status of the parameter. These two blocks are capable of handling the status. But for
their use you need to know that it is mandatory to connect all inputs of this block. A function does not have an instance
DB, so all inputs need to be configured, otherwise they will not work. If you do not have enough inputs, you need to
connect some "temp" variables to the input. The "temp" variables for the "Or04" block need to be set to "0" and the ones
for the "And04" block need to be set to "1" for the function to work correctly.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 57


Additional information

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 58


Additional information

5.3. Instance DB "Raw_Scale" and "Scale"


For the correct function of the simulation, it is mandatory to configure the "Scale" and the "Raw_Scale" parameter in the
instance DB for the channel input. In this project, the "Raw_Scale" needs to have the "Low" parameter at "0" and the "High"
parameter at "27648". The "Scale" parameter needs to have the "Low" parameter also at "0" and the "High" parameter
must be the high limit of its corresponding value. In the picture below the instance DB from "FIT100" channel input is
shown. The maximum flow can be at 32 L/s, so the "High" value of "Scale" is 32.
This configuration is needed because, for example the "AnIn" block reads a raw analog value from the process image
(partition) and converts it to its physical value or calculates a percentage value based on this raw value.

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 59


Appendix

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

Technical Support
The Technical Support of Siemens Industry provides you fast and competent support regarding all technical queries with
numerous tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via Web form:
siemens.com/SupportRequest

SITRAIN – Digital Industry Academy


We support you with our globally available training courses for industry with practical experience, innovative learning
methods and a concept that’s tailored to the customer’s specific needs.
For more information on our offered trainings and courses, as well as their locations and dates, refer to our web page:
siemens.com/sitrain

Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog web page:
support.industry.siemens.com/cs/sc

Industry Online Support app


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

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 60


Appendix

6.2. Industry Mall

The Siemens Industry Mall is the platform on which the entire siemens Industry product portfolio is accessible. From the
selection of products to the order and the delivery tracking, the Industry Mall enables the complete purchasing processing
– directly and independently of time and location:
mall.industry.siemens.com

6.3. Links and literature


No. Topic

\1\ Siemens Industry Online Support


https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109810699

6.4. Change documentation


Version Date Modifications

V1.0 02/2024 First version

Entry ID: 109810699 V1.0 02/2024 © Siemens 2024 61

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy