p01 04 Individual Drive Functions v9 Tud 0719 en
p01 04 Individual Drive Functions v9 Tud 0719 en
Learn-/Training Document
Siemens Automation Cooperates with Education
(SCE) | As of Version V9 SP1
PA Module P01-04
SIMATIC PCS 7 – Individual Drive Functions
siemens.com/sce
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved.
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
Note that these trainer packages are replaced with successor packages when necessary.
An overview of the currently available SCE packages is available at: siemens.com/sce/tp
Continued training
For regional Siemens SCE continued training, get in touch with your regional SCE contact
siemens.com/sce/contact
This document is to be used only for initial training on Siemens products/systems, which means it can be
copied in whole or part and given to those being trained for use within the scope of their training.
Circulation or copying this Learn-/Training Document and sharing its content is permitted within public
training and advanced training facilities for training purposes.
Exceptions require written consent from the Siemens. Send all related requests to
scesupportfinder.i-ia@siemens.com.
Offenders will be held liable. All rights including translation are reserved, particularly if a patent is granted
or a utility model or design is registered.
Use for industrial customer courses is explicitly not permitted. We do not consent to commercial use of
the Learn-/Training Document.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 2
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
We wish to thank the TU Dresden, particularly Prof. Dr.-Ing. Leon Urbas and the Michael Dziallas
Engineering Corporation and all other involved persons for their support during the preparation of this
Learn-/Training Document.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 3
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
Table of contents
1 Goal ................................................................................................................................................. 5
2 Prerequisite...................................................................................................................................... 5
4 Theory ............................................................................................................................................. 7
5 Task ............................................................................................................................................... 16
6 Planning......................................................................................................................................... 16
8.2 Inserting the Motor_Lean block from the PCS 7 AP Library V90 in the project library............... 21
10 Exercises ....................................................................................................................................... 59
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 4
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2 Prerequisite
This chapter builds on chapter 'Plant hierarchy'. To implement this chapter, you can use an
existing project from the previous chapter or the archived project 'p01-03-exercise-r1905-en.zip'
provided by SCE. The download of the project(s) is stored on the SCE Internet for the respective
module.
The simulation for the SIMIT program can be retrieved from the file 'p01-04-plantsim-v10-r1905-
en.simarc'. It can be run in demo mode.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 5
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2 SIMATIC PCS 7
V9 SP1 or higher
1 Engineering Station
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 6
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
4 Theory
4.1 Theory in brief
The goal of object-oriented software structuring is to reproduce the structure of the real plant
through corresponding modularization of the user software as clearly as possible. To this end, at
least one function block is provided for each field device type. This function block in turn provides
the entire control logic, the necessary protection and monitoring functions as well as suitable
operator control and visualization options. The user program utilizes this block to implement the
desired operating behavior of a machine or a process.
Motors and valves are control devices that are not controlled directly, in the sense of object-
oriented automation, but rather are initially modeled as function block types. Such function block
types are called Individual Drive Functions (IDF). They enable control, monitoring and
operation of the control device by providing corresponding I/Os for actuating and control signals
as well as for parameter assignment and monitoring functions. The control is technically
implemented by an instance of the function block type and remains hidden from the user.
Figure 1 shows the transition from the real motor – in this case a pump – to a block of the
corresponding control module function.
Figure 1: Transition from the real motor to the block of the control module function
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 7
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
In general, control devices can be operated in four different operating modes. The possible
operating modes of the device are:
– Out of service
– in Manual mode
– in Automatic mode
– In Local mode
A control module function may only ever adopt one operating mode. The operating modes
mentioned can have equal priority or be hierarchically prioritized. In addition, control module
functions provide functions for protection against device and process faults. Various interlocks as
well as runtime monitoring for the device and for the controlled process are also implemented.
Function block types, referred to as block types in PCS 7, represent pre-assembled program
sections for processing recurring functions. They can be inserted in CFCs where they can be
parameterized as instances, interconnected and adapted to the project requirements. The block
type specifies the characteristics for all instances of this type. PCS 7 already provides many
powerful and tested control module functions as block types in the process control libraries. They
model one control device each and provide the entire control logic.
– Controlling of signals
– Interlocks
Faceplates with different views allow for seamless integration into a corresponding process
control system.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 8
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
This block implements the entire control logic for this field device type. In addition, it makes
necessary protection and monitoring functions available as well as suitable operator control and
visualization options. It thus encapsulates the entire functionality that is necessary in connection
with the corresponding field device type. The user program utilizes this block to implement a
desired control for a machine or process without having to draw on knowledge of the internal data
and operations of the function block.
Table 1: Listing of various channel blocks for abstraction of the I/O interfacing
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 9
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
MotL Control of motors with a control signal (on/off) and running FB 1850
feedback
VlvMotL Control of motor-driven valves with two control signals and FB 1900
position feedback signals (open/closed).
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 10
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
Device faults (for example, cable break, axis break) cannot be prevented by the control device.
But the effects can be minimized through redundancy concepts. Process faults (for example,
tank overflow, dry run of a pump), on the other hand, must be prevented directly through the
control. Appropriate interlocks are implemented for this. If the control module function detects a
dangerous process state based on the current input values, the controlled device is brought to a
safe state (refer to the chapter 'Functional Safety'). The device is kept in this state as long as the
dangerous process state is present. Interlocks are normally specified using an interlock
matrix.
To detect a device fault, a control module function often performs runtime monitoring By
using certain sensor information from end position sensors in valves, for example, the control
module function checks whether the output actuating signals also achieve the required effect. If
over a certain period of time the measured values contradict the output actuating signals, there is
an error. If such a runtime error is detected, the higher-level control system is alerted and the
controlled device is deactivated. The device remains inactive until the runtime error is remedied
and the alarm has been acknowledged. Simple binary circuit breakers are often used to detect
device faults.
– Manual mode: The operator controls the control module function directly by means of a
graphical user interface of the control system.
– Local mode: The operator operates the device locally, for example, using an operator
panel.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 11
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
A control module function may only be in exactly one operating mode at a given time. Various
concepts exist for how the related mode changeover can be safely and unambiguously realized.
Basically, these concepts can be divided into those in which the operating modes are on a par
and those in which an operating mode hierarchy exists. In the latter case, the possible operating
modes are additionally explicitly prioritized. In this case, a selected operating mode is changed
precisely when the device is not active (operating mode: Out of service) or when the desired
new operating mode has a higher priority that the previously selected one.
The block type specifies the characteristics for all instances of this type. The utilized block types
of a project are stored in the master data library for this. If the block type stored there is changed,
the changes are applied immediately to all instances. This concept of type definition supports
efficient engineering through reusability and central changeability of frequently recurring
functions.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 12
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
block identifier
block type
Control output
Run feedback
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 13
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
A control module function in PCS 7 models a control device and provides the entire control logic.
Figure 2 describes the basic structure of the corresponding motor block using the control module
function Motor_Lean as an example.
Operator control and monitoring of process values and setpoints and control of operator
authorizations and maintenance releases are possible via a display and operator input area.
General and instance-specific messages provide information about the status of the device
and the process.
– Control of signals
Control signals can be output as static or pulsed signals. The signal status, i.e. quality of the
actuating signals, is monitored Internal and external setpoints as well as simulated values
can be specified, and ramps or dead zones can also be set.
– Monitoring
The block can monitor limits and generate corresponding warnings or alarms if limits are
violated. In addition, feedback from actuating signals can be monitored.
– Interlock functions
The block allows for a simple activation enable as well as an interlock with and without reset.
It implements a motor protection function that can switch off the motor in the event of thermal
overload. In addition, rapid stop is available for motors; it has the highest priority in all
operating modes and states. In the case of an interlock, the device is automatically brought
to a de-energized state and thus to a defined safety position.
The operating modes Local mode, Automatic mode, Manual mode and Out of service
presented at the beginning are available for all control module functions in PCS 7. The are
prioritized in descending order, i.e. local mode has highest priority and out of service mode
has lowest priority with automatic and manual mode having the same priority. In addition, it is
possible to put the block into a different operating state using interconnectable input
parameters, regardless of the currently pending control (forcing of operating states).
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 14
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
This list of functions clearly shows the complexity and the range of functions of a typical control
module function. The number of available inputs and outputs for these block types is
corresponding large. For example, the control module function Motor_Lean has a total of 53
I/Os. To keep the complexity of the program design low nevertheless, it is possible to hide inputs
or outputs that are not needed. The control module functions in PCS 7 also use a uniform and
integrated scheme for designating the inputs and outputs.
The control module functions in PCS 7 provide a large range of functions and guarantee
consistently high quality and reliability of the algorithms used. All block types have been tested
extensively and have already been proven in industrial use. This reduces the effort needed to
develop high-performance, high quality solutions considerably.
4.8 References
[1] Seitz, M. (2008): Speicherprogrammierbare Steuerungen. Hanser Fachbuchverlag
[2] SIEMENS (2018): SIMATIC Process Control System PCS 7 Advanced Process Library
(V9.0 SP2). A5E39148920-AC.
support.automation.siemens.com/WW/view/en/109760968)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 15
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5 Task
A pump motor for draining the liquid from Reactor R001 is to be created as the first program in
the Continuous Function Chart (CFC). The pump motor has an output for controlling the pump
and a feedback for checking whether the pump is also running.
6 Planning
Besides the two symbols known from Table 3 of the task, there are many other symbols in the
plant. To avoid having to enter all of these by hand, the previously prepared file p01-04-symbols-
r1905-en.dif can be imported. It can be generated from the P&ID as the result of an effective
plant planning. Because a motor (see Figure 4) is to be realized, a pre-assembled chart
'Motor_Lean" from a PCS 7 library will be used for creating the program. It will be copied to the
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 16
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
project's master data library and adapted there. Then the program will be loaded to the PLC
simulation and tested.
7 Learning objective
In this chapter, students learn the following:
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 17
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. The symbol and symbol comment can then be specified for each address in the symbol
table.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 18
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
3. If available, the content for the complete symbol table can also imported in *.dif format. In this
case, the imported table is integrated into the existing table. ( Symbol Table Import)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 19
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5. A log is displayed.
( Save )
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 20
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
8.2 Inserting the Motor_Lean block from the PCS 7 AP Library V90
in the project library
1. PCS 7 provides extensive libraries containing a large number of prepared blocks as well as
pre-assembled charts, called templates. You will use such a template for the pump motor.
For this purpose, open the PCS 7 AP Library V9.0. ( File Open Libraries
PCS 7 AP Library V90 OK)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 21
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. In order to move this template from the library to the project using drag-and-drop, go to the
plant view of the project. ( View Plant View)
3. Using drag-and-drop, move Motor_Lean (Library, Templates) to Process tag types (master
data library). ( PCS 7 Library Blocks+Templates Templates drag Motor_Lean to
plant view SCE_PCS7_Lib Process tag types)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 22
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
Note:
– CFC stands for Continuous Function Chart and is a graphic programming language for
describing continuous processes. Pre-assembled blocks are placed, parameterized and
interconnected in the CFC. This way, the programmer creates an overall software structure
for open-loop and closed-loop control of a machine.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 23
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. A CFC consists of chart partitions with 6 sheets each. In the overview, all six sheets are
displayed with their gray sheet bars. The incoming signals are shown on the sheet bars on
the left of the sheet and the outgoing signals on the sheet bars on the right. You can change
Note:
– You can switch between the chart partitions (maximum A to Z) with the tabs in the bottom
bar. There is only chart partition A here to start.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 24
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
3. You want to make a change to the 'MotL' block in the process tag type 'Motor_Lean'. To do
so, open its properties. ( MotL right-click Object Properties)
Note:
– If blocks turn blue and are displayed without I/Os, this means that insufficient space is
available for the full display. In this case, the blocks must be shifted in the CFC until no more
error messages are output.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 25
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
4. You are not interested in changing the general properties, such as whether operator control
and monitoring is possible, so you change to the I/Os tab. ( I/Os)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 26
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5. The I/Os are displayed in a table together with many configurable properties. You will get to
know the most important properties below. For now, you merely want to cancel the invisibility
for 'AutModOp' in the 'MotL' block. This will make this I/O visible in the sheet. Exit the
properties with 'OK'. ( AutModOp Invisible OK)
Note:
– If you click on the header of a property, the display can be sorted alphabetically by this
column.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 27
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
6. The process tag type can now simply be closed. A save operation occurs automatically at
each change. ( Chart Exit)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 28
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. Because this chart is to be used to control pump A1T2S003, it is now renamed A1T2S003
and opened with a double-click. ( Reactor R001 rename Motor_Lean to A1T2S003
A1T2S003)
3. The properties of the 'MotL' block are then opened with a right-click.
( Motor_Lean Object Properties)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 29
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
4. The name of the block is changed in the general properties. ( pump_A1T2S003 OK)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 30
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5. Now, you want to change the time for the feedback monitoring after successful operation of
the motor block to 10.0 seconds. The properties dialog for the 'MonTiDyn' input is opened for
this purpose and 10.0 is entered for Value. Exit the dialog again with 'OK'. ( MonTiDyn
Value: 10.0 OK)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 31
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
6. Next, the feedback is interconnected with the input address. This is done by right-clicking the
'PV_In' input on the 'FbkRun' block (PCS7DiIn) and selecting the interconnection to the
address. ( FbkRun PV_In Delete Interconnection(s) Interconnection to Address)
Notes:
– Like the PCS7DiOu block, the PCS7DiIn block is a driver block for interfacing with the PLC
I/O. If the value 'PV_In' on the input block or the value 'PV_Out' on the output block is
interconnected with an address that is also configured in the hardware configuration, the
MODE input is automatically supplied with data later during compilation.
– For this to happen, 'Generate module drivers' must be selected later for the compilation.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 32
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
7. The user selects the address that provides feedback on whether the pump is running directly
from the symbol table. ( A1.T2.A1T2S003.S0+.0+)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 33
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
8. Next, the control of the output address is interconnected. This is done by right-clicking the
'PV_Out' output on the 'OutStart' block (PCS7DiOu) and selecting the interconnection to the
address.
( OutStart PV_Out Interconnection to Address)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 34
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
9. The address for control of the pump can now be easily selected directly from the symbol
table. ( A1.T2.A1T2S003.SV.C)
Note:
The placeholder at the output of Pcs7DiOu 'output start' should be deleted; otherwise, there
will be a warning during compilation!
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 35
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 36
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
( SIMATIC Manager )
2. The PLC simulation behaves like a real SIMATIC S7 CPU. However, inputs and outputs must
be inserted first before they can be monitored and operated. ( Insert Input Variable
Insert Output Variable)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 37
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
3. The correct byte addresses must now also be entered. ( IB1 QB3)
4. So that the program can be downloaded from SIMATIC Manager to S7-PLCSIM via the
correct interface, the PG/PC interface still has to be correctly set. ( SIMATIC Manager
Options Set PG/PC Interface)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 38
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 39
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 40
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. In the following selection, 'Compile' and 'Download' are selected for the hardware and the
charts of AS1. The 'Charts' folder is then selected and its settings are
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 41
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
3. When compiling the charts, it is important to compile the entire program and to have the
module drivers generated. ( Scope: Entire program Generate module drivers S7
Download)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 42
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
4. When downloading the charts, it is also important to download the entire program.
( Download mode: Entire program OK OK )
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 43
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5. Finally, 'Compile and Download' is started. The warnings and instructions regarding plant
safety should be read carefully. The CPU must be switched to 'STOP' before 'Compile and
download'. ( Start OK Yes)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 44
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
6. At the end, errors and warnings are displayed in a log. Close the window. ( )
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 45
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
7. If you want to view details for the log, you must click on an individual object when displaying
the log. ( Individual object Close Close)
Note:
Four warnings appear here. Delete the empty OB1 and the presence of textual
interconnections. The latter arise due to unconnected I/Os of the template. These I/Os will be
connected in chapter P01-05.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 46
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
2. Before the individual blocks can be monitored in the CFC, the chart must first be switched to
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 47
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
3. The blocks that are to be monitored must now be explicitly activated for monitoring. The
same then applies for individual I/Os of the block. ( pump_A1T2S003 Watch On)
4. For the next steps, the I/Os for the automatic control 'StartAut' and 'StopAut' of the 'MotL'
block must be visible. 'RstOp' and 'MonDynErr' should also be made visible in case errors
occur. ( Object Properties)
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 48
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
( RstOp Invisible )
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 49
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
5. Next, the changeover for manual/automatic mode is made to automatic through 'AutModOp'
== 1. ( AutModOp Properties Value: 1 OK)
Notes:
– During testing, remember that feedback I 1.3 must be set within 10 seconds after control of
output Q 3.4 in S7-PLCSIM. If this is not done, the Pump_A1T2S003 block will shut down
and output an error.
– If there is no feedback, the pump block not only switches the actuating signal Start to 0 but
indicates by setting the 'ModDynErr' output to 1 that the pump running signal of the pump had
not arrived on time. The corresponding I/Os must be made visible for this. To prevent
damage from repeated switch-on attempts, the pump block must be reset before another
start attempt is made. To do this, the 'RstOp' input must be briefly set to 1 and then again to
0!
Double-clicking on this input parameter of pump block pump_A1T2S003 opens the above-
displayed dialog window. First, a 1 is entered in the Value field. Then, this value is transferred
to the control system by clicking the 'Apply' button, and the error outputs are set to 0. To
return to the normal mode of functioning, 'RstOp' must be reset to the original state by
entering 0 and clicking 'Apply' once more.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 50
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
6. In the next step, the pump is started with (StartAut == 1 and StopAut == 0) and can be
stopped again with (StartAut == 0 and StopAut == 1).
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 51
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
7. If the pump running feedback was not activated in time in the PLCSIM, an error is indicated
in the 'MonDynErr' I/O. This can be acknowledged with 'RstOp' == 1.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 52
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 53
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For this course, the essential interrelationships of the process to be automated have been
modeled with the SIMIT simulation software. The model reproduces the dynamic behavior of the
pumps, valves, tanks and reactors as well as the local operator panel with main switch,
EMERGENCY OFF, switchover to local operation and the corresponding operator controls. The
dynamic processes are accelerated by a factor 5 to 50 compared to reality to keep waiting times
short.
The operator interface of the simulator is shown in Figure 5. It shows the process scheme as well
as the signal levels of controlled and measured variables on the left side. The ochre-shaded local
operator panel is shown at the top right. Below that a series of control elements is provided for
the simulation.
Using the simulator is simple – all that has to be ensured is that the assignment of the inputs and
outputs has not been changed.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 54
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
The pump control can now be checked very easily with the simulator:
2. You retrieve and open the simulation program, if you have not already done so. Use the
supplied file 'p01-04-plantsim-v10-r1905-en.simarc' for this.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 55
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 56
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
4. Start the simulation of the plant in SIMIT with the button and confirm the message
regarding limited runtime with 'OK'.
5. You start the simulation of the PLC in S7-PLCSIM by switching over from STOP to RUN-P.
6. As shown in Figure 5, the simulation starts with educt tanks filled 75%. Everything else is
empty. This state can be restored in the simulation control at any time with the 'RESET'
option. Die 'RESET 50%' option fills all tanks 50%.
7. For testing, the motor block is controlled as described in the previous section 0. In the
simulation, the actuating signal of the pump is illuminated green.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 57
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
8. The simulated motor startup takes about 2 seconds. Then, the motor’s running indicator
lights up green in the simulation, and the signal level for binary input I 1.3 of the control
system is set.
9. To open the delivery path, the valve for product tank T3.B001 must be opened as well. This
valve will be operated using a suitable control module function in the subsequent exercise.
When the pump is switched on and the valve is open, it is possible to monitor how the
content of reactor T2.R001 is pumped into product tank T3.B001 in the simulation.
10. The simulation controls can be used to empty the product tanks and fill the educt tanks.
When the simulation control is used for the filling, the simulation first has to be disconnected
from the control system. To do so, click the button with the horizontal line ( ) once. The
valve can then be opened with the button to the right of it. The actuating signal lights up
green. After approximately one second, the signal of the end-position switch for the open
position follows. After an additional 5 to 10 seconds, the first level changes are visible.
11. With 'RESET' and 'RESET 50%', the simulation can be returned to a defined state.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 58
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
10 Exercises
In the exercises, you apply what you learned in the theory section and in the step-by-step
instructions. The existing multiproject from the step-by-step instructions (p01-04-project-r1905-
en.zip) is to be used and expanded for this. The download of the project is stored as zip file
"Projects" on the SCE Internet for the respective module.
The objective of this exercise is to create a CFC that can be used for controlling the valves of the
plant. The exercise is based on the knowledge acquired through the step-by-step instructions
where a similar CFC for controlling the motor was created.
In addition, a CFC is created for scaling the level, i.e. an analog input value, from the digitalized
value to the physical value. This task adds to your knowledge because the CFC is created
without a template but still uses blocks from the library. This CFC will be needed for the
Functional Safety chapter.
10.1 Tasks
The following tasks are geared to the step-by-step instructions. The corresponding steps of the
instructions can be used to assist with each task.
1. Insert the 'ValveLean' template in the process tag types (similar to 'Motor_Lean'). This
template is used to implement the valves.
2. An object instance of the valve template is now to be inserted in the chart folder
'product_tank B001' of unit T3_product_tanks and renamed to A1T3X001. Open the CFC
and also adapt the name of the 'VlvL' block. Now, close the feedback and control signals
(see Figure 7 and Table 5).
3. Download and test your implementation with the SIMIT model. The following I/Os should be
visible for this: 'ModLiOp', 'AutModOp', 'ManModOp', 'OpenAut', 'CloseAut', 'MonDynErr' and
'RstOp'.
4. To integrate the analog level sensor A1T2L001 (see Figure 7), create a new CFC in chart
folder 'reactor R001'. Name this CFC A1T2L001 and open it. Drag the block 'Pcs7AnIn'
(FB1869) from the catalog to the CFC. To do this, select the Libraries tab in the left frame
and then use either the search function at the very bottom or open
PCS 7 AP Library V90/Blocks+Templates\Blocks/Channel. As soon as the block has been
inserted, rename it Level_A1T2L001.
5. Now assign parameters to the block 'Pcs7AnIn' by setting the input value 'Scale' to
High = 0.0 and Low = 1158.0, and input value 'PV_InUni' to 1040 (for the unit ml). Connect
the 'PV_In' input of the 'Pcs7AnIn' block to the symbol for the actual level value (see Table 5)
of Reactor R001.
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 59
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
6. Now implement the high and low level sensor of product tank B001. For this, create a CFC in
the chart folder 'product_tank B001' and name it A1T3L001. Open the chart and add the
'Pcs7DiIn' block from the catalog twice (similar to exercise 5). Name one block
A1T3L001_LSA+ and the other A1T3L001_LSA-. Interconnect 'PV_In' with the sensor
signals in each case (see Table 4).
7. Next, create CFCs for the main switch, the EMERGENCY OFF switch and the switch for
local operation. For this, one CFC each is created for A1H001, A1H002 and A1H003 like in
task 6 in the chart folder 'Multipurpose plant' (see also Figure 6). The 'Pcs7DiIn' block is
added, named, and interconnected with the respective address to 'PV_In'.
Data
Symbol Address Comment
type
T
A1.T3.A1T3X001.GO+-.O- I 67.5 BOOL Open/close valve product tank
a
s B001 feedback closed
k
5 A1.T2.A1T2L001.LISA+.M IW 72 WORD Actual level reactor R001
Table 5: Symbols for implementing the valve control and level sensor
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 60
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 61
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 62
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
11 Additional information
More information for further practice and consolidation is available as orientation, for example:
Getting Started, videos, tutorials, apps, manuals, programming guidelines and trial software/
firmware, under the following link:
siemens.com/sce/pcs7
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 63
p01-04-individual-drive-functions-v9-tud-0719-en.docx
Learn-/Training Document | PA Module P01-04, Edition 02/2020 | Digital Industries, FA
Further Information
Siemens Automation Cooperates with Education
siemens.com/sce
Siemens SIMATIC PCS 7
siemens.com/pcs7
SCE Learn-/Training Documents
siemens.com/sce/documents
SCE Trainer Packages
siemens.com/sce/tp
SCE Contact Partners
siemens.com/sce/contact
Digital Enterprise
siemens.com/digital-enterprise
Industrie 4.0
siemens.com/future-of-manufacturing
Totally Integrated Automation (TIA)
siemens.com/tia
TIA Portal
siemens.com/tia-portal
SIMATIC Controller
siemens.com/controller
SIMATIC Technical Documentation
siemens.com/simatic-docu
Industry Online Support
support.industry.siemens.com
Product catalogue and online ordering system Industry Mall
mall.industry.siemens.com
Siemens
Digital Industries, FA
P.O. Box 4848
90026 Nuremberg
Germany
siemens.com/sce
For Frei verwendbar use in educational / R&D institutions. © Siemens 2020. All rights reserved. 64
p01-04-individual-drive-functions-v9-tud-0719-en.docx